Class: Inttegro::Resources::Customers
- Inherits:
-
Object
- Object
- Inttegro::Resources::Customers
- Defined in:
- lib/inttegro/resources/customers.rb
Instance Method Summary collapse
- #create(payload) ⇒ Object
-
#initialize(http) ⇒ Customers
constructor
A new instance of Customers.
- #lookup(customer_id:) ⇒ Object
- #page(payload = {}) ⇒ Object
- #update(payload) ⇒ Object
Constructor Details
#initialize(http) ⇒ Customers
Returns a new instance of Customers.
7 8 9 |
# File 'lib/inttegro/resources/customers.rb', line 7 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#create(payload) ⇒ Object
11 12 13 |
# File 'lib/inttegro/resources/customers.rb', line 11 def create(payload) @http.post_resource("/customers/create", Inttegro::Customer, :customer, payload) end |
#lookup(customer_id:) ⇒ Object
19 20 21 |
# File 'lib/inttegro/resources/customers.rb', line 19 def lookup(customer_id:) @http.post_resource("/customers/lookup", Inttegro::Customer, :customer, { customer_id: customer_id }) end |
#page(payload = {}) ⇒ Object
23 24 25 |
# File 'lib/inttegro/resources/customers.rb', line 23 def page(payload = {}) @http.post_resource("/customers/page", Inttegro::CustomerPage, :page, payload || {}) end |