amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Orders
 *
 * 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).
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// BuyerInfo : Buyer information.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BuyerInfo {
    /// The anonymized email address of the buyer.
    #[serde(rename = "BuyerEmail", skip_serializing_if = "Option::is_none")]
    pub buyer_email: Option<String>,
    /// The buyer name or the recipient name.
    #[serde(rename = "BuyerName", skip_serializing_if = "Option::is_none")]
    pub buyer_name: Option<String>,
    /// The county of the buyer.  **Note**: This attribute is only available in the Brazil marketplace.
    #[serde(rename = "BuyerCounty", skip_serializing_if = "Option::is_none")]
    pub buyer_county: Option<String>,
    #[serde(rename = "BuyerTaxInfo", skip_serializing_if = "Option::is_none")]
    pub buyer_tax_info: Option<Box<models::orders_v0::BuyerTaxInfo>>,
    /// The purchase order (PO) number entered by the buyer at checkout. Only returned for orders where the buyer entered a PO number at checkout.
    #[serde(rename = "PurchaseOrderNumber", skip_serializing_if = "Option::is_none")]
    pub purchase_order_number: Option<String>,
}

impl BuyerInfo {
    /// Buyer information.
    pub fn new() -> BuyerInfo {
        BuyerInfo {
            buyer_email: None,
            buyer_name: None,
            buyer_county: None,
            buyer_tax_info: None,
            purchase_order_number: None,
        }
    }
}