1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
/*
* Selling Partner API for Shipping
*
* Provides programmatic access to Amazon Shipping APIs. **Note:** If you are new to the Amazon Shipping API, refer to the latest version of <a href=\"https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference\">Amazon Shipping API (v2)</a> on the <a href=\"https://developer-docs.amazon.com/amazon-shipping/\">Amazon Shipping Developer Documentation</a> site.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
/// Address : The address.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Address {
/// The name of the person, business or institution at that address.
#[serde(default, rename = "name")]
pub name: String,
/// First line of that address.
#[serde(default, rename = "addressLine1")]
pub address_line1: String,
/// Additional address information, if required.
#[serde(default, rename = "addressLine2", skip_serializing_if = "Option::is_none")]
pub address_line2: Option<String>,
/// Additional address information, if required.
#[serde(default, rename = "addressLine3", skip_serializing_if = "Option::is_none")]
pub address_line3: Option<String>,
/// The state or region where the person, business or institution is located.
#[serde(default, rename = "stateOrRegion")]
pub state_or_region: String,
/// The city where the person, business or institution is located.
#[serde(default, rename = "city")]
pub city: String,
/// The two digit country code. In ISO 3166-1 alpha-2 format.
#[serde(default, rename = "countryCode")]
pub country_code: String,
/// The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation.
#[serde(default, rename = "postalCode")]
pub postal_code: String,
/// The email address of the contact associated with the address.
#[serde(default, rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// The email cc addresses of the contact associated with the address.
#[serde(default, rename = "copyEmails", skip_serializing_if = "Option::is_none")]
pub copy_emails: Option<Vec<String>>,
/// The phone number of the person, business or institution located at that address.
#[serde(default, rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
}
impl Address {
/// The address.
pub fn new(name: String, address_line1: String, state_or_region: String, city: String, country_code: String, postal_code: String) -> Address {
Address {
name,
address_line1,
address_line2: None,
address_line3: None,
state_or_region,
city,
country_code,
postal_code,
email: None,
copy_emails: None,
phone_number: None,
}
}
}