bitwarden_api_api/models/
expanded_tax_info_update_request_model.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 ExpandedTaxInfoUpdateRequestModel {
17    #[serde(rename = "country", alias = "Country")]
18    pub country: String,
19    #[serde(
20        rename = "postalCode",
21        alias = "PostalCode",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub postal_code: Option<String>,
25    #[serde(
26        rename = "taxId",
27        alias = "TaxId",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub tax_id: Option<String>,
31    #[serde(
32        rename = "line1",
33        alias = "Line1",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub line1: Option<String>,
37    #[serde(
38        rename = "line2",
39        alias = "Line2",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub line2: Option<String>,
43    #[serde(
44        rename = "city",
45        alias = "City",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub city: Option<String>,
49    #[serde(
50        rename = "state",
51        alias = "State",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub state: Option<String>,
55}
56
57impl ExpandedTaxInfoUpdateRequestModel {
58    pub fn new(country: String) -> ExpandedTaxInfoUpdateRequestModel {
59        ExpandedTaxInfoUpdateRequestModel {
60            country,
61            postal_code: None,
62            tax_id: None,
63            line1: None,
64            line2: None,
65            city: None,
66            state: None,
67        }
68    }
69}