Class: MWS::Products::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Products::Client
- Defined in:
- lib/mws/products/client.rb
Overview
The MWS Products API helps you get information to match your products to existing product listings on Amazon Marketplace websites and to make sourcing and pricing decisions for listing those products on Amazon Marketplace websites.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#get_competitive_pricing_for_asin(*asins, opts = {) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, identified by its ASIN.
-
#get_competitive_pricing_for_sku(*seller_skus, opts = {) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, based on Seller SKU.
-
#get_lowest_offer_listings_for_asin(*asins, opts = {) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, identified by its ASIN.
-
#get_lowest_offer_listings_for_sku(*seller_skus, opts = {) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, based on Seller SKU.
-
#get_lowest_priced_offers_for_asin(asin, item_condition, opts = ) ⇒ Peddler::XMLParser
Gets lowest priced offers for a single product, based on ASIN.
-
#get_lowest_priced_offers_for_sku(seller_sku, item_condition) ⇒ Peddler::XMLParser
Gets lowest priced offers for a single product, based on SellerSKU.
-
#get_matching_product(*asins, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN values.
-
#get_matching_product_for_id(id_type, *ids, opts = {) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, and JAN values.
-
#get_my_fees_estimate(*fees_estimate_requests) ⇒ Peddler::XMLParser
Gets the estimated fees for a list of products.
-
#get_my_price_for_asin(*asins, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, identified by its ASIN.
-
#get_my_price_for_sku(*seller_skus, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, based on Seller SKU.
-
#get_product_categories_for_asin(asin, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on ASIN.
-
#get_product_categories_for_sku(sku, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on Seller`SKU.
-
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API.
-
#list_matching_products(query, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a search query.
- #operation_with_marketplace(action) ⇒ Object private
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_competitive_pricing_for_asin(*asins, opts = {) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, identified by its ASIN
100 101 102 103 104 105 106 107 108 |
# File 'lib/mws/products/client.rb', line 100 def get_competitive_pricing_for_asin(*asin_list) opts = (asin_list) operation_with_marketplace('GetCompetitivePricingForASIN') .add(opts.update('ASINList' => asin_list)) .structure!('ASINList', 'ASIN') run end |
#get_competitive_pricing_for_sku(*seller_skus, opts = {) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, based on Seller SKU
81 82 83 84 85 86 87 88 89 |
# File 'lib/mws/products/client.rb', line 81 def get_competitive_pricing_for_sku(*seller_sku_list) opts = (seller_sku_list) operation_with_marketplace('GetCompetitivePricingForSKU') .add(opts.update('SellerSKUList' => seller_sku_list)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_lowest_offer_listings_for_asin(*asins, opts = {) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, identified by its ASIN
144 145 146 147 148 149 150 151 152 |
# File 'lib/mws/products/client.rb', line 144 def get_lowest_offer_listings_for_asin(*asin_list) opts = (asin_list) operation_with_marketplace('GetLowestOfferListingsForASIN') .add(opts.update('ASINList' => asin_list)) .structure!('ASINList', 'ASIN') run end |
#get_lowest_offer_listings_for_sku(*seller_skus, opts = {) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, based on Seller SKU
122 123 124 125 126 127 128 129 130 |
# File 'lib/mws/products/client.rb', line 122 def get_lowest_offer_listings_for_sku(*seller_sku_list) opts = (seller_sku_list) operation_with_marketplace('GetLowestOfferListingsForSKU') .add(opts.update('SellerSKUList' => seller_sku_list)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_lowest_priced_offers_for_asin(asin, item_condition, opts = ) ⇒ Peddler::XMLParser
Gets lowest priced offers for a single product, based on ASIN
186 187 188 189 190 191 192 193 194 195 |
# File 'lib/mws/products/client.rb', line 186 def get_lowest_priced_offers_for_asin(asin, item_condition, opts = {}) opts.update( 'ASIN' => asin, 'ItemCondition' => item_condition ) operation_with_marketplace('GetLowestPricedOffersForASIN') .add(opts) run end |
#get_lowest_priced_offers_for_sku(seller_sku, item_condition) ⇒ Peddler::XMLParser
Gets lowest priced offers for a single product, based on SellerSKU
164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/mws/products/client.rb', line 164 def get_lowest_priced_offers_for_sku(seller_sku, item_condition, opts = {}) opts.update( 'SellerSKU' => seller_sku, 'ItemCondition' => item_condition ) operation_with_marketplace('GetLowestPricedOffersForSKU') .add(opts) run end |
#get_matching_product(*asins, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN values
62 63 64 65 66 67 68 69 70 |
# File 'lib/mws/products/client.rb', line 62 def get_matching_product(*asin_list) opts = (asin_list) operation_with_marketplace('GetMatchingProduct') .add(opts.update('ASINList' => asin_list)) .structure!('ASINList', 'ASIN') run end |
#get_matching_product_for_id(id_type, *ids, opts = {) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN, GCID,
SellerSKU, UPC, EAN, ISBN, and JAN values
43 44 45 46 47 48 49 50 51 |
# File 'lib/mws/products/client.rb', line 43 def get_matching_product_for_id(id_type, *id_list) opts = (id_list) operation_with_marketplace('GetMatchingProductForId') .add(opts.update('IdType' => id_type, 'IdList' => id_list)) .structure!('IdList', 'Id') run end |
#get_my_fees_estimate(*fees_estimate_requests) ⇒ Peddler::XMLParser
Gets the estimated fees for a list of products.
203 204 205 206 207 208 209 |
# File 'lib/mws/products/client.rb', line 203 def get_my_fees_estimate(*fees_estimate_requests) operation('GetMyFeesEstimate') .add('FeesEstimateRequestList' => fees_estimate_requests) .structure!('FeesEstimateRequestList', 'FeesEstimateRequest') run end |
#get_my_price_for_asin(*asins, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, identified by its ASIN
243 244 245 246 247 248 249 250 251 |
# File 'lib/mws/products/client.rb', line 243 def get_my_price_for_asin(*asin_list) opts = (asin_list) operation_with_marketplace('GetMyPriceForASIN') .add(opts.update('ASINList' => asin_list)) .structure!('ASINList', 'ASIN') run end |
#get_my_price_for_sku(*seller_skus, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, based on Seller SKU
222 223 224 225 226 227 228 229 230 |
# File 'lib/mws/products/client.rb', line 222 def get_my_price_for_sku(*seller_sku_list) opts = (seller_sku_list) operation_with_marketplace('GetMyPriceForSKU') .add(opts.update('SellerSKUList' => seller_sku_list)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_product_categories_for_asin(asin, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on ASIN
279 280 281 282 283 284 |
# File 'lib/mws/products/client.rb', line 279 def get_product_categories_for_asin(asin, opts = {}) operation_with_marketplace('GetProductCategoriesForASIN') .add(opts.update('ASIN' => asin)) run end |
#get_product_categories_for_sku(sku, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on Seller`SKU
263 264 265 266 267 268 |
# File 'lib/mws/products/client.rb', line 263 def get_product_categories_for_sku(seller_sku, opts = {}) operation_with_marketplace('GetProductCategoriesForSKU') .add(opts.update('SellerSKU' => seller_sku)) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
290 291 292 293 |
# File 'lib/mws/products/client.rb', line 290 def get_service_status operation('GetServiceStatus') run end |
#list_matching_products(query, opts = { marketplace_id:) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a search query
25 26 27 28 29 30 |
# File 'lib/mws/products/client.rb', line 25 def list_matching_products(query, opts = {}) operation_with_marketplace('ListMatchingProducts') .add(opts.update('Query' => query)) run end |
#operation_with_marketplace(action) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
296 297 298 299 300 |
# File 'lib/mws/products/client.rb', line 296 def operation_with_marketplace(action) operation(action).tap do |opts| opts.store('MarketplaceId', primary_marketplace_id) end end |