amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Fulfillment Inbound
 *
 * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// InboundShipmentItem : Item information for an inbound shipment. Submitted with a call to the createInboundShipment or updateInboundShipment operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboundShipmentItem {
    /// A shipment identifier originally returned by the createInboundShipmentPlan operation.
    #[serde(rename = "ShipmentId", skip_serializing_if = "Option::is_none")]
    pub shipment_id: Option<String>,
    /// The seller SKU of the item.
    #[serde(rename = "SellerSKU")]
    pub seller_sku: String,
    /// Amazon's fulfillment network SKU of the item.
    #[serde(rename = "FulfillmentNetworkSKU", skip_serializing_if = "Option::is_none")]
    pub fulfillment_network_sku: Option<String>,
    /// The item quantity.
    #[serde(rename = "QuantityShipped")]
    pub quantity_shipped: i32,
    /// The item quantity.
    #[serde(rename = "QuantityReceived", skip_serializing_if = "Option::is_none")]
    pub quantity_received: Option<i32>,
    /// The item quantity.
    #[serde(rename = "QuantityInCase", skip_serializing_if = "Option::is_none")]
    pub quantity_in_case: Option<i32>,
    /// Type containing date in string format
    #[serde(rename = "ReleaseDate", skip_serializing_if = "Option::is_none")]
    pub release_date: Option<String>,
    /// A list of preparation instructions and who is responsible for that preparation.
    #[serde(rename = "PrepDetailsList", skip_serializing_if = "Option::is_none")]
    pub prep_details_list: Option<Vec<models::fulfillment_inbound_v0::PrepDetails>>,
}

impl InboundShipmentItem {
    /// Item information for an inbound shipment. Submitted with a call to the createInboundShipment or updateInboundShipment operation.
    pub fn new(seller_sku: String, quantity_shipped: i32) -> InboundShipmentItem {
        InboundShipmentItem {
            shipment_id: None,
            seller_sku,
            fulfillment_network_sku: None,
            quantity_shipped,
            quantity_received: None,
            quantity_in_case: None,
            release_date: None,
            prep_details_list: None,
        }
    }
}