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

/// InventorySummary : Summary of inventory per SKU.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InventorySummary {
    /// The expiration details of the inventory. This object will only appear if the `details` parameter in the request is set to `SHOW`.
    #[serde(rename = "expirationDetails", skip_serializing_if = "Option::is_none")]
    pub expiration_details: Option<Vec<models::awd_2024_05_09::ExpirationDetails>>,
    #[serde(rename = "inventoryDetails", skip_serializing_if = "Option::is_none")]
    pub inventory_details: Option<Box<models::awd_2024_05_09::InventoryDetails>>,
    /// The seller or merchant SKU.
    #[serde(rename = "sku")]
    pub sku: String,
    /// Total quantity that is in-transit from the seller and has not yet been received at an AWD Distribution Center
    #[serde(rename = "totalInboundQuantity", skip_serializing_if = "Option::is_none")]
    pub total_inbound_quantity: Option<i64>,
    /// Total quantity that is present in AWD distribution centers.
    #[serde(rename = "totalOnhandQuantity", skip_serializing_if = "Option::is_none")]
    pub total_onhand_quantity: Option<i64>,
}

impl InventorySummary {
    /// Summary of inventory per SKU.
    pub fn new(sku: String) -> InventorySummary {
        InventorySummary {
            expiration_details: None,
            inventory_details: None,
            sku,
            total_inbound_quantity: None,
            total_onhand_quantity: None,
        }
    }
}