osdm_sys/models/decision_type.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/// DecisionType : Summary result of decision on a complaint - `ACCEPTED`: the complaint is accepted and refund or compensation will be paid - `REJECTED`: the complaint is rejected and no refund or compensation will be paid - `GOOD_WILL`: a good will compensation is offered, no legal obligation to pay refund or compensation exists - `PARTIALLY_ACCEPTED`: the complaint is partially accepted, e.g. for part of the journey or part of the passengers
15/// Summary result of decision on a complaint - `ACCEPTED`: the complaint is accepted and refund or compensation will be paid - `REJECTED`: the complaint is rejected and no refund or compensation will be paid - `GOOD_WILL`: a good will compensation is offered, no legal obligation to pay refund or compensation exists - `PARTIALLY_ACCEPTED`: the complaint is partially accepted, e.g. for part of the journey or part of the passengers
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DecisionType {
18 #[serde(rename = "ACCEPTED")]
19 Accepted,
20 #[serde(rename = "REJECTED")]
21 Rejected,
22 #[serde(rename = "GOOD_WILL")]
23 GoodWill,
24 #[serde(rename = "PARTIALLY_ACCEPTED")]
25 PartiallyAccepted,
26
27}
28
29impl std::fmt::Display for DecisionType {
30 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31 match self {
32 Self::Accepted => write!(f, "ACCEPTED"),
33 Self::Rejected => write!(f, "REJECTED"),
34 Self::GoodWill => write!(f, "GOOD_WILL"),
35 Self::PartiallyAccepted => write!(f, "PARTIALLY_ACCEPTED"),
36 }
37 }
38}
39
40impl Default for DecisionType {
41 fn default() -> DecisionType {
42 Self::Accepted
43 }
44}
45