bitwarden_api_api/models/
billing_subscription.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BillingSubscription {
#[serde(rename = "trialStartDate", skip_serializing_if = "Option::is_none")]
pub trial_start_date: Option<String>,
#[serde(rename = "trialEndDate", skip_serializing_if = "Option::is_none")]
pub trial_end_date: Option<String>,
#[serde(rename = "periodStartDate", skip_serializing_if = "Option::is_none")]
pub period_start_date: Option<String>,
#[serde(rename = "periodEndDate", skip_serializing_if = "Option::is_none")]
pub period_end_date: Option<String>,
#[serde(rename = "cancelledDate", skip_serializing_if = "Option::is_none")]
pub cancelled_date: Option<String>,
#[serde(rename = "cancelAtEndDate", skip_serializing_if = "Option::is_none")]
pub cancel_at_end_date: Option<bool>,
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "cancelled", skip_serializing_if = "Option::is_none")]
pub cancelled: Option<bool>,
#[serde(rename = "items", skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<models::BillingSubscriptionItem>>,
#[serde(rename = "collectionMethod", skip_serializing_if = "Option::is_none")]
pub collection_method: Option<String>,
#[serde(rename = "suspensionDate", skip_serializing_if = "Option::is_none")]
pub suspension_date: Option<String>,
#[serde(
rename = "unpaidPeriodEndDate",
skip_serializing_if = "Option::is_none"
)]
pub unpaid_period_end_date: Option<String>,
#[serde(rename = "gracePeriod", skip_serializing_if = "Option::is_none")]
pub grace_period: Option<i32>,
}
impl BillingSubscription {
pub fn new() -> BillingSubscription {
BillingSubscription {
trial_start_date: None,
trial_end_date: None,
period_start_date: None,
period_end_date: None,
cancelled_date: None,
cancel_at_end_date: None,
status: None,
cancelled: None,
items: None,
collection_method: None,
suspension_date: None,
unpaid_period_end_date: None,
grace_period: None,
}
}
}