bitwarden_api_api/models/
billing_subscription.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use 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,
        }
    }
}