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
/*
* 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 TransportationDetails {
/// Code that identifies the carrier for the shipment. The Standard Carrier Alpha Code (SCAC) is a unique two to four letter code used to identify a carrier. Carrier SCAC codes are assigned and maintained by the NMFTA (National Motor Freight Association). This field is mandatory for US, CA, MX shipment confirmations.
#[serde(default, rename = "carrierScac", skip_serializing_if = "Option::is_none")]
pub carrier_scac: Option<String>,
/// The field also known as PRO number is a unique number assigned by the carrier. It is used to identify and track the shipment that goes out for delivery. This field is mandatory for UA, CA, MX shipment confirmations.
#[serde(default, rename = "carrierShipmentReferenceNumber", skip_serializing_if = "Option::is_none")]
pub carrier_shipment_reference_number: Option<String>,
/// The mode of transportation for this shipment.
#[serde(default, rename = "transportationMode", skip_serializing_if = "Option::is_none")]
pub transportation_mode: Option<TransportationMode>,
/// Bill Of Lading (BOL) number is the unique number assigned by the vendor. The BOL present in the Shipment Confirmation message ideally matches the paper BOL provided with the shipment, but that is no must. Instead of BOL, an alternative reference number (like Delivery Note Number) for the shipment can also be sent in this field.
#[serde(default, rename = "billOfLadingNumber", skip_serializing_if = "Option::is_none")]
pub bill_of_lading_number: Option<String>,
}
impl TransportationDetails {
pub fn new() -> TransportationDetails {
TransportationDetails {
carrier_scac: None,
carrier_shipment_reference_number: None,
transportation_mode: None,
bill_of_lading_number: None,
}
}
}
/// The mode of transportation for this shipment.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TransportationMode {
#[serde(rename = "Road")]
Road,
#[serde(rename = "Air")]
Air,
#[serde(rename = "Ocean")]
Ocean,
}
impl Default for TransportationMode {
fn default() -> TransportationMode {
Self::Road
}
}