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 Merchant Fulfillment
*
* With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.
*
* The version of the OpenAPI document: v0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Address : The postal address information.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Address {
/// The name of the addressee, or business name.
#[serde(rename = "Name")]
pub name: String,
/// The street address information.
#[serde(rename = "AddressLine1")]
pub address_line1: String,
/// Additional street address information.
#[serde(rename = "AddressLine2", skip_serializing_if = "Option::is_none")]
pub address_line2: Option<String>,
/// Additional street address information.
#[serde(rename = "AddressLine3", skip_serializing_if = "Option::is_none")]
pub address_line3: Option<String>,
/// The district or county.
#[serde(rename = "DistrictOrCounty", skip_serializing_if = "Option::is_none")]
pub district_or_county: Option<String>,
/// The email address.
#[serde(rename = "Email")]
pub email: String,
/// The city.
#[serde(rename = "City")]
pub city: String,
/// The state or province code. This is a required field in Canada, US, and UK marketplaces, and for shipments that originate in China.
#[serde(rename = "StateOrProvinceCode", skip_serializing_if = "Option::is_none")]
pub state_or_province_code: Option<String>,
/// The zip code or postal code.
#[serde(rename = "PostalCode")]
pub postal_code: String,
/// The two-letter country code in [ISO 3166-1 alpha-2](https://www.iban.com/country-codes) format.
#[serde(rename = "CountryCode")]
pub country_code: String,
/// The phone number.
#[serde(rename = "Phone")]
pub phone: String,
}
impl Address {
/// The postal address information.
pub fn new(name: String, address_line1: String, email: String, city: String, postal_code: String, country_code: String, phone: String) -> Address {
Address {
name,
address_line1,
address_line2: None,
address_line3: None,
district_or_county: None,
email,
city,
state_or_province_code: None,
postal_code,
country_code,
phone,
}
}
}