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};

/// TransactionAccount : Details of the bank account involved in the transaction.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionAccount {
    /// The unique identifier provided by Amazon to identify the account 
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    /// BankAccount holder's name 
    #[serde(rename = "bankAccountHolderName")]
    pub bank_account_holder_name: String,
    /// The name of the bank 
    #[serde(rename = "bankName")]
    pub bank_name: String,
    #[serde(rename = "bankAccountNumberFormat")]
    pub bank_account_number_format: models::seller_wallet_2024_03_01::BankAccountNumberFormat,
    /// Last 3 digit of the bank account number 
    #[serde(rename = "bankAccountNumberTail", skip_serializing_if = "Option::is_none")]
    pub bank_account_number_tail: Option<String>,
    /// The two digit country code, in ISO 3166 format. This field is OPTIONAL for transactionSourceAccount object but is MANDATORY field for transactionDestinationAccount 
    #[serde(rename = "bankAccountCountryCode", skip_serializing_if = "Option::is_none")]
    pub bank_account_country_code: Option<String>,
    /// The currency code in ISO 4217 format 
    #[serde(rename = "bankAccountCurrency")]
    pub bank_account_currency: String,
}

impl TransactionAccount {
    /// Details of the bank account involved in the transaction.
    pub fn new(bank_account_holder_name: String, bank_name: String, bank_account_number_format: models::seller_wallet_2024_03_01::BankAccountNumberFormat, bank_account_currency: String) -> TransactionAccount {
        TransactionAccount {
            account_id: None,
            bank_account_holder_name,
            bank_name,
            bank_account_number_format,
            bank_account_number_tail: None,
            bank_account_country_code: None,
            bank_account_currency,
        }
    }
}