Class: Easybill::Api::Contacts

Inherits:
Base
  • Object
show all
Defined in:
lib/easybill/api/contacts.rb

Constant Summary

Constants inherited from Base

Base::HEADERS

Class Method Summary collapse

Methods inherited from Base

authenticate

Methods included from ResponseHandler

included

Class Method Details

.create(customer_id, data) ⇒ Object



15
16
17
# File 'lib/easybill/api/contacts.rb', line 15

def create(customer_id, data)
  custom method: :post, path: resource_path(customer_id), data:
end

.destroy(customer_id, id) ⇒ Object



23
24
25
# File 'lib/easybill/api/contacts.rb', line 23

def destroy(customer_id, id)
  custom method: :delete, path: "#{resource_path(customer_id)}/#{id}"
end

.find(customer_id, id, query: {}) ⇒ Object



11
12
13
# File 'lib/easybill/api/contacts.rb', line 11

def find(customer_id, id, query: {})
  custom method: :get, path: "#{resource_path(customer_id)}/#{id}", query:
end

.list(customer_id, query: {}) ⇒ Object



7
8
9
# File 'lib/easybill/api/contacts.rb', line 7

def list(customer_id, query: {})
  custom method: :get, path: resource_path(customer_id), query:
end

.update(customer_id, id, data) ⇒ Object



19
20
21
# File 'lib/easybill/api/contacts.rb', line 19

def update(customer_id, id, data)
  custom method: :put, path: "#{resource_path(customer_id)}/#{id}", data:
end