stripe_shared/
account_capabilities.rs

1#[derive(Clone, Debug)]
2#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
3#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
4pub struct AccountCapabilities {
5    /// The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.
6    pub acss_debit_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
7    /// The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.
8    pub affirm_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
9    /// The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.
10    pub afterpay_clearpay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
11    /// The status of the Alma capability of the account, or whether the account can directly process Alma payments.
12    pub alma_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
13    /// The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.
14    pub amazon_pay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
15    /// The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
16    pub au_becs_debit_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
17    /// The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
18    pub bacs_debit_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
19    /// The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.
20    pub bancontact_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
21    /// The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.
22    pub bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
23    /// The status of the Billie capability of the account, or whether the account can directly process Billie payments.
24    pub billie_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
25    /// The status of the blik payments capability of the account, or whether the account can directly process blik charges.
26    pub blik_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
27    /// The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.
28    pub boleto_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
29    /// The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards.
30    pub card_issuing: Option<stripe_shared::AccountCapabilitiesStatus>,
31    /// The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.
32    pub card_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
33    /// The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.
34    pub cartes_bancaires_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
35    /// The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
36    pub cashapp_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
37    /// The status of the Crypto capability of the account, or whether the account can directly process Crypto payments.
38    pub crypto_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
39    /// The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
40    pub eps_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
41    /// The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
42    pub fpx_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
43    /// The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges.
44    pub gb_bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
45    /// The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.
46    pub giropay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
47    /// The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.
48    pub grabpay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
49    /// The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.
50    pub ideal_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
51    /// The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.
52    pub india_international_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
53    /// The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency.
54    pub jcb_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
55    /// The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges.
56    pub jp_bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
57    /// The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.
58    pub kakao_pay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
59    /// The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.
60    pub klarna_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
61    /// The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.
62    pub konbini_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
63    /// The status of the KrCard capability of the account, or whether the account can directly process KrCard payments.
64    pub kr_card_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
65    /// The status of the legacy payments capability of the account.
66    pub legacy_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
67    /// The status of the link_payments capability of the account, or whether the account can directly process Link charges.
68    pub link_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
69    /// The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges.
70    pub mb_way_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
71    /// The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.
72    pub mobilepay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
73    /// The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.
74    pub multibanco_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
75    /// The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges.
76    pub mx_bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
77    /// The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.
78    pub naver_pay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
79    /// The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges.
80    pub nz_bank_account_becs_debit_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
81    /// The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
82    pub oxxo_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
83    /// The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.
84    pub p24_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
85    /// The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.
86    pub pay_by_bank_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
87    /// The status of the Payco capability of the account, or whether the account can directly process Payco payments.
88    pub payco_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
89    /// The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
90    pub paynow_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
91    /// The status of the PayTo capability of the account, or whether the account can directly process PayTo charges.
92    pub payto_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
93    /// The status of the pix payments capability of the account, or whether the account can directly process pix charges.
94    pub pix_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
95    /// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
96    pub promptpay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
97    /// The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
98    pub revolut_pay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
99    /// The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.
100    pub samsung_pay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
101    /// The status of the Satispay capability of the account, or whether the account can directly process Satispay payments.
102    pub satispay_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
103    /// The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges.
104    pub sepa_bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
105    /// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
106    pub sepa_debit_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
107    /// The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
108    pub sofort_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
109    /// The status of the Swish capability of the account, or whether the account can directly process Swish payments.
110    pub swish_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
111    /// The status of the tax reporting 1099-K (US) capability of the account.
112    pub tax_reporting_us_1099_k: Option<stripe_shared::AccountCapabilitiesStatus>,
113    /// The status of the tax reporting 1099-MISC (US) capability of the account.
114    pub tax_reporting_us_1099_misc: Option<stripe_shared::AccountCapabilitiesStatus>,
115    /// The status of the transfers capability of the account, or whether your platform can transfer funds to the account.
116    pub transfers: Option<stripe_shared::AccountCapabilitiesStatus>,
117    /// The status of the banking capability, or whether the account can have bank accounts.
118    pub treasury: Option<stripe_shared::AccountCapabilitiesStatus>,
119    /// The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.
120    pub twint_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
121    /// The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
122    pub us_bank_account_ach_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
123    /// The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges.
124    pub us_bank_transfer_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
125    /// The status of the Zip capability of the account, or whether the account can directly process Zip charges.
126    pub zip_payments: Option<stripe_shared::AccountCapabilitiesStatus>,
127}
128#[doc(hidden)]
129pub struct AccountCapabilitiesBuilder {
130    acss_debit_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
131    affirm_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
132    afterpay_clearpay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
133    alma_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
134    amazon_pay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
135    au_becs_debit_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
136    bacs_debit_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
137    bancontact_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
138    bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
139    billie_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
140    blik_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
141    boleto_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
142    card_issuing: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
143    card_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
144    cartes_bancaires_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
145    cashapp_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
146    crypto_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
147    eps_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
148    fpx_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
149    gb_bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
150    giropay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
151    grabpay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
152    ideal_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
153    india_international_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
154    jcb_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
155    jp_bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
156    kakao_pay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
157    klarna_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
158    konbini_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
159    kr_card_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
160    legacy_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
161    link_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
162    mb_way_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
163    mobilepay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
164    multibanco_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
165    mx_bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
166    naver_pay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
167    nz_bank_account_becs_debit_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
168    oxxo_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
169    p24_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
170    pay_by_bank_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
171    payco_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
172    paynow_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
173    payto_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
174    pix_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
175    promptpay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
176    revolut_pay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
177    samsung_pay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
178    satispay_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
179    sepa_bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
180    sepa_debit_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
181    sofort_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
182    swish_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
183    tax_reporting_us_1099_k: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
184    tax_reporting_us_1099_misc: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
185    transfers: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
186    treasury: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
187    twint_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
188    us_bank_account_ach_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
189    us_bank_transfer_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
190    zip_payments: Option<Option<stripe_shared::AccountCapabilitiesStatus>>,
191}
192
193#[allow(
194    unused_variables,
195    irrefutable_let_patterns,
196    clippy::let_unit_value,
197    clippy::match_single_binding,
198    clippy::single_match
199)]
200const _: () = {
201    use miniserde::de::{Map, Visitor};
202    use miniserde::json::Value;
203    use miniserde::{Deserialize, Result, make_place};
204    use stripe_types::miniserde_helpers::FromValueOpt;
205    use stripe_types::{MapBuilder, ObjectDeser};
206
207    make_place!(Place);
208
209    impl Deserialize for AccountCapabilities {
210        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
211            Place::new(out)
212        }
213    }
214
215    struct Builder<'a> {
216        out: &'a mut Option<AccountCapabilities>,
217        builder: AccountCapabilitiesBuilder,
218    }
219
220    impl Visitor for Place<AccountCapabilities> {
221        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
222            Ok(Box::new(Builder {
223                out: &mut self.out,
224                builder: AccountCapabilitiesBuilder::deser_default(),
225            }))
226        }
227    }
228
229    impl MapBuilder for AccountCapabilitiesBuilder {
230        type Out = AccountCapabilities;
231        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
232            Ok(match k {
233                "acss_debit_payments" => Deserialize::begin(&mut self.acss_debit_payments),
234                "affirm_payments" => Deserialize::begin(&mut self.affirm_payments),
235                "afterpay_clearpay_payments" => {
236                    Deserialize::begin(&mut self.afterpay_clearpay_payments)
237                }
238                "alma_payments" => Deserialize::begin(&mut self.alma_payments),
239                "amazon_pay_payments" => Deserialize::begin(&mut self.amazon_pay_payments),
240                "au_becs_debit_payments" => Deserialize::begin(&mut self.au_becs_debit_payments),
241                "bacs_debit_payments" => Deserialize::begin(&mut self.bacs_debit_payments),
242                "bancontact_payments" => Deserialize::begin(&mut self.bancontact_payments),
243                "bank_transfer_payments" => Deserialize::begin(&mut self.bank_transfer_payments),
244                "billie_payments" => Deserialize::begin(&mut self.billie_payments),
245                "blik_payments" => Deserialize::begin(&mut self.blik_payments),
246                "boleto_payments" => Deserialize::begin(&mut self.boleto_payments),
247                "card_issuing" => Deserialize::begin(&mut self.card_issuing),
248                "card_payments" => Deserialize::begin(&mut self.card_payments),
249                "cartes_bancaires_payments" => {
250                    Deserialize::begin(&mut self.cartes_bancaires_payments)
251                }
252                "cashapp_payments" => Deserialize::begin(&mut self.cashapp_payments),
253                "crypto_payments" => Deserialize::begin(&mut self.crypto_payments),
254                "eps_payments" => Deserialize::begin(&mut self.eps_payments),
255                "fpx_payments" => Deserialize::begin(&mut self.fpx_payments),
256                "gb_bank_transfer_payments" => {
257                    Deserialize::begin(&mut self.gb_bank_transfer_payments)
258                }
259                "giropay_payments" => Deserialize::begin(&mut self.giropay_payments),
260                "grabpay_payments" => Deserialize::begin(&mut self.grabpay_payments),
261                "ideal_payments" => Deserialize::begin(&mut self.ideal_payments),
262                "india_international_payments" => {
263                    Deserialize::begin(&mut self.india_international_payments)
264                }
265                "jcb_payments" => Deserialize::begin(&mut self.jcb_payments),
266                "jp_bank_transfer_payments" => {
267                    Deserialize::begin(&mut self.jp_bank_transfer_payments)
268                }
269                "kakao_pay_payments" => Deserialize::begin(&mut self.kakao_pay_payments),
270                "klarna_payments" => Deserialize::begin(&mut self.klarna_payments),
271                "konbini_payments" => Deserialize::begin(&mut self.konbini_payments),
272                "kr_card_payments" => Deserialize::begin(&mut self.kr_card_payments),
273                "legacy_payments" => Deserialize::begin(&mut self.legacy_payments),
274                "link_payments" => Deserialize::begin(&mut self.link_payments),
275                "mb_way_payments" => Deserialize::begin(&mut self.mb_way_payments),
276                "mobilepay_payments" => Deserialize::begin(&mut self.mobilepay_payments),
277                "multibanco_payments" => Deserialize::begin(&mut self.multibanco_payments),
278                "mx_bank_transfer_payments" => {
279                    Deserialize::begin(&mut self.mx_bank_transfer_payments)
280                }
281                "naver_pay_payments" => Deserialize::begin(&mut self.naver_pay_payments),
282                "nz_bank_account_becs_debit_payments" => {
283                    Deserialize::begin(&mut self.nz_bank_account_becs_debit_payments)
284                }
285                "oxxo_payments" => Deserialize::begin(&mut self.oxxo_payments),
286                "p24_payments" => Deserialize::begin(&mut self.p24_payments),
287                "pay_by_bank_payments" => Deserialize::begin(&mut self.pay_by_bank_payments),
288                "payco_payments" => Deserialize::begin(&mut self.payco_payments),
289                "paynow_payments" => Deserialize::begin(&mut self.paynow_payments),
290                "payto_payments" => Deserialize::begin(&mut self.payto_payments),
291                "pix_payments" => Deserialize::begin(&mut self.pix_payments),
292                "promptpay_payments" => Deserialize::begin(&mut self.promptpay_payments),
293                "revolut_pay_payments" => Deserialize::begin(&mut self.revolut_pay_payments),
294                "samsung_pay_payments" => Deserialize::begin(&mut self.samsung_pay_payments),
295                "satispay_payments" => Deserialize::begin(&mut self.satispay_payments),
296                "sepa_bank_transfer_payments" => {
297                    Deserialize::begin(&mut self.sepa_bank_transfer_payments)
298                }
299                "sepa_debit_payments" => Deserialize::begin(&mut self.sepa_debit_payments),
300                "sofort_payments" => Deserialize::begin(&mut self.sofort_payments),
301                "swish_payments" => Deserialize::begin(&mut self.swish_payments),
302                "tax_reporting_us_1099_k" => Deserialize::begin(&mut self.tax_reporting_us_1099_k),
303                "tax_reporting_us_1099_misc" => {
304                    Deserialize::begin(&mut self.tax_reporting_us_1099_misc)
305                }
306                "transfers" => Deserialize::begin(&mut self.transfers),
307                "treasury" => Deserialize::begin(&mut self.treasury),
308                "twint_payments" => Deserialize::begin(&mut self.twint_payments),
309                "us_bank_account_ach_payments" => {
310                    Deserialize::begin(&mut self.us_bank_account_ach_payments)
311                }
312                "us_bank_transfer_payments" => {
313                    Deserialize::begin(&mut self.us_bank_transfer_payments)
314                }
315                "zip_payments" => Deserialize::begin(&mut self.zip_payments),
316                _ => <dyn Visitor>::ignore(),
317            })
318        }
319
320        fn deser_default() -> Self {
321            Self {
322                acss_debit_payments: Deserialize::default(),
323                affirm_payments: Deserialize::default(),
324                afterpay_clearpay_payments: Deserialize::default(),
325                alma_payments: Deserialize::default(),
326                amazon_pay_payments: Deserialize::default(),
327                au_becs_debit_payments: Deserialize::default(),
328                bacs_debit_payments: Deserialize::default(),
329                bancontact_payments: Deserialize::default(),
330                bank_transfer_payments: Deserialize::default(),
331                billie_payments: Deserialize::default(),
332                blik_payments: Deserialize::default(),
333                boleto_payments: Deserialize::default(),
334                card_issuing: Deserialize::default(),
335                card_payments: Deserialize::default(),
336                cartes_bancaires_payments: Deserialize::default(),
337                cashapp_payments: Deserialize::default(),
338                crypto_payments: Deserialize::default(),
339                eps_payments: Deserialize::default(),
340                fpx_payments: Deserialize::default(),
341                gb_bank_transfer_payments: Deserialize::default(),
342                giropay_payments: Deserialize::default(),
343                grabpay_payments: Deserialize::default(),
344                ideal_payments: Deserialize::default(),
345                india_international_payments: Deserialize::default(),
346                jcb_payments: Deserialize::default(),
347                jp_bank_transfer_payments: Deserialize::default(),
348                kakao_pay_payments: Deserialize::default(),
349                klarna_payments: Deserialize::default(),
350                konbini_payments: Deserialize::default(),
351                kr_card_payments: Deserialize::default(),
352                legacy_payments: Deserialize::default(),
353                link_payments: Deserialize::default(),
354                mb_way_payments: Deserialize::default(),
355                mobilepay_payments: Deserialize::default(),
356                multibanco_payments: Deserialize::default(),
357                mx_bank_transfer_payments: Deserialize::default(),
358                naver_pay_payments: Deserialize::default(),
359                nz_bank_account_becs_debit_payments: Deserialize::default(),
360                oxxo_payments: Deserialize::default(),
361                p24_payments: Deserialize::default(),
362                pay_by_bank_payments: Deserialize::default(),
363                payco_payments: Deserialize::default(),
364                paynow_payments: Deserialize::default(),
365                payto_payments: Deserialize::default(),
366                pix_payments: Deserialize::default(),
367                promptpay_payments: Deserialize::default(),
368                revolut_pay_payments: Deserialize::default(),
369                samsung_pay_payments: Deserialize::default(),
370                satispay_payments: Deserialize::default(),
371                sepa_bank_transfer_payments: Deserialize::default(),
372                sepa_debit_payments: Deserialize::default(),
373                sofort_payments: Deserialize::default(),
374                swish_payments: Deserialize::default(),
375                tax_reporting_us_1099_k: Deserialize::default(),
376                tax_reporting_us_1099_misc: Deserialize::default(),
377                transfers: Deserialize::default(),
378                treasury: Deserialize::default(),
379                twint_payments: Deserialize::default(),
380                us_bank_account_ach_payments: Deserialize::default(),
381                us_bank_transfer_payments: Deserialize::default(),
382                zip_payments: Deserialize::default(),
383            }
384        }
385
386        fn take_out(&mut self) -> Option<Self::Out> {
387            let (
388                Some(acss_debit_payments),
389                Some(affirm_payments),
390                Some(afterpay_clearpay_payments),
391                Some(alma_payments),
392                Some(amazon_pay_payments),
393                Some(au_becs_debit_payments),
394                Some(bacs_debit_payments),
395                Some(bancontact_payments),
396                Some(bank_transfer_payments),
397                Some(billie_payments),
398                Some(blik_payments),
399                Some(boleto_payments),
400                Some(card_issuing),
401                Some(card_payments),
402                Some(cartes_bancaires_payments),
403                Some(cashapp_payments),
404                Some(crypto_payments),
405                Some(eps_payments),
406                Some(fpx_payments),
407                Some(gb_bank_transfer_payments),
408                Some(giropay_payments),
409                Some(grabpay_payments),
410                Some(ideal_payments),
411                Some(india_international_payments),
412                Some(jcb_payments),
413                Some(jp_bank_transfer_payments),
414                Some(kakao_pay_payments),
415                Some(klarna_payments),
416                Some(konbini_payments),
417                Some(kr_card_payments),
418                Some(legacy_payments),
419                Some(link_payments),
420                Some(mb_way_payments),
421                Some(mobilepay_payments),
422                Some(multibanco_payments),
423                Some(mx_bank_transfer_payments),
424                Some(naver_pay_payments),
425                Some(nz_bank_account_becs_debit_payments),
426                Some(oxxo_payments),
427                Some(p24_payments),
428                Some(pay_by_bank_payments),
429                Some(payco_payments),
430                Some(paynow_payments),
431                Some(payto_payments),
432                Some(pix_payments),
433                Some(promptpay_payments),
434                Some(revolut_pay_payments),
435                Some(samsung_pay_payments),
436                Some(satispay_payments),
437                Some(sepa_bank_transfer_payments),
438                Some(sepa_debit_payments),
439                Some(sofort_payments),
440                Some(swish_payments),
441                Some(tax_reporting_us_1099_k),
442                Some(tax_reporting_us_1099_misc),
443                Some(transfers),
444                Some(treasury),
445                Some(twint_payments),
446                Some(us_bank_account_ach_payments),
447                Some(us_bank_transfer_payments),
448                Some(zip_payments),
449            ) = (
450                self.acss_debit_payments.take(),
451                self.affirm_payments.take(),
452                self.afterpay_clearpay_payments.take(),
453                self.alma_payments.take(),
454                self.amazon_pay_payments.take(),
455                self.au_becs_debit_payments.take(),
456                self.bacs_debit_payments.take(),
457                self.bancontact_payments.take(),
458                self.bank_transfer_payments.take(),
459                self.billie_payments.take(),
460                self.blik_payments.take(),
461                self.boleto_payments.take(),
462                self.card_issuing.take(),
463                self.card_payments.take(),
464                self.cartes_bancaires_payments.take(),
465                self.cashapp_payments.take(),
466                self.crypto_payments.take(),
467                self.eps_payments.take(),
468                self.fpx_payments.take(),
469                self.gb_bank_transfer_payments.take(),
470                self.giropay_payments.take(),
471                self.grabpay_payments.take(),
472                self.ideal_payments.take(),
473                self.india_international_payments.take(),
474                self.jcb_payments.take(),
475                self.jp_bank_transfer_payments.take(),
476                self.kakao_pay_payments.take(),
477                self.klarna_payments.take(),
478                self.konbini_payments.take(),
479                self.kr_card_payments.take(),
480                self.legacy_payments.take(),
481                self.link_payments.take(),
482                self.mb_way_payments.take(),
483                self.mobilepay_payments.take(),
484                self.multibanco_payments.take(),
485                self.mx_bank_transfer_payments.take(),
486                self.naver_pay_payments.take(),
487                self.nz_bank_account_becs_debit_payments.take(),
488                self.oxxo_payments.take(),
489                self.p24_payments.take(),
490                self.pay_by_bank_payments.take(),
491                self.payco_payments.take(),
492                self.paynow_payments.take(),
493                self.payto_payments.take(),
494                self.pix_payments.take(),
495                self.promptpay_payments.take(),
496                self.revolut_pay_payments.take(),
497                self.samsung_pay_payments.take(),
498                self.satispay_payments.take(),
499                self.sepa_bank_transfer_payments.take(),
500                self.sepa_debit_payments.take(),
501                self.sofort_payments.take(),
502                self.swish_payments.take(),
503                self.tax_reporting_us_1099_k.take(),
504                self.tax_reporting_us_1099_misc.take(),
505                self.transfers.take(),
506                self.treasury.take(),
507                self.twint_payments.take(),
508                self.us_bank_account_ach_payments.take(),
509                self.us_bank_transfer_payments.take(),
510                self.zip_payments.take(),
511            )
512            else {
513                return None;
514            };
515            Some(Self::Out {
516                acss_debit_payments,
517                affirm_payments,
518                afterpay_clearpay_payments,
519                alma_payments,
520                amazon_pay_payments,
521                au_becs_debit_payments,
522                bacs_debit_payments,
523                bancontact_payments,
524                bank_transfer_payments,
525                billie_payments,
526                blik_payments,
527                boleto_payments,
528                card_issuing,
529                card_payments,
530                cartes_bancaires_payments,
531                cashapp_payments,
532                crypto_payments,
533                eps_payments,
534                fpx_payments,
535                gb_bank_transfer_payments,
536                giropay_payments,
537                grabpay_payments,
538                ideal_payments,
539                india_international_payments,
540                jcb_payments,
541                jp_bank_transfer_payments,
542                kakao_pay_payments,
543                klarna_payments,
544                konbini_payments,
545                kr_card_payments,
546                legacy_payments,
547                link_payments,
548                mb_way_payments,
549                mobilepay_payments,
550                multibanco_payments,
551                mx_bank_transfer_payments,
552                naver_pay_payments,
553                nz_bank_account_becs_debit_payments,
554                oxxo_payments,
555                p24_payments,
556                pay_by_bank_payments,
557                payco_payments,
558                paynow_payments,
559                payto_payments,
560                pix_payments,
561                promptpay_payments,
562                revolut_pay_payments,
563                samsung_pay_payments,
564                satispay_payments,
565                sepa_bank_transfer_payments,
566                sepa_debit_payments,
567                sofort_payments,
568                swish_payments,
569                tax_reporting_us_1099_k,
570                tax_reporting_us_1099_misc,
571                transfers,
572                treasury,
573                twint_payments,
574                us_bank_account_ach_payments,
575                us_bank_transfer_payments,
576                zip_payments,
577            })
578        }
579    }
580
581    impl Map for Builder<'_> {
582        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
583            self.builder.key(k)
584        }
585
586        fn finish(&mut self) -> Result<()> {
587            *self.out = self.builder.take_out();
588            Ok(())
589        }
590    }
591
592    impl ObjectDeser for AccountCapabilities {
593        type Builder = AccountCapabilitiesBuilder;
594    }
595
596    impl FromValueOpt for AccountCapabilities {
597        fn from_value(v: Value) -> Option<Self> {
598            let Value::Object(obj) = v else {
599                return None;
600            };
601            let mut b = AccountCapabilitiesBuilder::deser_default();
602            for (k, v) in obj {
603                match k.as_str() {
604                    "acss_debit_payments" => b.acss_debit_payments = FromValueOpt::from_value(v),
605                    "affirm_payments" => b.affirm_payments = FromValueOpt::from_value(v),
606                    "afterpay_clearpay_payments" => {
607                        b.afterpay_clearpay_payments = FromValueOpt::from_value(v)
608                    }
609                    "alma_payments" => b.alma_payments = FromValueOpt::from_value(v),
610                    "amazon_pay_payments" => b.amazon_pay_payments = FromValueOpt::from_value(v),
611                    "au_becs_debit_payments" => {
612                        b.au_becs_debit_payments = FromValueOpt::from_value(v)
613                    }
614                    "bacs_debit_payments" => b.bacs_debit_payments = FromValueOpt::from_value(v),
615                    "bancontact_payments" => b.bancontact_payments = FromValueOpt::from_value(v),
616                    "bank_transfer_payments" => {
617                        b.bank_transfer_payments = FromValueOpt::from_value(v)
618                    }
619                    "billie_payments" => b.billie_payments = FromValueOpt::from_value(v),
620                    "blik_payments" => b.blik_payments = FromValueOpt::from_value(v),
621                    "boleto_payments" => b.boleto_payments = FromValueOpt::from_value(v),
622                    "card_issuing" => b.card_issuing = FromValueOpt::from_value(v),
623                    "card_payments" => b.card_payments = FromValueOpt::from_value(v),
624                    "cartes_bancaires_payments" => {
625                        b.cartes_bancaires_payments = FromValueOpt::from_value(v)
626                    }
627                    "cashapp_payments" => b.cashapp_payments = FromValueOpt::from_value(v),
628                    "crypto_payments" => b.crypto_payments = FromValueOpt::from_value(v),
629                    "eps_payments" => b.eps_payments = FromValueOpt::from_value(v),
630                    "fpx_payments" => b.fpx_payments = FromValueOpt::from_value(v),
631                    "gb_bank_transfer_payments" => {
632                        b.gb_bank_transfer_payments = FromValueOpt::from_value(v)
633                    }
634                    "giropay_payments" => b.giropay_payments = FromValueOpt::from_value(v),
635                    "grabpay_payments" => b.grabpay_payments = FromValueOpt::from_value(v),
636                    "ideal_payments" => b.ideal_payments = FromValueOpt::from_value(v),
637                    "india_international_payments" => {
638                        b.india_international_payments = FromValueOpt::from_value(v)
639                    }
640                    "jcb_payments" => b.jcb_payments = FromValueOpt::from_value(v),
641                    "jp_bank_transfer_payments" => {
642                        b.jp_bank_transfer_payments = FromValueOpt::from_value(v)
643                    }
644                    "kakao_pay_payments" => b.kakao_pay_payments = FromValueOpt::from_value(v),
645                    "klarna_payments" => b.klarna_payments = FromValueOpt::from_value(v),
646                    "konbini_payments" => b.konbini_payments = FromValueOpt::from_value(v),
647                    "kr_card_payments" => b.kr_card_payments = FromValueOpt::from_value(v),
648                    "legacy_payments" => b.legacy_payments = FromValueOpt::from_value(v),
649                    "link_payments" => b.link_payments = FromValueOpt::from_value(v),
650                    "mb_way_payments" => b.mb_way_payments = FromValueOpt::from_value(v),
651                    "mobilepay_payments" => b.mobilepay_payments = FromValueOpt::from_value(v),
652                    "multibanco_payments" => b.multibanco_payments = FromValueOpt::from_value(v),
653                    "mx_bank_transfer_payments" => {
654                        b.mx_bank_transfer_payments = FromValueOpt::from_value(v)
655                    }
656                    "naver_pay_payments" => b.naver_pay_payments = FromValueOpt::from_value(v),
657                    "nz_bank_account_becs_debit_payments" => {
658                        b.nz_bank_account_becs_debit_payments = FromValueOpt::from_value(v)
659                    }
660                    "oxxo_payments" => b.oxxo_payments = FromValueOpt::from_value(v),
661                    "p24_payments" => b.p24_payments = FromValueOpt::from_value(v),
662                    "pay_by_bank_payments" => b.pay_by_bank_payments = FromValueOpt::from_value(v),
663                    "payco_payments" => b.payco_payments = FromValueOpt::from_value(v),
664                    "paynow_payments" => b.paynow_payments = FromValueOpt::from_value(v),
665                    "payto_payments" => b.payto_payments = FromValueOpt::from_value(v),
666                    "pix_payments" => b.pix_payments = FromValueOpt::from_value(v),
667                    "promptpay_payments" => b.promptpay_payments = FromValueOpt::from_value(v),
668                    "revolut_pay_payments" => b.revolut_pay_payments = FromValueOpt::from_value(v),
669                    "samsung_pay_payments" => b.samsung_pay_payments = FromValueOpt::from_value(v),
670                    "satispay_payments" => b.satispay_payments = FromValueOpt::from_value(v),
671                    "sepa_bank_transfer_payments" => {
672                        b.sepa_bank_transfer_payments = FromValueOpt::from_value(v)
673                    }
674                    "sepa_debit_payments" => b.sepa_debit_payments = FromValueOpt::from_value(v),
675                    "sofort_payments" => b.sofort_payments = FromValueOpt::from_value(v),
676                    "swish_payments" => b.swish_payments = FromValueOpt::from_value(v),
677                    "tax_reporting_us_1099_k" => {
678                        b.tax_reporting_us_1099_k = FromValueOpt::from_value(v)
679                    }
680                    "tax_reporting_us_1099_misc" => {
681                        b.tax_reporting_us_1099_misc = FromValueOpt::from_value(v)
682                    }
683                    "transfers" => b.transfers = FromValueOpt::from_value(v),
684                    "treasury" => b.treasury = FromValueOpt::from_value(v),
685                    "twint_payments" => b.twint_payments = FromValueOpt::from_value(v),
686                    "us_bank_account_ach_payments" => {
687                        b.us_bank_account_ach_payments = FromValueOpt::from_value(v)
688                    }
689                    "us_bank_transfer_payments" => {
690                        b.us_bank_transfer_payments = FromValueOpt::from_value(v)
691                    }
692                    "zip_payments" => b.zip_payments = FromValueOpt::from_value(v),
693                    _ => {}
694                }
695            }
696            b.take_out()
697        }
698    }
699};
700#[derive(Clone, Eq, PartialEq)]
701#[non_exhaustive]
702pub enum AccountCapabilitiesStatus {
703    Active,
704    Inactive,
705    Pending,
706    /// An unrecognized value from Stripe. Should not be used as a request parameter.
707    Unknown(String),
708}
709impl AccountCapabilitiesStatus {
710    pub fn as_str(&self) -> &str {
711        use AccountCapabilitiesStatus::*;
712        match self {
713            Active => "active",
714            Inactive => "inactive",
715            Pending => "pending",
716            Unknown(v) => v,
717        }
718    }
719}
720
721impl std::str::FromStr for AccountCapabilitiesStatus {
722    type Err = std::convert::Infallible;
723    fn from_str(s: &str) -> Result<Self, Self::Err> {
724        use AccountCapabilitiesStatus::*;
725        match s {
726            "active" => Ok(Active),
727            "inactive" => Ok(Inactive),
728            "pending" => Ok(Pending),
729            v => {
730                tracing::warn!("Unknown value '{}' for enum '{}'", v, "AccountCapabilitiesStatus");
731                Ok(Unknown(v.to_owned()))
732            }
733        }
734    }
735}
736impl std::fmt::Display for AccountCapabilitiesStatus {
737    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
738        f.write_str(self.as_str())
739    }
740}
741
742impl std::fmt::Debug for AccountCapabilitiesStatus {
743    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
744        f.write_str(self.as_str())
745    }
746}
747#[cfg(feature = "serialize")]
748impl serde::Serialize for AccountCapabilitiesStatus {
749    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
750    where
751        S: serde::Serializer,
752    {
753        serializer.serialize_str(self.as_str())
754    }
755}
756impl miniserde::Deserialize for AccountCapabilitiesStatus {
757    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
758        crate::Place::new(out)
759    }
760}
761
762impl miniserde::de::Visitor for crate::Place<AccountCapabilitiesStatus> {
763    fn string(&mut self, s: &str) -> miniserde::Result<()> {
764        use std::str::FromStr;
765        self.out = Some(AccountCapabilitiesStatus::from_str(s).expect("infallible"));
766        Ok(())
767    }
768}
769
770stripe_types::impl_from_val_with_from_str!(AccountCapabilitiesStatus);
771#[cfg(feature = "deserialize")]
772impl<'de> serde::Deserialize<'de> for AccountCapabilitiesStatus {
773    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
774        use std::str::FromStr;
775        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
776        Ok(Self::from_str(&s).expect("infallible"))
777    }
778}