Skip to main content

amazon_spapi/models/product_pricing_v0/
summary.rs

1/*
2 * Selling Partner API for Pricing
3 *
4 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Summary : Contains price information about the product, including the LowestPrices and BuyBoxPrices, the ListPrice, the SuggestedLowerPricePlusShipping, and NumberOfOffers and NumberOfBuyBoxEligibleOffers.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Summary {
17    /// The number of unique offers contained in NumberOfOffers.
18    #[serde(rename = "TotalOfferCount")]
19    pub total_offer_count: i32,
20    /// A list that contains the total number of offers information for given conditions and fulfillment channels.
21    #[serde(rename = "NumberOfOffers", skip_serializing_if = "Option::is_none")]
22    pub number_of_offers: Option<Vec<models::product_pricing_v0::OfferCountType>>,
23    /// A list of the lowest prices.
24    #[serde(rename = "LowestPrices", skip_serializing_if = "Option::is_none")]
25    pub lowest_prices: Option<Vec<models::product_pricing_v0::LowestPriceType>>,
26    /// A list of the Buy Box prices.
27    #[serde(rename = "BuyBoxPrices", skip_serializing_if = "Option::is_none")]
28    pub buy_box_prices: Option<Vec<models::product_pricing_v0::BuyBoxPriceType>>,
29    #[serde(rename = "ListPrice", skip_serializing_if = "Option::is_none")]
30    pub list_price: Option<Box<models::product_pricing_v0::MoneyType>>,
31    #[serde(rename = "CompetitivePriceThreshold", skip_serializing_if = "Option::is_none")]
32    pub competitive_price_threshold: Option<Box<models::product_pricing_v0::MoneyType>>,
33    #[serde(rename = "SuggestedLowerPricePlusShipping", skip_serializing_if = "Option::is_none")]
34    pub suggested_lower_price_plus_shipping: Option<Box<models::product_pricing_v0::MoneyType>>,
35    /// A list of sales rank information for the item, by category.
36    #[serde(rename = "SalesRankings", skip_serializing_if = "Option::is_none")]
37    pub sales_rankings: Option<Vec<models::product_pricing_v0::SalesRankType>>,
38    /// A list that contains the total number of offers that are eligible for the Buy Box for the given conditions and fulfillment channels.
39    #[serde(rename = "BuyBoxEligibleOffers", skip_serializing_if = "Option::is_none")]
40    pub buy_box_eligible_offers: Option<Vec<models::product_pricing_v0::OfferCountType>>,
41    /// When the status is ActiveButTooSoonForProcessing, this is the time when the offers will be available for processing.
42    #[serde(rename = "OffersAvailableTime", skip_serializing_if = "Option::is_none")]
43    pub offers_available_time: Option<String>,
44}
45
46impl Summary {
47    /// Contains price information about the product, including the LowestPrices and BuyBoxPrices, the ListPrice, the SuggestedLowerPricePlusShipping, and NumberOfOffers and NumberOfBuyBoxEligibleOffers.
48    pub fn new(total_offer_count: i32) -> Summary {
49        Summary {
50            total_offer_count,
51            number_of_offers: None,
52            lowest_prices: None,
53            buy_box_prices: None,
54            list_price: None,
55            competitive_price_threshold: None,
56            suggested_lower_price_plus_shipping: None,
57            sales_rankings: None,
58            buy_box_eligible_offers: None,
59            offers_available_time: None,
60        }
61    }
62}
63