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