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

/// TransferScheduleRequest : Request body to initiate a scheduled transfer from a SW bank account to another customer defined bank account 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransferScheduleRequest {
    /// The unique identifier of the source Amazon SW bank account from where the money needs to be debited 
    #[serde(rename = "sourceAccountId")]
    pub source_account_id: String,
    /// Represents 3 letter currency code in ISO 4217 standard format of the source payment method country 
    #[serde(rename = "sourceCurrencyCode")]
    pub source_currency_code: String,
    /// Optional field to specify the unique identifier of the destination bank account where the money needs to be deposited 
    #[serde(rename = "destinationAccountId")]
    pub destination_account_id: String,
    #[serde(rename = "destinationTransactionInstrument")]
    pub destination_transaction_instrument: Box<models::seller_wallet_2024_03_01::TransactionInstrumentDetails>,
    #[serde(rename = "transactionType")]
    pub transaction_type: models::seller_wallet_2024_03_01::TransactionType,
    #[serde(rename = "transferScheduleInformation")]
    pub transfer_schedule_information: Box<models::seller_wallet_2024_03_01::TransferScheduleInformation>,
    #[serde(rename = "paymentPreference")]
    pub payment_preference: Box<models::seller_wallet_2024_03_01::PaymentPreference>,
    #[serde(rename = "transferScheduleStatus", skip_serializing_if = "Option::is_none")]
    pub transfer_schedule_status: Option<models::seller_wallet_2024_03_01::TransferScheduleStatus>,
}

impl TransferScheduleRequest {
    /// Request body to initiate a scheduled transfer from a SW bank account to another customer defined bank account 
    pub fn new(source_account_id: String, source_currency_code: String, destination_account_id: String, destination_transaction_instrument: models::seller_wallet_2024_03_01::TransactionInstrumentDetails, transaction_type: models::seller_wallet_2024_03_01::TransactionType, transfer_schedule_information: models::seller_wallet_2024_03_01::TransferScheduleInformation, payment_preference: models::seller_wallet_2024_03_01::PaymentPreference) -> TransferScheduleRequest {
        TransferScheduleRequest {
            source_account_id,
            source_currency_code,
            destination_account_id,
            destination_transaction_instrument: Box::new(destination_transaction_instrument),
            transaction_type,
            transfer_schedule_information: Box::new(transfer_schedule_information),
            payment_preference: Box::new(payment_preference),
            transfer_schedule_status: None,
        }
    }
}