Skip to main content

amazon_spapi/models/fulfillment_inbound_2024_03_20/
address_input.rs

1/*
2 * The Selling Partner API for FBA inbound operations.
3 *
4 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
5 *
6 * The version of the OpenAPI document: 2024-03-20
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AddressInput : Specific details to identify a place.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AddressInput {
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 city.
24    #[serde(rename = "city")]
25    pub city: String,
26    /// The name of the business.
27    #[serde(rename = "companyName", skip_serializing_if = "Option::is_none")]
28    pub company_name: Option<String>,
29    /// The country code in two-character ISO 3166-1 alpha-2 format.
30    #[serde(rename = "countryCode")]
31    pub country_code: String,
32    /// The email address.
33    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
34    pub email: Option<String>,
35    /// The name of the individual who is the primary contact.
36    #[serde(rename = "name")]
37    pub name: String,
38    /// The phone number.
39    #[serde(rename = "phoneNumber")]
40    pub phone_number: String,
41    /// The postal code.
42    #[serde(rename = "postalCode")]
43    pub postal_code: String,
44    /// The state or province code.
45    #[serde(rename = "stateOrProvinceCode", skip_serializing_if = "Option::is_none")]
46    pub state_or_province_code: Option<String>,
47}
48
49impl AddressInput {
50    /// Specific details to identify a place.
51    pub fn new(address_line1: String, city: String, country_code: String, name: String, phone_number: String, postal_code: String) -> AddressInput {
52        AddressInput {
53            address_line1,
54            address_line2: None,
55            city,
56            company_name: None,
57            country_code,
58            email: None,
59            name,
60            phone_number,
61            postal_code,
62            state_or_province_code: None,
63        }
64    }
65}
66