Class: MWS::Webstore::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Webstore::Client
- Defined in:
- lib/mws/webstore/client.rb
Overview
With the Webstore API section of Amazon MWS, you can get “Email Me When Available” subscription information for items listed on your Amazon Webstore. The Webstore API section can help you plan your inventory replenishment cycle by enabling you to query for items that your customers subscribed to when they clicked the Email Me When Available button on your Webstore. The Webstore API section can also return information about the notifications that were sent to your customers when out-of-stock items came back in stock. This information, when combined with sales information that your Webstore tracks, can help you determine how many notifications were converted into sales.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #marketplace_id, #merchant_id, #path
Instance Method Summary collapse
-
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API.
-
#get_subscription_details(seller_sku, subscription_state, date_range_start, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the number of subscriptions that were created or notifications that were sent for an item within a date range.
-
#list_subscriptions_count(subscription_state, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists subscription counts of subscriptions in a specified state, including the items that are subscribed to.
-
#list_subscriptions_count_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of subscription counts.
Methods inherited from Peddler::Client
#aws_endpoint, #defaults, #headers, inherited, #initialize, #marketplace, #on_error, #operation, parser, parser=, path, #run
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
82 83 84 85 |
# File 'lib/mws/webstore/client.rb', line 82 def get_service_status operation('GetServiceStatus') run end |
#get_subscription_details(seller_sku, subscription_state, date_range_start, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the number of subscriptions that were created or notifications that were sent for an item within a date range
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mws/webstore/client.rb', line 66 def get_subscription_details(seller_sku, subscription_state, date_range_start, opts = {}) opts[:marketplace_id] ||= marketplace_id operation('GetSubscriptionDetails') .add(opts.update( 'SellerSKU' => seller_sku, 'SubscriptionState' => subscription_state, 'DateRangeStart' => date_range_start )) run end |
#list_subscriptions_count(subscription_state, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists subscription counts of subscriptions in a specified state, including the items that are subscribed to
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/mws/webstore/client.rb', line 30 def list_subscriptions_count(subscription_state, opts = {}) opts[:marketplace_id] ||= marketplace_id if opts.key?(:seller_sku_list) opts['SellerSKUList'] = opts.delete(:seller_sku_list) end operation('ListSubscriptionsCount') .add(opts.update('SubscriptionState' => subscription_state)) .structure!('SellerSKUList', 'SellerSKU') run end |
#list_subscriptions_count_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of subscription counts
47 48 49 50 51 52 |
# File 'lib/mws/webstore/client.rb', line 47 def list_subscriptions_count_by_next_token(next_token) operation('ListSubscriptionsCountByNextToken') .add('NextToken' => next_token) run end |