amazon_spapi/models/shipping/
container_item.rs

1/*
2 * Selling Partner API for Shipping
3 *
4 * Provides programmatic access to Amazon Shipping APIs.   **Note:** If you are new to the Amazon Shipping API, refer to the latest version of <a href=\"https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference\">Amazon Shipping API (v2)</a> on the <a href=\"https://developer-docs.amazon.com/amazon-shipping/\">Amazon Shipping Developer Documentation</a> site.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ContainerItem : Item in the container.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ContainerItem {
17    /// The quantity of the items of this type in the container.
18    #[serde(rename = "quantity")]
19    pub quantity: f64,
20    #[serde(rename = "unitPrice")]
21    pub unit_price: Box<models::shipping::Currency>,
22    #[serde(rename = "unitWeight")]
23    pub unit_weight: Box<models::shipping::Weight>,
24    /// A descriptive title of the item.
25    #[serde(rename = "title")]
26    pub title: String,
27}
28
29impl ContainerItem {
30    /// Item in the container.
31    pub fn new(quantity: f64, unit_price: models::shipping::Currency, unit_weight: models::shipping::Weight, title: String) -> ContainerItem {
32        ContainerItem {
33            quantity,
34            unit_price: Box::new(unit_price),
35            unit_weight: Box::new(unit_weight),
36            title,
37        }
38    }
39}
40