Skip to main content

osdm_sys/models/
back_office_status.rs

1/*
2 * UIC 90918-10 - OSDM
3 *
4 * 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/) 
5 *
6 * The version of the OpenAPI document: 3.7.0
7 * Contact: osdm@uic.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BackOfficeStatus : Status of the request sent to the back office. Valid Values: - 'INITIATED' - 'EVALUATING' - 'DECIDED' - 'SETTLED' - 'INFORMATION_MISSING' - 'REQUEST_UPDATED': Additional information, i.e. documents have been provided which should trigger reevaluation. 
15/// Status of the request sent to the back office. Valid Values: - 'INITIATED' - 'EVALUATING' - 'DECIDED' - 'SETTLED' - 'INFORMATION_MISSING' - 'REQUEST_UPDATED': Additional information, i.e. documents have been provided which should trigger reevaluation. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
18pub enum BackOfficeStatus {
19    #[serde(rename = "INITIATED")]
20    Initiated,
21    #[serde(rename = "EVALUATING")]
22    Evaluating,
23    #[serde(rename = "DECIDED")]
24    Decided,
25    #[serde(rename = "SETTLED")]
26    Settled,
27    #[serde(rename = "INFORMATION_MISSING")]
28    InformationMissing,
29    #[serde(rename = "REQUEST_UPDATED")]
30    RequestUpdated,
31
32}
33
34impl std::fmt::Display for BackOfficeStatus {
35    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
36        match self {
37            Self::Initiated => write!(f, "INITIATED"),
38            Self::Evaluating => write!(f, "EVALUATING"),
39            Self::Decided => write!(f, "DECIDED"),
40            Self::Settled => write!(f, "SETTLED"),
41            Self::InformationMissing => write!(f, "INFORMATION_MISSING"),
42            Self::RequestUpdated => write!(f, "REQUEST_UPDATED"),
43        }
44    }
45}
46
47impl Default for BackOfficeStatus {
48    fn default() -> BackOfficeStatus {
49        Self::Initiated
50    }
51}
52