plaid/model/
transfer_platform_person_address.rs

1use serde::{Serialize, Deserialize};
2///Home address of a person
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct TransferPlatformPersonAddress {
5    ///The full city name.
6    pub city: String,
7    ///Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form.
8    pub country: String,
9    ///The postal code of the address.
10    pub postal_code: String,
11    /**An ISO 3166-2 subdivision code.
12Related terms would be "state", "province", "prefecture", "zone", "subdivision", etc.*/
13    pub region: String,
14    ///The primary street portion of an address. A string with at least one non-whitespace alphabetical character, with a max length of 80 characters.
15    pub street: String,
16    ///Extra street information, like an apartment or suite number. If provided, a string with at least one non-whitespace character, with a max length of 50 characters.
17    #[serde(default, skip_serializing_if = "Option::is_none")]
18    pub street2: Option<String>,
19}
20impl std::fmt::Display for TransferPlatformPersonAddress {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
22        write!(f, "{}", serde_json::to_string(self).unwrap())
23    }
24}