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

/// MeasurementData : Package weight and dimension.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MeasurementData {
    #[serde(rename = "dimensions", skip_serializing_if = "Option::is_none")]
    pub dimensions: Option<Box<models::awd_2024_05_09::PackageDimensions>>,
    #[serde(rename = "volume", skip_serializing_if = "Option::is_none")]
    pub volume: Option<Box<models::awd_2024_05_09::PackageVolume>>,
    #[serde(rename = "weight")]
    pub weight: Box<models::awd_2024_05_09::PackageWeight>,
}

impl MeasurementData {
    /// Package weight and dimension.
    pub fn new(weight: models::awd_2024_05_09::PackageWeight) -> MeasurementData {
        MeasurementData {
            dimensions: None,
            volume: None,
            weight: Box::new(weight),
        }
    }
}