osdm_sys/models/booking_cleanup_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/// BookingCleanupRequest : Request to cleanup a complete booking. Unconfirmed items will be deleted, any confirmed items will be refunded. There is no confirmation required. Attention point: refundDate and overruleCode are deprecated request attributes and will be ignored
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BookingCleanupRequest {
17 /// Reason for and type of an after sale, code list in IRS 90918-10. The PRM_SUPPORT_UNAVAILABLE overrule code shall only be used by the UIC PRM ABT tool. Values from the [Overrule Codes Code List](https://osdm.io/spec/catalog-of-code-lists/#OverruleCode) Listed values here are examples. - 'CONNECTION_BROKEN' - 'DEATH' - 'EQUIPMENT_FAILURE' - 'PAYMENT_FAILURE' - 'PRM_SUPPORT_UNAVAILABLE' - 'SALES_STAFF_ERROR' - 'STOP_NOT_SERVED' - 'STRIKE' - 'TECHNICAL_FAILURE' - 'TICKET_NOT_USED' - 'INABILITY_TO_TRAVEL': Inability to travel due to accident or sickness. - 'EXTERNAL_COMPENSATION': Offer has been compensated outside of the provider system in another way. - 'DISRUPTION': Inability to operate due to disruption. - 'JOURNEY_OBSOLETE': Due to external factors it's senseless to start the trip, thus the travel is obsolete. - 'CERTIFIED_MEDICAL_CONDITION': A medical certificate certifies that the passenger is unable to travel. - 'DELAY_COMPENSATION': Allows to override conditions in context of passenger rights regulation (PRR).
18 #[serde(rename = "overruleCode", skip_serializing_if = "Option::is_none")]
19 pub overrule_code: Option<String>,
20 /// --Deprecated -- Indicates for passes the date taken as reference to compute possible partial refund. It is also the date taken as reference to invalidate the pass partially refunded.
21 #[serde(rename = "refundDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub refund_date: Option<Option<String>>,
23}
24
25impl BookingCleanupRequest {
26 /// Request to cleanup a complete booking. Unconfirmed items will be deleted, any confirmed items will be refunded. There is no confirmation required. Attention point: refundDate and overruleCode are deprecated request attributes and will be ignored
27 pub fn new() -> BookingCleanupRequest {
28 BookingCleanupRequest {
29 overrule_code: None,
30 refund_date: None,
31 }
32 }
33}
34