1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * Selling Partner API for Pricing
 *
 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Summary {
    /// The number of unique offers contained in NumberOfOffers.
    #[serde(default, rename = "TotalOfferCount")]
    pub total_offer_count: i32,
    #[serde(default, rename = "NumberOfOffers", skip_serializing_if = "Option::is_none")]
    pub number_of_offers: Option<Vec<crate::models::OfferCountType>>,
    #[serde(default, rename = "LowestPrices", skip_serializing_if = "Option::is_none")]
    pub lowest_prices: Option<Vec<crate::models::LowestPriceType>>,
    #[serde(default, rename = "BuyBoxPrices", skip_serializing_if = "Option::is_none")]
    pub buy_box_prices: Option<Vec<crate::models::BuyBoxPriceType>>,
    #[serde(default, rename = "ListPrice", skip_serializing_if = "Option::is_none")]
    pub list_price: Option<Box<crate::models::MoneyType>>,
    #[serde(default, rename = "CompetitivePriceThreshold", skip_serializing_if = "Option::is_none")]
    pub competitive_price_threshold: Option<Box<crate::models::MoneyType>>,
    #[serde(default, rename = "SuggestedLowerPricePlusShipping", skip_serializing_if = "Option::is_none")]
    pub suggested_lower_price_plus_shipping: Option<Box<crate::models::MoneyType>>,
    /// A list of sales rank information for the item, by category.
    #[serde(default, rename = "SalesRankings", skip_serializing_if = "Option::is_none")]
    pub sales_rankings: Option<Vec<crate::models::SalesRankType>>,
    #[serde(default, rename = "BuyBoxEligibleOffers", skip_serializing_if = "Option::is_none")]
    pub buy_box_eligible_offers: Option<Vec<crate::models::OfferCountType>>,
    /// When the status is ActiveButTooSoonForProcessing, this is the time when the offers will be available for processing.
    #[serde(default, rename = "OffersAvailableTime", skip_serializing_if = "Option::is_none")]
    pub offers_available_time: Option<String>,
}

impl Summary {
    /// Contains price information about the product, including the LowestPrices and BuyBoxPrices, the ListPrice, the SuggestedLowerPricePlusShipping, and NumberOfOffers and NumberOfBuyBoxEligibleOffers.
    pub fn new(total_offer_count: i32) -> Summary {
        Summary {
            total_offer_count,
            number_of_offers: None,
            lowest_prices: None,
            buy_box_prices: None,
            list_price: None,
            competitive_price_threshold: None,
            suggested_lower_price_plus_shipping: None,
            sales_rankings: None,
            buy_box_eligible_offers: None,
            offers_available_time: None,
        }
    }
}