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};

/// IneligibilityReasonCode : Reasons that make a shipment service offering ineligible.
/// Reasons that make a shipment service offering ineligible.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IneligibilityReasonCode {
    #[serde(rename = "NO_COVERAGE")]
    NoCoverage,
    #[serde(rename = "PICKUP_SLOT_RESTRICTION")]
    PickupSlotRestriction,
    #[serde(rename = "UNSUPPORTED_VAS")]
    UnsupportedVas,
    #[serde(rename = "VAS_COMBINATION_RESTRICTION")]
    VasCombinationRestriction,
    #[serde(rename = "SIZE_RESTRICTIONS")]
    SizeRestrictions,
    #[serde(rename = "WEIGHT_RESTRICTIONS")]
    WeightRestrictions,
    #[serde(rename = "LATE_DELIVERY")]
    LateDelivery,
    #[serde(rename = "PROGRAM_CONSTRAINTS")]
    ProgramConstraints,
    #[serde(rename = "TERMS_AND_CONDITIONS_NOT_ACCEPTED")]
    TermsAndConditionsNotAccepted,
    #[serde(rename = "UNKNOWN")]
    Unknown,

}

impl std::fmt::Display for IneligibilityReasonCode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::NoCoverage => write!(f, "NO_COVERAGE"),
            Self::PickupSlotRestriction => write!(f, "PICKUP_SLOT_RESTRICTION"),
            Self::UnsupportedVas => write!(f, "UNSUPPORTED_VAS"),
            Self::VasCombinationRestriction => write!(f, "VAS_COMBINATION_RESTRICTION"),
            Self::SizeRestrictions => write!(f, "SIZE_RESTRICTIONS"),
            Self::WeightRestrictions => write!(f, "WEIGHT_RESTRICTIONS"),
            Self::LateDelivery => write!(f, "LATE_DELIVERY"),
            Self::ProgramConstraints => write!(f, "PROGRAM_CONSTRAINTS"),
            Self::TermsAndConditionsNotAccepted => write!(f, "TERMS_AND_CONDITIONS_NOT_ACCEPTED"),
            Self::Unknown => write!(f, "UNKNOWN"),
        }
    }
}

impl Default for IneligibilityReasonCode {
    fn default() -> IneligibilityReasonCode {
        Self::NoCoverage
    }
}