osdm_sys/models/fare_reference_station.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/// FareReferenceStation : Reference to a list of stations jointly valid in a fare. The fare reference station defines a set of station that are equivalent from a tariff point of view. The code is issued by the carrier. Needed to generate bar codes as well as fulfillments.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FareReferenceStation {
17 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(rename = "code")]
20 pub code: String,
21 /// Identifies a company. For rail, a RICS company code or compatible ERA company code are used. E.g.: 'urn:uic:rics:1185:000011'
22 #[serde(rename = "carrier")]
23 pub carrier: String,
24 #[serde(rename = "stations")]
25 pub stations: Vec<models::StopPlaceRef>,
26}
27
28impl FareReferenceStation {
29 /// Reference to a list of stations jointly valid in a fare. The fare reference station defines a set of station that are equivalent from a tariff point of view. The code is issued by the carrier. Needed to generate bar codes as well as fulfillments.
30 pub fn new(name: String, code: String, carrier: String, stations: Vec<models::StopPlaceRef>) -> FareReferenceStation {
31 FareReferenceStation {
32 name,
33 code,
34 carrier,
35 stations,
36 }
37 }
38}
39