Class: MWS::Products
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Products
- Defined in:
- lib/mws/products.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.
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
-
#get_competitive_pricing_for_asin(*asins, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, identified by its ASIN.
-
#get_competitive_pricing_for_sku(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, based on Seller SKU.
-
#get_lowest_offer_listings_for_asin(*asins, opts = { marketplace_id: marketplace_id }) ⇒ 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(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, based on Seller SKU.
-
#get_matching_product(*asins, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN values.
-
#get_matching_product_for_id(id_type, *id_list, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, and JAN values.
-
#get_my_price_for_asin(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, identified by its ASIN.
-
#get_my_price_for_sku(*skus, opts = { marketplace_id: 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: 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: 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: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a search query.
Methods inherited from Peddler::Client
#aws_endpoint, #headers, inherited, #operation, path, #run
Instance Method Details
#get_competitive_pricing_for_asin(*asins, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, identified by its ASIN
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/mws/products.rb', line 96 def get_competitive_pricing_for_asin(*asins) opts = (asins) opts[:marketplace_id] ||= marketplace_id operation('GetCompetitivePricingForASIN') .add(opts.merge('ASINList' => asins)) .structure!('ASINList', 'ASIN') run end |
#get_competitive_pricing_for_sku(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets the current competitive price of a product, based on Seller SKU
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mws/products.rb', line 77 def get_competitive_pricing_for_sku(*skus) opts = (skus) opts[:marketplace_id] ||= marketplace_id operation('GetCompetitivePricingForSKU') .add(opts.merge('SellerSKUList' => skus)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_lowest_offer_listings_for_asin(*asins, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, identified by its ASIN
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/mws/products.rb', line 140 def get_lowest_offer_listings_for_asin(*asins) opts = (asins) opts[:marketplace_id] ||= marketplace_id operation('GetLowestOfferListingsForASIN') .add(opts.merge('ASINList' => asins)) .structure!('ASINList', 'ASIN') run end |
#get_lowest_offer_listings_for_sku(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for the lowest-price active offer listings for a product, based on Seller SKU
118 119 120 121 122 123 124 125 126 127 |
# File 'lib/mws/products.rb', line 118 def get_lowest_offer_listings_for_sku(*skus) opts = (skus) opts[:marketplace_id] ||= marketplace_id operation('GetLowestOfferListingsForSKU') .add(opts.merge('SellerSKUList' => skus)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_matching_product(*asins, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN values
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/mws/products.rb', line 58 def get_matching_product(*asins) opts = (asins) opts[:marketplace_id] ||= marketplace_id operation('GetMatchingProduct') .add(opts.merge('ASINList' => asins)) .structure!('ASINList', 'ASIN') run end |
#get_matching_product_for_id(id_type, *id_list, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a list of ASIN, GCID,
SellerSKU, UPC, EAN, ISBN, and JAN values
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/mws/products.rb', line 39 def get_matching_product_for_id(id_type, *id_list) opts = (id_list) opts[:marketplace_id] ||= marketplace_id operation('GetMatchingProductForId') .add(opts.merge('IdType' => id_type, 'IdList' => id_list)) .structure!('IdList', 'Id') run end |
#get_my_price_for_asin(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, identified by its ASIN
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/mws/products.rb', line 182 def get_my_price_for_asin(*asins) opts = (asins) opts[:marketplace_id] ||= marketplace_id operation('GetMyPriceForASIN') .add(opts.merge('ASINList' => asins)) .structure!('ASINList', 'ASIN') run end |
#get_my_price_for_sku(*skus, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets pricing information for seller’s own offer listings, based on Seller SKU
161 162 163 164 165 166 167 168 169 170 |
# File 'lib/mws/products.rb', line 161 def get_my_price_for_sku(*skus) opts = (skus) opts[:marketplace_id] ||= marketplace_id operation('GetMyPriceForSKU') .add(opts.merge('SellerSKUList' => skus)) .structure!('SellerSKUList', 'SellerSKU') run end |
#get_product_categories_for_asin(asin, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on ASIN
219 220 221 222 223 224 225 226 |
# File 'lib/mws/products.rb', line 219 def get_product_categories_for_asin(asin, opts = {}) opts[:marketplace_id] ||= marketplace_id operation('GetProductCategoriesForASIN') .add(opts.merge('ASIN' => asin)) run end |
#get_product_categories_for_sku(sku, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Gets parent product categories that a product belongs to, based on Seller`SKU
202 203 204 205 206 207 208 209 |
# File 'lib/mws/products.rb', line 202 def get_product_categories_for_sku(sku, opts = {}) opts[:marketplace_id] ||= marketplace_id operation('GetProductCategoriesForSKU') .add(opts.merge('SellerSKU' => sku)) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
232 233 234 235 |
# File 'lib/mws/products.rb', line 232 def get_service_status operation('GetServiceStatus') run end |
#list_matching_products(query, opts = { marketplace_id: marketplace_id }) ⇒ Peddler::XMLParser
Lists products and their attributes, based on a search query
20 21 22 23 24 25 26 27 |
# File 'lib/mws/products.rb', line 20 def list_matching_products(query, opts = {}) opts[:marketplace_id] ||= marketplace_id operation('ListMatchingProducts') .add(opts.merge('Query' => query)) run end |