1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// 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},
};
/// SpeiAdvancedPaymentInfo : Advanced SPEI payment information for Mexican bank
/// transfers with full details
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SpeiAdvancedPaymentInfo {
/// The payment rail type for SPEI transfers
#[serde(rename = "rail")]
pub rail: Rail,
/// The addressing system used for SPEI 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 name of the bank
#[serde(rename = "bankName", skip_serializing_if = "Option::is_none")]
pub bank_name: Option<String>,
/// The RFC (Registro Federal de Contribuyentes) of the beneficiary
#[serde(rename = "beneficiaryRfc", skip_serializing_if = "Option::is_none")]
pub beneficiary_rfc: Option<String>,
/// The document ID of the sender
#[serde(rename = "senderDocumentId", skip_serializing_if = "Option::is_none")]
pub sender_document_id: Option<String>,
/// The CLABE (Clave Bancaria Estandarizada) number
#[serde(rename = "clabe")]
pub clabe: String,
}
impl SpeiAdvancedPaymentInfo {
/// Advanced SPEI payment information for Mexican bank transfers with full
/// details
pub fn new(
rail: Rail,
addressing_system: AddressingSystem,
account_holder_given_name: String,
account_holder_surname: String,
country: String,
clabe: String,
) -> SpeiAdvancedPaymentInfo {
SpeiAdvancedPaymentInfo {
rail,
addressing_system,
account_holder_given_name,
account_holder_surname,
country,
bank_name: None,
beneficiary_rfc: None,
sender_document_id: None,
clabe,
}
}
}
/// The payment rail type for SPEI transfers
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Rail {
#[serde(rename = "SPEI")]
Spei,
}
impl Default for Rail {
fn default() -> Rail {
Self::Spei
}
}
/// The addressing system used for SPEI transfers
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AddressingSystem {
#[serde(rename = "CLABE")]
Clabe,
}
impl Default for AddressingSystem {
fn default() -> AddressingSystem {
Self::Clabe
}
}