osdm-sys 0.1.0-alpha.2

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};

/// AfterSalesOverrideDetails : If initial after sales conditions have been overwritten this object provides details on the original conditions and an explanation text for the customer 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct AfterSalesOverrideDetails {
    #[serde(rename = "initialAftersalesConditions", skip_serializing_if = "Option::is_none")]
    pub initial_aftersales_conditions: Option<Vec<models::AfterSaleCondition>>,
    #[serde(rename = "initialAfterSalesConditions", skip_serializing_if = "Option::is_none")]
    pub initial_after_sales_conditions: Option<Vec<models::AfterSaleCondition>>,
    /// Description for the change of conditions for the customer.
    #[serde(rename = "overrideDescription", skip_serializing_if = "Option::is_none")]
    pub override_description: Option<String>,
    #[serde(rename = "validFrom", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub valid_from: Option<Option<String>>,
    #[serde(rename = "validUntil", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub valid_until: Option<Option<String>>,
    #[serde(rename = "initialExchangeableType", skip_serializing_if = "Option::is_none")]
    pub initial_exchangeable_type: Option<models::ExchangeableType>,
    #[serde(rename = "initialRefundType", skip_serializing_if = "Option::is_none")]
    pub initial_refund_type: Option<models::RefundType>,
}

impl AfterSalesOverrideDetails {
    /// If initial after sales conditions have been overwritten this object provides details on the original conditions and an explanation text for the customer 
    pub fn new() -> AfterSalesOverrideDetails {
        AfterSalesOverrideDetails {
            initial_aftersales_conditions: None,
            initial_after_sales_conditions: None,
            override_description: None,
            valid_from: None,
            valid_until: None,
            initial_exchangeable_type: None,
            initial_refund_type: None,
        }
    }
}