stripe_shared/
account_capabilities.rs

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