amazon_spapi/models/vendor_shipments/
item.rs

1/*
2 * Selling Partner API for Retail Procurement Shipments
3 *
4 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
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/// Item : Details of the item being shipped.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Item {
17    /// Item sequence number for the item. The first item will be 001, the second 002, and so on. This number is used as a reference to refer to this item from the carton or pallet level.
18    #[serde(rename = "itemSequenceNumber")]
19    pub item_sequence_number: String,
20    /// Buyer Standard Identification Number (ASIN) of an item.
21    #[serde(rename = "amazonProductIdentifier", skip_serializing_if = "Option::is_none")]
22    pub amazon_product_identifier: Option<String>,
23    /// The vendor selected product identification of the item. Should be the same as was sent in the purchase order.
24    #[serde(rename = "vendorProductIdentifier", skip_serializing_if = "Option::is_none")]
25    pub vendor_product_identifier: Option<String>,
26    #[serde(rename = "shippedQuantity")]
27    pub shipped_quantity: Box<models::vendor_shipments::ItemQuantity>,
28    #[serde(rename = "itemDetails", skip_serializing_if = "Option::is_none")]
29    pub item_details: Option<Box<models::vendor_shipments::ItemDetails>>,
30}
31
32impl Item {
33    /// Details of the item being shipped.
34    pub fn new(item_sequence_number: String, shipped_quantity: models::vendor_shipments::ItemQuantity) -> Item {
35        Item {
36            item_sequence_number,
37            amazon_product_identifier: None,
38            vendor_product_identifier: None,
39            shipped_quantity: Box::new(shipped_quantity),
40            item_details: None,
41        }
42    }
43}
44