osdm_sys/models/fulfillment_usage.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/// FulfillmentUsage : In case of multi-journey products describe parameters to be used to change the a fulfillment in status AVAILABLE to FULFILLED so it can be used by the passenger.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FulfillmentUsage {
17 #[serde(rename = "fromPlaceRequired", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18 pub from_place_required: Option<Option<bool>>,
19 /// Travel dates that can be selected. Note: date only is used to cover properly the case of passes including multiple time zones.
20 #[serde(rename = "travelDates", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21 pub travel_dates: Option<Option<Vec<String>>>,
22 #[serde(rename = "travelValidityRanges", skip_serializing_if = "Option::is_none")]
23 pub travel_validity_ranges: Option<Vec<models::TravelValidityRange>>,
24 /// upper limit to the number of selected zones
25 #[serde(rename = "maxAvailableZones", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26 pub max_available_zones: Option<Option<i32>>,
27 #[serde(rename = "availableZones", skip_serializing_if = "Option::is_none")]
28 pub available_zones: Option<Vec<models::ZoneDefinition>>,
29}
30
31impl FulfillmentUsage {
32 /// In case of multi-journey products describe parameters to be used to change the a fulfillment in status AVAILABLE to FULFILLED so it can be used by the passenger.
33 pub fn new() -> FulfillmentUsage {
34 FulfillmentUsage {
35 from_place_required: None,
36 travel_dates: None,
37 travel_validity_ranges: None,
38 max_available_zones: None,
39 available_zones: None,
40 }
41 }
42}
43