Skip to main content

amazon_spapi/models/fulfillment_inbound_2024_03_20/
box_input.rs

1/*
2 * The Selling Partner API for FBA inbound operations.
3 *
4 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
5 *
6 * The version of the OpenAPI document: 2024-03-20
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BoxInput : Input information for a given box.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BoxInput {
17    #[serde(rename = "contentInformationSource")]
18    pub content_information_source: models::fulfillment_inbound_2024_03_20::BoxContentInformationSource,
19    #[serde(rename = "dimensions")]
20    pub dimensions: Box<models::fulfillment_inbound_2024_03_20::Dimensions>,
21    /// The items and their quantity in the box. This must be empty if the box `contentInformationSource` is `BARCODE_2D` or `MANUAL_PROCESS`.
22    #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
23    pub items: Option<Vec<models::fulfillment_inbound_2024_03_20::ItemInput>>,
24    /// The number of containers where all other properties like weight or dimensions are identical.
25    #[serde(rename = "quantity")]
26    pub quantity: i32,
27    #[serde(rename = "weight")]
28    pub weight: Box<models::fulfillment_inbound_2024_03_20::Weight>,
29}
30
31impl BoxInput {
32    /// Input information for a given box.
33    pub fn new(content_information_source: models::fulfillment_inbound_2024_03_20::BoxContentInformationSource, dimensions: models::fulfillment_inbound_2024_03_20::Dimensions, quantity: i32, weight: models::fulfillment_inbound_2024_03_20::Weight) -> BoxInput {
34        BoxInput {
35            content_information_source,
36            dimensions: Box::new(dimensions),
37            items: None,
38            quantity,
39            weight: Box::new(weight),
40        }
41    }
42}
43