fireblocks-sdk 2025.10.17

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

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

/// AchPaymentInfo : ACH payment information for US Automated Clearing House
/// transfers
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AchPaymentInfo {
    /// The payment rail type for ACH transfers
    #[serde(rename = "rail")]
    pub rail: Rail,
    /// The addressing system used for ACH transfers
    #[serde(rename = "addressingSystem")]
    pub addressing_system: AddressingSystem,
    /// The given name (first name) of the account holder
    #[serde(rename = "accountHolderGivenName")]
    pub account_holder_given_name: String,
    /// The surname (last name) of the account holder
    #[serde(rename = "accountHolderSurname")]
    pub account_holder_surname: String,
    /// The country for the transfer (ISO 3166-1 alpha-2 code)
    #[serde(rename = "country")]
    pub country: String,
    /// The bank account number
    #[serde(rename = "accountNumber")]
    pub account_number: String,
    /// The bank routing number (ABA routing number)
    #[serde(rename = "routingNumber")]
    pub routing_number: String,
    /// The type of bank account
    #[serde(rename = "accountType")]
    pub account_type: AccountType,
}

impl AchPaymentInfo {
    /// ACH payment information for US Automated Clearing House transfers
    pub fn new(
        rail: Rail,
        addressing_system: AddressingSystem,
        account_holder_given_name: String,
        account_holder_surname: String,
        country: String,
        account_number: String,
        routing_number: String,
        account_type: AccountType,
    ) -> AchPaymentInfo {
        AchPaymentInfo {
            rail,
            addressing_system,
            account_holder_given_name,
            account_holder_surname,
            country,
            account_number,
            routing_number,
            account_type,
        }
    }
}
/// The payment rail type for ACH transfers
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Rail {
    #[serde(rename = "ACH")]
    Ach,
}

impl Default for Rail {
    fn default() -> Rail {
        Self::Ach
    }
}
/// The addressing system used for ACH transfers
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AddressingSystem {
    #[serde(rename = "ACH")]
    Ach,
}

impl Default for AddressingSystem {
    fn default() -> AddressingSystem {
        Self::Ach
    }
}
/// The type of bank account
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountType {
    #[serde(rename = "CHECKING")]
    Checking,
    #[serde(rename = "SAVINGS")]
    Savings,
}

impl Default for AccountType {
    fn default() -> AccountType {
        Self::Checking
    }
}