use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FulfillmentOrder {
#[serde(rename = "sellerFulfillmentOrderId")]
pub seller_fulfillment_order_id: String,
#[serde(rename = "marketplaceId")]
pub marketplace_id: String,
#[serde(rename = "displayableOrderId")]
pub displayable_order_id: String,
#[serde(rename = "displayableOrderDate")]
pub displayable_order_date: String,
#[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>>,
#[serde(rename = "receivedDate")]
pub received_date: String,
#[serde(rename = "fulfillmentOrderStatus")]
pub fulfillment_order_status: models::fulfillment_outbound_2020_07_01::FulfillmentOrderStatus,
#[serde(rename = "statusUpdatedDate")]
pub status_updated_date: String,
#[serde(rename = "notificationEmails", skip_serializing_if = "Option::is_none")]
pub notification_emails: Option<Vec<String>>,
#[serde(rename = "featureConstraints", skip_serializing_if = "Option::is_none")]
pub feature_constraints: Option<Vec<models::fulfillment_outbound_2020_07_01::FeatureSettings>>,
}
impl FulfillmentOrder {
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,
}
}
}