osdm_sys/models/
complaint_decision.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ComplaintDecision {
16    #[serde(rename = "compensationAmount", skip_serializing_if = "Option::is_none")]
17    pub compensation_amount: Option<Box<models::Price>>,
18    #[serde(rename = "refundVoucher", skip_serializing_if = "Option::is_none")]
19    pub refund_voucher: Option<Box<models::FulfillmentDocument>>,
20    #[serde(rename = "decisionType", skip_serializing_if = "Option::is_none")]
21    pub decision_type: Option<models::DecisionType>,
22    #[serde(rename = "explanation", skip_serializing_if = "Option::is_none")]
23    pub explanation: Option<Box<models::SupportingDocument>>,
24    #[serde(rename = "shortExplanation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub short_explanation: Option<Option<String>>,
26    /// Allocator or fare provider view on the delays. This might differ from the customer view. 
27    #[serde(rename = "delayedJourney", skip_serializing_if = "Option::is_none")]
28    pub delayed_journey: Option<Vec<models::Trip>>,
29}
30
31impl ComplaintDecision {
32    pub fn new() -> ComplaintDecision {
33        ComplaintDecision {
34            compensation_amount: None,
35            refund_voucher: None,
36            decision_type: None,
37            explanation: None,
38            short_explanation: None,
39            delayed_journey: None,
40        }
41    }
42}
43