amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * 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};

/// ShipmentStatusDetails : Shipment Status details.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipmentStatusDetails {
    /// Current status of the shipment on whether it is picked up or scheduled.
    #[serde(rename = "shipmentStatus", skip_serializing_if = "Option::is_none")]
    pub shipment_status: Option<ShipmentStatus>,
    /// Date and time on last status update received for the shipment
    #[serde(rename = "shipmentStatusDate", skip_serializing_if = "Option::is_none")]
    pub shipment_status_date: Option<String>,
}

impl ShipmentStatusDetails {
    /// Shipment Status details.
    pub fn new() -> ShipmentStatusDetails {
        ShipmentStatusDetails {
            shipment_status: None,
            shipment_status_date: None,
        }
    }
}
/// Current status of the shipment on whether it is picked up or scheduled.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ShipmentStatus {
    #[serde(rename = "Created")]
    Created,
    #[serde(rename = "TransportationRequested")]
    TransportationRequested,
    #[serde(rename = "CarrierAssigned")]
    CarrierAssigned,
    #[serde(rename = "Shipped")]
    Shipped,
}

impl Default for ShipmentStatus {
    fn default() -> ShipmentStatus {
        Self::Created
    }
}