Class: Creem::Resources::Customers
- Inherits:
-
Base
- Object
- Base
- Creem::Resources::Customers
show all
- Defined in:
- lib/creem/resources/customers.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#billing_portal(customer_id) ⇒ Object
19
20
21
|
# File 'lib/creem/resources/customers.rb', line 19
def billing_portal(customer_id)
post("/customers/billing-portal", { customer_id: customer_id })
end
|
#list(page_number: 1, page_size: 50) ⇒ Object
8
9
10
|
# File 'lib/creem/resources/customers.rb', line 8
def list(page_number: 1, page_size: 50)
get("/customers/list", page_number: page_number, page_size: page_size)
end
|
#retrieve(customer_id: nil, email: nil) ⇒ Object
12
13
14
15
16
17
|
# File 'lib/creem/resources/customers.rb', line 12
def retrieve(customer_id: nil, email: nil)
params = {}
params[:customer_id] = customer_id if customer_id
params[:email] = email if email
get("/customers", params)
end
|