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

/// SepaPaymentInfo : SEPA payment information for European Single Euro Payments
/// Area transfers
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SepaPaymentInfo {
    /// The payment rail type for SEPA transfers
    #[serde(rename = "rail")]
    pub rail: Rail,
    /// The addressing system used for SEPA 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 where the account holder resides (ISO 3166-1 alpha-2 code)
    #[serde(
        rename = "accountHolderCountry",
        skip_serializing_if = "Option::is_none"
    )]
    pub account_holder_country: Option<String>,
    /// The address of the account holder
    #[serde(
        rename = "accountHolderAddress",
        skip_serializing_if = "Option::is_none"
    )]
    pub account_holder_address: Option<String>,
    /// The International Bank Account Number (IBAN)
    #[serde(rename = "iban")]
    pub iban: String,
    /// The country for the transfer (ISO 3166-1 alpha-2 code)
    #[serde(rename = "country")]
    pub country: String,
    /// The Bank Identifier Code (BIC/SWIFT code)
    #[serde(rename = "bic", skip_serializing_if = "Option::is_none")]
    pub bic: Option<String>,
    /// The name of the bank
    #[serde(rename = "bankName", skip_serializing_if = "Option::is_none")]
    pub bank_name: Option<String>,
    /// The bank branch information
    #[serde(rename = "bankBranch", skip_serializing_if = "Option::is_none")]
    pub bank_branch: Option<String>,
    /// The address of the bank
    #[serde(rename = "bankAddress", skip_serializing_if = "Option::is_none")]
    pub bank_address: Option<String>,
    /// The purpose code for the transfer
    #[serde(rename = "purposeCode", skip_serializing_if = "Option::is_none")]
    pub purpose_code: Option<String>,
    /// The tax identification number
    #[serde(rename = "taxId", skip_serializing_if = "Option::is_none")]
    pub tax_id: Option<String>,
}

impl SepaPaymentInfo {
    /// SEPA payment information for European Single Euro Payments Area
    /// transfers
    pub fn new(
        rail: Rail,
        addressing_system: AddressingSystem,
        account_holder_given_name: String,
        account_holder_surname: String,
        iban: String,
        country: String,
    ) -> SepaPaymentInfo {
        SepaPaymentInfo {
            rail,
            addressing_system,
            account_holder_given_name,
            account_holder_surname,
            account_holder_country: None,
            account_holder_address: None,
            iban,
            country,
            bic: None,
            bank_name: None,
            bank_branch: None,
            bank_address: None,
            purpose_code: None,
            tax_id: None,
        }
    }
}
/// The payment rail type for SEPA transfers
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Rail {
    #[serde(rename = "SEPA")]
    Sepa,
}

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

impl Default for AddressingSystem {
    fn default() -> AddressingSystem {
        Self::Iban
    }
}