amazon_spapi/models/shipping_v2/location.rs
1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Location : The location where the person, business or institution is located.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Location {
17 /// The state, county or region where the person, business or institution is located.
18 #[serde(rename = "stateOrRegion", skip_serializing_if = "Option::is_none")]
19 pub state_or_region: Option<String>,
20 /// The city or town where the person, business or institution is located.
21 #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
22 pub city: Option<String>,
23 /// The two digit country code. Follows ISO 3166-1 alpha-2 format.
24 #[serde(rename = "countryCode", skip_serializing_if = "Option::is_none")]
25 pub country_code: Option<String>,
26 /// The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation.
27 #[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")]
28 pub postal_code: Option<String>,
29}
30
31impl Location {
32 /// The location where the person, business or institution is located.
33 pub fn new() -> Location {
34 Location {
35 state_or_region: None,
36 city: None,
37 country_code: None,
38 postal_code: None,
39 }
40 }
41}
42