amazon_spapi/models/vendor_shipments/item_details.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/// ItemDetails : Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever is appropriate.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ItemDetails {
17 /// The purchase order number for the shipment being confirmed. If the items in this shipment belong to multiple purchase order numbers that are in particular carton or pallet within the shipment, then provide the purchaseOrderNumber at the appropriate carton or pallet level. Formatting Notes: 8-character alpha-numeric code.
18 #[serde(rename = "purchaseOrderNumber", skip_serializing_if = "Option::is_none")]
19 pub purchase_order_number: Option<String>,
20 /// The batch or lot number associates an item with information the manufacturer considers relevant for traceability of the trade item to which the Element String is applied. The data may refer to the trade item itself or to items contained. This field is mandatory for all perishable items.
21 #[serde(rename = "lotNumber", skip_serializing_if = "Option::is_none")]
22 pub lot_number: Option<String>,
23 #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")]
24 pub expiry: Option<Box<models::vendor_shipments::Expiry>>,
25 #[serde(rename = "maximumRetailPrice", skip_serializing_if = "Option::is_none")]
26 pub maximum_retail_price: Option<Box<models::vendor_shipments::Money>>,
27 /// Identification of the instructions on how specified item/carton/pallet should be handled.
28 #[serde(rename = "handlingCode", skip_serializing_if = "Option::is_none")]
29 pub handling_code: Option<HandlingCode>,
30}
31
32impl ItemDetails {
33 /// Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever is appropriate.
34 pub fn new() -> ItemDetails {
35 ItemDetails {
36 purchase_order_number: None,
37 lot_number: None,
38 expiry: None,
39 maximum_retail_price: None,
40 handling_code: None,
41 }
42 }
43}
44/// Identification of the instructions on how specified item/carton/pallet should be handled.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum HandlingCode {
47 #[serde(rename = "Oversized")]
48 Oversized,
49 #[serde(rename = "Fragile")]
50 Fragile,
51 #[serde(rename = "Food")]
52 Food,
53 #[serde(rename = "HandleWithCare")]
54 HandleWithCare,
55}
56
57impl Default for HandlingCode {
58 fn default() -> HandlingCode {
59 Self::Oversized
60 }
61}
62