osdm-sys 0.1.0-alpha.2

Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information. The following resources are key to get started: - [Processes](https://osdm.io/spec/processes/) - [Models](https://osdm.io/spec/models/) - [Getting started](https://osdm.io/spec/getting-started/)
Documentation
/*
 * UIC 90918-10 - OSDM
 *
 * Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information.  The following resources are key to get started:    -  [Processes](https://osdm.io/spec/processes/)   -  [Models](https://osdm.io/spec/models/)   -  [Getting started](https://osdm.io/spec/getting-started/) 
 *
 * The version of the OpenAPI document: 3.7.0
 * Contact: osdm@uic.org
 * Generated by: https://openapi-generator.tech
 */

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

/// FulfillmentStatus : Individual fulfillments of a multi journey booking need an separate patch to create the usable fulfillment in status FULFILLED before they are in an intermediate state AVAILABLE where they don't provide a document for travel. Fulfillments can be ON_HOLD in case they are booked but not yet available (e.g. a booking providing two journeys per week) or passed in case the fulfillment was not patched for usage within the required time. 
/// Individual fulfillments of a multi journey booking need an separate patch to create the usable fulfillment in status FULFILLED before they are in an intermediate state AVAILABLE where they don't provide a document for travel. Fulfillments can be ON_HOLD in case they are booked but not yet available (e.g. a booking providing two journeys per week) or passed in case the fulfillment was not patched for usage within the required time. 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum FulfillmentStatus {
    #[serde(rename = "AVAILABLE")]
    Available,
    #[serde(rename = "ON_HOLD")]
    OnHold,
    #[serde(rename = "CONFIRMED")]
    Confirmed,
    #[serde(rename = "FULFILLED")]
    Fulfilled,
    #[serde(rename = "CHECKEDIN")]
    Checkedin,
    #[serde(rename = "CANCELLED")]
    Cancelled,
    #[serde(rename = "RELEASED")]
    Released,
    #[serde(rename = "REFUNDED")]
    Refunded,
    #[serde(rename = "EXCHANGED")]
    Exchanged,
    #[serde(rename = "EXPIRED")]
    Expired,

}

impl std::fmt::Display for FulfillmentStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Available => write!(f, "AVAILABLE"),
            Self::OnHold => write!(f, "ON_HOLD"),
            Self::Confirmed => write!(f, "CONFIRMED"),
            Self::Fulfilled => write!(f, "FULFILLED"),
            Self::Checkedin => write!(f, "CHECKEDIN"),
            Self::Cancelled => write!(f, "CANCELLED"),
            Self::Released => write!(f, "RELEASED"),
            Self::Refunded => write!(f, "REFUNDED"),
            Self::Exchanged => write!(f, "EXCHANGED"),
            Self::Expired => write!(f, "EXPIRED"),
        }
    }
}

impl Default for FulfillmentStatus {
    fn default() -> FulfillmentStatus {
        Self::Available
    }
}