Skip to main content

amazon_spapi/models/awd_2024_05_09/
inbound_order.rs

1/*
2 * The Selling Partner API for Amazon Warehousing and Distribution
3 *
4 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
5 *
6 * The version of the OpenAPI document: 2024-05-09
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// InboundOrder : Represents an AWD inbound order.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InboundOrder {
17    /// Date when this order was created.
18    #[serde(rename = "createdAt")]
19    pub created_at: String,
20    #[serde(rename = "destinationDetails", skip_serializing_if = "Option::is_none")]
21    pub destination_details: Option<Box<models::awd_2024_05_09::DestinationDetails>>,
22    /// Reference ID that can be used to correlate the order with partner resources.
23    #[serde(rename = "externalReferenceId", skip_serializing_if = "Option::is_none")]
24    pub external_reference_id: Option<String>,
25    /// Inbound order ID.
26    #[serde(rename = "orderId")]
27    pub order_id: String,
28    #[serde(rename = "orderStatus")]
29    pub order_status: models::awd_2024_05_09::InboundStatus,
30    #[serde(rename = "originAddress")]
31    pub origin_address: Box<models::awd_2024_05_09::Address>,
32    /// List of packages to be inbounded.
33    #[serde(rename = "packagesToInbound")]
34    pub packages_to_inbound: Vec<models::awd_2024_05_09::DistributionPackageQuantity>,
35    #[serde(rename = "preferences", skip_serializing_if = "Option::is_none")]
36    pub preferences: Option<Box<models::awd_2024_05_09::InboundPreferences>>,
37    /// Date when this order was last updated.
38    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
39    pub updated_at: Option<String>,
40}
41
42impl InboundOrder {
43    /// Represents an AWD inbound order.
44    pub fn new(created_at: String, order_id: String, order_status: models::awd_2024_05_09::InboundStatus, origin_address: models::awd_2024_05_09::Address, packages_to_inbound: Vec<models::awd_2024_05_09::DistributionPackageQuantity>) -> InboundOrder {
45        InboundOrder {
46            created_at,
47            destination_details: None,
48            external_reference_id: None,
49            order_id,
50            order_status,
51            origin_address: Box::new(origin_address),
52            packages_to_inbound,
53            preferences: None,
54            updated_at: None,
55        }
56    }
57}
58