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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct CancelFulfillmentsOffer {
    /// id of the cancel fulfillments offer 
    #[serde(rename = "id")]
    pub id: String,
    /// A human-readable description of the refund offer. 
    #[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub summary: Option<Option<String>>,
    #[serde(rename = "createdOn")]
    pub created_on: String,
    #[serde(rename = "validFrom")]
    pub valid_from: String,
    /// time until the offer can be used 
    #[serde(rename = "validUntil")]
    pub valid_until: String,
    #[serde(rename = "confirmedOn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub confirmed_on: Option<Option<String>>,
    #[serde(rename = "status")]
    pub status: models::CancelFulfillmentsStatus,
    #[serde(rename = "fulfillments")]
    pub fulfillments: Vec<models::Fulfillment>,
    ///  Java Property Name: 'links' 
    #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
    pub _links: Option<Vec<models::Link>>,
}

impl CancelFulfillmentsOffer {
    pub fn new(id: String, created_on: String, valid_from: String, valid_until: String, status: models::CancelFulfillmentsStatus, fulfillments: Vec<models::Fulfillment>) -> CancelFulfillmentsOffer {
        CancelFulfillmentsOffer {
            id,
            summary: None,
            created_on,
            valid_from,
            valid_until,
            confirmed_on: None,
            status,
            fulfillments,
            _links: None,
        }
    }
}