Class: Peddler::APIs::ProductPricingV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/product_pricing_v0.rb,
lib/peddler/apis/product_pricing_v0/error.rb,
lib/peddler/apis/product_pricing_v0/price.rb,
lib/peddler/apis/product_pricing_v0/errors.rb,
lib/peddler/apis/product_pricing_v0/points.rb,
lib/peddler/apis/product_pricing_v0/product.rb,
lib/peddler/apis/product_pricing_v0/summary.rb,
lib/peddler/apis/product_pricing_v0/error_list.rb,
lib/peddler/apis/product_pricing_v0/offer_type.rb,
lib/peddler/apis/product_pricing_v0/price_list.rb,
lib/peddler/apis/product_pricing_v0/price_type.rb,
lib/peddler/apis/product_pricing_v0/offers_list.rb,
lib/peddler/apis/product_pricing_v0/offer_detail.rb,
lib/peddler/apis/product_pricing_v0/batch_request.rb,
lib/peddler/apis/product_pricing_v0/lowest_prices.rb,
lib/peddler/apis/product_pricing_v0/buy_box_prices.rb,
lib/peddler/apis/product_pricing_v0/asin_identifier.rb,
lib/peddler/apis/product_pricing_v0/identifier_type.rb,
lib/peddler/apis/product_pricing_v0/item_identifier.rb,
lib/peddler/apis/product_pricing_v0/sales_rank_list.rb,
lib/peddler/apis/product_pricing_v0/sales_rank_type.rb,
lib/peddler/apis/product_pricing_v0/ships_from_type.rb,
lib/peddler/apis/product_pricing_v0/number_of_offers.rb,
lib/peddler/apis/product_pricing_v0/offer_count_type.rb,
lib/peddler/apis/product_pricing_v0/get_offers_result.rb,
lib/peddler/apis/product_pricing_v0/lowest_price_type.rb,
lib/peddler/apis/product_pricing_v0/offer_detail_list.rb,
lib/peddler/apis/product_pricing_v0/relationship_list.rb,
lib/peddler/apis/product_pricing_v0/attribute_set_list.rb,
lib/peddler/apis/product_pricing_v0/buy_box_price_type.rb,
lib/peddler/apis/product_pricing_v0/get_offers_response.rb,
lib/peddler/apis/product_pricing_v0/item_offers_request.rb,
lib/peddler/apis/product_pricing_v0/get_pricing_response.rb,
lib/peddler/apis/product_pricing_v0/item_offers_response.rb,
lib/peddler/apis/product_pricing_v0/seller_feedback_type.rb,
lib/peddler/apis/product_pricing_v0/batch_offers_response.rb,
lib/peddler/apis/product_pricing_v0/http_response_headers.rb,
lib/peddler/apis/product_pricing_v0/seller_sku_identifier.rb,
lib/peddler/apis/product_pricing_v0/competitive_price_list.rb,
lib/peddler/apis/product_pricing_v0/competitive_price_type.rb,
lib/peddler/apis/product_pricing_v0/listing_offers_request.rb,
lib/peddler/apis/product_pricing_v0/prime_information_type.rb,
lib/peddler/apis/product_pricing_v0/buy_box_eligible_offers.rb,
lib/peddler/apis/product_pricing_v0/listing_offers_response.rb,
lib/peddler/apis/product_pricing_v0/competitive_pricing_type.rb,
lib/peddler/apis/product_pricing_v0/item_offers_request_list.rb,
lib/peddler/apis/product_pricing_v0/offer_listing_count_type.rb,
lib/peddler/apis/product_pricing_v0/item_offers_response_list.rb,
lib/peddler/apis/product_pricing_v0/item_offers_request_params.rb,
lib/peddler/apis/product_pricing_v0/batch_offers_request_params.rb,
lib/peddler/apis/product_pricing_v0/detailed_shipping_time_type.rb,
lib/peddler/apis/product_pricing_v0/get_offers_http_status_line.rb,
lib/peddler/apis/product_pricing_v0/listing_offers_request_list.rb,
lib/peddler/apis/product_pricing_v0/listing_offers_response_list.rb,
lib/peddler/apis/product_pricing_v0/quantity_discount_price_type.rb,
lib/peddler/apis/product_pricing_v0/get_item_offers_batch_request.rb,
lib/peddler/apis/product_pricing_v0/listing_offers_request_params.rb,
lib/peddler/apis/product_pricing_v0/number_of_offer_listings_list.rb,
lib/peddler/apis/product_pricing_v0/get_item_offers_batch_response.rb,
lib/peddler/apis/product_pricing_v0/get_listing_offers_batch_request.rb,
lib/peddler/apis/product_pricing_v0/get_listing_offers_batch_response.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.

Defined Under Namespace

Classes: AttributeSetList, BuyBoxEligibleOffers, BuyBoxPrices, CompetitivePriceList, ErrorList, ItemOffersRequestList, ItemOffersResponseList, ListingOffersRequestList, ListingOffersResponseList, LowestPrices, NumberOfOfferListingsList, NumberOfOffers, OfferDetailList, OffersList, PriceList, RelationshipList, SalesRankList

Constant Summary collapse

Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute?(:details, String)
end
Price =

Schema for price info in getPricing response

Structure.new do
  # @return [String] The status of the operation.
  attribute(:status, String)

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute?(:asin, String, from: "ASIN")

  # @return [Product]
  attribute?(:product, Product, from: "Product")

  # @return [String] The seller stock keeping unit (SKU) of the item.
  attribute?(:seller_sku, String, from: "SellerSKU")
end
Errors =

A list of error responses returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the operation.
  attribute(:errors, [Error])
end
Points =

The number of Amazon Points offered with the purchase of an item, and their monetary value.

Structure.new do
  # @return [Money] The monetary value of the points.
  attribute?(:points_monetary_value, Money, from: "PointsMonetaryValue")

  # @return [Integer] The number of points.
  attribute?(:points_number, Integer, from: "PointsNumber")
end
Product =

An item.

Structure.new do
  # @return [IdentifierType]
  attribute(:identifiers, IdentifierType, from: "Identifiers")

  # @return [Array<Object>]
  attribute?(:attribute_sets, Array, from: "AttributeSets")

  # @return [CompetitivePricingType]
  attribute?(:competitive_pricing, CompetitivePricingType, from: "CompetitivePricing")

  # @return [Array<OfferType>]
  attribute?(:offers, [OfferType], from: "Offers")

  # @return [Array<Object>]
  attribute?(:relationships, Array, from: "Relationships")

  # @return [Array<SalesRankType>]
  attribute?(:sales_rankings, [SalesRankType], from: "SalesRankings")
end
Summary =

Contains price information about the product, including the LowestPrices and BuyBoxPrices, the ListPrice, the SuggestedLowerPricePlusShipping, and NumberOfOffers and NumberOfBuyBoxEligibleOffers.

Structure.new do
  # @return [Integer] The number of unique offers contained in NumberOfOffers.
  attribute(:total_offer_count, Integer, from: "TotalOfferCount")

  # @return [Array<OfferCountType>] A list that contains the total number of offers that are eligible for the Buy
  # Box for the given conditions and fulfillment channels.
  attribute?(:buy_box_eligible_offers, [OfferCountType], from: "BuyBoxEligibleOffers")

  # @return [Array<BuyBoxPriceType>] A list of item prices.
  attribute?(:buy_box_prices, [BuyBoxPriceType], from: "BuyBoxPrices")

  # @return [Money] This price is based on competitive prices from other retailers (excluding other Amazon
  # sellers). The offer may be ineligible for the Buy Box if the seller's price + shipping (minus Amazon Points)
  # is greater than this competitive price.
  attribute?(:competitive_price_threshold, Money, from: "CompetitivePriceThreshold")

  # @return [Money] The list price of the item as suggested by the manufacturer.
  attribute?(:list_price, Money, from: "ListPrice")

  # @return [Array<LowestPriceType>] A list of the lowest prices for the item.
  attribute?(:lowest_prices, [LowestPriceType], from: "LowestPrices")

  # @return [Array<OfferCountType>] A list that contains the total number of offers for the item for the given
  # conditions and fulfillment channels.
  attribute?(:number_of_offers, [OfferCountType], from: "NumberOfOffers")

  # @return [Time] When the status is ActiveButTooSoonForProcessing, this is the time when the offers will be
  # available for processing.
  attribute?(:offers_available_time, Time, from: "OffersAvailableTime")

  # @return [Array<SalesRankType>] A list that contains the sales rank of the item in the given product
  # categories.
  attribute?(:sales_rankings, [SalesRankType], from: "SalesRankings")

  # @return [Money] The suggested lower price of the item, including shipping and Amazon Points. The suggested
  # lower price is based on a range of factors, including historical selling prices, recent Buy Box-eligible
  # prices, and input from customers for your products.
  attribute?(:suggested_lower_price_plus_shipping, Money, from: "SuggestedLowerPricePlusShipping")
end
OfferType =

Schema for an individual offer.

Structure.new do
  # @return [PriceType] Contains pricing information that includes promotions and contains the shipping cost.
  attribute(:buying_price, PriceType, from: "BuyingPrice")

  # @return [String] The fulfillment channel for the offer listing. Possible values:
  #
  # * Amazon - Fulfilled by Amazon.
  # * Merchant - Fulfilled by the seller.
  attribute(:fulfillment_channel, String, from: "FulfillmentChannel")

  # @return [String] The item condition for the offer listing. Possible values: New, Used, Collectible,
  # Refurbished, or Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String] The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good,
  # Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.
  attribute(:item_sub_condition, String, from: "ItemSubCondition")

  # @return [Money] The current price excluding any promotions that apply to the product. Excludes the shipping
  # cost.
  attribute(:regular_price, Money, from: "RegularPrice")

  # @return [String] The seller stock keeping unit (SKU) of the item.
  attribute(:seller_sku, String, from: "SellerSKU")

  # @return [Money] The current listing price for Business buyers.
  attribute?(:business_price, Money, from: "businessPrice")

  # @return [String] Indicates the type of customer that the offer is valid for.
  attribute?(:offer_type, String, from: "offerType")

  # @return [Array<QuantityDiscountPriceType>] List of `QuantityDiscountPrice` that contains item's pricing
  # information when buy in bulk.
  attribute?(:quantity_discount_prices, [QuantityDiscountPriceType], from: "quantityDiscountPrices")
end
PriceType =

Schema for item's price information, including listing price, shipping price, and Amazon points.

Structure.new do
  # @return [Money] The listing price of the item including any promotions that apply.
  attribute(:listing_price, Money, from: "ListingPrice")

  # @return [Money] The value calculated by adding ListingPrice + Shipping - Points. Note that if the landed price
  # is not returned, the listing price represents the product with the lowest landed price.
  attribute?(:landed_price, Money, from: "LandedPrice")

  # @return [Points] The number of Amazon Points offered with the purchase of an item, and their monetary value.
  attribute?(:points, Points, from: "Points")

  # @return [Money] The shipping cost of the product. Note that the shipping cost is not always available.
  attribute?(:shipping, Money, from: "Shipping")
end
OfferDetail =

Schema for an individual offer. Object in OfferDetailList.

Structure.new do
  # @return [:boolean] When true, the offer is fulfilled by Amazon.
  attribute(:fulfilled_by_amazon, :boolean, from: "IsFulfilledByAmazon")

  # @return [Money] The price of the item.
  attribute(:listing_price, Money, from: "ListingPrice")

  # @return [Money] The shipping cost.
  attribute(:shipping, Money, from: "Shipping")

  # @return [DetailedShippingTimeType] The maximum time within which the item will likely be shipped once an order
  # has been placed.
  attribute(:shipping_time, DetailedShippingTimeType, from: "ShippingTime")

  # @return [String] The subcondition of the item. Subcondition values: New, Mint, Very Good, Good, Acceptable,
  # Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.
  attribute(:sub_condition, String, from: "SubCondition")

  # @return [String] Information about the condition of the item.
  attribute?(:condition_notes, String, from: "ConditionNotes")

  # @return [:boolean] When true, the offer is currently in the Buy Box. There can be up to two Buy Box winners at
  # any time per ASIN, one that is eligible for Prime and one that is not eligible for Prime.
  attribute?(:buy_box_winner, :boolean, from: "IsBuyBoxWinner")

  # @return [:boolean] When true, the seller of the item is eligible to win the Buy Box.
  attribute?(:featured_merchant, :boolean, from: "IsFeaturedMerchant")

  # @return [:boolean] When true, this is the seller's offer.
  attribute?(:my_offer, :boolean, from: "MyOffer")

  # @return [Points] The number of Amazon Points offered with the purchase of an item.
  attribute?(:points, Points, from: "Points")

  # @return [PrimeInformationType] Amazon Prime information.
  attribute?(:prime_information, PrimeInformationType, from: "PrimeInformation")

  # @return [SellerFeedbackType] Information about the seller's feedback, including the percentage of positive
  # feedback, and the total number of ratings received.
  attribute?(:seller_feedback_rating, SellerFeedbackType, from: "SellerFeedbackRating")

  # @return [String] The seller identifier for the offer.
  attribute?(:seller_id, String, from: "SellerId")

  # @return [ShipsFromType] The state and country from where the item is shipped.
  attribute?(:ships_from, ShipsFromType, from: "ShipsFrom")

  # @return [String] Indicates the type of customer that the offer is valid for.
  attribute?(:offer_type, String, from: "offerType")

  # @return [Array<QuantityDiscountPriceType>] List of `QuantityDiscountPrice` that contains item's pricing
  # information when buy in bulk.
  attribute?(:quantity_discount_prices, [QuantityDiscountPriceType], from: "quantityDiscountPrices")
end
BatchRequest =

Common properties of batch requests against individual APIs.

Structure.new do
  # @return [String]
  attribute(:method, String)

  # @return [String] The resource path of the operation you are calling in batch without any query parameters.
  #
  # If you are calling `getItemOffersBatch`, supply the path of `getItemOffers`.
  #
  # **Example:** `/products/pricing/v0/items/B000P6Q7MY/offers`
  #
  # If you are calling `getListingOffersBatch`, supply the path of `getListingOffers`.
  #
  # **Example:** `/products/pricing/v0/listings/B000P6Q7MY/offers`
  attribute(:uri, String)

  # @return [Hash]
  attribute?(:headers, Hash)
end
ASINIdentifier =

Schema to identify an item by MarketPlaceId and ASIN.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute(:asin, String, from: "ASIN")

  # @return [String] A marketplace identifier.
  attribute(:marketplace_id, String, from: "MarketplaceId")
end
IdentifierType =

Specifies the identifiers used to uniquely identify an item.

Structure.new do
  # @return [ASINIdentifier] Indicates the item is identified by MarketPlaceId and ASIN.
  attribute(:marketplace_asin, ASINIdentifier, from: "MarketplaceASIN")

  # @return [SellerSKUIdentifier] Indicates the item is identified by MarketPlaceId, SellerId, and SellerSKU.
  attribute?(:sku_identifier, SellerSKUIdentifier, from: "SKUIdentifier")
end
ItemIdentifier =

Information that identifies an item.

Structure.new do
  # @return [String] The condition of the item.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String] A marketplace identifier. Specifies the marketplace from which prices are returned.
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute?(:asin, String, from: "ASIN")

  # @return [String] The seller stock keeping unit (SKU) of the item.
  attribute?(:seller_sku, String, from: "SellerSKU")
end
SalesRankType =

Sales rank information for the item, by category

Structure.new do
  # @return [String] Identifies the item category from which the sales rank is taken.
  attribute(:product_category_id, String, from: "ProductCategoryId")

  # @return [Integer] The sales rank of the item within the item category.
  attribute(:rank, Integer, from: "Rank")
end
ShipsFromType =

The state and country from where the item is shipped.

Structure.new do
  # @return [String] The country from where the item is shipped.
  attribute?(:country, String, from: "Country")

  # @return [String] The state from where the item is shipped.
  attribute?(:state, String, from: "State")
end
OfferCountType =

The total number of offers for the specified condition and fulfillment channel.

Structure.new do
  # @return [Integer] The number of offers in a fulfillment channel that meet a specific condition.
  attribute?(:offer_count, Integer, from: "OfferCount")

  # @return [String] Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or
  # Club.
  attribute?(:condition, String)

  # @return [String] Indicates whether the item is fulfilled by Amazon or by the seller.
  attribute?(:fulfillment_channel, String, from: "fulfillmentChannel")
end
GetOffersResult =

The payload for the getListingOffers and getItemOffers operations.

Structure.new do
  # @return [ItemIdentifier] Metadata that identifies the item.
  attribute(:identifier, ItemIdentifier, from: "Identifier")

  # @return [String] The condition of the item.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String] A marketplace identifier.
  attribute(:marketplace_id, String, from: "MarketplaceID")

  # @return [Array<OfferDetail>] A list of offer details. The list is the same length as the TotalOfferCount in
  # the Summary or 20, whichever is less.
  attribute(:offers, [OfferDetail], from: "Offers")

  # @return [Summary] Pricing information about the item.
  attribute(:summary, Summary, from: "Summary")

  # @return [String] The status of the operation.
  attribute(:status, String)

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute?(:asin, String, from: "ASIN")

  # @return [String] The stock keeping unit (SKU) of the item.
  attribute?(:sku, String, from: "SKU")
end
LowestPriceType =

Schema for an individual lowest price.

Structure.new do
  # @return [Money] The price of the item.
  attribute(:listing_price, Money, from: "ListingPrice")

  # @return [String] Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or
  # Club.
  attribute(:condition, String)

  # @return [String] Indicates whether the item is fulfilled by Amazon or by the seller.
  attribute(:fulfillment_channel, String, from: "fulfillmentChannel")

  # @return [Money] The value calculated by adding ListingPrice + Shipping - Points.
  attribute?(:landed_price, Money, from: "LandedPrice")

  # @return [Points] The number of Amazon Points offered with the purchase of an item.
  attribute?(:points, Points, from: "Points")

  # @return [Money] The shipping cost.
  attribute?(:shipping, Money, from: "Shipping")

  # @return [String] Indicates the type of customer that the offer is valid for.
  attribute?(:offer_type, String, from: "offerType")

  # @return [String] Indicates the type of quantity discount this price applies to.
  attribute?(:quantity_discount_type, String, from: "quantityDiscountType")

  # @return [Integer] Indicates at what quantity this price becomes active.
  attribute?(:quantity_tier, Integer, from: "quantityTier")
end
BuyBoxPriceType =

Schema for an individual buybox price.

Structure.new do
  # @return [Money] The value calculated by adding ListingPrice + Shipping - Points.
  attribute(:landed_price, Money, from: "LandedPrice")

  # @return [Money] The price of the item.
  attribute(:listing_price, Money, from: "ListingPrice")

  # @return [Money] The shipping cost.
  attribute(:shipping, Money, from: "Shipping")

  # @return [String] Indicates the condition of the item. For example: New, Used, Collectible, Refurbished, or
  # Club.
  attribute(:condition, String)

  # @return [Points] The number of Amazon Points offered with the purchase of an item.
  attribute?(:points, Points, from: "Points")

  # @return [String] Indicates the type of customer that the offer is valid for.<br><br>When the offer type is B2C
  # in a quantity discount, the seller is winning the Buy Box because others do not have inventory at that
  # quantity, not because they have a quantity discount on the ASIN.
  attribute?(:offer_type, String, from: "offerType")

  # @return [String] Indicates the type of quantity discount this price applies to.
  attribute?(:quantity_discount_type, String, from: "quantityDiscountType")

  # @return [Integer] Indicates at what quantity this price becomes active.
  attribute?(:quantity_tier, Integer, from: "quantityTier")

  # @return [String] The seller identifier for the offer.
  attribute?(:seller_id, String, from: "sellerId")
end
GetOffersResponse =

The response schema for the getListingOffers and getItemOffers operations.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the operation.
  attribute?(:errors, [Error])

  # @return [GetOffersResult] The payload for the `getListingOffers` and `getItemOffers` operations.
  attribute?(:payload, GetOffersResult)
end
ItemOffersRequest =

List of request parameters can be accepted by ItemOffersRequests operation

Structure.new do
  # @return [String] Filters the offer listings to be considered based on item condition. Possible values: New,
  # Used, Collectible, Refurbished, Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String]
  attribute(:method, String)

  # @return [String] The resource path of the operation you are calling in batch without any query parameters.
  #
  # If you are calling `getItemOffersBatch`, supply the path of `getItemOffers`.
  #
  # **Example:** `/products/pricing/v0/items/B000P6Q7MY/offers`
  #
  # If you are calling `getListingOffersBatch`, supply the path of `getListingOffers`.
  #
  # **Example:** `/products/pricing/v0/listings/B000P6Q7MY/offers`
  attribute(:uri, String)

  # @return [String] Indicates whether to request Consumer or Business offers. Default is Consumer.
  attribute?(:customer_type, String, from: "CustomerType")

  # @return [Hash]
  attribute?(:headers, Hash)
end
GetPricingResponse =

The response schema for the getPricing and getCompetitivePricing operations.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the operation.
  attribute?(:errors, [Error])

  # @return [Array<Price>] The payload for the getPricing and getCompetitivePricing operations.
  attribute?(:payload, [Price])
end
ItemOffersResponse =

Schema for an individual ItemOffersResponse

Structure.new do
  # @return [GetOffersResponse]
  attribute(:body, GetOffersResponse)

  # @return [ItemOffersRequestParams]
  attribute(:request, ItemOffersRequestParams)

  # @return [HttpResponseHeaders]
  attribute?(:headers, HttpResponseHeaders)

  # @return [GetOffersHttpStatusLine]
  attribute?(:status, GetOffersHttpStatusLine)
end
SellerFeedbackType =

Information about the seller's feedback, including the percentage of positive feedback, and the total number of ratings received.

Structure.new do
  # @return [Integer] The number of ratings received about the seller.
  attribute(:feedback_count, Integer, from: "FeedbackCount")

  # @return [Float] The percentage of positive feedback for the seller in the past 365 days.
  attribute?(:seller_positive_feedback_rating, Float, from: "SellerPositiveFeedbackRating")
end
BatchOffersResponse =

Common schema that present in ItemOffersResponse and ListingOffersResponse

Structure.new do
  # @return [GetOffersResponse]
  attribute(:body, GetOffersResponse)

  # @return [HttpResponseHeaders]
  attribute?(:headers, HttpResponseHeaders)

  # @return [GetOffersHttpStatusLine]
  attribute?(:status, GetOffersHttpStatusLine)
end
HttpResponseHeaders =

A mapping of additional HTTP headers to send/receive for the individual batch request.

Structure.new do
  # @return [String] The timestamp that the API request was received. For more information, consult [RFC 2616
  # Section 14](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
  attribute?(:date, String, from: "Date")

  # @return [String] Unique request reference identifier.
  attribute?(:x_amzn_request_id, String, from: "x-amzn-RequestId")
end
SellerSKUIdentifier =

Schema to identify an item by MarketPlaceId, SellerId, and SellerSKU.

Structure.new do
  # @return [String] A marketplace identifier.
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The seller identifier submitted for the operation.
  attribute(:seller_id, String, from: "SellerId")

  # @return [String] The seller stock keeping unit (SKU) of the item.
  attribute(:seller_sku, String, from: "SellerSKU")
end
CompetitivePriceType =

Schema for competitive pricing information

Structure.new do
  # @return [String] The pricing model for each price that is returned.
  #
  # Possible values:
  #
  # * 1 - New Buy Box Price.
  # * 2 - Used Buy Box Price.
  attribute(:competitive_price_id, String, from: "CompetitivePriceId")

  # @return [PriceType] Pricing information for a given CompetitivePriceId value.
  attribute(:price, PriceType, from: "Price")

  # @return [:boolean] Indicates whether or not the pricing information is for an offer listing that belongs to
  # the requester. The requester is the seller associated with the SellerId that was submitted with the request.
  # Possible values are: true and false.
  attribute?(:belongs_to_requester, :boolean, from: "belongsToRequester")

  # @return [String] Indicates the condition of the item whose pricing information is returned. Possible values
  # are: New, Used, Collectible, Refurbished, or Club.
  attribute?(:condition, String)

  # @return [String] Indicates the type of customer that the offer is valid for.<br><br>When the offer type is B2C
  # in a quantity discount, the seller is winning the Buy Box because others do not have inventory at that
  # quantity, not because they have a quantity discount on the ASIN.
  attribute?(:offer_type, String, from: "offerType")

  # @return [String] Indicates the type of quantity discount this price applies to.
  attribute?(:quantity_discount_type, String, from: "quantityDiscountType")

  # @return [Integer] Indicates at what quantity this price becomes active.
  attribute?(:quantity_tier, Integer, from: "quantityTier")

  # @return [String] The seller identifier for the offer.
  attribute?(:seller_id, String, from: "sellerId")

  # @return [String] Indicates the subcondition of the item whose pricing information is returned. Possible values
  # are: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished,
  # Open Box, or Other.
  attribute?(:subcondition, String)
end
ListingOffersRequest =

List of request parameters that can be accepted by ListingOffersRequest operation

Structure.new do
  # @return [String] Filters the offer listings to be considered based on item condition. Possible values: New,
  # Used, Collectible, Refurbished, Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String]
  attribute(:method, String)

  # @return [String] The resource path of the operation you are calling in batch without any query parameters.
  #
  # If you are calling `getItemOffersBatch`, supply the path of `getItemOffers`.
  #
  # **Example:** `/products/pricing/v0/items/B000P6Q7MY/offers`
  #
  # If you are calling `getListingOffersBatch`, supply the path of `getListingOffers`.
  #
  # **Example:** `/products/pricing/v0/listings/B000P6Q7MY/offers`
  attribute(:uri, String)

  # @return [String] Indicates whether to request Consumer or Business offers. Default is Consumer.
  attribute?(:customer_type, String, from: "CustomerType")

  # @return [Hash]
  attribute?(:headers, Hash)
end
PrimeInformationType =

Amazon Prime information.

Structure.new do
  # @return [:boolean] Indicates whether the offer is an Amazon Prime offer throughout the entire marketplace
  # where it is listed.
  attribute(:national_prime, :boolean, from: "IsNationalPrime")

  # @return [:boolean] Indicates whether the offer is an Amazon Prime offer.
  attribute(:prime, :boolean, from: "IsPrime")
end
ListingOffersResponse =

Schema for an individual ListingOffersResponse

Structure.new do
  # @return [GetOffersResponse]
  attribute(:body, GetOffersResponse)

  # @return [HttpResponseHeaders]
  attribute?(:headers, HttpResponseHeaders)

  # @return [ListingOffersRequestParams]
  attribute?(:request, ListingOffersRequestParams)

  # @return [GetOffersHttpStatusLine]
  attribute?(:status, GetOffersHttpStatusLine)
end
CompetitivePricingType =

Competitive pricing information for the item.

Structure.new do
  # @return [Array<CompetitivePriceType>]
  attribute(:competitive_prices, [CompetitivePriceType], from: "CompetitivePrices")

  # @return [Array<OfferListingCountType>]
  attribute(:number_of_offer_listings, [OfferListingCountType], from: "NumberOfOfferListings")

  # @return [Money] The trade-in value of the item in the trade-in program.
  attribute?(:trade_in_value, Money, from: "TradeInValue")
end
OfferListingCountType =

The number of offer listings with the specified condition.

Structure.new do
  # @return [Integer] The number of offer listings.
  attribute(:count, Integer, from: "Count")

  # @return [String] The condition of the item.
  attribute(:condition, String)
end
ItemOffersRequestParams =

List of request parameters that can be accepted by ItemOffersRequest

Structure.new do
  # @return [String] Filters the offer listings to be considered based on item condition. Possible values: New,
  # Used, Collectible, Refurbished, Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item. This is the same Asin passed as
  # a request parameter.
  attribute?(:asin, String, from: "Asin")

  # @return [String] Indicates whether to request Consumer or Business offers. Default is Consumer.
  attribute?(:customer_type, String, from: "CustomerType")
end
BatchOffersRequestParams =

Common request parameters that can be accepted by ItemOffersRequest and ListingOffersRequest

Structure.new do
  # @return [String] Filters the offer listings to be considered based on item condition. Possible values: New,
  # Used, Collectible, Refurbished, Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] Indicates whether to request Consumer or Business offers. Default is Consumer.
  attribute?(:customer_type, String, from: "CustomerType")
end
DetailedShippingTimeType =

The time range in which an item will likely be shipped once an order has been placed.

Structure.new do
  # @return [String] Indicates whether the item is available for shipping now, or on a known or an unknown date in
  # the future. If known, the availableDate property indicates the date that the item will be available for
  # shipping. Possible values: NOW, FUTURE_WITHOUT_DATE, FUTURE_WITH_DATE.
  attribute?(:availability_type, String, from: "availabilityType")

  # @return [String] The date when the item will be available for shipping. Only displayed for items that are not
  # currently available for shipping.
  attribute?(:available_date, String, from: "availableDate")

  # @return [Integer] The maximum time, in hours, that the item will likely be shipped after the order has been
  # placed.
  attribute?(:maximum_hours, Integer, from: "maximumHours")

  # @return [Integer] The minimum time, in hours, that the item will likely be shipped after the order has been
  # placed.
  attribute?(:minimum_hours, Integer, from: "minimumHours")
end
GetOffersHttpStatusLine =

The HTTP status line associated with the response. For more information, consult RFC 2616.

Structure.new do
  # @return [String] The HTTP response Reason-Phase.
  attribute?(:reason_phrase, String, from: "reasonPhrase")

  # @return [Integer] The HTTP response Status Code.
  attribute?(:status_code, Integer, from: "statusCode")
end
QuantityDiscountPriceType =

Contains pricing information that includes special pricing when buying in bulk.

Structure.new do
  # @return [Money] The price at this quantity tier.
  attribute(:listing_price, Money, from: "listingPrice")

  # @return [String] Indicates the type of quantity discount this price applies to.
  attribute(:quantity_discount_type, String, from: "quantityDiscountType")

  # @return [Integer] Indicates at what quantity this price becomes active.
  attribute(:quantity_tier, Integer, from: "quantityTier")
end
GetItemOffersBatchRequest =

The request associated with the getItemOffersBatch API call.

Structure.new do
  # @return [Array<ItemOffersRequest>]
  attribute?(:requests, [ItemOffersRequest])
end
ListingOffersRequestParams =

List of request parameters that can be accepted by ListingOffersRequest

Structure.new do
  # @return [String] Filters the offer listings to be considered based on item condition. Possible values: New,
  # Used, Collectible, Refurbished, Club.
  attribute(:item_condition, String, from: "ItemCondition")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The seller stock keeping unit (SKU) of the item. This is the same SKU passed as a path
  # parameter.
  attribute(:seller_sku, String, from: "SellerSKU")

  # @return [String] Indicates whether to request Consumer or Business offers. Default is Consumer.
  attribute?(:customer_type, String, from: "CustomerType")
end
GetItemOffersBatchResponse =

The response associated with the getItemOffersBatch API call.

Structure.new do
  # @return [Array<ItemOffersResponse>]
  attribute?(:responses, [ItemOffersResponse])
end
GetListingOffersBatchRequest =

The request associated with the getListingOffersBatch API call.

Structure.new do
  # @return [Array<ListingOffersRequest>]
  attribute?(:requests, [ListingOffersRequest])
end
GetListingOffersBatchResponse =

The response associated with the getListingOffersBatch API call.

Structure.new do
  # @return [Array<ListingOffersResponse>]
  attribute?(:responses, [ListingOffersResponse])
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #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) ⇒ Peddler::Response

Note:

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.

returned. identify items in the given marketplace. marketplace. specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. Consumer or Business buyers. Default is Consumer.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for which prices are

  • asins (Array<String>) (defaults to: nil)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to

  • skus (Array<String>) (defaults to: nil)

    A list of up to twenty seller SKU values used to identify items in the given

  • item_type (String)

    Indicates whether ASIN values or seller SKU values are used to identify items. If you

  • customer_type (String) (defaults to: nil)

    Indicates whether to request pricing information from the point of view of

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/peddler/apis/product_pricing_v0.rb', line 73

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" => stringify_array(asins),
    "Skus" => stringify_array(skus),
    "ItemType" => item_type,
    "CustomerType" => customer_type,
  }.compact
  parser = -> { GetPricingResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the lowest priced offers for a single item based on ASIN.

returned. values: New, Used, Collectible, Refurbished, Club.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for which prices are

  • item_condition (String)

    Filters the offer listings to be considered based on item condition. Possible

  • asin (String)

    The Amazon Standard Identification Number (ASIN) of the item.

  • customer_type (String) (defaults to: nil)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



124
125
126
127
128
129
130
131
132
133
# File 'lib/peddler/apis/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/#{percent_encode(asin)}/offers"
  params = {
    "MarketplaceId" => marketplace_id,
    "ItemCondition" => item_condition,
    "CustomerType" => customer_type,
  }.compact
  parser = -> { GetOffersResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the lowest priced offers for a batch of items based on ASIN.

Parameters:

  • get_item_offers_batch_request_body (Hash)

    The request associated with the getItemOffersBatch API call.

  • rate_limit (Float) (defaults to: 0.1)

    Requests per second

Returns:



141
142
143
144
145
146
# File 'lib/peddler/apis/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
  parser = -> { GetItemOffersBatchResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

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.

returned. Collectible, Refurbished, Club. SellerId, which is included with every operation that you submit.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for which prices are

  • item_condition (String)

    Filters the offer listings based on item condition. Possible values: New, Used,

  • seller_sku (String)

    Identifies an item in the given marketplace. SellerSKU is qualified by the seller's

  • customer_type (String) (defaults to: nil)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



102
103
104
105
106
107
108
109
110
111
# File 'lib/peddler/apis/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/#{percent_encode(seller_sku)}/offers"
  params = {
    "MarketplaceId" => marketplace_id,
    "ItemCondition" => item_condition,
    "CustomerType" => customer_type,
  }.compact
  parser = -> { GetOffersResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the lowest priced offers for a batch of listings by SKU.

call.

Parameters:

  • get_listing_offers_batch_request_body (Hash)

    The request associated with the getListingOffersBatch API

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



155
156
157
158
159
160
# File 'lib/peddler/apis/product_pricing_v0.rb', line 155

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
  parser = -> { GetListingOffersBatchResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

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.

returned. identify items in the given marketplace. marketplace. specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Collectible, Refurbished, Club. Default is B2C.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for which prices are

  • asins (Array<String>) (defaults to: nil)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to

  • skus (Array<String>) (defaults to: nil)

    A list of up to twenty seller SKU values used to identify items in the given

  • item_type (String)

    Indicates whether ASIN values or seller SKU values are used to identify items. If you

  • item_condition (String) (defaults to: nil)

    Filters the offer listings based on item condition. Possible values: New, Used,

  • offer_type (String) (defaults to: nil)

    Indicates whether to request pricing information for the seller's B2C or B2B offers.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/peddler/apis/product_pricing_v0.rb', line 37

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" => stringify_array(asins),
    "Skus" => stringify_array(skus),
    "ItemType" => item_type,
    "ItemCondition" => item_condition,
    "OfferType" => offer_type,
  }.compact
  parser = -> { GetPricingResponse }
  meter(rate_limit).get(path, params:, parser:)
end