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
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FulfillmentPreview {
#[serde(default, rename = "shippingSpeedCategory")]
pub shipping_speed_category: crate::models::ShippingSpeedCategory,
#[serde(default, rename = "scheduledDeliveryInfo", skip_serializing_if = "Option::is_none")]
pub scheduled_delivery_info: Option<Box<crate::models::ScheduledDeliveryInfo>>,
#[serde(default, rename = "isFulfillable")]
pub is_fulfillable: bool,
#[serde(default, rename = "isCODCapable")]
pub is_cod_capable: bool,
#[serde(default, rename = "estimatedShippingWeight", skip_serializing_if = "Option::is_none")]
pub estimated_shipping_weight: Option<Box<crate::models::Weight>>,
#[serde(default, rename = "estimatedFees", skip_serializing_if = "Option::is_none")]
pub estimated_fees: Option<Vec<crate::models::Fee>>,
#[serde(default, rename = "fulfillmentPreviewShipments", skip_serializing_if = "Option::is_none")]
pub fulfillment_preview_shipments: Option<Vec<crate::models::FulfillmentPreviewShipment>>,
#[serde(default, rename = "unfulfillablePreviewItems", skip_serializing_if = "Option::is_none")]
pub unfulfillable_preview_items: Option<Vec<crate::models::UnfulfillablePreviewItem>>,
#[serde(default, rename = "orderUnfulfillableReasons", skip_serializing_if = "Option::is_none")]
pub order_unfulfillable_reasons: Option<Vec<String>>,
#[serde(default, rename = "marketplaceId")]
pub marketplace_id: String,
#[serde(default, rename = "featureConstraints", skip_serializing_if = "Option::is_none")]
pub feature_constraints: Option<Vec<crate::models::FeatureSettings>>,
}
impl FulfillmentPreview {
pub fn new(shipping_speed_category: crate::models::ShippingSpeedCategory, is_fulfillable: bool, is_cod_capable: bool, marketplace_id: String) -> FulfillmentPreview {
FulfillmentPreview {
shipping_speed_category,
scheduled_delivery_info: None,
is_fulfillable,
is_cod_capable,
estimated_shipping_weight: None,
estimated_fees: None,
fulfillment_preview_shipments: None,
unfulfillable_preview_items: None,
order_unfulfillable_reasons: None,
marketplace_id,
feature_constraints: None,
}
}
}