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
/*
* 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
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Address : The address.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Address {
/// The name of the person, business or institution at that address.
#[serde(rename = "name")]
pub name: String,
/// First line of that address.
#[serde(rename = "addressLine1")]
pub address_line1: String,
/// Additional address information, if required.
#[serde(rename = "addressLine2", skip_serializing_if = "Option::is_none")]
pub address_line2: Option<String>,
/// Additional address information, if required.
#[serde(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(rename = "stateOrRegion")]
pub state_or_region: String,
/// The city where the person, business or institution is located.
#[serde(rename = "city")]
pub city: String,
/// The two digit country code. In ISO 3166-1 alpha-2 format.
#[serde(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(rename = "postalCode")]
pub postal_code: String,
/// The email address of the contact associated with the address.
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// The email cc addresses of the contact associated with the address.
#[serde(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(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,
}
}
}