osdm_sys/models/refund_offer_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/// RefundOfferRequest : Request for a refund offer. Fulfillments can be provided in case the booking contains multiple individual fulfillments.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RefundOfferRequest {
17 /// ids of the fulfillments to refund
18 #[serde(rename = "fulfillmentIds")]
19 pub fulfillment_ids: Vec<String>,
20 /// To do a partial refund repeat the fulfillmentIds affected and point out what to refund
21 #[serde(rename = "refundSpecifications", skip_serializing_if = "Option::is_none")]
22 pub refund_specifications: Option<Vec<models::RefundSpecification>>,
23 /// 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).
24 #[serde(rename = "overruleCode", skip_serializing_if = "Option::is_none")]
25 pub overrule_code: Option<String>,
26 /// 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.
27 #[serde(rename = "refundDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28 pub refund_date: Option<Option<String>>,
29}
30
31impl RefundOfferRequest {
32 /// Request for a refund offer. Fulfillments can be provided in case the booking contains multiple individual fulfillments.
33 pub fn new(fulfillment_ids: Vec<String>) -> RefundOfferRequest {
34 RefundOfferRequest {
35 fulfillment_ids,
36 refund_specifications: None,
37 overrule_code: None,
38 refund_date: None,
39 }
40 }
41}
42