Class: MWS::CustomerInformation

Inherits:
Peddler::Client show all
Defined in:
lib/mws/customer_information.rb

Overview

Note:

The Customer Information API section only returns customer information for Webstores with Seller-Branded Checkout. No customer information is returned for Webstores with Amazon.com checkout. If your Webstore offers both checkout options, customer information is returned only for Seller-Branded Checkout accounts.

Note:

In addition to registering for Amazon MWS, you must request authorization to use the Customer Information API.

With the Customer Information API, you can retrieve information from the customer accounts of your Amazon Webstore customers. This customer information includes customer name, contact information, customer account type, and associated Amazon Webstore marketplaces. The Customer Information API enables you to programmatically integrate Amazon Webstore customer account information with your CRM systems, marketing applications, and other systems that require customer data.

Constant Summary

Constants inherited from Peddler::Client

Peddler::Client::BadMarketplaceId, Peddler::Client::HOSTS

Instance Attribute Summary

Attributes inherited from Peddler::Client

#body, #marketplace_id, #merchant_id

Instance Method Summary collapse

Methods inherited from Peddler::Client

#aws_endpoint, #headers, inherited, #operation, path, #run

Instance Method Details

#get_customers_for_customer_id(*customer_id_list, opts = {}) ⇒ Peddler::XMLParser

Returns customer accounts based on the CustomerId values that you specify

Parameters:

  • customer_id_list (Array<String>)
  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :marketplace_id (String)

Returns:

See Also:



58
59
60
61
62
63
64
65
# File 'lib/mws/customer_information.rb', line 58

def get_customers_for_customer_id(*customer_id_list)
  opts = extract_options(id_list)
  operation('GetCustomersForCustomerId')
    .add(opts.merge('CustomerIdList' => customer_id_list))
    .structure!('CustomerIdList', 'CustomerId')

  run
end

#get_service_statusPeddler::XMLParser

Gets the service status of the API



71
72
73
74
# File 'lib/mws/customer_information.rb', line 71

def get_service_status
  operation('GetServiceStatus')
  run
end

#list_customers(opts = {}) ⇒ Peddler::XMLParser

Lists customer accounts based on search criteria that you specify

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :marketplace_id (String)
  • :date_range_start (String, #iso8601)
  • :date_range_end (String, #iso8601)
  • :date_range_type (String)

Returns:

See Also:



31
32
33
34
35
36
# File 'lib/mws/customer_information.rb', line 31

def list_customers(opts = {})
  operation('ListCarts')
    .add(opts)

  run
end

#list_customers_by_next_token(next_token) ⇒ Peddler::XMLParser

Lists the next page of customer accounts



43
44
45
46
47
48
# File 'lib/mws/customer_information.rb', line 43

def list_customers_by_next_token(next_token)
  operation('ListCustomersByNextToken')
    .add('NextToken' => next_token)

  run
end