osdm_sys/models/purchaser.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/// Purchaser : Purchaser information. Exactly one of `detail` or `companyDetails` must be provided.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Purchaser {
17 /// A stable reference to a purchaser from other elements, or from caller system. When received in input of a request, it must be echoed back in the response.
18 #[serde(rename = "externalRef", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19 pub external_ref: Option<Option<String>>,
20 #[serde(rename = "detail", skip_serializing_if = "Option::is_none")]
21 pub detail: Option<Box<models::PersonDetail>>,
22 #[serde(rename = "companyDetails", skip_serializing_if = "Option::is_none")]
23 pub company_details: Option<Box<models::CompanyDetail>>,
24 /// Java Property Name: 'links'
25 #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
26 pub _links: Option<Vec<models::Link>>,
27}
28
29impl Purchaser {
30 /// Purchaser information. Exactly one of `detail` or `companyDetails` must be provided.
31 pub fn new() -> Purchaser {
32 Purchaser {
33 external_ref: None,
34 detail: None,
35 company_details: None,
36 _links: None,
37 }
38 }
39}
40