bitwarden_api_api/models/
organization_subscription_purchase_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 OrganizationSubscriptionPurchaseRequest {
17    #[serde(rename = "tier")]
18    pub tier: models::ProductTierType,
19    #[serde(rename = "cadence")]
20    pub cadence: models::PlanCadenceType,
21    #[serde(rename = "passwordManager")]
22    pub password_manager: Box<models::PasswordManagerPurchaseSelections>,
23    #[serde(rename = "secretsManager", skip_serializing_if = "Option::is_none")]
24    pub secrets_manager: Option<Box<models::SecretsManagerPurchaseSelections>>,
25}
26
27impl OrganizationSubscriptionPurchaseRequest {
28    pub fn new(
29        tier: models::ProductTierType,
30        cadence: models::PlanCadenceType,
31        password_manager: models::PasswordManagerPurchaseSelections,
32    ) -> OrganizationSubscriptionPurchaseRequest {
33        OrganizationSubscriptionPurchaseRequest {
34            tier,
35            cadence,
36            password_manager: Box::new(password_manager),
37            secrets_manager: None,
38        }
39    }
40}