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
/*
 * Selling Partner APIs for Fulfillment Outbound
 *
 * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
 *
 * The version of the OpenAPI document: 2020-07-01
 * 
 * Generated by: https://openapi-generator.tech
 */

/// FulfillmentPreview : Information about a fulfillment order preview, including delivery and fee information based on shipping method.



#[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>>,
    /// When true, this fulfillment order preview is fulfillable.
    #[serde(default, rename = "isFulfillable")]
    pub is_fulfillable: bool,
    /// When true, this fulfillment order preview is for COD (Cash On Delivery).
    #[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>>,
    /// An array of fee type and cost pairs.
    #[serde(default, rename = "estimatedFees", skip_serializing_if = "Option::is_none")]
    pub estimated_fees: Option<Vec<crate::models::Fee>>,
    /// An array of fulfillment preview shipment information.
    #[serde(default, rename = "fulfillmentPreviewShipments", skip_serializing_if = "Option::is_none")]
    pub fulfillment_preview_shipments: Option<Vec<crate::models::FulfillmentPreviewShipment>>,
    /// An array of unfulfillable preview item information.
    #[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>>,
    /// The marketplace the fulfillment order is placed against.
    #[serde(default, rename = "marketplaceId")]
    pub marketplace_id: String,
    /// A list of features and their fulfillment policies to apply to the order.
    #[serde(default, rename = "featureConstraints", skip_serializing_if = "Option::is_none")]
    pub feature_constraints: Option<Vec<crate::models::FeatureSettings>>,
}

impl FulfillmentPreview {
    /// Information about a fulfillment order preview, including delivery and fee information based on shipping method.
    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,
        }
    }
}