bitwarden_api_api/models/
premium_cloud_hosted_subscription_request.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PremiumCloudHostedSubscriptionRequest {
17    #[serde(rename = "tokenizedPaymentMethod")]
18    pub tokenized_payment_method: Box<models::MinimalTokenizedPaymentMethodRequest>,
19    #[serde(rename = "billingAddress")]
20    pub billing_address: Box<models::MinimalBillingAddressRequest>,
21    #[serde(
22        rename = "additionalStorageGb",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub additional_storage_gb: Option<i32>,
26}
27
28impl PremiumCloudHostedSubscriptionRequest {
29    pub fn new(
30        tokenized_payment_method: models::MinimalTokenizedPaymentMethodRequest,
31        billing_address: models::MinimalBillingAddressRequest,
32    ) -> PremiumCloudHostedSubscriptionRequest {
33        PremiumCloudHostedSubscriptionRequest {
34            tokenized_payment_method: Box::new(tokenized_payment_method),
35            billing_address: Box::new(billing_address),
36            additional_storage_gb: None,
37        }
38    }
39}