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
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FulfillmentPreviewItem {
#[serde(default, rename = "sellerSku")]
pub seller_sku: String,
#[serde(default, rename = "quantity")]
pub quantity: i32,
#[serde(default, rename = "sellerFulfillmentOrderItemId")]
pub seller_fulfillment_order_item_id: String,
#[serde(default, rename = "estimatedShippingWeight", skip_serializing_if = "Option::is_none")]
pub estimated_shipping_weight: Option<Box<crate::models::Weight>>,
#[serde(default, rename = "shippingWeightCalculationMethod", skip_serializing_if = "Option::is_none")]
pub shipping_weight_calculation_method: Option<ShippingWeightCalculationMethod>,
}
impl FulfillmentPreviewItem {
pub fn new(seller_sku: String, quantity: i32, seller_fulfillment_order_item_id: String) -> FulfillmentPreviewItem {
FulfillmentPreviewItem {
seller_sku,
quantity,
seller_fulfillment_order_item_id,
estimated_shipping_weight: None,
shipping_weight_calculation_method: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ShippingWeightCalculationMethod {
#[serde(rename = "Package")]
Package,
#[serde(rename = "Dimensional")]
Dimensional,
}
impl Default for ShippingWeightCalculationMethod {
fn default() -> ShippingWeightCalculationMethod {
Self::Package
}
}