Class: MWS::Recommendations::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Recommendations::Client
- Defined in:
- lib/mws/recommendations/client.rb
Overview
The Recommendations API enables you to programmatically retrieve Amazon Selling Coach recommendations by recommendation category. A recommendation is an actionable, timely, and personalized opportunity to increase your sales and performance.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#get_last_updated_time_for_recommendations(marketplace_id = primary_marketplace_id) ⇒ Peddler::XMLParser
Checks whether there are active recommendations for each category for the given marketplace, and if there are, returns the time when recommendations were last updated for each category.
-
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API.
-
#list_recommendations(opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists active recommendations for a specific category or for all categories for a specific marketplace.
-
#list_recommendations_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of active recommendations.
Methods inherited from Peddler::Client
#aws_endpoint, #defaults, #error_handler, #headers, #initialize, #marketplace, #marketplace_id, #marketplace_id=, on_error, #on_error, #operation, path, #run, version
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#get_last_updated_time_for_recommendations(marketplace_id = primary_marketplace_id) ⇒ Peddler::XMLParser
Checks whether there are active recommendations for each category for the given marketplace, and if there are, returns the time when recommendations were last updated for each category
22 23 24 25 26 27 28 |
# File 'lib/mws/recommendations/client.rb', line 22 def get_last_updated_time_for_recommendations(marketplace_id = primary_marketplace_id) operation('GetLastUpdatedTimeForRecommendations') .add('MarketplaceId' => marketplace_id) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
70 71 72 73 |
# File 'lib/mws/recommendations/client.rb', line 70 def get_service_status operation('GetServiceStatus') run end |
#list_recommendations(opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists active recommendations for a specific category or for all categories for a specific marketplace
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/mws/recommendations/client.rb', line 41 def list_recommendations(opts = {}) opts[:marketplace_id] ||= primary_marketplace_id operation('ListRecommendations') .add(opts) .structure!( 'CategoryQueryList', 'CategoryQuery', '1', 'FilterOptions', 'FilterOption' ) run end |
#list_recommendations_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of active recommendations
59 60 61 62 63 64 |
# File 'lib/mws/recommendations/client.rb', line 59 def list_recommendations_by_next_token(next_token) operation('ListRecommendationsByNextToken') .add('NextToken' => next_token) run end |