amazon_spapi/models/shipping_v2/
ineligibility_reason_code.rs

1/*
2 * Amazon Shipping API
3 *
4 * 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.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// IneligibilityReasonCode : Reasons that make a shipment service offering ineligible.
15/// Reasons that make a shipment service offering ineligible.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum IneligibilityReasonCode {
18    #[serde(rename = "NO_COVERAGE")]
19    NoCoverage,
20    #[serde(rename = "PICKUP_SLOT_RESTRICTION")]
21    PickupSlotRestriction,
22    #[serde(rename = "UNSUPPORTED_VAS")]
23    UnsupportedVas,
24    #[serde(rename = "VAS_COMBINATION_RESTRICTION")]
25    VasCombinationRestriction,
26    #[serde(rename = "SIZE_RESTRICTIONS")]
27    SizeRestrictions,
28    #[serde(rename = "WEIGHT_RESTRICTIONS")]
29    WeightRestrictions,
30    #[serde(rename = "LATE_DELIVERY")]
31    LateDelivery,
32    #[serde(rename = "PROGRAM_CONSTRAINTS")]
33    ProgramConstraints,
34    #[serde(rename = "TERMS_AND_CONDITIONS_NOT_ACCEPTED")]
35    TermsAndConditionsNotAccepted,
36    #[serde(rename = "UNKNOWN")]
37    Unknown,
38
39}
40
41impl std::fmt::Display for IneligibilityReasonCode {
42    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
43        match self {
44            Self::NoCoverage => write!(f, "NO_COVERAGE"),
45            Self::PickupSlotRestriction => write!(f, "PICKUP_SLOT_RESTRICTION"),
46            Self::UnsupportedVas => write!(f, "UNSUPPORTED_VAS"),
47            Self::VasCombinationRestriction => write!(f, "VAS_COMBINATION_RESTRICTION"),
48            Self::SizeRestrictions => write!(f, "SIZE_RESTRICTIONS"),
49            Self::WeightRestrictions => write!(f, "WEIGHT_RESTRICTIONS"),
50            Self::LateDelivery => write!(f, "LATE_DELIVERY"),
51            Self::ProgramConstraints => write!(f, "PROGRAM_CONSTRAINTS"),
52            Self::TermsAndConditionsNotAccepted => write!(f, "TERMS_AND_CONDITIONS_NOT_ACCEPTED"),
53            Self::Unknown => write!(f, "UNKNOWN"),
54        }
55    }
56}
57
58impl Default for IneligibilityReasonCode {
59    fn default() -> IneligibilityReasonCode {
60        Self::NoCoverage
61    }
62}
63