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