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
313                _ => <dyn Visitor>::ignore(),
314            })
315        }
316
317        fn deser_default() -> Self {
318            Self {
319                acss_debit_payments: Deserialize::default(),
320                affirm_payments: Deserialize::default(),
321                afterpay_clearpay_payments: Deserialize::default(),
322                alma_payments: Deserialize::default(),
323                amazon_pay_payments: Deserialize::default(),
324                au_becs_debit_payments: Deserialize::default(),
325                bacs_debit_payments: Deserialize::default(),
326                bancontact_payments: Deserialize::default(),
327                bank_transfer_payments: Deserialize::default(),
328                billie_payments: Deserialize::default(),
329                blik_payments: Deserialize::default(),
330                boleto_payments: Deserialize::default(),
331                card_issuing: Deserialize::default(),
332                card_payments: Deserialize::default(),
333                cartes_bancaires_payments: Deserialize::default(),
334                cashapp_payments: Deserialize::default(),
335                crypto_payments: Deserialize::default(),
336                eps_payments: Deserialize::default(),
337                fpx_payments: Deserialize::default(),
338                gb_bank_transfer_payments: Deserialize::default(),
339                giropay_payments: Deserialize::default(),
340                grabpay_payments: Deserialize::default(),
341                ideal_payments: Deserialize::default(),
342                india_international_payments: Deserialize::default(),
343                jcb_payments: Deserialize::default(),
344                jp_bank_transfer_payments: Deserialize::default(),
345                kakao_pay_payments: Deserialize::default(),
346                klarna_payments: Deserialize::default(),
347                konbini_payments: Deserialize::default(),
348                kr_card_payments: Deserialize::default(),
349                legacy_payments: Deserialize::default(),
350                link_payments: Deserialize::default(),
351                mb_way_payments: Deserialize::default(),
352                mobilepay_payments: Deserialize::default(),
353                multibanco_payments: Deserialize::default(),
354                mx_bank_transfer_payments: Deserialize::default(),
355                naver_pay_payments: Deserialize::default(),
356                nz_bank_account_becs_debit_payments: Deserialize::default(),
357                oxxo_payments: Deserialize::default(),
358                p24_payments: Deserialize::default(),
359                pay_by_bank_payments: Deserialize::default(),
360                payco_payments: Deserialize::default(),
361                paynow_payments: Deserialize::default(),
362                pix_payments: Deserialize::default(),
363                promptpay_payments: Deserialize::default(),
364                revolut_pay_payments: Deserialize::default(),
365                samsung_pay_payments: Deserialize::default(),
366                satispay_payments: Deserialize::default(),
367                sepa_bank_transfer_payments: Deserialize::default(),
368                sepa_debit_payments: Deserialize::default(),
369                sofort_payments: Deserialize::default(),
370                swish_payments: Deserialize::default(),
371                tax_reporting_us_1099_k: Deserialize::default(),
372                tax_reporting_us_1099_misc: Deserialize::default(),
373                transfers: Deserialize::default(),
374                treasury: Deserialize::default(),
375                twint_payments: Deserialize::default(),
376                us_bank_account_ach_payments: Deserialize::default(),
377                us_bank_transfer_payments: Deserialize::default(),
378                zip_payments: Deserialize::default(),
379            }
380        }
381
382        fn take_out(&mut self) -> Option<Self::Out> {
383            let (
384                Some(acss_debit_payments),
385                Some(affirm_payments),
386                Some(afterpay_clearpay_payments),
387                Some(alma_payments),
388                Some(amazon_pay_payments),
389                Some(au_becs_debit_payments),
390                Some(bacs_debit_payments),
391                Some(bancontact_payments),
392                Some(bank_transfer_payments),
393                Some(billie_payments),
394                Some(blik_payments),
395                Some(boleto_payments),
396                Some(card_issuing),
397                Some(card_payments),
398                Some(cartes_bancaires_payments),
399                Some(cashapp_payments),
400                Some(crypto_payments),
401                Some(eps_payments),
402                Some(fpx_payments),
403                Some(gb_bank_transfer_payments),
404                Some(giropay_payments),
405                Some(grabpay_payments),
406                Some(ideal_payments),
407                Some(india_international_payments),
408                Some(jcb_payments),
409                Some(jp_bank_transfer_payments),
410                Some(kakao_pay_payments),
411                Some(klarna_payments),
412                Some(konbini_payments),
413                Some(kr_card_payments),
414                Some(legacy_payments),
415                Some(link_payments),
416                Some(mb_way_payments),
417                Some(mobilepay_payments),
418                Some(multibanco_payments),
419                Some(mx_bank_transfer_payments),
420                Some(naver_pay_payments),
421                Some(nz_bank_account_becs_debit_payments),
422                Some(oxxo_payments),
423                Some(p24_payments),
424                Some(pay_by_bank_payments),
425                Some(payco_payments),
426                Some(paynow_payments),
427                Some(pix_payments),
428                Some(promptpay_payments),
429                Some(revolut_pay_payments),
430                Some(samsung_pay_payments),
431                Some(satispay_payments),
432                Some(sepa_bank_transfer_payments),
433                Some(sepa_debit_payments),
434                Some(sofort_payments),
435                Some(swish_payments),
436                Some(tax_reporting_us_1099_k),
437                Some(tax_reporting_us_1099_misc),
438                Some(transfers),
439                Some(treasury),
440                Some(twint_payments),
441                Some(us_bank_account_ach_payments),
442                Some(us_bank_transfer_payments),
443                Some(zip_payments),
444            ) = (
445                self.acss_debit_payments,
446                self.affirm_payments,
447                self.afterpay_clearpay_payments,
448                self.alma_payments,
449                self.amazon_pay_payments,
450                self.au_becs_debit_payments,
451                self.bacs_debit_payments,
452                self.bancontact_payments,
453                self.bank_transfer_payments,
454                self.billie_payments,
455                self.blik_payments,
456                self.boleto_payments,
457                self.card_issuing,
458                self.card_payments,
459                self.cartes_bancaires_payments,
460                self.cashapp_payments,
461                self.crypto_payments,
462                self.eps_payments,
463                self.fpx_payments,
464                self.gb_bank_transfer_payments,
465                self.giropay_payments,
466                self.grabpay_payments,
467                self.ideal_payments,
468                self.india_international_payments,
469                self.jcb_payments,
470                self.jp_bank_transfer_payments,
471                self.kakao_pay_payments,
472                self.klarna_payments,
473                self.konbini_payments,
474                self.kr_card_payments,
475                self.legacy_payments,
476                self.link_payments,
477                self.mb_way_payments,
478                self.mobilepay_payments,
479                self.multibanco_payments,
480                self.mx_bank_transfer_payments,
481                self.naver_pay_payments,
482                self.nz_bank_account_becs_debit_payments,
483                self.oxxo_payments,
484                self.p24_payments,
485                self.pay_by_bank_payments,
486                self.payco_payments,
487                self.paynow_payments,
488                self.pix_payments,
489                self.promptpay_payments,
490                self.revolut_pay_payments,
491                self.samsung_pay_payments,
492                self.satispay_payments,
493                self.sepa_bank_transfer_payments,
494                self.sepa_debit_payments,
495                self.sofort_payments,
496                self.swish_payments,
497                self.tax_reporting_us_1099_k,
498                self.tax_reporting_us_1099_misc,
499                self.transfers,
500                self.treasury,
501                self.twint_payments,
502                self.us_bank_account_ach_payments,
503                self.us_bank_transfer_payments,
504                self.zip_payments,
505            )
506            else {
507                return None;
508            };
509            Some(Self::Out {
510                acss_debit_payments,
511                affirm_payments,
512                afterpay_clearpay_payments,
513                alma_payments,
514                amazon_pay_payments,
515                au_becs_debit_payments,
516                bacs_debit_payments,
517                bancontact_payments,
518                bank_transfer_payments,
519                billie_payments,
520                blik_payments,
521                boleto_payments,
522                card_issuing,
523                card_payments,
524                cartes_bancaires_payments,
525                cashapp_payments,
526                crypto_payments,
527                eps_payments,
528                fpx_payments,
529                gb_bank_transfer_payments,
530                giropay_payments,
531                grabpay_payments,
532                ideal_payments,
533                india_international_payments,
534                jcb_payments,
535                jp_bank_transfer_payments,
536                kakao_pay_payments,
537                klarna_payments,
538                konbini_payments,
539                kr_card_payments,
540                legacy_payments,
541                link_payments,
542                mb_way_payments,
543                mobilepay_payments,
544                multibanco_payments,
545                mx_bank_transfer_payments,
546                naver_pay_payments,
547                nz_bank_account_becs_debit_payments,
548                oxxo_payments,
549                p24_payments,
550                pay_by_bank_payments,
551                payco_payments,
552                paynow_payments,
553                pix_payments,
554                promptpay_payments,
555                revolut_pay_payments,
556                samsung_pay_payments,
557                satispay_payments,
558                sepa_bank_transfer_payments,
559                sepa_debit_payments,
560                sofort_payments,
561                swish_payments,
562                tax_reporting_us_1099_k,
563                tax_reporting_us_1099_misc,
564                transfers,
565                treasury,
566                twint_payments,
567                us_bank_account_ach_payments,
568                us_bank_transfer_payments,
569                zip_payments,
570            })
571        }
572    }
573
574    impl Map for Builder<'_> {
575        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
576            self.builder.key(k)
577        }
578
579        fn finish(&mut self) -> Result<()> {
580            *self.out = self.builder.take_out();
581            Ok(())
582        }
583    }
584
585    impl ObjectDeser for AccountCapabilities {
586        type Builder = AccountCapabilitiesBuilder;
587    }
588
589    impl FromValueOpt for AccountCapabilities {
590        fn from_value(v: Value) -> Option<Self> {
591            let Value::Object(obj) = v else {
592                return None;
593            };
594            let mut b = AccountCapabilitiesBuilder::deser_default();
595            for (k, v) in obj {
596                match k.as_str() {
597                    "acss_debit_payments" => b.acss_debit_payments = FromValueOpt::from_value(v),
598                    "affirm_payments" => b.affirm_payments = FromValueOpt::from_value(v),
599                    "afterpay_clearpay_payments" => {
600                        b.afterpay_clearpay_payments = FromValueOpt::from_value(v)
601                    }
602                    "alma_payments" => b.alma_payments = FromValueOpt::from_value(v),
603                    "amazon_pay_payments" => b.amazon_pay_payments = FromValueOpt::from_value(v),
604                    "au_becs_debit_payments" => {
605                        b.au_becs_debit_payments = FromValueOpt::from_value(v)
606                    }
607                    "bacs_debit_payments" => b.bacs_debit_payments = FromValueOpt::from_value(v),
608                    "bancontact_payments" => b.bancontact_payments = FromValueOpt::from_value(v),
609                    "bank_transfer_payments" => {
610                        b.bank_transfer_payments = FromValueOpt::from_value(v)
611                    }
612                    "billie_payments" => b.billie_payments = FromValueOpt::from_value(v),
613                    "blik_payments" => b.blik_payments = FromValueOpt::from_value(v),
614                    "boleto_payments" => b.boleto_payments = FromValueOpt::from_value(v),
615                    "card_issuing" => b.card_issuing = FromValueOpt::from_value(v),
616                    "card_payments" => b.card_payments = FromValueOpt::from_value(v),
617                    "cartes_bancaires_payments" => {
618                        b.cartes_bancaires_payments = FromValueOpt::from_value(v)
619                    }
620                    "cashapp_payments" => b.cashapp_payments = FromValueOpt::from_value(v),
621                    "crypto_payments" => b.crypto_payments = FromValueOpt::from_value(v),
622                    "eps_payments" => b.eps_payments = FromValueOpt::from_value(v),
623                    "fpx_payments" => b.fpx_payments = FromValueOpt::from_value(v),
624                    "gb_bank_transfer_payments" => {
625                        b.gb_bank_transfer_payments = FromValueOpt::from_value(v)
626                    }
627                    "giropay_payments" => b.giropay_payments = FromValueOpt::from_value(v),
628                    "grabpay_payments" => b.grabpay_payments = FromValueOpt::from_value(v),
629                    "ideal_payments" => b.ideal_payments = FromValueOpt::from_value(v),
630                    "india_international_payments" => {
631                        b.india_international_payments = FromValueOpt::from_value(v)
632                    }
633                    "jcb_payments" => b.jcb_payments = FromValueOpt::from_value(v),
634                    "jp_bank_transfer_payments" => {
635                        b.jp_bank_transfer_payments = FromValueOpt::from_value(v)
636                    }
637                    "kakao_pay_payments" => b.kakao_pay_payments = FromValueOpt::from_value(v),
638                    "klarna_payments" => b.klarna_payments = FromValueOpt::from_value(v),
639                    "konbini_payments" => b.konbini_payments = FromValueOpt::from_value(v),
640                    "kr_card_payments" => b.kr_card_payments = FromValueOpt::from_value(v),
641                    "legacy_payments" => b.legacy_payments = FromValueOpt::from_value(v),
642                    "link_payments" => b.link_payments = FromValueOpt::from_value(v),
643                    "mb_way_payments" => b.mb_way_payments = FromValueOpt::from_value(v),
644                    "mobilepay_payments" => b.mobilepay_payments = FromValueOpt::from_value(v),
645                    "multibanco_payments" => b.multibanco_payments = FromValueOpt::from_value(v),
646                    "mx_bank_transfer_payments" => {
647                        b.mx_bank_transfer_payments = FromValueOpt::from_value(v)
648                    }
649                    "naver_pay_payments" => b.naver_pay_payments = FromValueOpt::from_value(v),
650                    "nz_bank_account_becs_debit_payments" => {
651                        b.nz_bank_account_becs_debit_payments = FromValueOpt::from_value(v)
652                    }
653                    "oxxo_payments" => b.oxxo_payments = FromValueOpt::from_value(v),
654                    "p24_payments" => b.p24_payments = FromValueOpt::from_value(v),
655                    "pay_by_bank_payments" => b.pay_by_bank_payments = FromValueOpt::from_value(v),
656                    "payco_payments" => b.payco_payments = FromValueOpt::from_value(v),
657                    "paynow_payments" => b.paynow_payments = FromValueOpt::from_value(v),
658                    "pix_payments" => b.pix_payments = FromValueOpt::from_value(v),
659                    "promptpay_payments" => b.promptpay_payments = FromValueOpt::from_value(v),
660                    "revolut_pay_payments" => b.revolut_pay_payments = FromValueOpt::from_value(v),
661                    "samsung_pay_payments" => b.samsung_pay_payments = FromValueOpt::from_value(v),
662                    "satispay_payments" => b.satispay_payments = FromValueOpt::from_value(v),
663                    "sepa_bank_transfer_payments" => {
664                        b.sepa_bank_transfer_payments = FromValueOpt::from_value(v)
665                    }
666                    "sepa_debit_payments" => b.sepa_debit_payments = FromValueOpt::from_value(v),
667                    "sofort_payments" => b.sofort_payments = FromValueOpt::from_value(v),
668                    "swish_payments" => b.swish_payments = FromValueOpt::from_value(v),
669                    "tax_reporting_us_1099_k" => {
670                        b.tax_reporting_us_1099_k = FromValueOpt::from_value(v)
671                    }
672                    "tax_reporting_us_1099_misc" => {
673                        b.tax_reporting_us_1099_misc = FromValueOpt::from_value(v)
674                    }
675                    "transfers" => b.transfers = FromValueOpt::from_value(v),
676                    "treasury" => b.treasury = FromValueOpt::from_value(v),
677                    "twint_payments" => b.twint_payments = FromValueOpt::from_value(v),
678                    "us_bank_account_ach_payments" => {
679                        b.us_bank_account_ach_payments = FromValueOpt::from_value(v)
680                    }
681                    "us_bank_transfer_payments" => {
682                        b.us_bank_transfer_payments = FromValueOpt::from_value(v)
683                    }
684                    "zip_payments" => b.zip_payments = FromValueOpt::from_value(v),
685
686                    _ => {}
687                }
688            }
689            b.take_out()
690        }
691    }
692};
693#[derive(Copy, Clone, Eq, PartialEq)]
694pub enum AccountCapabilitiesStatus {
695    Active,
696    Inactive,
697    Pending,
698}
699impl AccountCapabilitiesStatus {
700    pub fn as_str(self) -> &'static str {
701        use AccountCapabilitiesStatus::*;
702        match self {
703            Active => "active",
704            Inactive => "inactive",
705            Pending => "pending",
706        }
707    }
708}
709
710impl std::str::FromStr for AccountCapabilitiesStatus {
711    type Err = stripe_types::StripeParseError;
712    fn from_str(s: &str) -> Result<Self, Self::Err> {
713        use AccountCapabilitiesStatus::*;
714        match s {
715            "active" => Ok(Active),
716            "inactive" => Ok(Inactive),
717            "pending" => Ok(Pending),
718            _ => Err(stripe_types::StripeParseError),
719        }
720    }
721}
722impl std::fmt::Display for AccountCapabilitiesStatus {
723    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
724        f.write_str(self.as_str())
725    }
726}
727
728impl std::fmt::Debug for AccountCapabilitiesStatus {
729    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
730        f.write_str(self.as_str())
731    }
732}
733#[cfg(feature = "serialize")]
734impl serde::Serialize for AccountCapabilitiesStatus {
735    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
736    where
737        S: serde::Serializer,
738    {
739        serializer.serialize_str(self.as_str())
740    }
741}
742impl miniserde::Deserialize for AccountCapabilitiesStatus {
743    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
744        crate::Place::new(out)
745    }
746}
747
748impl miniserde::de::Visitor for crate::Place<AccountCapabilitiesStatus> {
749    fn string(&mut self, s: &str) -> miniserde::Result<()> {
750        use std::str::FromStr;
751        self.out = Some(AccountCapabilitiesStatus::from_str(s).map_err(|_| miniserde::Error)?);
752        Ok(())
753    }
754}
755
756stripe_types::impl_from_val_with_from_str!(AccountCapabilitiesStatus);
757#[cfg(feature = "deserialize")]
758impl<'de> serde::Deserialize<'de> for AccountCapabilitiesStatus {
759    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
760        use std::str::FromStr;
761        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
762        Self::from_str(&s)
763            .map_err(|_| serde::de::Error::custom("Unknown value for AccountCapabilitiesStatus"))
764    }
765}