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.
- #operation ⇒ Object private
Methods inherited from Peddler::Client
#aws_endpoint, #headers, inherited, #initialize, path, #run
Constructor Details
This class inherits a constructor from Peddler::Client
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
91 92 93 94 95 96 97 98 99 |
# File 'lib/mws/products.rb', line 91 def get_competitive_pricing_for_asin(*asins) opts = (asins) 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
73 74 75 76 77 78 79 80 81 |
# File 'lib/mws/products.rb', line 73 def get_competitive_pricing_for_sku(*skus) opts = (skus) 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
133 134 135 136 137 138 139 140 141 |
# File 'lib/mws/products.rb', line 133 def get_lowest_offer_listings_for_asin(*asins) opts = (asins) 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
112 113 114 115 116 117 118 119 120 |
# File 'lib/mws/products.rb', line 112 def get_lowest_offer_listings_for_sku(*skus) opts = (skus) 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
55 56 57 58 59 60 61 62 63 |
# File 'lib/mws/products.rb', line 55 def get_matching_product(*asins) opts = (asins) 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
37 38 39 40 41 42 43 44 45 |
# File 'lib/mws/products.rb', line 37 def get_matching_product_for_id(id_type, *id_list) opts = (id_list) 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
173 174 175 176 177 178 179 180 181 |
# File 'lib/mws/products.rb', line 173 def get_my_price_for_asin(*asins) opts = (asins) 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
153 154 155 156 157 158 159 160 161 |
# File 'lib/mws/products.rb', line 153 def get_my_price_for_sku(*skus) opts = (skus) 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
207 208 209 210 211 212 |
# File 'lib/mws/products.rb', line 207 def get_product_categories_for_asin(asin, opts = {}) 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
192 193 194 195 196 197 |
# File 'lib/mws/products.rb', line 192 def get_product_categories_for_sku(sku, opts = {}) operation('GetProductCategoriesForSKU') .add(opts.merge('SellerSKU' => sku)) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
218 219 220 221 |
# File 'lib/mws/products.rb', line 218 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 |
# File 'lib/mws/products.rb', line 20 def list_matching_products(query, opts = {}) operation('ListMatchingProducts') .add(opts.merge('Query' => query)) run end |
#operation ⇒ 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.
224 225 226 227 228 229 230 |
# File 'lib/mws/products.rb', line 224 def operation(*) super.tap do |opts| unless opts.has_key?('MarketplaceId') opts.store('MarketplaceId', marketplace_id) end end end |