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

/// Balance : Specifies the balance amount in the Amazon SW bank account
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Balance {
    /// The unique identifier provided by Amazon to identify the account 
    #[serde(rename = "accountId")]
    pub account_id: String,
    #[serde(rename = "balanceType", skip_serializing_if = "Option::is_none")]
    pub balance_type: Option<models::seller_wallet_2024_03_01::BalanceType>,
    /// A decimal number such as amount or FX rate.
    #[serde(rename = "balanceAmount")]
    pub balance_amount: f64,
    /// The Amazon SW bank account currency code in ISO 4217 format 
    #[serde(rename = "balanceCurrency")]
    pub balance_currency: String,
    /// The last update date on the account balance 
    #[serde(rename = "lastUpdateDate")]
    pub last_update_date: String,
}

impl Balance {
    /// Specifies the balance amount in the Amazon SW bank account
    pub fn new(account_id: String, balance_amount: f64, balance_currency: String, last_update_date: String) -> Balance {
        Balance {
            account_id,
            balance_type: None,
            balance_amount,
            balance_currency,
            last_update_date,
        }
    }
}