Skip to main content

amazon_spapi/models/fulfillment_inbound_2024_03_20/
box_update_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/// BoxUpdateInput : Input information for updating a box
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BoxUpdateInput {
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    /// Primary key to uniquely identify a Box Package. PackageId must be provided if the intent is to update an existing box. Adding a new box will not require providing this value. Any existing PackageIds not provided will be treated as to-be-removed
25    #[serde(rename = "packageId", skip_serializing_if = "Option::is_none")]
26    pub package_id: Option<String>,
27    /// The number of containers where all other properties like weight or dimensions are identical.
28    #[serde(rename = "quantity")]
29    pub quantity: i32,
30    #[serde(rename = "weight")]
31    pub weight: Box<models::fulfillment_inbound_2024_03_20::Weight>,
32}
33
34impl BoxUpdateInput {
35    /// Input information for updating a box
36    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) -> BoxUpdateInput {
37        BoxUpdateInput {
38            content_information_source,
39            dimensions: Box::new(dimensions),
40            items: None,
41            package_id: None,
42            quantity,
43            weight: Box::new(weight),
44        }
45    }
46}
47