amazon_spapi/models/orders_v0/order_address.rs
1/*
2 * Selling Partner API for Orders
3 *
4 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools. _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
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/// OrderAddress : The shipping address for the order.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OrderAddress {
17 /// An Amazon-defined order identifier, in 3-7-7 format.
18 #[serde(rename = "AmazonOrderId")]
19 pub amazon_order_id: String,
20 /// The company name of the contact buyer. For IBA orders, the buyer company must be Amazon entities.
21 #[serde(rename = "BuyerCompanyName", skip_serializing_if = "Option::is_none")]
22 pub buyer_company_name: Option<String>,
23 #[serde(rename = "ShippingAddress", skip_serializing_if = "Option::is_none")]
24 pub shipping_address: Option<Box<models::orders_v0::Address>>,
25 #[serde(rename = "DeliveryPreferences", skip_serializing_if = "Option::is_none")]
26 pub delivery_preferences: Option<Box<models::orders_v0::DeliveryPreferences>>,
27}
28
29impl OrderAddress {
30 /// The shipping address for the order.
31 pub fn new(amazon_order_id: String) -> OrderAddress {
32 OrderAddress {
33 amazon_order_id,
34 buyer_company_name: None,
35 shipping_address: None,
36 delivery_preferences: None,
37 }
38 }
39}
40