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

/// SkuQuantity : Quantity details for a SKU as part of a shipment
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SkuQuantity {
    #[serde(rename = "expectedQuantity")]
    pub expected_quantity: Box<models::awd_2024_05_09::InventoryQuantity>,
    #[serde(rename = "receivedQuantity", skip_serializing_if = "Option::is_none")]
    pub received_quantity: Option<Box<models::awd_2024_05_09::InventoryQuantity>>,
    /// The merchant stock keeping unit
    #[serde(rename = "sku")]
    pub sku: String,
}

impl SkuQuantity {
    /// Quantity details for a SKU as part of a shipment
    pub fn new(expected_quantity: models::awd_2024_05_09::InventoryQuantity, sku: String) -> SkuQuantity {
        SkuQuantity {
            expected_quantity: Box::new(expected_quantity),
            received_quantity: None,
            sku,
        }
    }
}