openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * GitHub's official OpenAPI spec + Octokit extension
 *
 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
 *
 * The version of the OpenAPI document: 16.6.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// UserMarketplacePurchase : User Marketplace Purchase
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserMarketplacePurchase {
    #[serde(rename = "billing_cycle")]
    pub billing_cycle: String,
    #[serde(rename = "next_billing_date", deserialize_with = "Option::deserialize")]
    pub next_billing_date: Option<String>,
    #[serde(rename = "unit_count", deserialize_with = "Option::deserialize")]
    pub unit_count: Option<i32>,
    #[serde(rename = "on_free_trial")]
    pub on_free_trial: bool,
    #[serde(rename = "free_trial_ends_on", deserialize_with = "Option::deserialize")]
    pub free_trial_ends_on: Option<String>,
    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
    pub updated_at: Option<String>,
    #[serde(rename = "account")]
    pub account: Box<models::MarketplaceAccount>,
    #[serde(rename = "plan")]
    pub plan: Box<models::MarketplaceListingPlan>,
}

impl UserMarketplacePurchase {
    /// User Marketplace Purchase
    pub fn new(billing_cycle: String, next_billing_date: Option<String>, unit_count: Option<i32>, on_free_trial: bool, free_trial_ends_on: Option<String>, updated_at: Option<String>, account: models::MarketplaceAccount, plan: models::MarketplaceListingPlan) -> UserMarketplacePurchase {
        UserMarketplacePurchase {
            billing_cycle,
            next_billing_date,
            unit_count,
            on_free_trial,
            free_trial_ends_on,
            updated_at,
            account: Box::new(account),
            plan: Box::new(plan),
        }
    }
}