osdm_sys/models/
reduction_card_account.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReductionCardAccount {
16 #[serde(rename = "objectType")]
18 pub object_type: String,
19 #[serde(rename = "holder", skip_serializing_if = "Option::is_none")]
20 pub holder: Option<Box<models::PersonDetail>>,
21 #[serde(rename = "issuer")]
23 pub issuer: String,
24 #[serde(rename = "validFrom")]
25 pub valid_from: String,
26 #[serde(rename = "validUntil")]
27 pub valid_until: String,
28 #[serde(rename = "number")]
29 pub number: String,
30 #[serde(rename = "type")]
31 pub r#type: Box<models::ReductionCardType>,
32}
33
34impl ReductionCardAccount {
35 pub fn new(object_type: String, issuer: String, valid_from: String, valid_until: String, number: String, r#type: models::ReductionCardType) -> ReductionCardAccount {
36 ReductionCardAccount {
37 object_type,
38 holder: None,
39 issuer,
40 valid_from,
41 valid_until,
42 number,
43 r#type: Box::new(r#type),
44 }
45 }
46}
47