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



13
14
15
# 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) ⇒ Object



21
22
23
# 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: {}) ⇒ Object



9
10
11
# 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: {}) ⇒ Object



5
6
7
# 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) ⇒ Object



17
18
19
# 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