Class: Chartmogul::V1::Import::Customers
- Defined in:
- lib/chartmogul/v1/import/customers.rb
Constant Summary collapse
- BASE_URI =
"#{BASE_URI}/import/customers"
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(options = {}) ⇒ Object
Public: Import a Customer.
-
#invoices ⇒ Object
Public: Get invoices API.
-
#list ⇒ Object
Public: Get list Customers.
Instance Method Details
#create(options = {}) ⇒ Object
Public: Import a Customer.
See: dev.chartmogul.com/docs/import-customer
options - The Hash options used to create a Customer (default: {}):
:data_source_uuid - The String ChartMogul UUID of the data
source that this customer comes from.
:external_id - The String unique identifier specified by you for the customer.
Typically an identifier from your internal system.
Accepts alphanumeric characters.
:name - The String name of the customer for display purposes.
Accepts alphanumeric characters.
:email - The String Email address of the customer (optional).
:company - The String customer's company or organisation (optional).
:country - The String Country code of customer's location
as per ISO-3166 alpha-2 standard (optional).
:state - The String State code of customer's location
as per ISO-3166 alpha-2 standard (optional).
:city - The String city of the customer's location (optional).
:zip - The String zip code of the customer's location (optional).
Returns the instance of Chartmogul::V1::Request.
37 38 39 |
# File 'lib/chartmogul/v1/import/customers.rb', line 37 def create( = {}) Chartmogul::V1::Request.new BASE_URI, .merge(method: :post, userpwd: client.userpwd) end |
#invoices ⇒ Object
Public: Get invoices API.
Returns the instance of Chartmogul::V1::Import::Invoices.
11 12 13 |
# File 'lib/chartmogul/v1/import/customers.rb', line 11 def invoices Chartmogul::V1::Import::Invoices.new(client) end |
#list ⇒ Object
Public: Get list Customers.
See: dev.chartmogul.com/docs/list-all-imported-customers
Returns the instance of Chartmogul::V1::Request.
46 47 48 |
# File 'lib/chartmogul/v1/import/customers.rb', line 46 def list Chartmogul::V1::Request.new BASE_URI, userpwd: client.userpwd end |