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};

/// Item : Information associated with a single SKU in the seller's catalog.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Item {
    /// The Amazon Standard Identification Number (ASIN) of the item.
    #[serde(rename = "asin")]
    pub asin: String,
    /// 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`. The same MSKU with different expiration dates cannot go into the same box.
    #[serde(rename = "expiration", skip_serializing_if = "Option::is_none")]
    pub expiration: Option<String>,
    /// A unique identifier assigned by Amazon to products stored in and fulfilled from an Amazon fulfillment center.
    #[serde(rename = "fnsku")]
    pub fnsku: String,
    /// Specifies who will label the items. Options include `AMAZON`, `SELLER`, and `NONE`.
    #[serde(rename = "labelOwner")]
    pub label_owner: String,
    /// 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,
    /// Special preparations that are required for an item.
    #[serde(rename = "prepInstructions")]
    pub prep_instructions: Vec<models::fulfillment_inbound_2024_03_20::PrepInstruction>,
    /// The number of the specified MSKU.
    #[serde(rename = "quantity")]
    pub quantity: i32,
}

impl Item {
    /// Information associated with a single SKU in the seller's catalog.
    pub fn new(asin: String, fnsku: String, label_owner: String, msku: String, prep_instructions: Vec<models::fulfillment_inbound_2024_03_20::PrepInstruction>, quantity: i32) -> Item {
        Item {
            asin,
            expiration: None,
            fnsku,
            label_owner,
            manufacturing_lot_code: None,
            msku,
            prep_instructions,
            quantity,
        }
    }
}