amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Seller Wallet Open Banking API
 *
 * The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.
 *
 * The version of the OpenAPI document: 2024-03-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// AccountHolderAddress : Address for bank account verification of the Payee. For example, this can be a person or business mailing address 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountHolderAddress {
    /// Address Line 1 of the public address 
    #[serde(rename = "addressLine1")]
    pub address_line1: String,
    /// Address Line 2 of the public address 
    #[serde(rename = "addressLine2", skip_serializing_if = "Option::is_none")]
    pub address_line2: Option<String>,
    /// City name of the public address 
    #[serde(rename = "city")]
    pub city: String,
    /// State name of the public address. This is the state or region for China-based addresses.
    #[serde(rename = "state")]
    pub state: String,
    /// Postal code of the public address 
    #[serde(rename = "postalCode")]
    pub postal_code: String,
    /// Country name of the public address 
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    /// The two digit country code, in ISO 3166 format. 
    #[serde(rename = "countryCode")]
    pub country_code: String,
}

impl AccountHolderAddress {
    /// Address for bank account verification of the Payee. For example, this can be a person or business mailing address 
    pub fn new(address_line1: String, city: String, state: String, postal_code: String, country_code: String) -> AccountHolderAddress {
        AccountHolderAddress {
            address_line1,
            address_line2: None,
            city,
            state,
            postal_code,
            country: None,
            country_code,
        }
    }
}