Skip to main content

amazon_spapi/models/shipping/
location.rs

1/*
2 * Selling Partner API for Shipping
3 *
4 * 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.
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/// 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 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 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. In 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