amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for FBA inbound operations.
 *
 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
 *
 * The version of the OpenAPI document: 2024-03-20
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ItemInput : Defines an item's input parameters.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ItemInput {
    /// The expiration date of the MSKU. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `YYYY-MM-DD`. Items with the same MSKU but different expiration dates cannot go into the same box.
    #[serde(rename = "expiration", skip_serializing_if = "Option::is_none")]
    pub expiration: Option<String>,
    #[serde(rename = "labelOwner")]
    pub label_owner: models::fulfillment_inbound_2024_03_20::LabelOwner,
    /// The manufacturing lot code.
    #[serde(rename = "manufacturingLotCode", skip_serializing_if = "Option::is_none")]
    pub manufacturing_lot_code: Option<String>,
    /// The merchant SKU, a merchant-supplied identifier of a specific SKU.
    #[serde(rename = "msku")]
    pub msku: String,
    #[serde(rename = "prepOwner")]
    pub prep_owner: models::fulfillment_inbound_2024_03_20::PrepOwner,
    /// The number of units of the specified MSKU that will be shipped.
    #[serde(rename = "quantity")]
    pub quantity: i32,
}

impl ItemInput {
    /// Defines an item's input parameters.
    pub fn new(label_owner: models::fulfillment_inbound_2024_03_20::LabelOwner, msku: String, prep_owner: models::fulfillment_inbound_2024_03_20::PrepOwner, quantity: i32) -> ItemInput {
        ItemInput {
            expiration: None,
            label_owner,
            manufacturing_lot_code: None,
            msku,
            prep_owner,
            quantity,
        }
    }
}