osdm_sys/models/exchange_operation_patch_request.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/// ExchangeOperationPatchRequest : Allows modifying a general setting for the booking: * setting the required fulfillment type, e.g. value paper or e-ticket and preferred fulfillment media. The latter is optional and relevant in some cases only. * Provisionally exchanging some of the fulfillments in the booking
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExchangeOperationPatchRequest {
17 /// Values from the [Fulfillment Type Code List](https://osdm.io/spec/catalog-of-code-lists/#FulfillmentType) Listed values here are examples.
18 #[serde(rename = "requestedFulfillmentType", skip_serializing_if = "Option::is_none")]
19 pub requested_fulfillment_type: Option<String>,
20 /// Fulfillment types. RCT2, RCCST and UIC_PDF are official UIC standards. Notice:`ALLOCATOR_APP` is deprecated and should not be used anymore. The `ALLOCATOR_APP` type is replaced by the `RETAILER_APP` type. `DISTRIBUTOR_APP` was introduced to distinguish between the different types of apps that can be used to fulfill a booking. Values from the [Fulfillment Media Type Code List](https://osdm.io/spec/catalog-of-code-lists/#FulfillmentMediaType) Listed values here are examples.
21 #[serde(rename = "preferredFulfillmentMedia", skip_serializing_if = "Option::is_none")]
22 pub preferred_fulfillment_media: Option<String>,
23 /// Influences whether referenced resources are returned in full or as references only.
24 #[serde(rename = "embed", skip_serializing_if = "Option::is_none")]
25 pub embed: Option<Vec<models::ExchangeOperationResponseContent>>,
26}
27
28impl ExchangeOperationPatchRequest {
29 /// Allows modifying a general setting for the booking: * setting the required fulfillment type, e.g. value paper or e-ticket and preferred fulfillment media. The latter is optional and relevant in some cases only. * Provisionally exchanging some of the fulfillments in the booking
30 pub fn new() -> ExchangeOperationPatchRequest {
31 ExchangeOperationPatchRequest {
32 requested_fulfillment_type: None,
33 preferred_fulfillment_media: None,
34 embed: None,
35 }
36 }
37}
38