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", 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<String>,
27    #[serde(
28        rename = "taxIdType",
29        alias = "TaxIdType",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub tax_id_type: Option<String>,
33    #[serde(
34        rename = "line1",
35        alias = "Line1",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub line1: Option<String>,
39    #[serde(
40        rename = "line2",
41        alias = "Line2",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub line2: Option<String>,
45    #[serde(
46        rename = "city",
47        alias = "City",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub city: Option<String>,
51    #[serde(
52        rename = "state",
53        alias = "State",
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub state: Option<String>,
57}
58
59impl TaxInformationRequestBody {
60    pub fn new(country: String, postal_code: String) -> TaxInformationRequestBody {
61        TaxInformationRequestBody {
62            country,
63            postal_code,
64            tax_id: None,
65            tax_id_type: None,
66            line1: None,
67            line2: None,
68            city: None,
69            state: None,
70        }
71    }
72}