1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Selling Partner API for Retail Procurement Shipments
 *
 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportDetails {
    /// This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.
    #[serde(default, rename = "methodOfPayment", skip_serializing_if = "Option::is_none")]
    pub method_of_payment: Option<MethodOfPayment>,
    /// The container's seal number.
    #[serde(default, rename = "sealNumber", skip_serializing_if = "Option::is_none")]
    pub seal_number: Option<String>,
    #[serde(default, rename = "route", skip_serializing_if = "Option::is_none")]
    pub route: Option<Box<crate::models::Route>>,
    /// Types and numbers of container(s) for import purchase orders. Can be a comma-separated list if shipment has multiple containers.
    #[serde(default, rename = "importContainers", skip_serializing_if = "Option::is_none")]
    pub import_containers: Option<String>,
    #[serde(default, rename = "billableWeight", skip_serializing_if = "Option::is_none")]
    pub billable_weight: Option<Box<crate::models::Weight>>,
    /// Date on which the shipment is expected to be shipped. This value should not be in the past and not more than 60 days out in the future.
    #[serde(default, rename = "estimatedShipByDate", skip_serializing_if = "Option::is_none")]
    pub estimated_ship_by_date: Option<String>,
}

impl ImportDetails {
    pub fn new() -> ImportDetails {
        ImportDetails {
            method_of_payment: None,
            seal_number: None,
            route: None,
            import_containers: None,
            billable_weight: None,
            estimated_ship_by_date: None,
        }
    }
}

/// This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MethodOfPayment {
    #[serde(rename = "PaidByBuyer")]
    PaidByBuyer,
    #[serde(rename = "CollectOnDelivery")]
    CollectOnDelivery,
    #[serde(rename = "DefinedByBuyerAndSeller")]
    DefinedByBuyerAndSeller,
    #[serde(rename = "FOBPortOfCall")]
    FOBPortOfCall,
    #[serde(rename = "PrepaidBySeller")]
    PrepaidBySeller,
    #[serde(rename = "PaidBySeller")]
    PaidBySeller,
}

impl Default for MethodOfPayment {
    fn default() -> MethodOfPayment {
        Self::PaidByBuyer
    }
}