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
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ShippingService {
#[serde(default, rename = "ShippingServiceName")]
pub shipping_service_name: String,
#[serde(default, rename = "CarrierName")]
pub carrier_name: String,
#[serde(default, rename = "ShippingServiceId")]
pub shipping_service_id: String,
#[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>>,
#[serde(default, rename = "AvailableLabelFormats", skip_serializing_if = "Option::is_none")]
pub available_label_formats: Option<Vec<crate::models::LabelFormat>>,
#[serde(default, rename = "AvailableFormatOptionsForLabel", skip_serializing_if = "Option::is_none")]
pub available_format_options_for_label: Option<Vec<crate::models::LabelFormatOption>>,
#[serde(default, rename = "RequiresAdditionalSellerInputs")]
pub requires_additional_seller_inputs: bool,
}
impl ShippingService {
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,
}
}
}