Class: Zazu::Resources::Customers
- Defined in:
- lib/zazu/resources/customers.rb
Overview
Customers — individuals or businesses the entity invoices.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(**attributes) ⇒ Object
POST /api/customers.
-
#delete(id) ⇒ Object
DELETE /api/customers/:id.
-
#get(id) ⇒ Object
GET /api/customers/:id.
-
#list(q: nil, limit: MAX_PER_PAGE, cursor: nil) ⇒ Object
GET /api/customers.
-
#update(id, **attributes) ⇒ Object
PATCH /api/customers/:id.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Zazu::Resources::Base
Instance Method Details
#create(**attributes) ⇒ Object
POST /api/customers
25 26 27 |
# File 'lib/zazu/resources/customers.rb', line 25 def create(**attributes) http_post("api/customers", body: attributes) end |
#delete(id) ⇒ Object
DELETE /api/customers/:id
35 36 37 |
# File 'lib/zazu/resources/customers.rb', line 35 def delete(id) http_delete(encode_path("api/customers", id)) end |
#get(id) ⇒ Object
GET /api/customers/:id
15 16 17 |
# File 'lib/zazu/resources/customers.rb', line 15 def get(id) http_get(encode_path("api/customers", id)) end |
#list(q: nil, limit: MAX_PER_PAGE, cursor: nil) ⇒ Object
GET /api/customers
10 11 12 |
# File 'lib/zazu/resources/customers.rb', line 10 def list(q: nil, limit: MAX_PER_PAGE, cursor: nil) list_page("api/customers", q: q, limit: limit, cursor: cursor) end |
#update(id, **attributes) ⇒ Object
PATCH /api/customers/:id
30 31 32 |
# File 'lib/zazu/resources/customers.rb', line 30 def update(id, **attributes) http_patch(encode_path("api/customers", id), body: attributes) end |