/*
* 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
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TransportationDetails : Transportation details for this shipment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransportationDetails {
/// The type of shipment.
#[serde(rename = "shipMode", skip_serializing_if = "Option::is_none")]
pub ship_mode: Option<ShipMode>,
/// The mode of transportation for this shipment.
#[serde(rename = "transportationMode", skip_serializing_if = "Option::is_none")]
pub transportation_mode: Option<TransportationMode>,
/// Date when shipment is performed by the Vendor to Buyer
#[serde(rename = "shippedDate", skip_serializing_if = "Option::is_none")]
pub shipped_date: Option<String>,
/// Estimated Date on which shipment will be delivered from Vendor to Buyer
#[serde(rename = "estimatedDeliveryDate", skip_serializing_if = "Option::is_none")]
pub estimated_delivery_date: Option<String>,
/// Date on which shipment will be delivered from Vendor to Buyer
#[serde(rename = "shipmentDeliveryDate", skip_serializing_if = "Option::is_none")]
pub shipment_delivery_date: Option<String>,
#[serde(rename = "carrierDetails", skip_serializing_if = "Option::is_none")]
pub carrier_details: Option<Box<models::vendor_shipments::CarrierDetails>>,
/// The Bill of Lading (BOL) number is a unique number assigned to each shipment of goods by the vendor or shipper during the creation of the Bill of Lading. This number must be unique for every shipment and cannot be a date/time or single character. The BOL numer is mandatory in Shipment Confirmation message for FTL and LTL shipments, and must match the paper BOL provided with the shipment. Instead of BOL, an alternative reference number (like Delivery Note Number) for the shipment can also be sent in this field.
#[serde(rename = "billOfLadingNumber", skip_serializing_if = "Option::is_none")]
pub bill_of_lading_number: Option<String>,
}
impl TransportationDetails {
/// Transportation details for this shipment.
pub fn new() -> TransportationDetails {
TransportationDetails {
ship_mode: None,
transportation_mode: None,
shipped_date: None,
estimated_delivery_date: None,
shipment_delivery_date: None,
carrier_details: None,
bill_of_lading_number: None,
}
}
}
/// The type of shipment.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ShipMode {
#[serde(rename = "TruckLoad")]
TruckLoad,
#[serde(rename = "LessThanTruckLoad")]
LessThanTruckLoad,
#[serde(rename = "SmallParcel")]
SmallParcel,
}
impl Default for ShipMode {
fn default() -> ShipMode {
Self::TruckLoad
}
}
/// 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
}
}