amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Amazon Shipping API
 *
 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
 *
 * The version of the OpenAPI document: v2
 * Contact: swa-api-core@amazon.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Status : The status of the package being shipped.
/// The status of the package being shipped.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "PreTransit")]
    PreTransit,
    #[serde(rename = "InTransit")]
    InTransit,
    #[serde(rename = "Delivered")]
    Delivered,
    #[serde(rename = "Lost")]
    Lost,
    #[serde(rename = "OutForDelivery")]
    OutForDelivery,
    #[serde(rename = "Rejected")]
    Rejected,
    #[serde(rename = "Undeliverable")]
    Undeliverable,
    #[serde(rename = "DeliveryAttempted")]
    DeliveryAttempted,
    #[serde(rename = "PickupCancelled")]
    PickupCancelled,
    #[serde(rename = "AwaitingCustomerPickup")]
    AwaitingCustomerPickup,

}

impl std::fmt::Display for Status {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::PreTransit => write!(f, "PreTransit"),
            Self::InTransit => write!(f, "InTransit"),
            Self::Delivered => write!(f, "Delivered"),
            Self::Lost => write!(f, "Lost"),
            Self::OutForDelivery => write!(f, "OutForDelivery"),
            Self::Rejected => write!(f, "Rejected"),
            Self::Undeliverable => write!(f, "Undeliverable"),
            Self::DeliveryAttempted => write!(f, "DeliveryAttempted"),
            Self::PickupCancelled => write!(f, "PickupCancelled"),
            Self::AwaitingCustomerPickup => write!(f, "AwaitingCustomerPickup"),
        }
    }
}

impl Default for Status {
    fn default() -> Status {
        Self::PreTransit
    }
}