fireblocks_sdk/models/
sepa_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/// SepaPaymentInfo : SEPA payment information for European Single Euro Payments
15/// Area transfers
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct SepaPaymentInfo {
18    /// The payment rail type for SEPA transfers
19    #[serde(rename = "rail")]
20    pub rail: Rail,
21    /// The addressing system used for SEPA 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 where the account holder resides (ISO 3166-1 alpha-2 code)
31    #[serde(
32        rename = "accountHolderCountry",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub account_holder_country: Option<String>,
36    /// The address of the account holder
37    #[serde(
38        rename = "accountHolderAddress",
39        skip_serializing_if = "Option::is_none"
40    )]
41    pub account_holder_address: Option<String>,
42    /// The International Bank Account Number (IBAN)
43    #[serde(rename = "iban")]
44    pub iban: String,
45    /// The country for the transfer (ISO 3166-1 alpha-2 code)
46    #[serde(rename = "country")]
47    pub country: String,
48    /// The Bank Identifier Code (BIC/SWIFT code)
49    #[serde(rename = "bic", skip_serializing_if = "Option::is_none")]
50    pub bic: Option<String>,
51    /// The name of the bank
52    #[serde(rename = "bankName", skip_serializing_if = "Option::is_none")]
53    pub bank_name: Option<String>,
54    /// The bank branch information
55    #[serde(rename = "bankBranch", skip_serializing_if = "Option::is_none")]
56    pub bank_branch: Option<String>,
57    /// The address of the bank
58    #[serde(rename = "bankAddress", skip_serializing_if = "Option::is_none")]
59    pub bank_address: Option<String>,
60    /// The purpose code for the transfer
61    #[serde(rename = "purposeCode", skip_serializing_if = "Option::is_none")]
62    pub purpose_code: Option<String>,
63    /// The tax identification number
64    #[serde(rename = "taxId", skip_serializing_if = "Option::is_none")]
65    pub tax_id: Option<String>,
66}
67
68impl SepaPaymentInfo {
69    /// SEPA payment information for European Single Euro Payments Area
70    /// transfers
71    pub fn new(
72        rail: Rail,
73        addressing_system: AddressingSystem,
74        account_holder_given_name: String,
75        account_holder_surname: String,
76        iban: String,
77        country: String,
78    ) -> SepaPaymentInfo {
79        SepaPaymentInfo {
80            rail,
81            addressing_system,
82            account_holder_given_name,
83            account_holder_surname,
84            account_holder_country: None,
85            account_holder_address: None,
86            iban,
87            country,
88            bic: None,
89            bank_name: None,
90            bank_branch: None,
91            bank_address: None,
92            purpose_code: None,
93            tax_id: None,
94        }
95    }
96}
97/// The payment rail type for SEPA transfers
98#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
99pub enum Rail {
100    #[serde(rename = "SEPA")]
101    Sepa,
102}
103
104impl Default for Rail {
105    fn default() -> Rail {
106        Self::Sepa
107    }
108}
109/// The addressing system used for SEPA transfers
110#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
111pub enum AddressingSystem {
112    #[serde(rename = "IBAN")]
113    Iban,
114}
115
116impl Default for AddressingSystem {
117    fn default() -> AddressingSystem {
118        Self::Iban
119    }
120}