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