1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ReductionCardAccount {
/// Attribute is used as discriminator for inheritance between data types.
#[serde(rename = "objectType")]
pub object_type: String,
#[serde(rename = "holder", skip_serializing_if = "Option::is_none")]
pub holder: Option<Box<models::PersonDetail>>,
/// Identifies a company. For rail, a RICS company code or compatible ERA company code are used. E.g.: 'urn:uic:rics:1185:000011'
#[serde(rename = "issuer")]
pub issuer: String,
#[serde(rename = "validFrom")]
pub valid_from: String,
#[serde(rename = "validUntil")]
pub valid_until: String,
#[serde(rename = "number")]
pub number: String,
#[serde(rename = "type")]
pub r#type: Box<models::ReductionCardType>,
}
impl ReductionCardAccount {
pub fn new(object_type: String, issuer: String, valid_from: String, valid_until: String, number: String, r#type: models::ReductionCardType) -> ReductionCardAccount {
ReductionCardAccount {
object_type,
holder: None,
issuer,
valid_from,
valid_until,
number,
r#type: Box::new(r#type),
}
}
}