binance-sdk 61.0.0

This is a lightweight library that works as a connector to the Binance public API.
Documentation
/*
 * Fiat REST API
 *
 * Query Binance fiat deposit and withdrawal history.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#![allow(unused_imports)]
use crate::fiat::rest_api::models;
use serde::{Deserialize, Serialize};

/// `FiatWithdrawRequestAccountInfo` : withdraw account info
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FiatWithdrawRequestAccountInfo {
    /// Your destination bank account number is required to receive the withdrawal. In Argentina, this will be your CBU/CVU; in Mexico, it will be your CLABE.
    #[serde(rename = "accountNumber")]
    pub account_number: String,
    /// Bank agency code. If contains a hyphen (e.g. `123-4`), enter `123` only.
    #[serde(rename = "agency", skip_serializing_if = "Option::is_none")]
    pub agency: Option<String>,
    /// Bank code used for PIX routing.
    #[serde(rename = "bankCodeForPix", skip_serializing_if = "Option::is_none")]
    pub bank_code_for_pix: Option<String>,
    /// Account type, e.g. `current` (Checking Account), `saving` (Savings Account), etc.
    #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")]
    pub account_type: Option<String>,
}

impl FiatWithdrawRequestAccountInfo {
    /// withdraw account info
    #[must_use]
    pub fn new(account_number: String) -> FiatWithdrawRequestAccountInfo {
        FiatWithdrawRequestAccountInfo {
            account_number,
            agency: None,
            bank_code_for_pix: None,
            account_type: None,
        }
    }
}