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
74
75
76
77
78
79
80
/*
 * 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
 */

/// CreateFulfillmentOrderRequest : The request body schema for the createFulfillmentOrder operation.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateFulfillmentOrderRequest {
    /// The marketplace the fulfillment order is placed against.
    #[serde(default, rename = "marketplaceId", skip_serializing_if = "Option::is_none")]
    pub marketplace_id: Option<String>,
    /// A fulfillment order identifier that the seller creates to track their fulfillment order. The SellerFulfillmentOrderId must be unique for each fulfillment order that a seller creates. If the seller's system already creates unique order identifiers, then these might be good values for them to use.
    #[serde(default, rename = "sellerFulfillmentOrderId")]
    pub seller_fulfillment_order_id: String,
    /// A fulfillment order identifier that the seller creates. This value displays as the order identifier in recipient-facing materials such as the outbound shipment packing slip. The value of DisplayableOrderId should match the order identifier that the seller provides to the recipient. The seller can use the SellerFulfillmentOrderId for this value or they can specify an alternate value if they want the recipient to reference an alternate order identifier.  The value must be an alpha-numeric or ISO 8859-1 compliant string from one to 40 characters in length. Cannot contain two spaces in a row. Leading and trailing white space is removed.
    #[serde(default, rename = "displayableOrderId")]
    pub displayable_order_id: String,
    #[serde(default, rename = "displayableOrderDate")]
    pub displayable_order_date: String,
    /// Order-specific text that appears in recipient-facing materials such as the outbound shipment packing slip.
    #[serde(default, rename = "displayableOrderComment")]
    pub displayable_order_comment: String,
    #[serde(default, rename = "shippingSpeedCategory")]
    pub shipping_speed_category: crate::models::ShippingSpeedCategory,
    #[serde(default, rename = "deliveryWindow", skip_serializing_if = "Option::is_none")]
    pub delivery_window: Option<Box<crate::models::DeliveryWindow>>,
    #[serde(default, rename = "destinationAddress")]
    pub destination_address: Box<crate::models::Address>,
    #[serde(default, rename = "fulfillmentAction", skip_serializing_if = "Option::is_none")]
    pub fulfillment_action: Option<crate::models::FulfillmentAction>,
    #[serde(default, rename = "fulfillmentPolicy", skip_serializing_if = "Option::is_none")]
    pub fulfillment_policy: Option<crate::models::FulfillmentPolicy>,
    #[serde(default, rename = "codSettings", skip_serializing_if = "Option::is_none")]
    pub cod_settings: Option<Box<crate::models::CodSettings>>,
    /// The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format.
    #[serde(default, rename = "shipFromCountryCode", skip_serializing_if = "Option::is_none")]
    pub ship_from_country_code: Option<String>,
    /// A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller.
    #[serde(default, rename = "notificationEmails", skip_serializing_if = "Option::is_none")]
    pub notification_emails: Option<Vec<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>>,
    /// An array of item information for creating a fulfillment order.
    #[serde(default, rename = "items")]
    pub items: Vec<crate::models::CreateFulfillmentOrderItem>,
}

impl CreateFulfillmentOrderRequest {
    /// The request body schema for the createFulfillmentOrder operation.
    pub fn new(seller_fulfillment_order_id: String, displayable_order_id: String, displayable_order_date: String, displayable_order_comment: String, shipping_speed_category: crate::models::ShippingSpeedCategory, destination_address: crate::models::Address, items: Vec<crate::models::CreateFulfillmentOrderItem>) -> CreateFulfillmentOrderRequest {
        CreateFulfillmentOrderRequest {
            marketplace_id: None,
            seller_fulfillment_order_id,
            displayable_order_id,
            displayable_order_date,
            displayable_order_comment,
            shipping_speed_category,
            delivery_window: None,
            destination_address: Box::new(destination_address),
            fulfillment_action: None,
            fulfillment_policy: None,
            cod_settings: None,
            ship_from_country_code: None,
            notification_emails: None,
            feature_constraints: None,
            items,
        }
    }
}