bitwarden_api_api/models/
tax_information_request_body.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 TaxInformationRequestBody {
17    #[serde(rename = "country")]
18    pub country: String,
19    #[serde(rename = "postalCode")]
20    pub postal_code: String,
21    #[serde(rename = "taxId", skip_serializing_if = "Option::is_none")]
22    pub tax_id: Option<String>,
23    #[serde(rename = "taxIdType", skip_serializing_if = "Option::is_none")]
24    pub tax_id_type: Option<String>,
25    #[serde(rename = "line1", skip_serializing_if = "Option::is_none")]
26    pub line1: Option<String>,
27    #[serde(rename = "line2", skip_serializing_if = "Option::is_none")]
28    pub line2: Option<String>,
29    #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
30    pub city: Option<String>,
31    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
32    pub state: Option<String>,
33}
34
35impl TaxInformationRequestBody {
36    pub fn new(country: String, postal_code: String) -> TaxInformationRequestBody {
37        TaxInformationRequestBody {
38            country,
39            postal_code,
40            tax_id: None,
41            tax_id_type: None,
42            line1: None,
43            line2: None,
44            city: None,
45            state: None,
46        }
47    }
48}