lib/mws/recommendations/client.rb in peddler-1.6.7 vs lib/mws/recommendations/client.rb in peddler-2.0.0
- old
+ new
@@ -7,55 +7,51 @@
# 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.
class Client < ::Peddler::Client
- version '2013-04-01'
- path "/Recommendations/#{version}"
+ self.version = '2013-04-01'
+ self.path = "/Recommendations/#{version}"
# 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
#
- # @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_GetLastUpdatedTimeForRecommendations.html
+ # @see https://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_GetLastUpdatedTimeForRecommendations.html
# @param [String] marketplace_id
# @return [Peddler::XMLParser]
- def get_last_updated_time_for_recommendations(marketplace_id =
- primary_marketplace_id)
+ def get_last_updated_time_for_recommendations(marketplace_id)
operation('GetLastUpdatedTimeForRecommendations')
.add('MarketplaceId' => marketplace_id)
run
end
# Lists active recommendations for a specific category or for all
# categories for a specific marketplace
#
- # @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_ListRecommendations.html
- # @overload list_recommendations(opts = { marketplace_id:
- # primary_marketplace_id })
- # @param [Hash] opts
- # @option opts [String] :marketplace_id
- # @option opts [String] :recommendation_category
- # @option opts [Array<Struct, Hash>] :category_query_list
+ # @see https://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_ListRecommendations.html
+ # @param [String] marketplace_id
+ # @param [Hash] opts
+ # @option opts [String] :recommendation_category
+ # @option opts [Array<Struct, Hash>] :category_query_list
# @return [Peddler::XMLParser]
- def list_recommendations(opts = {})
- opts[:marketplace_id] ||= primary_marketplace_id
-
+ def list_recommendations(marketplace_id, opts = {})
operation('ListRecommendations')
.add(opts)
+ .add('MarketplaceId' => marketplace_id)
.structure!(
'CategoryQueryList', 'CategoryQuery', '1', 'FilterOptions',
'FilterOption'
)
run
end
# Lists the next page of active recommendations
#
- # @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_ListRecommendationsByNextToken.html
+ # @see https://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_ListRecommendationsByNextToken.html
# @param [String] next_token
# @return [Peddler::XMLParser]
def list_recommendations_by_next_token(next_token)
operation('ListRecommendationsByNextToken')
.add('NextToken' => next_token)
@@ -63,10 +59,10 @@
run
end
# Gets the service status of the API
#
- # @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_GetServiceStatus.html
+ # @see https://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_GetServiceStatus.html
# @return [Peddler::XMLParser]
def get_service_status
operation('GetServiceStatus')
run
end