fireblocks_sdk/models/
aba_payment_info.rs1use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AbaPaymentInfo {
17 #[serde(rename = "accountHolderGivenName")]
19 pub account_holder_given_name: String,
20 #[serde(
22 rename = "accountHolderSurname",
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub account_holder_surname: Option<String>,
26 #[serde(rename = "accountHolderCity")]
28 pub account_holder_city: String,
29 #[serde(rename = "accountHolderCountry")]
31 pub account_holder_country: String,
32 #[serde(rename = "accountHolderAddress1")]
34 pub account_holder_address1: String,
35 #[serde(
37 rename = "accountHolderAddress2",
38 skip_serializing_if = "Option::is_none"
39 )]
40 pub account_holder_address2: Option<String>,
41 #[serde(
43 rename = "accountHolderDistrict",
44 skip_serializing_if = "Option::is_none"
45 )]
46 pub account_holder_district: Option<String>,
47 #[serde(rename = "accountHolderPostalCode")]
49 pub account_holder_postal_code: String,
50 #[serde(rename = "abaRoutingNumber")]
52 pub aba_routing_number: String,
53 #[serde(rename = "abaAccountNumber")]
55 pub aba_account_number: String,
56 #[serde(rename = "abaCountry")]
58 pub aba_country: String,
59}
60
61impl AbaPaymentInfo {
62 pub fn new(
64 account_holder_given_name: String,
65 account_holder_city: String,
66 account_holder_country: String,
67 account_holder_address1: String,
68 account_holder_postal_code: String,
69 aba_routing_number: String,
70 aba_account_number: String,
71 aba_country: String,
72 ) -> AbaPaymentInfo {
73 AbaPaymentInfo {
74 account_holder_given_name,
75 account_holder_surname: None,
76 account_holder_city,
77 account_holder_country,
78 account_holder_address1,
79 account_holder_address2: None,
80 account_holder_district: None,
81 account_holder_postal_code,
82 aba_routing_number,
83 aba_account_number,
84 aba_country,
85 }
86 }
87}