Class: MWS::CartInformation

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

Overview

Note:

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

Note:

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

With the Cart Information API, you can retrieve shopping carts that your Amazon Webstore customers have created. The Cart Information API enables you to programmatically integrate Amazon Webstore cart information with your CRM systems, marketing applications, and other systems that require cart 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_carts(marketplace_id, *cart_id_list) ⇒ Peddler::XMLParser

Returns shopping carts based on specified values

Parameters:

  • marketplace_id (String)
  • cart_id_list (Array<String>)

Returns:

See Also:



52
53
54
55
56
57
58
# File 'lib/mws/cart_information.rb', line 52

def get_carts(marketplace_id, *cart_id_list)
  operation('GetCarts')
    .add('MarketplaceId' => marketplace_id, 'CartIdList' => cart_id_list)
    .structure!('CartIdList', 'CartId')

  run
end

#get_service_statusPeddler::XMLParser

Gets the service status of the API



64
65
66
67
# File 'lib/mws/cart_information.rb', line 64

def get_service_status
  operation('GetServiceStatus')
  run
end

#list_carts(date_range_start, opts = {}) ⇒ Peddler::XMLParser

Lists shopping carts

Parameters:

  • date_range_start (String, #iso8601)
  • opts (Hash) (defaults to: {})

Options Hash (opts):

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

Returns:

See Also:



27
28
29
30
31
32
# File 'lib/mws/cart_information.rb', line 27

def list_carts(date_range_start, opts = {})
  operation('ListCarts')
    .add(opts.merge('DateRangeStart' => date_range_start))

  run
end

#list_carts_by_next_token(next_token) ⇒ Peddler::XMLParser

Lists the next page of shopping carts



39
40
41
42
43
44
# File 'lib/mws/cart_information.rb', line 39

def list_carts_by_next_token(next_token)
  operation('ListCartsByNextToken')
    .add('NextToken' => next_token)

  run
end