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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * 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
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct OfferDetail {
    /// When true, this is the seller's offer.
    #[serde(default, rename = "MyOffer", skip_serializing_if = "Option::is_none")]
    pub my_offer: Option<bool>,
    #[serde(default, rename = "offerType", skip_serializing_if = "Option::is_none")]
    pub offer_type: Option<crate::models::OfferCustomerType>,
    /// The subcondition of the item. Subcondition values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.
    #[serde(default, rename = "SubCondition")]
    pub sub_condition: String,
    /// The seller identifier for the offer.
    #[serde(default, rename = "SellerId", skip_serializing_if = "Option::is_none")]
    pub seller_id: Option<String>,
    /// Information about the condition of the item.
    #[serde(default, rename = "ConditionNotes", skip_serializing_if = "Option::is_none")]
    pub condition_notes: Option<String>,
    #[serde(default, rename = "SellerFeedbackRating", skip_serializing_if = "Option::is_none")]
    pub seller_feedback_rating: Option<Box<crate::models::SellerFeedbackType>>,
    #[serde(default, rename = "ShippingTime")]
    pub shipping_time: Box<crate::models::DetailedShippingTimeType>,
    #[serde(default, rename = "ListingPrice")]
    pub listing_price: Box<crate::models::MoneyType>,
    #[serde(default, rename = "quantityDiscountPrices", skip_serializing_if = "Option::is_none")]
    pub quantity_discount_prices: Option<Vec<crate::models::QuantityDiscountPriceType>>,
    #[serde(default, rename = "Points", skip_serializing_if = "Option::is_none")]
    pub points: Option<Box<crate::models::Points>>,
    #[serde(default, rename = "Shipping")]
    pub shipping: Box<crate::models::MoneyType>,
    #[serde(default, rename = "ShipsFrom", skip_serializing_if = "Option::is_none")]
    pub ships_from: Option<Box<crate::models::ShipsFromType>>,
    /// When true, the offer is fulfilled by Amazon.
    #[serde(default, rename = "IsFulfilledByAmazon")]
    pub is_fulfilled_by_amazon: bool,
    #[serde(default, rename = "PrimeInformation", skip_serializing_if = "Option::is_none")]
    pub prime_information: Option<Box<crate::models::PrimeInformationType>>,
    /// 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.
    #[serde(default, rename = "IsBuyBoxWinner", skip_serializing_if = "Option::is_none")]
    pub is_buy_box_winner: Option<bool>,
    /// When true, the seller of the item is eligible to win the Buy Box.
    #[serde(default, rename = "IsFeaturedMerchant", skip_serializing_if = "Option::is_none")]
    pub is_featured_merchant: Option<bool>,
}

impl OfferDetail {
    pub fn new(sub_condition: String, shipping_time: crate::models::DetailedShippingTimeType, listing_price: crate::models::MoneyType, shipping: crate::models::MoneyType, is_fulfilled_by_amazon: bool) -> OfferDetail {
        OfferDetail {
            my_offer: None,
            offer_type: None,
            sub_condition,
            seller_id: None,
            condition_notes: None,
            seller_feedback_rating: None,
            shipping_time: Box::new(shipping_time),
            listing_price: Box::new(listing_price),
            quantity_discount_prices: None,
            points: None,
            shipping: Box::new(shipping),
            ships_from: None,
            is_fulfilled_by_amazon,
            prime_information: None,
            is_buy_box_winner: None,
            is_featured_merchant: None,
        }
    }
}