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