bitwarden_api_api/models/
checkout_billing_address_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 CheckoutBillingAddressRequest {
17    #[serde(rename = "country", alias = "Country")]
18    pub country: String,
19    #[serde(rename = "postalCode", alias = "PostalCode")]
20    pub postal_code: String,
21    #[serde(
22        rename = "taxId",
23        alias = "TaxId",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub tax_id: Option<Box<models::TaxIdRequest>>,
27}
28
29impl CheckoutBillingAddressRequest {
30    pub fn new(country: String, postal_code: String) -> CheckoutBillingAddressRequest {
31        CheckoutBillingAddressRequest {
32            country,
33            postal_code,
34            tax_id: None,
35        }
36    }
37}