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
/*
 * Selling Partner API for Merchant Fulfillment
 *
 * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// ShippingService : A shipping service offer made by a carrier.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ShippingService {
    /// A plain text representation of a carrier's shipping service. For example, \"UPS Ground\" or \"FedEx Standard Overnight\". 
    #[serde(default, rename = "ShippingServiceName")]
    pub shipping_service_name: String,
    /// The name of the carrier.
    #[serde(default, rename = "CarrierName")]
    pub carrier_name: String,
    /// An Amazon-defined shipping service identifier.
    #[serde(default, rename = "ShippingServiceId")]
    pub shipping_service_id: String,
    /// An Amazon-defined shipping service offer identifier.
    #[serde(default, rename = "ShippingServiceOfferId")]
    pub shipping_service_offer_id: String,
    #[serde(default, rename = "ShipDate")]
    pub ship_date: String,
    #[serde(default, rename = "EarliestEstimatedDeliveryDate", skip_serializing_if = "Option::is_none")]
    pub earliest_estimated_delivery_date: Option<String>,
    #[serde(default, rename = "LatestEstimatedDeliveryDate", skip_serializing_if = "Option::is_none")]
    pub latest_estimated_delivery_date: Option<String>,
    #[serde(default, rename = "Rate")]
    pub rate: Box<crate::models::CurrencyAmount>,
    #[serde(default, rename = "ShippingServiceOptions")]
    pub shipping_service_options: Box<crate::models::ShippingServiceOptions>,
    #[serde(default, rename = "AvailableShippingServiceOptions", skip_serializing_if = "Option::is_none")]
    pub available_shipping_service_options: Option<Box<crate::models::AvailableShippingServiceOptions>>,
    /// List of label formats.
    #[serde(default, rename = "AvailableLabelFormats", skip_serializing_if = "Option::is_none")]
    pub available_label_formats: Option<Vec<crate::models::LabelFormat>>,
    /// The available label formats.
    #[serde(default, rename = "AvailableFormatOptionsForLabel", skip_serializing_if = "Option::is_none")]
    pub available_format_options_for_label: Option<Vec<crate::models::LabelFormatOption>>,
    /// When true, additional seller inputs are required.
    #[serde(default, rename = "RequiresAdditionalSellerInputs")]
    pub requires_additional_seller_inputs: bool,
}

impl ShippingService {
    /// A shipping service offer made by a carrier.
    pub fn new(shipping_service_name: String, carrier_name: String, shipping_service_id: String, shipping_service_offer_id: String, ship_date: String, rate: crate::models::CurrencyAmount, shipping_service_options: crate::models::ShippingServiceOptions, requires_additional_seller_inputs: bool) -> ShippingService {
        ShippingService {
            shipping_service_name,
            carrier_name,
            shipping_service_id,
            shipping_service_offer_id,
            ship_date,
            earliest_estimated_delivery_date: None,
            latest_estimated_delivery_date: None,
            rate: Box::new(rate),
            shipping_service_options: Box::new(shipping_service_options),
            available_shipping_service_options: None,
            available_label_formats: None,
            available_format_options_for_label: None,
            requires_additional_seller_inputs,
        }
    }
}