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
/*
 * 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
 */

/// GetFulfillmentPreviewRequest : The request body schema for the getFulfillmentPreview operation.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GetFulfillmentPreviewRequest {
    /// The marketplace the fulfillment order is placed against.
    #[serde(default, rename = "marketplaceId", skip_serializing_if = "Option::is_none")]
    pub marketplace_id: Option<String>,
    #[serde(default, rename = "address")]
    pub address: Box<crate::models::Address>,
    /// An array of fulfillment preview item information.
    #[serde(default, rename = "items")]
    pub items: Vec<crate::models::GetFulfillmentPreviewItem>,
    #[serde(default, rename = "shippingSpeedCategories", skip_serializing_if = "Option::is_none")]
    pub shipping_speed_categories: Option<Vec<crate::models::ShippingSpeedCategory>>,
    /// Specifies whether to return fulfillment order previews that are for COD (Cash On Delivery).  Possible values:  * true - Returns all fulfillment order previews (both for COD and not for COD). * false - Returns only fulfillment order previews that are not for COD.
    #[serde(default, rename = "includeCODFulfillmentPreview", skip_serializing_if = "Option::is_none")]
    pub include_cod_fulfillment_preview: Option<bool>,
    /// Specifies whether to return the ScheduledDeliveryInfo response object, which contains the available delivery windows for a Scheduled Delivery. The ScheduledDeliveryInfo response object can only be returned for fulfillment order previews with ShippingSpeedCategories = ScheduledDelivery.
    #[serde(default, rename = "includeDeliveryWindows", skip_serializing_if = "Option::is_none")]
    pub include_delivery_windows: Option<bool>,
    /// 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 GetFulfillmentPreviewRequest {
    /// The request body schema for the getFulfillmentPreview operation.
    pub fn new(address: crate::models::Address, items: Vec<crate::models::GetFulfillmentPreviewItem>) -> GetFulfillmentPreviewRequest {
        GetFulfillmentPreviewRequest {
            marketplace_id: None,
            address: Box::new(address),
            items,
            shipping_speed_categories: None,
            include_cod_fulfillment_preview: None,
            include_delivery_windows: None,
            feature_constraints: None,
        }
    }
}