Skip to main content

amazon_spapi/models/fulfillment_outbound_2020_07_01/
variable_precision_address.rs

1/*
2 * Selling Partner APIs for Fulfillment Outbound
3 *
4 * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
5 *
6 * The version of the OpenAPI document: 2020-07-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// VariablePrecisionAddress : A physical address with varying degrees of precision. A more precise address can provide more accurate results than country code and postal code alone.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VariablePrecisionAddress {
17    /// The first line of the address.
18    #[serde(rename = "addressLine1", skip_serializing_if = "Option::is_none")]
19    pub address_line1: Option<String>,
20    /// Additional address information, if required.
21    #[serde(rename = "addressLine2", skip_serializing_if = "Option::is_none")]
22    pub address_line2: Option<String>,
23    /// Additional address information, if required.
24    #[serde(rename = "addressLine3", skip_serializing_if = "Option::is_none")]
25    pub address_line3: Option<String>,
26    /// The city where the person, business, or institution is located. This property should not be used in Japan.
27    #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
28    pub city: Option<String>,
29    /// The district or county where the person, business, or institution is located.
30    #[serde(rename = "districtOrCounty", skip_serializing_if = "Option::is_none")]
31    pub district_or_county: Option<String>,
32    /// The state or region where the person, business or institution is located.
33    #[serde(rename = "stateOrRegion", skip_serializing_if = "Option::is_none")]
34    pub state_or_region: Option<String>,
35    /// The postal code of the address.
36    #[serde(rename = "postalCode")]
37    pub postal_code: String,
38    /// The two digit country code. In ISO 3166-1 alpha-2 format.
39    #[serde(rename = "countryCode")]
40    pub country_code: String,
41}
42
43impl VariablePrecisionAddress {
44    /// A physical address with varying degrees of precision. A more precise address can provide more accurate results than country code and postal code alone.
45    pub fn new(postal_code: String, country_code: String) -> VariablePrecisionAddress {
46        VariablePrecisionAddress {
47            address_line1: None,
48            address_line2: None,
49            address_line3: None,
50            city: None,
51            district_or_county: None,
52            state_or_region: None,
53            postal_code,
54            country_code,
55        }
56    }
57}
58