amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Direct Fulfillment Shipping
 *
 * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// PackedItem : Represents an item that has been packed into a container for shipping.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PackedItem {
    /// Item Sequence Number for the item. This must be the same value as sent in the order for a given item.
    #[serde(rename = "itemSequenceNumber")]
    pub item_sequence_number: i32,
    /// Buyer's Standard Identification Number (ASIN) of an item. Either buyerProductIdentifier or vendorProductIdentifier is required.
    #[serde(rename = "buyerProductIdentifier", skip_serializing_if = "Option::is_none")]
    pub buyer_product_identifier: Option<String>,
    /// The vendor selected product identification of the item. Should be the same as was sent in the Purchase Order, like SKU Number.
    #[serde(rename = "vendorProductIdentifier", skip_serializing_if = "Option::is_none")]
    pub vendor_product_identifier: Option<String>,
    #[serde(rename = "packedQuantity")]
    pub packed_quantity: Box<models::vendor_direct_fulfillment_shipping_v1::ItemQuantity>,
}

impl PackedItem {
    /// Represents an item that has been packed into a container for shipping.
    pub fn new(item_sequence_number: i32, packed_quantity: models::vendor_direct_fulfillment_shipping_v1::ItemQuantity) -> PackedItem {
        PackedItem {
            item_sequence_number,
            buyer_product_identifier: None,
            vendor_product_identifier: None,
            packed_quantity: Box::new(packed_quantity),
        }
    }
}