Skip to main content

amazon_spapi/models/vendor_shipments/
shipment_information.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/// ShipmentInformation : Shipment Information details for Label request.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ShipmentInformation {
17    #[serde(rename = "vendorDetails", skip_serializing_if = "Option::is_none")]
18    pub vendor_details: Option<Box<models::vendor_shipments::VendorDetails>>,
19    /// The buyer reference number is a unique identifier generated by the buyer for all Collect and WePay shipments.
20    #[serde(rename = "buyerReferenceNumber", skip_serializing_if = "Option::is_none")]
21    pub buyer_reference_number: Option<String>,
22    #[serde(rename = "shipToParty", skip_serializing_if = "Option::is_none")]
23    pub ship_to_party: Option<Box<models::vendor_shipments::PartyIdentification>>,
24    #[serde(rename = "shipFromParty", skip_serializing_if = "Option::is_none")]
25    pub ship_from_party: Option<Box<models::vendor_shipments::PartyIdentification>>,
26    /// Vendor Warehouse ID from where the shipment is scheduled to be picked up by buyer / Carrier.
27    #[serde(rename = "warehouseId", skip_serializing_if = "Option::is_none")]
28    pub warehouse_id: Option<String>,
29    /// Unique Id with  which  the shipment can be tracked for Small Parcels.
30    #[serde(rename = "masterTrackingId", skip_serializing_if = "Option::is_none")]
31    pub master_tracking_id: Option<String>,
32    /// Number of Labels that are created as part of this shipment.
33    #[serde(rename = "totalLabelCount", skip_serializing_if = "Option::is_none")]
34    pub total_label_count: Option<i32>,
35    /// Type of shipment whether it is Small Parcel
36    #[serde(rename = "shipMode", skip_serializing_if = "Option::is_none")]
37    pub ship_mode: Option<ShipMode>,
38}
39
40impl ShipmentInformation {
41    /// Shipment Information details for Label request.
42    pub fn new() -> ShipmentInformation {
43        ShipmentInformation {
44            vendor_details: None,
45            buyer_reference_number: None,
46            ship_to_party: None,
47            ship_from_party: None,
48            warehouse_id: None,
49            master_tracking_id: None,
50            total_label_count: None,
51            ship_mode: None,
52        }
53    }
54}
55/// Type of shipment whether it is Small Parcel
56#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
57pub enum ShipMode {
58    #[serde(rename = "SmallParcel")]
59    SmallParcel,
60    #[serde(rename = "LTL")]
61    Ltl,
62}
63
64impl Default for ShipMode {
65    fn default() -> ShipMode {
66        Self::SmallParcel
67    }
68}
69