amazon_spapi/models/vendor_orders/
import_details.rs

1/*
2 * Selling Partner API for Retail Procurement Orders
3 *
4 * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
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/// ImportDetails : Import details for an import order.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ImportDetails {
17    /// If the recipient requests, contains the shipment method of payment. This is for import PO's only.
18    #[serde(rename = "methodOfPayment", skip_serializing_if = "Option::is_none")]
19    pub method_of_payment: Option<MethodOfPayment>,
20    /// Incoterms (International Commercial Terms) are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices. This is for import purchase orders only. 
21    #[serde(rename = "internationalCommercialTerms", skip_serializing_if = "Option::is_none")]
22    pub international_commercial_terms: Option<InternationalCommercialTerms>,
23    /// The port where goods on an import purchase order must be delivered by the vendor. This should only be specified when the internationalCommercialTerms is FOB.
24    #[serde(rename = "portOfDelivery", skip_serializing_if = "Option::is_none")]
25    pub port_of_delivery: Option<String>,
26    /// Types and numbers of container(s) for import purchase orders. Can be a comma-separated list if the shipment has multiple containers. HC signifies a high-capacity container. Free-text field, limited to 64 characters. The format will be a comma-delimited list containing values of the type: $NUMBER_OF_CONTAINERS_OF_THIS_TYPE-$CONTAINER_TYPE. The list of values for the container type is: 40'(40-foot container), 40'HC (40-foot high-capacity container), 45', 45'HC, 30', 30'HC, 20', 20'HC.
27    #[serde(rename = "importContainers", skip_serializing_if = "Option::is_none")]
28    pub import_containers: Option<String>,
29    /// Special instructions regarding the shipment. This field is for import purchase orders.
30    #[serde(rename = "shippingInstructions", skip_serializing_if = "Option::is_none")]
31    pub shipping_instructions: Option<String>,
32}
33
34impl ImportDetails {
35    /// Import details for an import order.
36    pub fn new() -> ImportDetails {
37        ImportDetails {
38            method_of_payment: None,
39            international_commercial_terms: None,
40            port_of_delivery: None,
41            import_containers: None,
42            shipping_instructions: None,
43        }
44    }
45}
46/// If the recipient requests, contains the shipment method of payment. This is for import PO's only.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum MethodOfPayment {
49    #[serde(rename = "PaidByBuyer")]
50    PaidByBuyer,
51    #[serde(rename = "CollectOnDelivery")]
52    CollectOnDelivery,
53    #[serde(rename = "DefinedByBuyerAndSeller")]
54    DefinedByBuyerAndSeller,
55    #[serde(rename = "FOBPortOfCall")]
56    FobPortOfCall,
57    #[serde(rename = "PrepaidBySeller")]
58    PrepaidBySeller,
59    #[serde(rename = "PaidBySeller")]
60    PaidBySeller,
61}
62
63impl Default for MethodOfPayment {
64    fn default() -> MethodOfPayment {
65        Self::PaidByBuyer
66    }
67}
68/// Incoterms (International Commercial Terms) are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices. This is for import purchase orders only. 
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum InternationalCommercialTerms {
71    #[serde(rename = "ExWorks")]
72    ExWorks,
73    #[serde(rename = "FreeCarrier")]
74    FreeCarrier,
75    #[serde(rename = "FreeOnBoard")]
76    FreeOnBoard,
77    #[serde(rename = "FreeAlongSideShip")]
78    FreeAlongSideShip,
79    #[serde(rename = "CarriagePaidTo")]
80    CarriagePaidTo,
81    #[serde(rename = "CostAndFreight")]
82    CostAndFreight,
83    #[serde(rename = "CarriageAndInsurancePaidTo")]
84    CarriageAndInsurancePaidTo,
85    #[serde(rename = "CostInsuranceAndFreight")]
86    CostInsuranceAndFreight,
87    #[serde(rename = "DeliveredAtTerminal")]
88    DeliveredAtTerminal,
89    #[serde(rename = "DeliveredAtPlace")]
90    DeliveredAtPlace,
91    #[serde(rename = "DeliverDutyPaid")]
92    DeliverDutyPaid,
93}
94
95impl Default for InternationalCommercialTerms {
96    fn default() -> InternationalCommercialTerms {
97        Self::ExWorks
98    }
99}
100