fireblocks_sdk/models/
ach_payment_info.rs

1// Fireblocks API
2//
3// 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)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14/// AchPaymentInfo : ACH payment information for US Automated Clearing House
15/// transfers
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct AchPaymentInfo {
18    /// The payment rail type for ACH transfers
19    #[serde(rename = "rail")]
20    pub rail: Rail,
21    /// The addressing system used for ACH transfers
22    #[serde(rename = "addressingSystem")]
23    pub addressing_system: AddressingSystem,
24    /// The given name (first name) of the account holder
25    #[serde(rename = "accountHolderGivenName")]
26    pub account_holder_given_name: String,
27    /// The surname (last name) of the account holder
28    #[serde(rename = "accountHolderSurname")]
29    pub account_holder_surname: String,
30    /// The country for the transfer (ISO 3166-1 alpha-2 code)
31    #[serde(rename = "country")]
32    pub country: String,
33    /// The bank account number
34    #[serde(rename = "accountNumber")]
35    pub account_number: String,
36    /// The bank routing number (ABA routing number)
37    #[serde(rename = "routingNumber")]
38    pub routing_number: String,
39    /// The type of bank account
40    #[serde(rename = "accountType")]
41    pub account_type: AccountType,
42}
43
44impl AchPaymentInfo {
45    /// ACH payment information for US Automated Clearing House transfers
46    pub fn new(
47        rail: Rail,
48        addressing_system: AddressingSystem,
49        account_holder_given_name: String,
50        account_holder_surname: String,
51        country: String,
52        account_number: String,
53        routing_number: String,
54        account_type: AccountType,
55    ) -> AchPaymentInfo {
56        AchPaymentInfo {
57            rail,
58            addressing_system,
59            account_holder_given_name,
60            account_holder_surname,
61            country,
62            account_number,
63            routing_number,
64            account_type,
65        }
66    }
67}
68/// The payment rail type for ACH transfers
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum Rail {
71    #[serde(rename = "ACH")]
72    Ach,
73}
74
75impl Default for Rail {
76    fn default() -> Rail {
77        Self::Ach
78    }
79}
80/// The addressing system used for ACH transfers
81#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
82pub enum AddressingSystem {
83    #[serde(rename = "ACH")]
84    Ach,
85}
86
87impl Default for AddressingSystem {
88    fn default() -> AddressingSystem {
89        Self::Ach
90    }
91}
92/// The type of bank account
93#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
94pub enum AccountType {
95    #[serde(rename = "CHECKING")]
96    Checking,
97    #[serde(rename = "SAVINGS")]
98    Savings,
99}
100
101impl Default for AccountType {
102    fn default() -> AccountType {
103        Self::Checking
104    }
105}