amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * 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
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// FulfillmentOrder : General information about a fulfillment order, including its status.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FulfillmentOrder {
    /// The fulfillment order identifier submitted with the `createFulfillmentOrder` operation.
    #[serde(rename = "sellerFulfillmentOrderId")]
    pub seller_fulfillment_order_id: String,
    /// The identifier for the marketplace the fulfillment order is placed against.
    #[serde(rename = "marketplaceId")]
    pub marketplace_id: String,
    /// A fulfillment order identifier submitted with the `createFulfillmentOrder` operation. Displays as the order identifier in recipient-facing materials such as the packing slip.
    #[serde(rename = "displayableOrderId")]
    pub displayable_order_id: String,
    /// Date timestamp
    #[serde(rename = "displayableOrderDate")]
    pub displayable_order_date: String,
    /// A text block submitted with the `createFulfillmentOrder` operation. Displays in recipient-facing materials such as the packing slip.
    #[serde(rename = "displayableOrderComment")]
    pub displayable_order_comment: String,
    #[serde(rename = "shippingSpeedCategory")]
    pub shipping_speed_category: models::fulfillment_outbound_2020_07_01::ShippingSpeedCategory,
    #[serde(rename = "deliveryWindow", skip_serializing_if = "Option::is_none")]
    pub delivery_window: Option<Box<models::fulfillment_outbound_2020_07_01::DeliveryWindow>>,
    #[serde(rename = "destinationAddress")]
    pub destination_address: Box<models::fulfillment_outbound_2020_07_01::Address>,
    #[serde(rename = "fulfillmentAction", skip_serializing_if = "Option::is_none")]
    pub fulfillment_action: Option<models::fulfillment_outbound_2020_07_01::FulfillmentAction>,
    #[serde(rename = "fulfillmentPolicy", skip_serializing_if = "Option::is_none")]
    pub fulfillment_policy: Option<models::fulfillment_outbound_2020_07_01::FulfillmentPolicy>,
    #[serde(rename = "codSettings", skip_serializing_if = "Option::is_none")]
    pub cod_settings: Option<Box<models::fulfillment_outbound_2020_07_01::CodSettings>>,
    /// Date timestamp
    #[serde(rename = "receivedDate")]
    pub received_date: String,
    #[serde(rename = "fulfillmentOrderStatus")]
    pub fulfillment_order_status: models::fulfillment_outbound_2020_07_01::FulfillmentOrderStatus,
    /// Date timestamp
    #[serde(rename = "statusUpdatedDate")]
    pub status_updated_date: 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(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(rename = "featureConstraints", skip_serializing_if = "Option::is_none")]
    pub feature_constraints: Option<Vec<models::fulfillment_outbound_2020_07_01::FeatureSettings>>,
}

impl FulfillmentOrder {
    /// General information about a fulfillment order, including its status.
    pub fn new(seller_fulfillment_order_id: String, marketplace_id: String, displayable_order_id: String, displayable_order_date: String, displayable_order_comment: String, shipping_speed_category: models::fulfillment_outbound_2020_07_01::ShippingSpeedCategory, destination_address: models::fulfillment_outbound_2020_07_01::Address, received_date: String, fulfillment_order_status: models::fulfillment_outbound_2020_07_01::FulfillmentOrderStatus, status_updated_date: String) -> FulfillmentOrder {
        FulfillmentOrder {
            seller_fulfillment_order_id,
            marketplace_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,
            received_date,
            fulfillment_order_status,
            status_updated_date,
            notification_emails: None,
            feature_constraints: None,
        }
    }
}