openapi_github/models/
user_marketplace_purchase.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UserMarketplacePurchase {
17 #[serde(rename = "billing_cycle")]
18 pub billing_cycle: String,
19 #[serde(rename = "next_billing_date", deserialize_with = "Option::deserialize")]
20 pub next_billing_date: Option<String>,
21 #[serde(rename = "unit_count", deserialize_with = "Option::deserialize")]
22 pub unit_count: Option<i32>,
23 #[serde(rename = "on_free_trial")]
24 pub on_free_trial: bool,
25 #[serde(rename = "free_trial_ends_on", deserialize_with = "Option::deserialize")]
26 pub free_trial_ends_on: Option<String>,
27 #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
28 pub updated_at: Option<String>,
29 #[serde(rename = "account")]
30 pub account: Box<models::MarketplaceAccount>,
31 #[serde(rename = "plan")]
32 pub plan: Box<models::MarketplaceListingPlan>,
33}
34
35impl UserMarketplacePurchase {
36 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 {
38 UserMarketplacePurchase {
39 billing_cycle,
40 next_billing_date,
41 unit_count,
42 on_free_trial,
43 free_trial_ends_on,
44 updated_at,
45 account: Box::new(account),
46 plan: Box::new(plan),
47 }
48 }
49}
50