bitwarden_api_api/models/
upgrade_premium_to_organization_request.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UpgradePremiumToOrganizationRequest {
17 #[serde(rename = "organizationName", alias = "OrganizationName")]
18 pub organization_name: String,
19 #[serde(rename = "key", alias = "Key")]
20 pub key: String,
21 #[serde(rename = "publicKey", alias = "PublicKey")]
22 pub public_key: String,
23 #[serde(rename = "encryptedPrivateKey", alias = "EncryptedPrivateKey")]
24 pub encrypted_private_key: String,
25 #[serde(
26 rename = "collectionName",
27 alias = "CollectionName",
28 skip_serializing_if = "Option::is_none"
29 )]
30 pub collection_name: Option<String>,
31 #[serde(rename = "targetProductTierType", alias = "TargetProductTierType")]
32 pub target_product_tier_type: models::ProductTierType,
33 #[serde(rename = "billingAddress", alias = "BillingAddress")]
34 pub billing_address: Box<models::CheckoutBillingAddressRequest>,
35}
36
37impl UpgradePremiumToOrganizationRequest {
38 pub fn new(
39 organization_name: String,
40 key: String,
41 public_key: String,
42 encrypted_private_key: String,
43 target_product_tier_type: models::ProductTierType,
44 billing_address: models::CheckoutBillingAddressRequest,
45 ) -> UpgradePremiumToOrganizationRequest {
46 UpgradePremiumToOrganizationRequest {
47 organization_name,
48 key,
49 public_key,
50 encrypted_private_key,
51 collection_name: None,
52 target_product_tier_type,
53 billing_address: Box::new(billing_address),
54 }
55 }
56}