amazon_spapi/models/sellers/address.rs
1/*
2 * The Selling Partner API for Sellers
3 *
4 * The [Selling Partner API for Sellers](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) (Sellers API) provides essential information about seller accounts, such as: - The marketplaces a seller can list in - The default language and currency of a marketplace - Whether the seller has suspended listings Refer to the [Sellers API reference](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) for details about this API's operations, data types, and schemas.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Address : Represents an address
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Address {
17 /// Street address information.
18 #[serde(rename = "addressLine1")]
19 pub address_line1: String,
20 /// Additional street address information.
21 #[serde(rename = "addressLine2", skip_serializing_if = "Option::is_none")]
22 pub address_line2: Option<String>,
23 /// The country code in two-character ISO 3166-1 alpha-2 format.
24 #[serde(rename = "countryCode")]
25 pub country_code: String,
26 /// The state or province code.
27 #[serde(rename = "stateOrProvinceCode", skip_serializing_if = "Option::is_none")]
28 pub state_or_province_code: Option<String>,
29 /// The city.
30 #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
31 pub city: Option<String>,
32 /// The postal code.
33 #[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")]
34 pub postal_code: Option<String>,
35}
36
37impl Address {
38 /// Represents an address
39 pub fn new(address_line1: String, country_code: String) -> Address {
40 Address {
41 address_line1,
42 address_line2: None,
43 country_code,
44 state_or_province_code: None,
45 city: None,
46 postal_code: None,
47 }
48 }
49}
50