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