Skip to main content

fireblocks_sdk/models/
us_wire_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/// UsWirePaymentInfo : US Wire payment information for US domestic wire
15/// transfers
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct UsWirePaymentInfo {
18    /// The payment rail type for US wire transfers
19    #[serde(rename = "rail")]
20    pub rail: Rail,
21    /// The addressing system used for US wire 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 SWIFT/BIC code of the bank
40    #[serde(rename = "swiftCode")]
41    pub swift_code: String,
42    /// The name of the bank
43    #[serde(rename = "bankName")]
44    pub bank_name: String,
45    /// The street address of the bank
46    #[serde(rename = "bankAddressLine")]
47    pub bank_address_line: String,
48    /// The city where the bank is located
49    #[serde(rename = "bankAddressCity")]
50    pub bank_address_city: String,
51    /// The state where the bank is located
52    #[serde(rename = "bankAddressState", skip_serializing_if = "Option::is_none")]
53    pub bank_address_state: Option<String>,
54    /// The country where the bank is located (ISO 3166-1 alpha-2 code)
55    #[serde(rename = "bankAddressCountry")]
56    pub bank_address_country: String,
57    /// The postal code of the bank's address
58    #[serde(rename = "bankAddressPostalCode")]
59    pub bank_address_postal_code: String,
60    /// The branch number of the bank
61    #[serde(rename = "branchNumber", skip_serializing_if = "Option::is_none")]
62    pub branch_number: Option<String>,
63}
64
65impl UsWirePaymentInfo {
66    /// US Wire payment information for US domestic wire transfers
67    pub fn new(
68        rail: Rail,
69        addressing_system: AddressingSystem,
70        account_holder_given_name: String,
71        account_holder_surname: String,
72        country: String,
73        account_number: String,
74        routing_number: String,
75        swift_code: String,
76        bank_name: String,
77        bank_address_line: String,
78        bank_address_city: String,
79        bank_address_country: String,
80        bank_address_postal_code: String,
81    ) -> UsWirePaymentInfo {
82        UsWirePaymentInfo {
83            rail,
84            addressing_system,
85            account_holder_given_name,
86            account_holder_surname,
87            country,
88            account_number,
89            routing_number,
90            swift_code,
91            bank_name,
92            bank_address_line,
93            bank_address_city,
94            bank_address_state: None,
95            bank_address_country,
96            bank_address_postal_code,
97            branch_number: None,
98        }
99    }
100}
101/// The payment rail type for US wire transfers
102#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
103pub enum Rail {
104    #[serde(rename = "US_WIRE")]
105    UsWire,
106}
107
108impl Default for Rail {
109    fn default() -> Rail {
110        Self::UsWire
111    }
112}
113/// The addressing system used for US wire transfers
114#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
115pub enum AddressingSystem {
116    #[serde(rename = "ABA")]
117    Aba,
118}
119
120impl Default for AddressingSystem {
121    fn default() -> AddressingSystem {
122        Self::Aba
123    }
124}