osdm-sys 0.1.0-alpha.3

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/)
Documentation
/*
 * UIC 90918-10 - OSDM
 *
 * 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/) 
 *
 * The version of the OpenAPI document: 3.7.0
 * Contact: osdm@uic.org
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ReimbursementRequest : The reimbursement process is used to support refunds which are not covered by the online refund/exchange processes, e.g.: Partial refund of a trip (Trip was Hamburg - Munich, but only Hamburg - Kassel was used), Refund outside of rules due to good will. This is a manual back office process within the provider's organization which is triggered by this request. State changes can be signaled by web hook events. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ReimbursementRequest {
    /// Reason why the booking should be reimbursed. 
    #[serde(rename = "reimbursementReason")]
    pub reimbursement_reason: String,
    #[serde(rename = "reimbursementDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub reimbursement_date: Option<Option<String>>,
    #[serde(rename = "reimbursedPassengerIds")]
    pub reimbursed_passenger_ids: Vec<String>,
    #[serde(rename = "tripSections", skip_serializing_if = "Option::is_none")]
    pub trip_sections: Option<Vec<models::TripSection>>,
    #[serde(rename = "fulfillmentIds")]
    pub fulfillment_ids: Vec<String>,
    #[serde(rename = "supportingDocuments", skip_serializing_if = "Option::is_none")]
    pub supporting_documents: Option<Vec<models::SupportingDocument>>,
}

impl ReimbursementRequest {
    /// The reimbursement process is used to support refunds which are not covered by the online refund/exchange processes, e.g.: Partial refund of a trip (Trip was Hamburg - Munich, but only Hamburg - Kassel was used), Refund outside of rules due to good will. This is a manual back office process within the provider's organization which is triggered by this request. State changes can be signaled by web hook events. 
    pub fn new(reimbursement_reason: String, reimbursed_passenger_ids: Vec<String>, fulfillment_ids: Vec<String>) -> ReimbursementRequest {
        ReimbursementRequest {
            reimbursement_reason,
            reimbursement_date: None,
            reimbursed_passenger_ids,
            trip_sections: None,
            fulfillment_ids,
            supporting_documents: None,
        }
    }
}