Class: Peddler::API::ProductPricingV0
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::API::ProductPricingV0
- Defined in:
- lib/peddler/api/product_pricing_v0.rb
Overview
Selling Partner API for Pricing
The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
Instance Attribute Summary
Attributes inherited from Peddler::API
Instance Method Summary collapse
-
#get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, customer_type: nil, rate_limit: 0.5) ⇒ Hash
Returns competitive pricing information for a seller’s offer listings based on seller SKU or ASIN.
-
#get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, rate_limit: 0.5) ⇒ Hash
Returns the lowest priced offers for a single item based on ASIN.
-
#get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) ⇒ Hash
Returns the lowest priced offers for a batch of items based on ASIN.
-
#get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type: nil, rate_limit: 1.0) ⇒ Hash
Returns the lowest priced offers for a single SKU listing.
-
#get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5) ⇒ Hash
Returns the lowest priced offers for a batch of listings by SKU.
-
#get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil, rate_limit: 0.5) ⇒ Hash
Returns pricing information for a seller’s offer listings based on seller SKU or ASIN.
Methods inherited from Peddler::API
#cannot_sandbox!, #endpoint_uri, #http, #initialize, #meter, #must_sandbox!, #retriable, #sandbox, #sandbox?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, customer_type: nil, rate_limit: 0.5) ⇒ Hash
This operation can make a static sandbox call.
Returns competitive pricing information for a seller’s offer listings based on seller SKU or ASIN. Note: The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](developer-docs.amazon.com/sp-api/docs/url-encoding).
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 75 def get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, customer_type: nil, rate_limit: 0.5) path = "/products/pricing/v0/competitivePrice" params = { "MarketplaceId" => marketplace_id, "Asins" => asins, "Skus" => skus, "ItemType" => item_type, "CustomerType" => customer_type, }.compact meter(rate_limit).get(path, params:) end |
#get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, rate_limit: 0.5) ⇒ Hash
This operation can make a static sandbox call.
Returns the lowest priced offers for a single item based on ASIN.
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 124 def get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, rate_limit: 0.5) path = "/products/pricing/v0/items/#{asin}/offers" params = { "MarketplaceId" => marketplace_id, "ItemCondition" => item_condition, "CustomerType" => customer_type, }.compact meter(rate_limit).get(path, params:) end |
#get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) ⇒ Hash
This operation can make a static sandbox call.
Returns the lowest priced offers for a batch of items based on ASIN.
141 142 143 144 145 146 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 141 def get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) path = "/batches/products/pricing/v0/itemOffers" body = get_item_offers_batch_request_body meter(rate_limit).post(path, body:) end |
#get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type: nil, rate_limit: 1.0) ⇒ Hash
This operation can make a static sandbox call.
Returns the lowest priced offers for a single SKU listing. Note: The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](developer-docs.amazon.com/sp-api/docs/url-encoding).
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 102 def get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type: nil, rate_limit: 1.0) path = "/products/pricing/v0/listings/#{seller_sku}/offers" params = { "MarketplaceId" => marketplace_id, "ItemCondition" => item_condition, "CustomerType" => customer_type, }.compact meter(rate_limit).get(path, params:) end |
#get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5) ⇒ Hash
This operation can make a static sandbox call.
Returns the lowest priced offers for a batch of listings by SKU.
154 155 156 157 158 159 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 154 def get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5) path = "/batches/products/pricing/v0/listingOffers" body = get_listing_offers_batch_request_body meter(rate_limit).post(path, body:) end |
#get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil, rate_limit: 0.5) ⇒ Hash
This operation can make a static sandbox call.
Returns pricing information for a seller’s offer listings based on seller SKU or ASIN. Note: The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](developer-docs.amazon.com/sp-api/docs/url-encoding).
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/peddler/api/product_pricing_v0.rb', line 40 def get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil, rate_limit: 0.5) path = "/products/pricing/v0/price" params = { "MarketplaceId" => marketplace_id, "Asins" => asins, "Skus" => skus, "ItemType" => item_type, "ItemCondition" => item_condition, "OfferType" => offer_type, }.compact meter(rate_limit).get(path, params:) end |