Module: Peddler::Types::ProductPricing20220501

Defined in:
lib/peddler/types/product_pricing_2022_05_01/error.rb,
lib/peddler/types/product_pricing_2022_05_01/offer.rb,
lib/peddler/types/product_pricing_2022_05_01/price.rb,
lib/peddler/types/product_pricing_2022_05_01/errors.rb,
lib/peddler/types/product_pricing_2022_05_01/points.rb,
lib/peddler/types/product_pricing_2022_05_01/segment.rb,
lib/peddler/types/product_pricing_2022_05_01/money_type.rb,
lib/peddler/types/product_pricing_2022_05_01/postal_code.rb,
lib/peddler/types/product_pricing_2022_05_01/http_headers.rb,
lib/peddler/types/product_pricing_2022_05_01/batch_request.rb,
lib/peddler/types/product_pricing_2022_05_01/prime_details.rb,
lib/peddler/types/product_pricing_2022_05_01/batch_response.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer.rb,
lib/peddler/types/product_pricing_2022_05_01/reference_price.rb,
lib/peddler/types/product_pricing_2022_05_01/sample_location.rb,
lib/peddler/types/product_pricing_2022_05_01/segment_details.rb,
lib/peddler/types/product_pricing_2022_05_01/shipping_option.rb,
lib/peddler/types/product_pricing_2022_05_01/http_status_line.rb,
lib/peddler/types/product_pricing_2022_05_01/offer_identifier.rb,
lib/peddler/types/product_pricing_2022_05_01/lowest_priced_offer.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_buying_option.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer_segment.rb,
lib/peddler/types/product_pricing_2022_05_01/lowest_priced_offers_input.rb,
lib/peddler/types/product_pricing_2022_05_01/competitive_summary_request.rb,
lib/peddler/types/product_pricing_2022_05_01/competitive_summary_response.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer_expected_price.rb,
lib/peddler/types/product_pricing_2022_05_01/competitive_summary_batch_request.rb,
lib/peddler/types/product_pricing_2022_05_01/competitive_summary_response_body.rb,
lib/peddler/types/product_pricing_2022_05_01/competitive_summary_batch_response.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer_expected_price_result.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer_expected_price_response_body.rb,
lib/peddler/types/product_pricing_2022_05_01/featured_offer_expected_price_request_params.rb,
lib/peddler/types/product_pricing_2022_05_01/get_featured_offer_expected_price_batch_request.rb,
lib/peddler/types/product_pricing_2022_05_01/get_featured_offer_expected_price_batch_response.rb

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
Offer =

The offer data of a product.

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

  # @return [String] Item Condition.
  attribute(:condition, String)

  # @return [String] The item subcondition of the offer.
  attribute(:sub_condition, String, from: "subCondition")

  # @return [String] The fulfillment type for the offer. Possible values are `AFN` (Amazon Fulfillment Network)
  # and `MFN` (Merchant Fulfillment Network).
  attribute(:fulfillment_type, String, from: "fulfillmentType")

  # @return [Money] The offer buying price. This doesn't include shipping, points, or applicable promotions.
  attribute(:listing_price, Money, from: "listingPrice")

  # @return [Array<ShippingOption>] A list of shipping options associated with this offer
  attribute(:shipping_options, [ShippingOption], from: "shippingOptions")

  # @return [Points] The number of Amazon Points that are offered with the purchase of an item and the monetary
  # value of these points. Note that the Points element is only returned in Japan (JP).
  attribute(:points, Points)

  # @return [PrimeDetails] Amazon Prime details.
  attribute(:prime_details, PrimeDetails, from: "primeDetails")
end
Price =

The schema for item's price information, including listing price, shipping price, and Amazon Points.

Structure.new do
  # @return [Money] The listing price for the item, excluding any promotions.
  attribute(:listing_price, Money, from: "listingPrice")

  # @return [Money] The shipping cost of the product. Note that the shipping cost is not always available.
  attribute(:shipping_price, Money, from: "shippingPrice")

  # @return [Points] The number of Amazon Points that are offered with the purchase of an item and the monetary
  # value of these points.
  attribute(:points, Points)
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 that are offered with the purchase of an item and the monetary value of these points.

Structure.new do
  # @return [Integer] The number of Amazon Points.
  attribute(:points_number, Integer, from: "pointsNumber")

  # @return [Money] The monetary value of the Amazon Points.
  attribute(:points_monetary_value, Money, from: "pointsMonetaryValue")
end
Segment =

Input segment for featured offer expected price. The segment contains the location information for which featured offer expected price is requested.

Structure.new do
  # @return [SegmentDetails] Segment details
  attribute(:segment_details, SegmentDetails, from: "segmentDetails")
end
MoneyType =

Currency type and monetary value schema to demonstrate pricing information.

Structure.new do
  # @return [String] The currency code in ISO 4217 format.
  attribute(:currency_code, String, from: "currencyCode")

  # @return [Float] The monetary value.
  attribute(:amount, Float)
end
PostalCode =

Postal code value with country code

Structure.new do
  # @return [String] Country code value
  attribute(:country_code, String, from: "countryCode")

  # @return [String] Postal code value
  attribute(:value, String)
end
HttpHeaders =

A mapping of additional HTTP headers to send or receive for an individual request within a batch.

Structure.new do
end
BatchRequest =

The common properties for individual requests within a batch.

Structure.new do
  # @return [String] The URI associated with an individual request within a batch. For
  # `FeaturedOfferExpectedPrice`, this is `/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice`.
  attribute(:uri, String)

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

  # @return [Hash]
  attribute(:body, Hash)

  # @return [HttpHeaders]
  attribute(:headers, HttpHeaders)
end
PrimeDetails =

Amazon Prime details.

Structure.new do
  # @return [String] Indicates whether the offer is an Amazon Prime offer.
  attribute(:eligibility, String)
end
BatchResponse =

The common properties for responses to individual requests within a batch.

Structure.new do
  # @return [HttpHeaders]
  attribute(:headers, HttpHeaders)

  # @return [HttpStatusLine]
  attribute(:status, HttpStatusLine)
end
FeaturedOffer =

Schema for currentFeaturedOffer or competingFeaturedOffer.

Structure.new do
  # @return [OfferIdentifier] An offer identifier used to identify the merchant of the featured offer. Since this
  # may not belong to the requester, the SKU field is omitted.
  attribute(:offer_identifier, OfferIdentifier, from: "offerIdentifier")

  # @return [String] The item condition.
  attribute(:condition, String)

  # @return [Price] The current active price of the offer.
  attribute(:price, Price)
end
ReferencePrice =

The reference price for the specified ASIN marketplaceId combination.

Structure.new do
  # @return [String] Reference price type (e.g., `CompetitivePriceThreshold`, `WasPrice`, `CompetitivePrice`). For
  # definitions, see the [Product Pricing API Use Case
  # Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
  attribute(:name, String)

  # @return [Money] The reference price for the ASIN `marketplaceId` combination.
  attribute(:price, Money)
end
SampleLocation =

Information about a location. It uses a postal code to identify the location.

Structure.new do
  # @return [PostalCode]
  attribute(:postal_code, PostalCode, from: "postalCode")
end
SegmentDetails =

The details about the segment. The FeaturedOfferExpectedPrice API uses only the sampleLocation portion as input.

Structure.new do
  # @return [Float] The glance view weighted percentage for this segment, which is the glance views for this
  # segment as a percentage of total glance views across all segments for the ASIN. A higher percentage indicates
  # that more Amazon customers receive this offer as the Featured Offer.
  attribute(:glance_view_weight_percentage, Float, from: "glanceViewWeightPercentage")

  # @return [SampleLocation] The representative location that features the offer for the segment.
  attribute(:sample_location, SampleLocation, from: "sampleLocation")
end
ShippingOption =

The shipping option available for the offer.

Structure.new do
  # @return [String] The type of shipping option.
  attribute(:shipping_option_type, String, from: "shippingOptionType")

  # @return [Money] Shipping price for the offer.
  attribute(:price, Money)
end
HttpStatusLine =

The HTTP status line associated with the response for an individual request within a batch. For more information, refer to RFC 2616.

Structure.new do
  # @return [Integer] The HTTP response status code.
  attribute(:status_code, Integer, from: "statusCode")

  # @return [String] The HTTP response reason phrase.
  attribute(:reason_phrase, String, from: "reasonPhrase")
end
OfferIdentifier =

Identifies an offer from a particular seller for a specified ASIN.

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

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

  # @return [String] The seller SKU of the item. This will only be present for the target offer, which belongs to
  # the requesting seller.
  attribute(:sku, String)

  # @return [String] The Amazon identifier for the item.
  attribute(:asin, String)

  # @return [String] The fulfillment type for the offer.
  attribute(:fulfillment_type, String, from: "fulfillmentType")
end
LowestPricedOffer =

Describes the lowest priced offers for the specified item condition and offer type.

Structure.new do
  # @return [LowestPricedOffersInput] The filtering criteria that are used to retrieve the lowest priced offers
  # that correspond to the `lowestPricedOffersInputs` request.
  attribute(:lowest_priced_offers_input, LowestPricedOffersInput, from: "lowestPricedOffersInput")

  # @return [Array<Offer>] A list of up to 20 lowest priced offers that match the criteria specified in
  # `lowestPricedOffersInput`.
  attribute(:offers, [Offer])
end
FeaturedBuyingOption =

Describes a featured buying option, which includes a list of segmented featured offers for a particular item condition.

Structure.new do
  # @return [String] The buying option type for the featured offer. `buyingOptionType` represents the buying
  # options that a customer receives on the detail page, such as `B2B`, `Fresh`, and `Subscribe n Save`.
  # `buyingOptionType` currently supports `NEW` as a value.
  attribute(:buying_option_type, String, from: "buyingOptionType")

  # @return [Array<SegmentedFeaturedOffer>] A list of segmented featured offers for the current buying option
  # type. A segment can be considered as a group of regional contexts that all have the same featured offer. A
  # regional context is a combination of factors such as customer type, region, or postal code and buying option.
  attribute(:segmented_featured_offers, Array, from: "segmentedFeaturedOffers")
end
FeaturedOfferSegment =

Describes the segment in which the offer is featured.

Structure.new do
  # @return [String] The customer membership type that makes up this segment
  attribute(:customer_membership, String, from: "customerMembership")

  # @return [SegmentDetails] The details about the segment.
  attribute(:segment_details, SegmentDetails, from: "segmentDetails")
end
LowestPricedOffersInput =

The input required for building LowestPricedOffers data in the response.

Structure.new do
  # @return [String] The input parameter specifies the `itemCondition` of the offer that is requested for
  # `LowestPricedOffers`. `New` is the default value for `itemCondition`.
  attribute(:item_condition, String, from: "itemCondition")

  # @return [String] The input parameter specifies the type of offers requested for `LowestPricedOffers`. This
  # applies to `Consumer` and `Business` offers. `Consumer` is the default `offerType`.
  attribute(:offer_type, String, from: "offerType")
end
CompetitiveSummaryRequest =

An individual competitiveSummary request for an ASIN and marketplaceId.

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

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

  # @return [Array<CompetitiveSummaryIncludedData>] The list of requested competitive pricing data for the
  # product.
  attribute(:included_data, Array, from: "includedData")

  # @return [Array<LowestPricedOffersInput>] The list of `lowestPricedOffersInput` parameters that are used to
  # build `lowestPricedOffers` in the response. This attribute is only valid if `lowestPricedOffers` is requested
  # in `includedData`
  attribute(:lowest_priced_offers_inputs, [LowestPricedOffersInput], from: "lowestPricedOffersInputs")

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

  # @return [String] The URI associated with the individual APIs that are called as part of the batch request. For
  # `getCompetitiveSummary`, this is `/products/pricing/2022-05-01/items/competitiveSummary`.
  attribute(:uri, String)
end
CompetitiveSummaryResponse =

The response for the individual competitiveSummary request in the batch operation.

Structure.new do
  # @return [HttpStatusLine] The HTTP status line associated with the response. For more information, refer to
  # [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html).
  attribute(:status, HttpStatusLine)

  # @return [CompetitiveSummaryResponseBody] The `competitiveSummaryResponse` body for a requested ASIN and
  # `marketplaceId`.
  attribute(:body, CompetitiveSummaryResponseBody)
end
FeaturedOfferExpectedPrice =

The item price at or below which the target offer may be featured.

Structure.new do
  # @return [Money] A computed listing price at or below which a seller can expect to become the featured offer
  # (before applicable promotions).
  attribute(:listing_price, Money, from: "listingPrice")

  # @return [Points] The number of Amazon Points that are offered with the purchase of an item and the monetary
  # value of these points.
  attribute(:points, Points)
end
CompetitiveSummaryBatchRequest =

The competitiveSummary batch request data.

Structure.new do
  # @return [Array<CompetitiveSummaryRequest>] A batched list of `competitiveSummary` requests.
  attribute(:requests, [CompetitiveSummaryRequest])
end
CompetitiveSummaryResponseBody =

The competitiveSummaryResponse body for a requested ASIN and marketplaceId.

Structure.new do
  # @return [String] The Amazon identifier for the item.
  attribute(:asin, String)

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

  # @return [Array<FeaturedBuyingOption>] A list of featured buying options for the specified ASIN `marketplaceId`
  # combination.
  attribute(:featured_buying_options, [FeaturedBuyingOption], from: "featuredBuyingOptions")

  # @return [Array<LowestPricedOffer>] A list of lowest priced offers for the specified ASIN `marketplaceId`
  # combination.
  attribute(:lowest_priced_offers, [LowestPricedOffer], from: "lowestPricedOffers")

  # @return [Array<ReferencePrice>] A list of reference prices for the specified ASIN `marketplaceId` combination.
  attribute(:reference_prices, [ReferencePrice], from: "referencePrices")

  # @return [Array<Error>] A list of errors
  attribute(:errors, [Error])
end
CompetitiveSummaryBatchResponse =

The response schema for the competitiveSummaryBatch operation.

Structure.new do
  # @return [Array<CompetitiveSummaryResponse>] The response list for the `competitiveSummaryBatch` operation.
  attribute(:responses, [CompetitiveSummaryResponse])
end
FeaturedOfferExpectedPriceResult =

The FOEP result data for the requested offer.

Structure.new do
  # @return [FeaturedOfferExpectedPrice]
  attribute(:featured_offer_expected_price, FeaturedOfferExpectedPrice, from: "featuredOfferExpectedPrice")

  # @return [String] The status of the FOEP computation. Possible values include `VALID_FOEP`,
  # `NO_COMPETING_OFFER`, `OFFER_NOT_ELIGIBLE`, `OFFER_NOT_FOUND`, and `ASIN_NOT_ELIGIBLE`. Additional values
  # might be added in the future.
  attribute(:result_status, String, from: "resultStatus")

  # @return [FeaturedOffer] The offer that will likely be the featured offer if the target offer is priced above
  # its FOEP. If the target offer is currently the featured offer, this property will be different than
  # `currentFeaturedOffer`.
  attribute(:competing_featured_offer, FeaturedOffer, from: "competingFeaturedOffer")

  # @return [FeaturedOffer] The offer that is currently the featured offer. If the target offer is not currently
  # featured, then this property will be equal to `competingFeaturedOffer`.
  attribute(:current_featured_offer, FeaturedOffer, from: "currentFeaturedOffer")
end
FeaturedOfferExpectedPriceResponseBody =

The FOEP response data for a requested SKU.

Structure.new do
  # @return [OfferIdentifier] Metadata that identifies the target offer for which the FOEP result data was
  # computed.
  attribute(:offer_identifier, OfferIdentifier, from: "offerIdentifier")

  # @return [Array<FeaturedOfferExpectedPriceResult>] The FOEP results for the requested target offer.
  attribute(:featured_offer_expected_price_results, [FeaturedOfferExpectedPriceResult], from: "featuredOfferExpectedPriceResults")

  # @return [Array<Error>] The errors that occurred if the operation wasn't successful (HTTP status code non-200).
  attribute(:errors, [Error])
end
FeaturedOfferExpectedPriceRequestParams =

The parameters for an individual request.

Structure.new do
  # @return [String]
  attribute(:marketplace_id, String, from: "marketplaceId")

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

  # @return [Segment]
  attribute(:segment, Segment)
end
GetFeaturedOfferExpectedPriceBatchRequest =

The request body for the getFeaturedOfferExpectedPriceBatch operation.

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

The response schema for the getFeaturedOfferExpectedPriceBatch operation.

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