Skip to main content

stripe_shared/
account_capabilities.rs

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