amazon_spapi/models/fulfillment_inbound_v0/address.rs
1/*
2 * Selling Partner API for Fulfillment Inbound
3 *
4 * The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.
5 *
6 * The version of the OpenAPI document: v0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Address : Specific details to identify a place.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Address {
17 /// Name of the individual or business.
18 #[serde(rename = "Name")]
19 pub name: String,
20 /// The street address information.
21 #[serde(rename = "AddressLine1")]
22 pub address_line1: String,
23 /// Additional street address information, if required.
24 #[serde(rename = "AddressLine2", skip_serializing_if = "Option::is_none")]
25 pub address_line2: Option<String>,
26 /// The district or county.
27 #[serde(rename = "DistrictOrCounty", skip_serializing_if = "Option::is_none")]
28 pub district_or_county: Option<String>,
29 /// The city.
30 #[serde(rename = "City")]
31 pub city: String,
32 /// The state or province code. If state or province codes are used in your marketplace, it is recommended that you include one with your request. This helps Amazon to select the most appropriate Amazon fulfillment center for your inbound shipment plan.
33 #[serde(rename = "StateOrProvinceCode")]
34 pub state_or_province_code: String,
35 /// The country code in two-character ISO 3166-1 alpha-2 format.
36 #[serde(rename = "CountryCode")]
37 pub country_code: String,
38 /// The postal code. If postal codes are used in your marketplace, we recommended that you include one with your request. This helps Amazon select the most appropriate Amazon fulfillment center for the inbound shipment plan.
39 #[serde(rename = "PostalCode")]
40 pub postal_code: String,
41}
42
43impl Address {
44 /// Specific details to identify a place.
45 pub fn new(name: String, address_line1: String, city: String, state_or_province_code: String, country_code: String, postal_code: String) -> Address {
46 Address {
47 name,
48 address_line1,
49 address_line2: None,
50 district_or_county: None,
51 city,
52 state_or_province_code,
53 country_code,
54 postal_code,
55 }
56 }
57}
58