Skip to main content

amazon_spapi/models/awd_2024_05_09/
inventory_quantity.rs

1/*
2 * The Selling Partner API for Amazon Warehousing and Distribution
3 *
4 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
5 *
6 * The version of the OpenAPI document: 2024-05-09
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// InventoryQuantity : Quantity of inventory with an associated measurement unit context.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InventoryQuantity {
17    /// Quantity of the respective inventory.
18    #[serde(rename = "quantity")]
19    pub quantity: f64,
20    #[serde(rename = "unitOfMeasurement")]
21    pub unit_of_measurement: models::awd_2024_05_09::InventoryUnitOfMeasurement,
22}
23
24impl InventoryQuantity {
25    /// Quantity of inventory with an associated measurement unit context.
26    pub fn new(quantity: f64, unit_of_measurement: models::awd_2024_05_09::InventoryUnitOfMeasurement) -> InventoryQuantity {
27        InventoryQuantity {
28            quantity,
29            unit_of_measurement,
30        }
31    }
32}
33