use crate::models;
use serde::{Deserialize, Serialize};
#[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
}
}