class Easybill::Api::Contacts

Public Class Methods

create(customer_id, data) click to toggle source
# File lib/easybill/api/contacts.rb, line 13
def create(customer_id, data)
  custom method: :post, path: resource_path(customer_id), data: data
end
destroy(customer_id, id) click to toggle source
# File lib/easybill/api/contacts.rb, line 21
def destroy(customer_id, id)
  custom method: :delete, path: "#{resource_path(customer_id)}/#{id}"
end
find(customer_id, id, query: {}) click to toggle source
# File lib/easybill/api/contacts.rb, line 9
def find(customer_id, id, query: {})
  custom method: :get, path: "#{resource_path(customer_id)}/#{id}", query: query
end
list(customer_id, query: {}) click to toggle source
# File lib/easybill/api/contacts.rb, line 5
def list(customer_id, query: {})
  custom method: :get, path: resource_path(customer_id), query: query
end
update(customer_id, id, data) click to toggle source
# File lib/easybill/api/contacts.rb, line 17
def update(customer_id, id, data)
  custom method: :put, path: "#{resource_path(customer_id)}/#{id}", data: data
end

Private Class Methods

resource_path(customer_id) click to toggle source
# File lib/easybill/api/contacts.rb, line 27
def resource_path(customer_id)
  "#{base_path}/customers/#{customer_id}/contacts"
end