osdm_sys/models/
booking_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/// BookingPatchRequest : Allows 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. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BookingPatchRequest {
17    /// The unique booking reference in the distributor/retailer system. Usually refers to an order number or PNR.
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 = "placeSelections", skip_serializing_if = "Option::is_none")]
21    pub place_selections: Option<Vec<models::PlaceSelection>>,
22    /// Values from the [Fulfillment Type Code List](https://osdm.io/spec/catalog-of-code-lists/#FulfillmentType) Listed values here are examples. 
23    #[serde(rename = "requestedFulfillmentType", skip_serializing_if = "Option::is_none")]
24    pub requested_fulfillment_type: Option<String>,
25    /// 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. 
26    #[serde(rename = "preferredFulfillmentMedia", skip_serializing_if = "Option::is_none")]
27    pub preferred_fulfillment_media: Option<String>,
28    #[serde(rename = "usedPaymentMethods", skip_serializing_if = "Option::is_none")]
29    pub used_payment_methods: Option<Vec<models::PaymentMethod>>,
30}
31
32impl BookingPatchRequest {
33    /// Allows 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. 
34    pub fn new() -> BookingPatchRequest {
35        BookingPatchRequest {
36            external_ref: None,
37            place_selections: None,
38            requested_fulfillment_type: None,
39            preferred_fulfillment_media: None,
40            used_payment_methods: None,
41        }
42    }
43}
44