stripe/resources/generated/
invoice_payment_method_options_us_bank_account.rs1use serde::{Deserialize, Serialize};
6
7#[derive(Clone, Debug, Default, Deserialize, Serialize)]
9pub struct InvoicePaymentMethodOptionsUsBankAccount {
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub financial_connections: Option<InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions>,
12
13 #[serde(skip_serializing_if = "Option::is_none")]
15 pub verification_method: Option<InvoicePaymentMethodOptionsUsBankAccountVerificationMethod>,
16}
17
18#[derive(Clone, Debug, Default, Deserialize, Serialize)]
19pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions {
20 #[serde(skip_serializing_if = "Option::is_none")]
24 pub permissions:
25 Option<Vec<InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions>>,
26
27 pub prefetch: Option<Vec<InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch>>,
29}
30
31#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
33#[serde(rename_all = "snake_case")]
34pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions {
35 Balances,
36 PaymentMethod,
37 Transactions,
38}
39
40impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions {
41 pub fn as_str(self) -> &'static str {
42 match self {
43 InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::Balances => "balances",
44 InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::PaymentMethod => "payment_method",
45 InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::Transactions => "transactions",
46 }
47 }
48}
49
50impl AsRef<str> for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions {
51 fn as_ref(&self) -> &str {
52 self.as_str()
53 }
54}
55
56impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions {
57 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
58 self.as_str().fmt(f)
59 }
60}
61impl std::default::Default
62 for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions
63{
64 fn default() -> Self {
65 Self::Balances
66 }
67}
68
69#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
71#[serde(rename_all = "snake_case")]
72pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch {
73 Balances,
74 Transactions,
75}
76
77impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch {
78 pub fn as_str(self) -> &'static str {
79 match self {
80 InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => {
81 "balances"
82 }
83 InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => {
84 "transactions"
85 }
86 }
87 }
88}
89
90impl AsRef<str> for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch {
91 fn as_ref(&self) -> &str {
92 self.as_str()
93 }
94}
95
96impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch {
97 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
98 self.as_str().fmt(f)
99 }
100}
101impl std::default::Default
102 for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch
103{
104 fn default() -> Self {
105 Self::Balances
106 }
107}
108
109#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
111#[serde(rename_all = "snake_case")]
112pub enum InvoicePaymentMethodOptionsUsBankAccountVerificationMethod {
113 Automatic,
114 Instant,
115 Microdeposits,
116}
117
118impl InvoicePaymentMethodOptionsUsBankAccountVerificationMethod {
119 pub fn as_str(self) -> &'static str {
120 match self {
121 InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic",
122 InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant",
123 InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => {
124 "microdeposits"
125 }
126 }
127 }
128}
129
130impl AsRef<str> for InvoicePaymentMethodOptionsUsBankAccountVerificationMethod {
131 fn as_ref(&self) -> &str {
132 self.as_str()
133 }
134}
135
136impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountVerificationMethod {
137 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
138 self.as_str().fmt(f)
139 }
140}
141impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountVerificationMethod {
142 fn default() -> Self {
143 Self::Automatic
144 }
145}