amazon_spapi/models/vendor_shipments/
import_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/// ImportDetails : Provide these fields only if this shipment is a direct import.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ImportDetails {
17    /// This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.
18    #[serde(rename = "methodOfPayment", skip_serializing_if = "Option::is_none")]
19    pub method_of_payment: Option<MethodOfPayment>,
20    /// The container's seal number.
21    #[serde(rename = "sealNumber", skip_serializing_if = "Option::is_none")]
22    pub seal_number: Option<String>,
23    #[serde(rename = "route", skip_serializing_if = "Option::is_none")]
24    pub route: Option<Box<models::vendor_shipments::Route>>,
25    /// Types and numbers of container(s) for import purchase orders. Can be a comma-separated list if shipment has multiple containers.
26    #[serde(rename = "importContainers", skip_serializing_if = "Option::is_none")]
27    pub import_containers: Option<String>,
28    #[serde(rename = "billableWeight", skip_serializing_if = "Option::is_none")]
29    pub billable_weight: Option<Box<models::vendor_shipments::Weight>>,
30    /// 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.
31    #[serde(rename = "estimatedShipByDate", skip_serializing_if = "Option::is_none")]
32    pub estimated_ship_by_date: Option<String>,
33    /// Identification of the instructions on how specified item/carton/pallet should be handled.
34    #[serde(rename = "handlingInstructions", skip_serializing_if = "Option::is_none")]
35    pub handling_instructions: Option<HandlingInstructions>,
36}
37
38impl ImportDetails {
39    /// Provide these fields only if this shipment is a direct import.
40    pub fn new() -> ImportDetails {
41        ImportDetails {
42            method_of_payment: None,
43            seal_number: None,
44            route: None,
45            import_containers: None,
46            billable_weight: None,
47            estimated_ship_by_date: None,
48            handling_instructions: None,
49        }
50    }
51}
52/// This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum MethodOfPayment {
55    #[serde(rename = "PaidByBuyer")]
56    PaidByBuyer,
57    #[serde(rename = "CollectOnDelivery")]
58    CollectOnDelivery,
59    #[serde(rename = "DefinedByBuyerAndSeller")]
60    DefinedByBuyerAndSeller,
61    #[serde(rename = "FOBPortOfCall")]
62    FobPortOfCall,
63    #[serde(rename = "PrepaidBySeller")]
64    PrepaidBySeller,
65    #[serde(rename = "PaidBySeller")]
66    PaidBySeller,
67}
68
69impl Default for MethodOfPayment {
70    fn default() -> MethodOfPayment {
71        Self::PaidByBuyer
72    }
73}
74/// Identification of the instructions on how specified item/carton/pallet should be handled.
75#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
76pub enum HandlingInstructions {
77    #[serde(rename = "Oversized")]
78    Oversized,
79    #[serde(rename = "Fragile")]
80    Fragile,
81    #[serde(rename = "Food")]
82    Food,
83    #[serde(rename = "HandleWithCare")]
84    HandleWithCare,
85}
86
87impl Default for HandlingInstructions {
88    fn default() -> HandlingInstructions {
89        Self::Oversized
90    }
91}
92