amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Warehousing and Distribution
 *
 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
 *
 * The version of the OpenAPI document: 2024-05-09
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// InboundShipmentSummary : Summary for an AWD inbound shipment containing the shipment ID, which can be used to retrieve the actual shipment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboundShipmentSummary {
    /// Timestamp when the shipment was created.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Optional client-provided reference ID that can be used to correlate this shipment with client resources. For example, to map this shipment to an internal bookkeeping order record.
    #[serde(rename = "externalReferenceId", skip_serializing_if = "Option::is_none")]
    pub external_reference_id: Option<String>,
    /// The AWD inbound order ID that this inbound shipment belongs to.
    #[serde(rename = "orderId")]
    pub order_id: String,
    /// A unique shipment ID.
    #[serde(rename = "shipmentId")]
    pub shipment_id: String,
    #[serde(rename = "shipmentStatus")]
    pub shipment_status: models::awd_2024_05_09::InboundShipmentStatus,
    /// Timestamp when the shipment was updated.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
}

impl InboundShipmentSummary {
    /// Summary for an AWD inbound shipment containing the shipment ID, which can be used to retrieve the actual shipment.
    pub fn new(order_id: String, shipment_id: String, shipment_status: models::awd_2024_05_09::InboundShipmentStatus) -> InboundShipmentSummary {
        InboundShipmentSummary {
            created_at: None,
            external_reference_id: None,
            order_id,
            shipment_id,
            shipment_status,
            updated_at: None,
        }
    }
}