stripe/resources/generated/
setup_intent.rs

1// ======================================
2// This file was automatically generated.
3// ======================================
4
5use crate::client::{Client, Response};
6use crate::ids::{CustomerId, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId};
7use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp};
8use crate::resources::{
9    Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount,
10    Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod,
11    PaymentMethodConfigBizPaymentMethodConfigurationDetails,
12    PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt,
13};
14use serde::{Deserialize, Serialize};
15
16/// The resource representing a Stripe "SetupIntent".
17///
18/// For more details see <https://stripe.com/docs/api/setup_intents/object>
19#[derive(Clone, Debug, Default, Deserialize, Serialize)]
20pub struct SetupIntent {
21    /// Unique identifier for the object.
22    pub id: SetupIntentId,
23
24    /// ID of the Connect application that created the SetupIntent.
25    pub application: Option<Expandable<Application>>,
26
27    /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
28    ///
29    /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers.
30    ///
31    /// It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub attach_to_self: Option<bool>,
34
35    /// Settings for dynamic payment methods compatible with this Setup Intent.
36    pub automatic_payment_methods: Option<PaymentFlowsAutomaticPaymentMethodsSetupIntent>,
37
38    /// Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
39    pub cancellation_reason: Option<SetupIntentCancellationReason>,
40
41    /// The client secret of this SetupIntent.
42    ///
43    /// Used for client-side retrieval using a publishable key.  The client secret can be used to complete payment setup from your frontend.
44    /// It should not be stored, logged, or exposed to anyone other than the customer.
45    /// Make sure that you have TLS enabled on any page that includes the client secret.
46    pub client_secret: Option<String>,
47
48    /// Time at which the object was created.
49    ///
50    /// Measured in seconds since the Unix epoch.
51    pub created: Timestamp,
52
53    /// ID of the Customer this SetupIntent belongs to, if one exists.
54    ///
55    /// If present, the SetupIntent's payment method will be attached to the Customer on successful setup.
56    ///
57    /// Payment methods attached to other Customers cannot be used with this SetupIntent.
58    pub customer: Option<Expandable<Customer>>,
59
60    /// An arbitrary string attached to the object.
61    ///
62    /// Often useful for displaying to users.
63    pub description: Option<String>,
64
65    /// Indicates the directions of money movement for which this payment method is intended to be used.
66    ///
67    /// Include `inbound` if you intend to use the payment method as the origin to pull funds from.
68    ///
69    /// Include `outbound` if you intend to use the payment method as the destination to send funds to.
70    /// You can include both if you intend to use the payment method for both purposes.
71    pub flow_directions: Option<Vec<SetupIntentFlowDirections>>,
72
73    /// The error encountered in the previous SetupIntent confirmation.
74    pub last_setup_error: Option<Box<ApiErrors>>,
75
76    /// The most recent SetupAttempt for this SetupIntent.
77    pub latest_attempt: Option<Expandable<SetupAttempt>>,
78
79    /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
80    pub livemode: bool,
81
82    /// ID of the multi use Mandate generated by the SetupIntent.
83    pub mandate: Option<Expandable<Mandate>>,
84
85    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
86    ///
87    /// This can be useful for storing additional information about the object in a structured format.
88    pub metadata: Option<Metadata>,
89
90    /// If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
91    pub next_action: Option<SetupIntentNextAction>,
92
93    /// The account (if any) for which the setup is intended.
94    pub on_behalf_of: Option<Expandable<Account>>,
95
96    /// ID of the payment method used with this SetupIntent.
97    pub payment_method: Option<Expandable<PaymentMethod>>,
98
99    /// Information about the payment method configuration used for this Setup Intent.
100    pub payment_method_configuration_details:
101        Option<PaymentMethodConfigBizPaymentMethodConfigurationDetails>,
102
103    /// Payment method-specific configuration for this SetupIntent.
104    pub payment_method_options: Option<SetupIntentPaymentMethodOptions>,
105
106    /// The list of payment method types (e.g.
107    ///
108    /// card) that this SetupIntent is allowed to set up.
109    pub payment_method_types: Vec<String>,
110
111    /// ID of the single_use Mandate generated by the SetupIntent.
112    pub single_use_mandate: Option<Expandable<Mandate>>,
113
114    /// [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
115    pub status: SetupIntentStatus,
116
117    /// Indicates how the payment method is intended to be used in the future.
118    ///
119    /// Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow.
120    ///
121    /// Use `off_session` if your customer may or may not be in your checkout flow.
122    /// If not provided, this value defaults to `off_session`.
123    pub usage: String,
124}
125
126impl SetupIntent {
127    /// Returns a list of SetupIntents.
128    pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response<List<SetupIntent>> {
129        client.get_query("/setup_intents", params)
130    }
131
132    /// Creates a SetupIntent object.
133    ///
134    /// After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
135    /// it to collect any required permissions to charge the payment method later.
136    pub fn create(client: &Client, params: CreateSetupIntent<'_>) -> Response<SetupIntent> {
137        #[allow(clippy::needless_borrows_for_generic_args)]
138        client.post_form("/setup_intents", &params)
139    }
140
141    /// Retrieves the details of a SetupIntent that has previously been created.
142    ///
143    /// Client-side retrieval using a publishable key is allowed when the `client_secret` is provided in the query string.
144    /// When retrieved with a publishable key, only a subset of properties will be returned.
145    /// Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details.
146    pub fn retrieve(client: &Client, id: &SetupIntentId, expand: &[&str]) -> Response<SetupIntent> {
147        client.get_query(&format!("/setup_intents/{}", id), Expand { expand })
148    }
149
150    /// Updates a SetupIntent object.
151    pub fn update(
152        client: &Client,
153        id: &SetupIntentId,
154        params: UpdateSetupIntent<'_>,
155    ) -> Response<SetupIntent> {
156        #[allow(clippy::needless_borrows_for_generic_args)]
157        client.post_form(&format!("/setup_intents/{}", id), &params)
158    }
159}
160
161impl Object for SetupIntent {
162    type Id = SetupIntentId;
163    fn id(&self) -> Self::Id {
164        self.id.clone()
165    }
166    fn object(&self) -> &'static str {
167        "setup_intent"
168    }
169}
170
171#[derive(Clone, Debug, Default, Deserialize, Serialize)]
172pub struct PaymentFlowsAutomaticPaymentMethodsSetupIntent {
173    /// Controls whether this SetupIntent will accept redirect-based payment methods.
174    ///
175    /// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
176    ///
177    /// To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub allow_redirects: Option<PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects>,
180
181    /// Automatically calculates compatible payment methods.
182    pub enabled: Option<bool>,
183}
184
185#[derive(Clone, Debug, Default, Deserialize, Serialize)]
186pub struct SetupIntentNextAction {
187    #[serde(skip_serializing_if = "Option::is_none")]
188    pub cashapp_handle_redirect_or_display_qr_code:
189        Option<PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode>,
190
191    #[serde(skip_serializing_if = "Option::is_none")]
192    pub redirect_to_url: Option<SetupIntentNextActionRedirectToUrl>,
193
194    /// Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
195    #[serde(rename = "type")]
196    pub type_: String,
197
198    /// When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows.
199    ///
200    /// The shape of the contents is subject to change and is only intended to be used by Stripe.js.
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub use_stripe_sdk: Option<serde_json::Value>,
203
204    #[serde(skip_serializing_if = "Option::is_none")]
205    pub verify_with_microdeposits: Option<SetupIntentNextActionVerifyWithMicrodeposits>,
206}
207
208#[derive(Clone, Debug, Default, Deserialize, Serialize)]
209pub struct SetupIntentNextActionRedirectToUrl {
210    /// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
211    pub return_url: Option<String>,
212
213    /// The URL you must redirect your customer to in order to authenticate.
214    pub url: Option<String>,
215}
216
217#[derive(Clone, Debug, Default, Deserialize, Serialize)]
218pub struct SetupIntentNextActionVerifyWithMicrodeposits {
219    /// The timestamp when the microdeposits are expected to land.
220    pub arrival_date: Timestamp,
221
222    /// The URL for the hosted verification page, which allows customers to verify their bank account.
223    pub hosted_verification_url: String,
224
225    /// The type of the microdeposit sent to the customer.
226    ///
227    /// Used to distinguish between different verification methods.
228    pub microdeposit_type: Option<SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType>,
229}
230
231#[derive(Clone, Debug, Default, Deserialize, Serialize)]
232pub struct SetupIntentPaymentMethodOptions {
233    #[serde(skip_serializing_if = "Option::is_none")]
234    pub acss_debit: Option<SetupIntentPaymentMethodOptionsAcssDebit>,
235
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub card: Option<SetupIntentPaymentMethodOptionsCard>,
238
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub link: Option<SetupIntentPaymentMethodOptionsLink>,
241
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub paypal: Option<SetupIntentPaymentMethodOptionsPaypal>,
244
245    #[serde(skip_serializing_if = "Option::is_none")]
246    pub sepa_debit: Option<SetupIntentPaymentMethodOptionsSepaDebit>,
247
248    #[serde(skip_serializing_if = "Option::is_none")]
249    pub us_bank_account: Option<SetupIntentPaymentMethodOptionsUsBankAccount>,
250}
251
252#[derive(Clone, Debug, Default, Deserialize, Serialize)]
253pub struct SetupIntentPaymentMethodOptionsAcssDebit {
254    /// Currency supported by the bank account.
255    pub currency: Option<Currency>,
256
257    #[serde(skip_serializing_if = "Option::is_none")]
258    pub mandate_options: Option<SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit>,
259
260    /// Bank account verification method.
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub verification_method: Option<SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
263}
264
265#[derive(Clone, Debug, Default, Deserialize, Serialize)]
266pub struct SetupIntentPaymentMethodOptionsCard {
267    /// Configuration options for setting up an eMandate for cards issued in India.
268    pub mandate_options: Option<SetupIntentPaymentMethodOptionsCardMandateOptions>,
269
270    /// Selected network to process this SetupIntent on.
271    ///
272    /// Depends on the available networks of the card attached to the setup intent.
273    /// Can be only set confirm-time.
274    pub network: Option<SetupIntentPaymentMethodOptionsCardNetwork>,
275
276    /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication).
277    ///
278    /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
279    /// If not provided, this value defaults to `automatic`.
280    /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
281    pub request_three_d_secure: Option<SetupIntentPaymentMethodOptionsCardRequestThreeDSecure>,
282}
283
284#[derive(Clone, Debug, Default, Deserialize, Serialize)]
285pub struct SetupIntentPaymentMethodOptionsCardMandateOptions {
286    /// Amount to be charged for future payments.
287    pub amount: i64,
288
289    /// One of `fixed` or `maximum`.
290    ///
291    /// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
292    /// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
293    pub amount_type: SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType,
294
295    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
296    ///
297    /// Must be a [supported currency](https://stripe.com/docs/currencies).
298    pub currency: Currency,
299
300    /// A description of the mandate or subscription that is meant to be displayed to the customer.
301    pub description: Option<String>,
302
303    /// End date of the mandate or subscription.
304    ///
305    /// If not provided, the mandate will be active until canceled.
306    /// If provided, end date should be after start date.
307    pub end_date: Option<Timestamp>,
308
309    /// Specifies payment frequency.
310    ///
311    /// One of `day`, `week`, `month`, `year`, or `sporadic`.
312    pub interval: SetupIntentPaymentMethodOptionsCardMandateOptionsInterval,
313
314    /// The number of intervals between payments.
315    ///
316    /// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
317    /// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
318    /// This parameter is optional when `interval=sporadic`.
319    pub interval_count: Option<u64>,
320
321    /// Unique identifier for the mandate or subscription.
322    pub reference: String,
323
324    /// Start date of the mandate or subscription.
325    ///
326    /// Start date should not be lesser than yesterday.
327    pub start_date: Timestamp,
328
329    /// Specifies the type of mandates supported.
330    ///
331    /// Possible values are `india`.
332    pub supported_types:
333        Option<Vec<SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
334}
335
336#[derive(Clone, Debug, Default, Deserialize, Serialize)]
337pub struct SetupIntentPaymentMethodOptionsLink {
338    /// [Deprecated] This is a legacy parameter that no longer has any function.
339    pub persistent_token: Option<String>,
340}
341
342#[derive(Clone, Debug, Default, Deserialize, Serialize)]
343pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit {
344    /// A URL for custom mandate text.
345    #[serde(skip_serializing_if = "Option::is_none")]
346    pub custom_mandate_url: Option<String>,
347
348    /// List of Stripe products where this mandate can be selected automatically.
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub default_for: Option<Vec<SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor>>,
351
352    /// Description of the interval.
353    ///
354    /// Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
355    pub interval_description: Option<String>,
356
357    /// Payment schedule for the mandate.
358    pub payment_schedule:
359        Option<SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule>,
360
361    /// Transaction type of the mandate.
362    pub transaction_type:
363        Option<SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType>,
364}
365
366#[derive(Clone, Debug, Default, Deserialize, Serialize)]
367pub struct SetupIntentPaymentMethodOptionsPaypal {
368    /// The PayPal Billing Agreement ID (BAID).
369    ///
370    /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
371    pub billing_agreement_id: Option<String>,
372}
373
374#[derive(Clone, Debug, Default, Deserialize, Serialize)]
375pub struct SetupIntentPaymentMethodOptionsSepaDebit {
376    #[serde(skip_serializing_if = "Option::is_none")]
377    pub mandate_options: Option<SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit>,
378}
379
380#[derive(Clone, Debug, Default, Deserialize, Serialize)]
381pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit {}
382
383#[derive(Clone, Debug, Default, Deserialize, Serialize)]
384pub struct SetupIntentPaymentMethodOptionsUsBankAccount {
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub financial_connections: Option<LinkedAccountOptionsUsBankAccount>,
387
388    #[serde(skip_serializing_if = "Option::is_none")]
389    pub mandate_options: Option<PaymentMethodOptionsUsBankAccountMandateOptions>,
390
391    /// Bank account verification method.
392    #[serde(skip_serializing_if = "Option::is_none")]
393    pub verification_method: Option<SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
394}
395
396/// The parameters for `SetupIntent::create`.
397#[derive(Clone, Debug, Serialize, Default)]
398pub struct CreateSetupIntent<'a> {
399    /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
400    ///
401    /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers.
402    ///
403    /// It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub attach_to_self: Option<bool>,
406
407    /// When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub automatic_payment_methods: Option<CreateSetupIntentAutomaticPaymentMethods>,
410
411    /// Set to `true` to attempt to confirm this SetupIntent immediately.
412    ///
413    /// This parameter defaults to `false`.
414    /// If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
415    #[serde(skip_serializing_if = "Option::is_none")]
416    pub confirm: Option<bool>,
417
418    /// ID of the Customer this SetupIntent belongs to, if one exists.
419    ///
420    /// If present, the SetupIntent's payment method will be attached to the Customer on successful setup.
421    ///
422    /// Payment methods attached to other Customers cannot be used with this SetupIntent.
423    #[serde(skip_serializing_if = "Option::is_none")]
424    pub customer: Option<CustomerId>,
425
426    /// An arbitrary string attached to the object.
427    ///
428    /// Often useful for displaying to users.
429    #[serde(skip_serializing_if = "Option::is_none")]
430    pub description: Option<&'a str>,
431
432    /// Specifies which fields in the response should be expanded.
433    #[serde(skip_serializing_if = "Expand::is_empty")]
434    pub expand: &'a [&'a str],
435
436    /// Indicates the directions of money movement for which this payment method is intended to be used.
437    ///
438    /// Include `inbound` if you intend to use the payment method as the origin to pull funds from.
439    ///
440    /// Include `outbound` if you intend to use the payment method as the destination to send funds to.
441    /// You can include both if you intend to use the payment method for both purposes.
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub flow_directions: Option<Vec<CreateSetupIntentFlowDirections>>,
444
445    /// This hash contains details about the mandate to create.
446    ///
447    /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
448    #[serde(skip_serializing_if = "Option::is_none")]
449    pub mandate_data: Option<CreateSetupIntentMandateData>,
450
451    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
452    ///
453    /// This can be useful for storing additional information about the object in a structured format.
454    /// Individual keys can be unset by posting an empty value to them.
455    /// All keys can be unset by posting an empty value to `metadata`.
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub metadata: Option<Metadata>,
458
459    /// The Stripe account ID created for this SetupIntent.
460    #[serde(skip_serializing_if = "Option::is_none")]
461    pub on_behalf_of: Option<&'a str>,
462
463    /// ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
464    #[serde(skip_serializing_if = "Option::is_none")]
465    pub payment_method: Option<PaymentMethodId>,
466
467    /// The ID of the payment method configuration to use with this SetupIntent.
468    #[serde(skip_serializing_if = "Option::is_none")]
469    pub payment_method_configuration: Option<PaymentMethodConfigurationId>,
470
471    /// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
472    /// value in the SetupIntent.
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub payment_method_data: Option<CreateSetupIntentPaymentMethodData>,
475
476    /// Payment method-specific configuration for this SetupIntent.
477    #[serde(skip_serializing_if = "Option::is_none")]
478    pub payment_method_options: Option<CreateSetupIntentPaymentMethodOptions>,
479
480    /// The list of payment method types (for example, card) that this SetupIntent can use.
481    ///
482    /// If you don't provide this, it defaults to ["card"].
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub payment_method_types: Option<Vec<String>>,
485
486    /// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
487    ///
488    /// To redirect to a mobile application, you can alternatively supply an application URI scheme.
489    /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
490    #[serde(skip_serializing_if = "Option::is_none")]
491    pub return_url: Option<&'a str>,
492
493    /// If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
494    #[serde(skip_serializing_if = "Option::is_none")]
495    pub single_use: Option<CreateSetupIntentSingleUse>,
496
497    /// Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub use_stripe_sdk: Option<bool>,
500}
501
502impl<'a> CreateSetupIntent<'a> {
503    pub fn new() -> Self {
504        CreateSetupIntent {
505            attach_to_self: Default::default(),
506            automatic_payment_methods: Default::default(),
507            confirm: Default::default(),
508            customer: Default::default(),
509            description: Default::default(),
510            expand: Default::default(),
511            flow_directions: Default::default(),
512            mandate_data: Default::default(),
513            metadata: Default::default(),
514            on_behalf_of: Default::default(),
515            payment_method: Default::default(),
516            payment_method_configuration: Default::default(),
517            payment_method_data: Default::default(),
518            payment_method_options: Default::default(),
519            payment_method_types: Default::default(),
520            return_url: Default::default(),
521            single_use: Default::default(),
522            use_stripe_sdk: Default::default(),
523        }
524    }
525}
526
527/// The parameters for `SetupIntent::list`.
528#[derive(Clone, Debug, Serialize, Default)]
529pub struct ListSetupIntents<'a> {
530    /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
531    ///
532    /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers.
533    ///
534    /// It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub attach_to_self: Option<bool>,
537
538    /// A filter on the list, based on the object `created` field.
539    ///
540    /// The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub created: Option<RangeQuery<Timestamp>>,
543
544    /// Only return SetupIntents for the customer specified by this customer ID.
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub customer: Option<CustomerId>,
547
548    /// A cursor for use in pagination.
549    ///
550    /// `ending_before` is an object ID that defines your place in the list.
551    /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub ending_before: Option<SetupIntentId>,
554
555    /// Specifies which fields in the response should be expanded.
556    #[serde(skip_serializing_if = "Expand::is_empty")]
557    pub expand: &'a [&'a str],
558
559    /// A limit on the number of objects to be returned.
560    ///
561    /// Limit can range between 1 and 100, and the default is 10.
562    #[serde(skip_serializing_if = "Option::is_none")]
563    pub limit: Option<u64>,
564
565    /// Only return SetupIntents that associate with the specified payment method.
566    #[serde(skip_serializing_if = "Option::is_none")]
567    pub payment_method: Option<PaymentMethodId>,
568
569    /// A cursor for use in pagination.
570    ///
571    /// `starting_after` is an object ID that defines your place in the list.
572    /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub starting_after: Option<SetupIntentId>,
575}
576
577impl<'a> ListSetupIntents<'a> {
578    pub fn new() -> Self {
579        ListSetupIntents {
580            attach_to_self: Default::default(),
581            created: Default::default(),
582            customer: Default::default(),
583            ending_before: Default::default(),
584            expand: Default::default(),
585            limit: Default::default(),
586            payment_method: Default::default(),
587            starting_after: Default::default(),
588        }
589    }
590}
591impl Paginable for ListSetupIntents<'_> {
592    type O = SetupIntent;
593    fn set_last(&mut self, item: Self::O) {
594        self.starting_after = Some(item.id());
595    }
596}
597/// The parameters for `SetupIntent::update`.
598#[derive(Clone, Debug, Serialize, Default)]
599pub struct UpdateSetupIntent<'a> {
600    /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
601    ///
602    /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers.
603    ///
604    /// It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
605    #[serde(skip_serializing_if = "Option::is_none")]
606    pub attach_to_self: Option<bool>,
607
608    /// ID of the Customer this SetupIntent belongs to, if one exists.
609    ///
610    /// If present, the SetupIntent's payment method will be attached to the Customer on successful setup.
611    ///
612    /// Payment methods attached to other Customers cannot be used with this SetupIntent.
613    #[serde(skip_serializing_if = "Option::is_none")]
614    pub customer: Option<CustomerId>,
615
616    /// An arbitrary string attached to the object.
617    ///
618    /// Often useful for displaying to users.
619    #[serde(skip_serializing_if = "Option::is_none")]
620    pub description: Option<&'a str>,
621
622    /// Specifies which fields in the response should be expanded.
623    #[serde(skip_serializing_if = "Expand::is_empty")]
624    pub expand: &'a [&'a str],
625
626    /// Indicates the directions of money movement for which this payment method is intended to be used.
627    ///
628    /// Include `inbound` if you intend to use the payment method as the origin to pull funds from.
629    ///
630    /// Include `outbound` if you intend to use the payment method as the destination to send funds to.
631    /// You can include both if you intend to use the payment method for both purposes.
632    #[serde(skip_serializing_if = "Option::is_none")]
633    pub flow_directions: Option<Vec<UpdateSetupIntentFlowDirections>>,
634
635    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
636    ///
637    /// This can be useful for storing additional information about the object in a structured format.
638    /// Individual keys can be unset by posting an empty value to them.
639    /// All keys can be unset by posting an empty value to `metadata`.
640    #[serde(skip_serializing_if = "Option::is_none")]
641    pub metadata: Option<Metadata>,
642
643    /// ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
644    #[serde(skip_serializing_if = "Option::is_none")]
645    pub payment_method: Option<PaymentMethodId>,
646
647    /// The ID of the payment method configuration to use with this SetupIntent.
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub payment_method_configuration: Option<PaymentMethodConfigurationId>,
650
651    /// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
652    /// value in the SetupIntent.
653    #[serde(skip_serializing_if = "Option::is_none")]
654    pub payment_method_data: Option<UpdateSetupIntentPaymentMethodData>,
655
656    /// Payment method-specific configuration for this SetupIntent.
657    #[serde(skip_serializing_if = "Option::is_none")]
658    pub payment_method_options: Option<UpdateSetupIntentPaymentMethodOptions>,
659
660    /// The list of payment method types (for example, card) that this SetupIntent can set up.
661    ///
662    /// If you don't provide this array, it defaults to ["card"].
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub payment_method_types: Option<Vec<String>>,
665}
666
667impl<'a> UpdateSetupIntent<'a> {
668    pub fn new() -> Self {
669        UpdateSetupIntent {
670            attach_to_self: Default::default(),
671            customer: Default::default(),
672            description: Default::default(),
673            expand: Default::default(),
674            flow_directions: Default::default(),
675            metadata: Default::default(),
676            payment_method: Default::default(),
677            payment_method_configuration: Default::default(),
678            payment_method_data: Default::default(),
679            payment_method_options: Default::default(),
680            payment_method_types: Default::default(),
681        }
682    }
683}
684
685#[derive(Clone, Debug, Default, Deserialize, Serialize)]
686pub struct CreateSetupIntentAutomaticPaymentMethods {
687    /// Controls whether this SetupIntent will accept redirect-based payment methods.
688    ///
689    /// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
690    ///
691    /// To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
692    #[serde(skip_serializing_if = "Option::is_none")]
693    pub allow_redirects: Option<CreateSetupIntentAutomaticPaymentMethodsAllowRedirects>,
694
695    /// Whether this feature is enabled.
696    pub enabled: bool,
697}
698
699#[derive(Clone, Debug, Default, Deserialize, Serialize)]
700pub struct CreateSetupIntentMandateData {
701    /// This hash contains details about the customer acceptance of the Mandate.
702    pub customer_acceptance: CreateSetupIntentMandateDataCustomerAcceptance,
703}
704
705#[derive(Clone, Debug, Default, Deserialize, Serialize)]
706pub struct CreateSetupIntentPaymentMethodData {
707    /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
708    #[serde(skip_serializing_if = "Option::is_none")]
709    pub acss_debit: Option<CreateSetupIntentPaymentMethodDataAcssDebit>,
710
711    /// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub affirm: Option<CreateSetupIntentPaymentMethodDataAffirm>,
714
715    /// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub afterpay_clearpay: Option<CreateSetupIntentPaymentMethodDataAfterpayClearpay>,
718
719    /// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub alipay: Option<CreateSetupIntentPaymentMethodDataAlipay>,
722
723    /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub au_becs_debit: Option<CreateSetupIntentPaymentMethodDataAuBecsDebit>,
726
727    /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub bacs_debit: Option<CreateSetupIntentPaymentMethodDataBacsDebit>,
730
731    /// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub bancontact: Option<CreateSetupIntentPaymentMethodDataBancontact>,
734
735    /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub billing_details: Option<CreateSetupIntentPaymentMethodDataBillingDetails>,
738
739    /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub blik: Option<CreateSetupIntentPaymentMethodDataBlik>,
742
743    /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
744    #[serde(skip_serializing_if = "Option::is_none")]
745    pub boleto: Option<CreateSetupIntentPaymentMethodDataBoleto>,
746
747    /// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub cashapp: Option<CreateSetupIntentPaymentMethodDataCashapp>,
750
751    /// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub customer_balance: Option<CreateSetupIntentPaymentMethodDataCustomerBalance>,
754
755    /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
756    #[serde(skip_serializing_if = "Option::is_none")]
757    pub eps: Option<CreateSetupIntentPaymentMethodDataEps>,
758
759    /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub fpx: Option<CreateSetupIntentPaymentMethodDataFpx>,
762
763    /// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub giropay: Option<CreateSetupIntentPaymentMethodDataGiropay>,
766
767    /// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub grabpay: Option<CreateSetupIntentPaymentMethodDataGrabpay>,
770
771    /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub ideal: Option<CreateSetupIntentPaymentMethodDataIdeal>,
774
775    /// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub interac_present: Option<CreateSetupIntentPaymentMethodDataInteracPresent>,
778
779    /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
780    #[serde(skip_serializing_if = "Option::is_none")]
781    pub klarna: Option<CreateSetupIntentPaymentMethodDataKlarna>,
782
783    /// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub konbini: Option<CreateSetupIntentPaymentMethodDataKonbini>,
786
787    /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
788    #[serde(skip_serializing_if = "Option::is_none")]
789    pub link: Option<CreateSetupIntentPaymentMethodDataLink>,
790
791    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
792    ///
793    /// This can be useful for storing additional information about the object in a structured format.
794    /// Individual keys can be unset by posting an empty value to them.
795    /// All keys can be unset by posting an empty value to `metadata`.
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub metadata: Option<Metadata>,
798
799    /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub oxxo: Option<CreateSetupIntentPaymentMethodDataOxxo>,
802
803    /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub p24: Option<CreateSetupIntentPaymentMethodDataP24>,
806
807    /// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub paynow: Option<CreateSetupIntentPaymentMethodDataPaynow>,
810
811    /// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub paypal: Option<CreateSetupIntentPaymentMethodDataPaypal>,
814
815    /// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
816    #[serde(skip_serializing_if = "Option::is_none")]
817    pub pix: Option<CreateSetupIntentPaymentMethodDataPix>,
818
819    /// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
820    #[serde(skip_serializing_if = "Option::is_none")]
821    pub promptpay: Option<CreateSetupIntentPaymentMethodDataPromptpay>,
822
823    /// Options to configure Radar.
824    ///
825    /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
826    #[serde(skip_serializing_if = "Option::is_none")]
827    pub radar_options: Option<CreateSetupIntentPaymentMethodDataRadarOptions>,
828
829    /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
830    #[serde(skip_serializing_if = "Option::is_none")]
831    pub revolut_pay: Option<CreateSetupIntentPaymentMethodDataRevolutPay>,
832
833    /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub sepa_debit: Option<CreateSetupIntentPaymentMethodDataSepaDebit>,
836
837    /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub sofort: Option<CreateSetupIntentPaymentMethodDataSofort>,
840
841    /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub swish: Option<CreateSetupIntentPaymentMethodDataSwish>,
844
845    /// The type of the PaymentMethod.
846    ///
847    /// An additional hash is included on the PaymentMethod with a name matching this value.
848    /// It contains additional information specific to the PaymentMethod type.
849    #[serde(rename = "type")]
850    pub type_: CreateSetupIntentPaymentMethodDataType,
851
852    /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
853    #[serde(skip_serializing_if = "Option::is_none")]
854    pub us_bank_account: Option<CreateSetupIntentPaymentMethodDataUsBankAccount>,
855
856    /// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
857    #[serde(skip_serializing_if = "Option::is_none")]
858    pub wechat_pay: Option<CreateSetupIntentPaymentMethodDataWechatPay>,
859
860    /// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub zip: Option<CreateSetupIntentPaymentMethodDataZip>,
863}
864
865#[derive(Clone, Debug, Default, Deserialize, Serialize)]
866pub struct CreateSetupIntentPaymentMethodOptions {
867    /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub acss_debit: Option<CreateSetupIntentPaymentMethodOptionsAcssDebit>,
870
871    /// Configuration for any card setup attempted on this SetupIntent.
872    #[serde(skip_serializing_if = "Option::is_none")]
873    pub card: Option<CreateSetupIntentPaymentMethodOptionsCard>,
874
875    /// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
876    #[serde(skip_serializing_if = "Option::is_none")]
877    pub link: Option<CreateSetupIntentPaymentMethodOptionsLink>,
878
879    /// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
880    #[serde(skip_serializing_if = "Option::is_none")]
881    pub paypal: Option<CreateSetupIntentPaymentMethodOptionsPaypal>,
882
883    /// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
884    #[serde(skip_serializing_if = "Option::is_none")]
885    pub sepa_debit: Option<CreateSetupIntentPaymentMethodOptionsSepaDebit>,
886
887    /// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
888    #[serde(skip_serializing_if = "Option::is_none")]
889    pub us_bank_account: Option<CreateSetupIntentPaymentMethodOptionsUsBankAccount>,
890}
891
892#[derive(Clone, Debug, Default, Deserialize, Serialize)]
893pub struct CreateSetupIntentSingleUse {
894    /// Amount the customer is granting permission to collect later.
895    ///
896    /// A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
897    /// The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
898    /// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
899    pub amount: i64,
900
901    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
902    ///
903    /// Must be a [supported currency](https://stripe.com/docs/currencies).
904    pub currency: Currency,
905}
906
907#[derive(Clone, Debug, Default, Deserialize, Serialize)]
908pub struct UpdateSetupIntentPaymentMethodData {
909    /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub acss_debit: Option<UpdateSetupIntentPaymentMethodDataAcssDebit>,
912
913    /// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
914    #[serde(skip_serializing_if = "Option::is_none")]
915    pub affirm: Option<UpdateSetupIntentPaymentMethodDataAffirm>,
916
917    /// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
918    #[serde(skip_serializing_if = "Option::is_none")]
919    pub afterpay_clearpay: Option<UpdateSetupIntentPaymentMethodDataAfterpayClearpay>,
920
921    /// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub alipay: Option<UpdateSetupIntentPaymentMethodDataAlipay>,
924
925    /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub au_becs_debit: Option<UpdateSetupIntentPaymentMethodDataAuBecsDebit>,
928
929    /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub bacs_debit: Option<UpdateSetupIntentPaymentMethodDataBacsDebit>,
932
933    /// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
934    #[serde(skip_serializing_if = "Option::is_none")]
935    pub bancontact: Option<UpdateSetupIntentPaymentMethodDataBancontact>,
936
937    /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
938    #[serde(skip_serializing_if = "Option::is_none")]
939    pub billing_details: Option<UpdateSetupIntentPaymentMethodDataBillingDetails>,
940
941    /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
942    #[serde(skip_serializing_if = "Option::is_none")]
943    pub blik: Option<UpdateSetupIntentPaymentMethodDataBlik>,
944
945    /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
946    #[serde(skip_serializing_if = "Option::is_none")]
947    pub boleto: Option<UpdateSetupIntentPaymentMethodDataBoleto>,
948
949    /// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub cashapp: Option<UpdateSetupIntentPaymentMethodDataCashapp>,
952
953    /// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
954    #[serde(skip_serializing_if = "Option::is_none")]
955    pub customer_balance: Option<UpdateSetupIntentPaymentMethodDataCustomerBalance>,
956
957    /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
958    #[serde(skip_serializing_if = "Option::is_none")]
959    pub eps: Option<UpdateSetupIntentPaymentMethodDataEps>,
960
961    /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
962    #[serde(skip_serializing_if = "Option::is_none")]
963    pub fpx: Option<UpdateSetupIntentPaymentMethodDataFpx>,
964
965    /// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub giropay: Option<UpdateSetupIntentPaymentMethodDataGiropay>,
968
969    /// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub grabpay: Option<UpdateSetupIntentPaymentMethodDataGrabpay>,
972
973    /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
974    #[serde(skip_serializing_if = "Option::is_none")]
975    pub ideal: Option<UpdateSetupIntentPaymentMethodDataIdeal>,
976
977    /// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
978    #[serde(skip_serializing_if = "Option::is_none")]
979    pub interac_present: Option<UpdateSetupIntentPaymentMethodDataInteracPresent>,
980
981    /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
982    #[serde(skip_serializing_if = "Option::is_none")]
983    pub klarna: Option<UpdateSetupIntentPaymentMethodDataKlarna>,
984
985    /// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
986    #[serde(skip_serializing_if = "Option::is_none")]
987    pub konbini: Option<UpdateSetupIntentPaymentMethodDataKonbini>,
988
989    /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub link: Option<UpdateSetupIntentPaymentMethodDataLink>,
992
993    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
994    ///
995    /// This can be useful for storing additional information about the object in a structured format.
996    /// Individual keys can be unset by posting an empty value to them.
997    /// All keys can be unset by posting an empty value to `metadata`.
998    #[serde(skip_serializing_if = "Option::is_none")]
999    pub metadata: Option<Metadata>,
1000
1001    /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
1002    #[serde(skip_serializing_if = "Option::is_none")]
1003    pub oxxo: Option<UpdateSetupIntentPaymentMethodDataOxxo>,
1004
1005    /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
1006    #[serde(skip_serializing_if = "Option::is_none")]
1007    pub p24: Option<UpdateSetupIntentPaymentMethodDataP24>,
1008
1009    /// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub paynow: Option<UpdateSetupIntentPaymentMethodDataPaynow>,
1012
1013    /// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
1014    #[serde(skip_serializing_if = "Option::is_none")]
1015    pub paypal: Option<UpdateSetupIntentPaymentMethodDataPaypal>,
1016
1017    /// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
1018    #[serde(skip_serializing_if = "Option::is_none")]
1019    pub pix: Option<UpdateSetupIntentPaymentMethodDataPix>,
1020
1021    /// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    pub promptpay: Option<UpdateSetupIntentPaymentMethodDataPromptpay>,
1024
1025    /// Options to configure Radar.
1026    ///
1027    /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1028    #[serde(skip_serializing_if = "Option::is_none")]
1029    pub radar_options: Option<UpdateSetupIntentPaymentMethodDataRadarOptions>,
1030
1031    /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub revolut_pay: Option<UpdateSetupIntentPaymentMethodDataRevolutPay>,
1034
1035    /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub sepa_debit: Option<UpdateSetupIntentPaymentMethodDataSepaDebit>,
1038
1039    /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    pub sofort: Option<UpdateSetupIntentPaymentMethodDataSofort>,
1042
1043    /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
1044    #[serde(skip_serializing_if = "Option::is_none")]
1045    pub swish: Option<UpdateSetupIntentPaymentMethodDataSwish>,
1046
1047    /// The type of the PaymentMethod.
1048    ///
1049    /// An additional hash is included on the PaymentMethod with a name matching this value.
1050    /// It contains additional information specific to the PaymentMethod type.
1051    #[serde(rename = "type")]
1052    pub type_: UpdateSetupIntentPaymentMethodDataType,
1053
1054    /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
1055    #[serde(skip_serializing_if = "Option::is_none")]
1056    pub us_bank_account: Option<UpdateSetupIntentPaymentMethodDataUsBankAccount>,
1057
1058    /// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
1059    #[serde(skip_serializing_if = "Option::is_none")]
1060    pub wechat_pay: Option<UpdateSetupIntentPaymentMethodDataWechatPay>,
1061
1062    /// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
1063    #[serde(skip_serializing_if = "Option::is_none")]
1064    pub zip: Option<UpdateSetupIntentPaymentMethodDataZip>,
1065}
1066
1067#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1068pub struct UpdateSetupIntentPaymentMethodOptions {
1069    /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
1070    #[serde(skip_serializing_if = "Option::is_none")]
1071    pub acss_debit: Option<UpdateSetupIntentPaymentMethodOptionsAcssDebit>,
1072
1073    /// Configuration for any card setup attempted on this SetupIntent.
1074    #[serde(skip_serializing_if = "Option::is_none")]
1075    pub card: Option<UpdateSetupIntentPaymentMethodOptionsCard>,
1076
1077    /// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    pub link: Option<UpdateSetupIntentPaymentMethodOptionsLink>,
1080
1081    /// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
1082    #[serde(skip_serializing_if = "Option::is_none")]
1083    pub paypal: Option<UpdateSetupIntentPaymentMethodOptionsPaypal>,
1084
1085    /// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
1086    #[serde(skip_serializing_if = "Option::is_none")]
1087    pub sepa_debit: Option<UpdateSetupIntentPaymentMethodOptionsSepaDebit>,
1088
1089    /// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
1090    #[serde(skip_serializing_if = "Option::is_none")]
1091    pub us_bank_account: Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccount>,
1092}
1093
1094#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1095pub struct CreateSetupIntentMandateDataCustomerAcceptance {
1096    /// The time at which the customer accepted the Mandate.
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub accepted_at: Option<Timestamp>,
1099
1100    /// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub offline: Option<CreateSetupIntentMandateDataCustomerAcceptanceOffline>,
1103
1104    /// If this is a Mandate accepted online, this hash contains details about the online acceptance.
1105    #[serde(skip_serializing_if = "Option::is_none")]
1106    pub online: Option<CreateSetupIntentMandateDataCustomerAcceptanceOnline>,
1107
1108    /// The type of customer acceptance information included with the Mandate.
1109    ///
1110    /// One of `online` or `offline`.
1111    #[serde(rename = "type")]
1112    pub type_: CreateSetupIntentMandateDataCustomerAcceptanceType,
1113}
1114
1115#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1116pub struct CreateSetupIntentPaymentMethodDataAcssDebit {
1117    /// Customer's bank account number.
1118    pub account_number: String,
1119
1120    /// Institution number of the customer's bank.
1121    pub institution_number: String,
1122
1123    /// Transit number of the customer's bank.
1124    pub transit_number: String,
1125}
1126
1127#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1128pub struct CreateSetupIntentPaymentMethodDataAffirm {}
1129
1130#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1131pub struct CreateSetupIntentPaymentMethodDataAfterpayClearpay {}
1132
1133#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1134pub struct CreateSetupIntentPaymentMethodDataAlipay {}
1135
1136#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1137pub struct CreateSetupIntentPaymentMethodDataAuBecsDebit {
1138    /// The account number for the bank account.
1139    pub account_number: String,
1140
1141    /// Bank-State-Branch number of the bank account.
1142    pub bsb_number: String,
1143}
1144
1145#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1146pub struct CreateSetupIntentPaymentMethodDataBacsDebit {
1147    /// Account number of the bank account that the funds will be debited from.
1148    #[serde(skip_serializing_if = "Option::is_none")]
1149    pub account_number: Option<String>,
1150
1151    /// Sort code of the bank account.
1152    ///
1153    /// (e.g., `10-20-30`).
1154    #[serde(skip_serializing_if = "Option::is_none")]
1155    pub sort_code: Option<String>,
1156}
1157
1158#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1159pub struct CreateSetupIntentPaymentMethodDataBancontact {}
1160
1161#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1162pub struct CreateSetupIntentPaymentMethodDataBillingDetails {
1163    /// Billing address.
1164    #[serde(skip_serializing_if = "Option::is_none")]
1165    pub address: Option<CreateSetupIntentPaymentMethodDataBillingDetailsAddress>,
1166
1167    /// Email address.
1168    #[serde(skip_serializing_if = "Option::is_none")]
1169    pub email: Option<String>,
1170
1171    /// Full name.
1172    #[serde(skip_serializing_if = "Option::is_none")]
1173    pub name: Option<String>,
1174
1175    /// Billing phone number (including extension).
1176    #[serde(skip_serializing_if = "Option::is_none")]
1177    pub phone: Option<String>,
1178}
1179
1180#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1181pub struct CreateSetupIntentPaymentMethodDataBlik {}
1182
1183#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1184pub struct CreateSetupIntentPaymentMethodDataBoleto {
1185    /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
1186    pub tax_id: String,
1187}
1188
1189#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1190pub struct CreateSetupIntentPaymentMethodDataCashapp {}
1191
1192#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1193pub struct CreateSetupIntentPaymentMethodDataCustomerBalance {}
1194
1195#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1196pub struct CreateSetupIntentPaymentMethodDataEps {
1197    /// The customer's bank.
1198    #[serde(skip_serializing_if = "Option::is_none")]
1199    pub bank: Option<CreateSetupIntentPaymentMethodDataEpsBank>,
1200}
1201
1202#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1203pub struct CreateSetupIntentPaymentMethodDataFpx {
1204    /// Account holder type for FPX transaction.
1205    #[serde(skip_serializing_if = "Option::is_none")]
1206    pub account_holder_type: Option<CreateSetupIntentPaymentMethodDataFpxAccountHolderType>,
1207
1208    /// The customer's bank.
1209    pub bank: CreateSetupIntentPaymentMethodDataFpxBank,
1210}
1211
1212#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1213pub struct CreateSetupIntentPaymentMethodDataGiropay {}
1214
1215#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1216pub struct CreateSetupIntentPaymentMethodDataGrabpay {}
1217
1218#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1219pub struct CreateSetupIntentPaymentMethodDataIdeal {
1220    /// The customer's bank.
1221    #[serde(skip_serializing_if = "Option::is_none")]
1222    pub bank: Option<CreateSetupIntentPaymentMethodDataIdealBank>,
1223}
1224
1225#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1226pub struct CreateSetupIntentPaymentMethodDataInteracPresent {}
1227
1228#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1229pub struct CreateSetupIntentPaymentMethodDataKlarna {
1230    /// Customer's date of birth.
1231    #[serde(skip_serializing_if = "Option::is_none")]
1232    pub dob: Option<CreateSetupIntentPaymentMethodDataKlarnaDob>,
1233}
1234
1235#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1236pub struct CreateSetupIntentPaymentMethodDataKonbini {}
1237
1238#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1239pub struct CreateSetupIntentPaymentMethodDataLink {}
1240
1241#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1242pub struct CreateSetupIntentPaymentMethodDataOxxo {}
1243
1244#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1245pub struct CreateSetupIntentPaymentMethodDataP24 {
1246    /// The customer's bank.
1247    #[serde(skip_serializing_if = "Option::is_none")]
1248    pub bank: Option<CreateSetupIntentPaymentMethodDataP24Bank>,
1249}
1250
1251#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1252pub struct CreateSetupIntentPaymentMethodDataPaynow {}
1253
1254#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1255pub struct CreateSetupIntentPaymentMethodDataPaypal {}
1256
1257#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1258pub struct CreateSetupIntentPaymentMethodDataPix {}
1259
1260#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1261pub struct CreateSetupIntentPaymentMethodDataPromptpay {}
1262
1263#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1264pub struct CreateSetupIntentPaymentMethodDataRadarOptions {
1265    /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
1266    #[serde(skip_serializing_if = "Option::is_none")]
1267    pub session: Option<String>,
1268}
1269
1270#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1271pub struct CreateSetupIntentPaymentMethodDataRevolutPay {}
1272
1273#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1274pub struct CreateSetupIntentPaymentMethodDataSepaDebit {
1275    /// IBAN of the bank account.
1276    pub iban: String,
1277}
1278
1279#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1280pub struct CreateSetupIntentPaymentMethodDataSofort {
1281    /// Two-letter ISO code representing the country the bank account is located in.
1282    pub country: CreateSetupIntentPaymentMethodDataSofortCountry,
1283}
1284
1285#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1286pub struct CreateSetupIntentPaymentMethodDataSwish {}
1287
1288#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1289pub struct CreateSetupIntentPaymentMethodDataUsBankAccount {
1290    /// Account holder type: individual or company.
1291    #[serde(skip_serializing_if = "Option::is_none")]
1292    pub account_holder_type:
1293        Option<CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType>,
1294
1295    /// Account number of the bank account.
1296    #[serde(skip_serializing_if = "Option::is_none")]
1297    pub account_number: Option<String>,
1298
1299    /// Account type: checkings or savings.
1300    ///
1301    /// Defaults to checking if omitted.
1302    #[serde(skip_serializing_if = "Option::is_none")]
1303    pub account_type: Option<CreateSetupIntentPaymentMethodDataUsBankAccountAccountType>,
1304
1305    /// The ID of a Financial Connections Account to use as a payment method.
1306    #[serde(skip_serializing_if = "Option::is_none")]
1307    pub financial_connections_account: Option<String>,
1308
1309    /// Routing number of the bank account.
1310    #[serde(skip_serializing_if = "Option::is_none")]
1311    pub routing_number: Option<String>,
1312}
1313
1314#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1315pub struct CreateSetupIntentPaymentMethodDataWechatPay {}
1316
1317#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1318pub struct CreateSetupIntentPaymentMethodDataZip {}
1319
1320#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1321pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit {
1322    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
1323    ///
1324    /// Must be a [supported currency](https://stripe.com/docs/currencies).
1325    #[serde(skip_serializing_if = "Option::is_none")]
1326    pub currency: Option<Currency>,
1327
1328    /// Additional fields for Mandate creation.
1329    #[serde(skip_serializing_if = "Option::is_none")]
1330    pub mandate_options: Option<CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions>,
1331
1332    /// Bank account verification method.
1333    #[serde(skip_serializing_if = "Option::is_none")]
1334    pub verification_method:
1335        Option<CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
1336}
1337
1338#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1339pub struct CreateSetupIntentPaymentMethodOptionsCard {
1340    /// Configuration options for setting up an eMandate for cards issued in India.
1341    #[serde(skip_serializing_if = "Option::is_none")]
1342    pub mandate_options: Option<CreateSetupIntentPaymentMethodOptionsCardMandateOptions>,
1343
1344    /// When specified, this parameter signals that a card has been collected
1345    /// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA.
1346    ///
1347    /// This parameter can only be provided during confirmation.
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    pub moto: Option<bool>,
1350
1351    /// Selected network to process this SetupIntent on.
1352    ///
1353    /// Depends on the available networks of the card attached to the SetupIntent.
1354    /// Can be only set confirm-time.
1355    #[serde(skip_serializing_if = "Option::is_none")]
1356    pub network: Option<CreateSetupIntentPaymentMethodOptionsCardNetwork>,
1357
1358    /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication).
1359    ///
1360    /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
1361    /// If not provided, this value defaults to `automatic`.
1362    /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1363    #[serde(skip_serializing_if = "Option::is_none")]
1364    pub request_three_d_secure:
1365        Option<CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure>,
1366
1367    /// If 3D Secure authentication was performed with a third-party provider,
1368    /// the authentication details to use for this setup.
1369    #[serde(skip_serializing_if = "Option::is_none")]
1370    pub three_d_secure: Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecure>,
1371}
1372
1373#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1374pub struct CreateSetupIntentPaymentMethodOptionsLink {
1375    /// [Deprecated] This is a legacy parameter that no longer has any function.
1376    #[serde(skip_serializing_if = "Option::is_none")]
1377    pub persistent_token: Option<String>,
1378}
1379
1380#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1381pub struct CreateSetupIntentPaymentMethodOptionsPaypal {
1382    /// The PayPal Billing Agreement ID (BAID).
1383    ///
1384    /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
1385    #[serde(skip_serializing_if = "Option::is_none")]
1386    pub billing_agreement_id: Option<String>,
1387}
1388
1389#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1390pub struct CreateSetupIntentPaymentMethodOptionsSepaDebit {
1391    /// Additional fields for Mandate creation.
1392    #[serde(skip_serializing_if = "Option::is_none")]
1393    pub mandate_options: Option<CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions>,
1394}
1395
1396#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1397pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount {
1398    /// Additional fields for Financial Connections Session creation.
1399    #[serde(skip_serializing_if = "Option::is_none")]
1400    pub financial_connections:
1401        Option<CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections>,
1402
1403    /// Additional fields for Mandate creation.
1404    #[serde(skip_serializing_if = "Option::is_none")]
1405    pub mandate_options: Option<CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions>,
1406
1407    /// Additional fields for network related functions.
1408    #[serde(skip_serializing_if = "Option::is_none")]
1409    pub networks: Option<CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks>,
1410
1411    /// Bank account verification method.
1412    #[serde(skip_serializing_if = "Option::is_none")]
1413    pub verification_method:
1414        Option<CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
1415}
1416
1417#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1418pub struct UpdateSetupIntentPaymentMethodDataAcssDebit {
1419    /// Customer's bank account number.
1420    pub account_number: String,
1421
1422    /// Institution number of the customer's bank.
1423    pub institution_number: String,
1424
1425    /// Transit number of the customer's bank.
1426    pub transit_number: String,
1427}
1428
1429#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1430pub struct UpdateSetupIntentPaymentMethodDataAffirm {}
1431
1432#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1433pub struct UpdateSetupIntentPaymentMethodDataAfterpayClearpay {}
1434
1435#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1436pub struct UpdateSetupIntentPaymentMethodDataAlipay {}
1437
1438#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1439pub struct UpdateSetupIntentPaymentMethodDataAuBecsDebit {
1440    /// The account number for the bank account.
1441    pub account_number: String,
1442
1443    /// Bank-State-Branch number of the bank account.
1444    pub bsb_number: String,
1445}
1446
1447#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1448pub struct UpdateSetupIntentPaymentMethodDataBacsDebit {
1449    /// Account number of the bank account that the funds will be debited from.
1450    #[serde(skip_serializing_if = "Option::is_none")]
1451    pub account_number: Option<String>,
1452
1453    /// Sort code of the bank account.
1454    ///
1455    /// (e.g., `10-20-30`).
1456    #[serde(skip_serializing_if = "Option::is_none")]
1457    pub sort_code: Option<String>,
1458}
1459
1460#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1461pub struct UpdateSetupIntentPaymentMethodDataBancontact {}
1462
1463#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1464pub struct UpdateSetupIntentPaymentMethodDataBillingDetails {
1465    /// Billing address.
1466    #[serde(skip_serializing_if = "Option::is_none")]
1467    pub address: Option<UpdateSetupIntentPaymentMethodDataBillingDetailsAddress>,
1468
1469    /// Email address.
1470    #[serde(skip_serializing_if = "Option::is_none")]
1471    pub email: Option<String>,
1472
1473    /// Full name.
1474    #[serde(skip_serializing_if = "Option::is_none")]
1475    pub name: Option<String>,
1476
1477    /// Billing phone number (including extension).
1478    #[serde(skip_serializing_if = "Option::is_none")]
1479    pub phone: Option<String>,
1480}
1481
1482#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1483pub struct UpdateSetupIntentPaymentMethodDataBlik {}
1484
1485#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1486pub struct UpdateSetupIntentPaymentMethodDataBoleto {
1487    /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
1488    pub tax_id: String,
1489}
1490
1491#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1492pub struct UpdateSetupIntentPaymentMethodDataCashapp {}
1493
1494#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1495pub struct UpdateSetupIntentPaymentMethodDataCustomerBalance {}
1496
1497#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1498pub struct UpdateSetupIntentPaymentMethodDataEps {
1499    /// The customer's bank.
1500    #[serde(skip_serializing_if = "Option::is_none")]
1501    pub bank: Option<UpdateSetupIntentPaymentMethodDataEpsBank>,
1502}
1503
1504#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1505pub struct UpdateSetupIntentPaymentMethodDataFpx {
1506    /// Account holder type for FPX transaction.
1507    #[serde(skip_serializing_if = "Option::is_none")]
1508    pub account_holder_type: Option<UpdateSetupIntentPaymentMethodDataFpxAccountHolderType>,
1509
1510    /// The customer's bank.
1511    pub bank: UpdateSetupIntentPaymentMethodDataFpxBank,
1512}
1513
1514#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1515pub struct UpdateSetupIntentPaymentMethodDataGiropay {}
1516
1517#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1518pub struct UpdateSetupIntentPaymentMethodDataGrabpay {}
1519
1520#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1521pub struct UpdateSetupIntentPaymentMethodDataIdeal {
1522    /// The customer's bank.
1523    #[serde(skip_serializing_if = "Option::is_none")]
1524    pub bank: Option<UpdateSetupIntentPaymentMethodDataIdealBank>,
1525}
1526
1527#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1528pub struct UpdateSetupIntentPaymentMethodDataInteracPresent {}
1529
1530#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1531pub struct UpdateSetupIntentPaymentMethodDataKlarna {
1532    /// Customer's date of birth.
1533    #[serde(skip_serializing_if = "Option::is_none")]
1534    pub dob: Option<UpdateSetupIntentPaymentMethodDataKlarnaDob>,
1535}
1536
1537#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1538pub struct UpdateSetupIntentPaymentMethodDataKonbini {}
1539
1540#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1541pub struct UpdateSetupIntentPaymentMethodDataLink {}
1542
1543#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1544pub struct UpdateSetupIntentPaymentMethodDataOxxo {}
1545
1546#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1547pub struct UpdateSetupIntentPaymentMethodDataP24 {
1548    /// The customer's bank.
1549    #[serde(skip_serializing_if = "Option::is_none")]
1550    pub bank: Option<UpdateSetupIntentPaymentMethodDataP24Bank>,
1551}
1552
1553#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1554pub struct UpdateSetupIntentPaymentMethodDataPaynow {}
1555
1556#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1557pub struct UpdateSetupIntentPaymentMethodDataPaypal {}
1558
1559#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1560pub struct UpdateSetupIntentPaymentMethodDataPix {}
1561
1562#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1563pub struct UpdateSetupIntentPaymentMethodDataPromptpay {}
1564
1565#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1566pub struct UpdateSetupIntentPaymentMethodDataRadarOptions {
1567    /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
1568    #[serde(skip_serializing_if = "Option::is_none")]
1569    pub session: Option<String>,
1570}
1571
1572#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1573pub struct UpdateSetupIntentPaymentMethodDataRevolutPay {}
1574
1575#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1576pub struct UpdateSetupIntentPaymentMethodDataSepaDebit {
1577    /// IBAN of the bank account.
1578    pub iban: String,
1579}
1580
1581#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1582pub struct UpdateSetupIntentPaymentMethodDataSofort {
1583    /// Two-letter ISO code representing the country the bank account is located in.
1584    pub country: UpdateSetupIntentPaymentMethodDataSofortCountry,
1585}
1586
1587#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1588pub struct UpdateSetupIntentPaymentMethodDataSwish {}
1589
1590#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1591pub struct UpdateSetupIntentPaymentMethodDataUsBankAccount {
1592    /// Account holder type: individual or company.
1593    #[serde(skip_serializing_if = "Option::is_none")]
1594    pub account_holder_type:
1595        Option<UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType>,
1596
1597    /// Account number of the bank account.
1598    #[serde(skip_serializing_if = "Option::is_none")]
1599    pub account_number: Option<String>,
1600
1601    /// Account type: checkings or savings.
1602    ///
1603    /// Defaults to checking if omitted.
1604    #[serde(skip_serializing_if = "Option::is_none")]
1605    pub account_type: Option<UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType>,
1606
1607    /// The ID of a Financial Connections Account to use as a payment method.
1608    #[serde(skip_serializing_if = "Option::is_none")]
1609    pub financial_connections_account: Option<String>,
1610
1611    /// Routing number of the bank account.
1612    #[serde(skip_serializing_if = "Option::is_none")]
1613    pub routing_number: Option<String>,
1614}
1615
1616#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1617pub struct UpdateSetupIntentPaymentMethodDataWechatPay {}
1618
1619#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1620pub struct UpdateSetupIntentPaymentMethodDataZip {}
1621
1622#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1623pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit {
1624    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
1625    ///
1626    /// Must be a [supported currency](https://stripe.com/docs/currencies).
1627    #[serde(skip_serializing_if = "Option::is_none")]
1628    pub currency: Option<Currency>,
1629
1630    /// Additional fields for Mandate creation.
1631    #[serde(skip_serializing_if = "Option::is_none")]
1632    pub mandate_options: Option<UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions>,
1633
1634    /// Bank account verification method.
1635    #[serde(skip_serializing_if = "Option::is_none")]
1636    pub verification_method:
1637        Option<UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
1638}
1639
1640#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1641pub struct UpdateSetupIntentPaymentMethodOptionsCard {
1642    /// Configuration options for setting up an eMandate for cards issued in India.
1643    #[serde(skip_serializing_if = "Option::is_none")]
1644    pub mandate_options: Option<UpdateSetupIntentPaymentMethodOptionsCardMandateOptions>,
1645
1646    /// When specified, this parameter signals that a card has been collected
1647    /// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA.
1648    ///
1649    /// This parameter can only be provided during confirmation.
1650    #[serde(skip_serializing_if = "Option::is_none")]
1651    pub moto: Option<bool>,
1652
1653    /// Selected network to process this SetupIntent on.
1654    ///
1655    /// Depends on the available networks of the card attached to the SetupIntent.
1656    /// Can be only set confirm-time.
1657    #[serde(skip_serializing_if = "Option::is_none")]
1658    pub network: Option<UpdateSetupIntentPaymentMethodOptionsCardNetwork>,
1659
1660    /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication).
1661    ///
1662    /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
1663    /// If not provided, this value defaults to `automatic`.
1664    /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1665    #[serde(skip_serializing_if = "Option::is_none")]
1666    pub request_three_d_secure:
1667        Option<UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure>,
1668
1669    /// If 3D Secure authentication was performed with a third-party provider,
1670    /// the authentication details to use for this setup.
1671    #[serde(skip_serializing_if = "Option::is_none")]
1672    pub three_d_secure: Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure>,
1673}
1674
1675#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1676pub struct UpdateSetupIntentPaymentMethodOptionsLink {
1677    /// [Deprecated] This is a legacy parameter that no longer has any function.
1678    #[serde(skip_serializing_if = "Option::is_none")]
1679    pub persistent_token: Option<String>,
1680}
1681
1682#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1683pub struct UpdateSetupIntentPaymentMethodOptionsPaypal {
1684    /// The PayPal Billing Agreement ID (BAID).
1685    ///
1686    /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
1687    #[serde(skip_serializing_if = "Option::is_none")]
1688    pub billing_agreement_id: Option<String>,
1689}
1690
1691#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1692pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebit {
1693    /// Additional fields for Mandate creation.
1694    #[serde(skip_serializing_if = "Option::is_none")]
1695    pub mandate_options: Option<UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions>,
1696}
1697
1698#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1699pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount {
1700    /// Additional fields for Financial Connections Session creation.
1701    #[serde(skip_serializing_if = "Option::is_none")]
1702    pub financial_connections:
1703        Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections>,
1704
1705    /// Additional fields for Mandate creation.
1706    #[serde(skip_serializing_if = "Option::is_none")]
1707    pub mandate_options: Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions>,
1708
1709    /// Additional fields for network related functions.
1710    #[serde(skip_serializing_if = "Option::is_none")]
1711    pub networks: Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks>,
1712
1713    /// Bank account verification method.
1714    #[serde(skip_serializing_if = "Option::is_none")]
1715    pub verification_method:
1716        Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
1717}
1718
1719#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1720pub struct CreateSetupIntentMandateDataCustomerAcceptanceOffline {}
1721
1722#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1723pub struct CreateSetupIntentMandateDataCustomerAcceptanceOnline {
1724    /// The IP address from which the Mandate was accepted by the customer.
1725    pub ip_address: String,
1726
1727    /// The user agent of the browser from which the Mandate was accepted by the customer.
1728    pub user_agent: String,
1729}
1730
1731#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1732pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress {
1733    /// City, district, suburb, town, or village.
1734    #[serde(skip_serializing_if = "Option::is_none")]
1735    pub city: Option<String>,
1736
1737    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1738    #[serde(skip_serializing_if = "Option::is_none")]
1739    pub country: Option<String>,
1740
1741    /// Address line 1 (e.g., street, PO Box, or company name).
1742    #[serde(skip_serializing_if = "Option::is_none")]
1743    pub line1: Option<String>,
1744
1745    /// Address line 2 (e.g., apartment, suite, unit, or building).
1746    #[serde(skip_serializing_if = "Option::is_none")]
1747    pub line2: Option<String>,
1748
1749    /// ZIP or postal code.
1750    #[serde(skip_serializing_if = "Option::is_none")]
1751    pub postal_code: Option<String>,
1752
1753    /// State, county, province, or region.
1754    #[serde(skip_serializing_if = "Option::is_none")]
1755    pub state: Option<String>,
1756}
1757
1758#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1759pub struct CreateSetupIntentPaymentMethodDataKlarnaDob {
1760    /// The day of birth, between 1 and 31.
1761    pub day: i64,
1762
1763    /// The month of birth, between 1 and 12.
1764    pub month: i64,
1765
1766    /// The four-digit year of birth.
1767    pub year: i64,
1768}
1769
1770#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1771pub struct CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions {
1772    /// A URL for custom mandate text to render during confirmation step.
1773    /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
1774    /// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
1775    #[serde(skip_serializing_if = "Option::is_none")]
1776    pub custom_mandate_url: Option<String>,
1777
1778    /// List of Stripe products where this mandate can be selected automatically.
1779    #[serde(skip_serializing_if = "Option::is_none")]
1780    pub default_for:
1781        Option<Vec<CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor>>,
1782
1783    /// Description of the mandate interval.
1784    ///
1785    /// Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
1786    #[serde(skip_serializing_if = "Option::is_none")]
1787    pub interval_description: Option<String>,
1788
1789    /// Payment schedule for the mandate.
1790    #[serde(skip_serializing_if = "Option::is_none")]
1791    pub payment_schedule:
1792        Option<CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule>,
1793
1794    /// Transaction type of the mandate.
1795    #[serde(skip_serializing_if = "Option::is_none")]
1796    pub transaction_type:
1797        Option<CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType>,
1798}
1799
1800#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1801pub struct CreateSetupIntentPaymentMethodOptionsCardMandateOptions {
1802    /// Amount to be charged for future payments.
1803    pub amount: i64,
1804
1805    /// One of `fixed` or `maximum`.
1806    ///
1807    /// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
1808    /// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1809    pub amount_type: CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType,
1810
1811    /// Currency in which future payments will be charged.
1812    ///
1813    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
1814    /// Must be a [supported currency](https://stripe.com/docs/currencies).
1815    pub currency: Currency,
1816
1817    /// A description of the mandate or subscription that is meant to be displayed to the customer.
1818    #[serde(skip_serializing_if = "Option::is_none")]
1819    pub description: Option<String>,
1820
1821    /// End date of the mandate or subscription.
1822    ///
1823    /// If not provided, the mandate will be active until canceled.
1824    /// If provided, end date should be after start date.
1825    #[serde(skip_serializing_if = "Option::is_none")]
1826    pub end_date: Option<Timestamp>,
1827
1828    /// Specifies payment frequency.
1829    ///
1830    /// One of `day`, `week`, `month`, `year`, or `sporadic`.
1831    pub interval: CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval,
1832
1833    /// The number of intervals between payments.
1834    ///
1835    /// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
1836    /// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
1837    /// This parameter is optional when `interval=sporadic`.
1838    #[serde(skip_serializing_if = "Option::is_none")]
1839    pub interval_count: Option<u64>,
1840
1841    /// Unique identifier for the mandate or subscription.
1842    pub reference: String,
1843
1844    /// Start date of the mandate or subscription.
1845    ///
1846    /// Start date should not be lesser than yesterday.
1847    pub start_date: Timestamp,
1848
1849    /// Specifies the type of mandates supported.
1850    ///
1851    /// Possible values are `india`.
1852    #[serde(skip_serializing_if = "Option::is_none")]
1853    pub supported_types:
1854        Option<Vec<CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
1855}
1856
1857#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1858pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure {
1859    /// The `transStatus` returned from the card Issuer’s ACS in the ARes.
1860    #[serde(skip_serializing_if = "Option::is_none")]
1861    pub ares_trans_status:
1862        Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus>,
1863
1864    /// The cryptogram, also known as the "authentication value" (AAV, CAVV or
1865    /// AEVV).
1866    ///
1867    /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.).
1868    #[serde(skip_serializing_if = "Option::is_none")]
1869    pub cryptogram: Option<String>,
1870
1871    /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
1872    /// provider and indicates what degree of authentication was performed.
1873    #[serde(skip_serializing_if = "Option::is_none")]
1874    pub electronic_commerce_indicator:
1875        Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator>,
1876
1877    /// Network specific 3DS fields.
1878    ///
1879    /// Network specific arguments require an explicit card brand choice.
1880    /// The parameter `payment_method_options.card.network`` must be populated accordingly.
1881    #[serde(skip_serializing_if = "Option::is_none")]
1882    pub network_options:
1883        Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions>,
1884
1885    /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
1886    /// AReq sent to the card Issuer's ACS.
1887    ///
1888    /// A string containing 2 digits from 01-99.
1889    #[serde(skip_serializing_if = "Option::is_none")]
1890    pub requestor_challenge_indicator: Option<String>,
1891
1892    /// For 3D Secure 1, the XID.
1893    ///
1894    /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID).
1895    #[serde(skip_serializing_if = "Option::is_none")]
1896    pub transaction_id: Option<String>,
1897
1898    /// The version of 3D Secure that was performed.
1899    #[serde(skip_serializing_if = "Option::is_none")]
1900    pub version: Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion>,
1901}
1902
1903#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1904pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {}
1905
1906#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1907pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections {
1908    /// The list of permissions to request.
1909    ///
1910    /// If this parameter is passed, the `payment_method` permission must be included.
1911    /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
1912    #[serde(skip_serializing_if = "Option::is_none")]
1913    pub permissions: Option<
1914        Vec<CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions>,
1915    >,
1916
1917    /// List of data features that you would like to retrieve upon account creation.
1918    #[serde(skip_serializing_if = "Option::is_none")]
1919    pub prefetch:
1920        Option<Vec<CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch>>,
1921
1922    /// For webview integrations only.
1923    ///
1924    /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
1925    #[serde(skip_serializing_if = "Option::is_none")]
1926    pub return_url: Option<String>,
1927}
1928
1929#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1930pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions {
1931    /// The method used to collect offline mandate customer acceptance.
1932    #[serde(skip_serializing_if = "Option::is_none")]
1933    pub collection_method:
1934        Option<CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod>,
1935}
1936
1937#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1938pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks {
1939    /// Triggers validations to run across the selected networks.
1940    #[serde(skip_serializing_if = "Option::is_none")]
1941    pub requested: Option<Vec<CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested>>,
1942}
1943
1944#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1945pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress {
1946    /// City, district, suburb, town, or village.
1947    #[serde(skip_serializing_if = "Option::is_none")]
1948    pub city: Option<String>,
1949
1950    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1951    #[serde(skip_serializing_if = "Option::is_none")]
1952    pub country: Option<String>,
1953
1954    /// Address line 1 (e.g., street, PO Box, or company name).
1955    #[serde(skip_serializing_if = "Option::is_none")]
1956    pub line1: Option<String>,
1957
1958    /// Address line 2 (e.g., apartment, suite, unit, or building).
1959    #[serde(skip_serializing_if = "Option::is_none")]
1960    pub line2: Option<String>,
1961
1962    /// ZIP or postal code.
1963    #[serde(skip_serializing_if = "Option::is_none")]
1964    pub postal_code: Option<String>,
1965
1966    /// State, county, province, or region.
1967    #[serde(skip_serializing_if = "Option::is_none")]
1968    pub state: Option<String>,
1969}
1970
1971#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1972pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob {
1973    /// The day of birth, between 1 and 31.
1974    pub day: i64,
1975
1976    /// The month of birth, between 1 and 12.
1977    pub month: i64,
1978
1979    /// The four-digit year of birth.
1980    pub year: i64,
1981}
1982
1983#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1984pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions {
1985    /// A URL for custom mandate text to render during confirmation step.
1986    /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
1987    /// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
1988    #[serde(skip_serializing_if = "Option::is_none")]
1989    pub custom_mandate_url: Option<String>,
1990
1991    /// List of Stripe products where this mandate can be selected automatically.
1992    #[serde(skip_serializing_if = "Option::is_none")]
1993    pub default_for:
1994        Option<Vec<UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor>>,
1995
1996    /// Description of the mandate interval.
1997    ///
1998    /// Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
1999    #[serde(skip_serializing_if = "Option::is_none")]
2000    pub interval_description: Option<String>,
2001
2002    /// Payment schedule for the mandate.
2003    #[serde(skip_serializing_if = "Option::is_none")]
2004    pub payment_schedule:
2005        Option<UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule>,
2006
2007    /// Transaction type of the mandate.
2008    #[serde(skip_serializing_if = "Option::is_none")]
2009    pub transaction_type:
2010        Option<UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType>,
2011}
2012
2013#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2014pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions {
2015    /// Amount to be charged for future payments.
2016    pub amount: i64,
2017
2018    /// One of `fixed` or `maximum`.
2019    ///
2020    /// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
2021    /// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
2022    pub amount_type: UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType,
2023
2024    /// Currency in which future payments will be charged.
2025    ///
2026    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
2027    /// Must be a [supported currency](https://stripe.com/docs/currencies).
2028    pub currency: Currency,
2029
2030    /// A description of the mandate or subscription that is meant to be displayed to the customer.
2031    #[serde(skip_serializing_if = "Option::is_none")]
2032    pub description: Option<String>,
2033
2034    /// End date of the mandate or subscription.
2035    ///
2036    /// If not provided, the mandate will be active until canceled.
2037    /// If provided, end date should be after start date.
2038    #[serde(skip_serializing_if = "Option::is_none")]
2039    pub end_date: Option<Timestamp>,
2040
2041    /// Specifies payment frequency.
2042    ///
2043    /// One of `day`, `week`, `month`, `year`, or `sporadic`.
2044    pub interval: UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval,
2045
2046    /// The number of intervals between payments.
2047    ///
2048    /// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
2049    /// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
2050    /// This parameter is optional when `interval=sporadic`.
2051    #[serde(skip_serializing_if = "Option::is_none")]
2052    pub interval_count: Option<u64>,
2053
2054    /// Unique identifier for the mandate or subscription.
2055    pub reference: String,
2056
2057    /// Start date of the mandate or subscription.
2058    ///
2059    /// Start date should not be lesser than yesterday.
2060    pub start_date: Timestamp,
2061
2062    /// Specifies the type of mandates supported.
2063    ///
2064    /// Possible values are `india`.
2065    #[serde(skip_serializing_if = "Option::is_none")]
2066    pub supported_types:
2067        Option<Vec<UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
2068}
2069
2070#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2071pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure {
2072    /// The `transStatus` returned from the card Issuer’s ACS in the ARes.
2073    #[serde(skip_serializing_if = "Option::is_none")]
2074    pub ares_trans_status:
2075        Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus>,
2076
2077    /// The cryptogram, also known as the "authentication value" (AAV, CAVV or
2078    /// AEVV).
2079    ///
2080    /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.).
2081    #[serde(skip_serializing_if = "Option::is_none")]
2082    pub cryptogram: Option<String>,
2083
2084    /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
2085    /// provider and indicates what degree of authentication was performed.
2086    #[serde(skip_serializing_if = "Option::is_none")]
2087    pub electronic_commerce_indicator:
2088        Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator>,
2089
2090    /// Network specific 3DS fields.
2091    ///
2092    /// Network specific arguments require an explicit card brand choice.
2093    /// The parameter `payment_method_options.card.network`` must be populated accordingly.
2094    #[serde(skip_serializing_if = "Option::is_none")]
2095    pub network_options:
2096        Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions>,
2097
2098    /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
2099    /// AReq sent to the card Issuer's ACS.
2100    ///
2101    /// A string containing 2 digits from 01-99.
2102    #[serde(skip_serializing_if = "Option::is_none")]
2103    pub requestor_challenge_indicator: Option<String>,
2104
2105    /// For 3D Secure 1, the XID.
2106    ///
2107    /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID).
2108    #[serde(skip_serializing_if = "Option::is_none")]
2109    pub transaction_id: Option<String>,
2110
2111    /// The version of 3D Secure that was performed.
2112    #[serde(skip_serializing_if = "Option::is_none")]
2113    pub version: Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion>,
2114}
2115
2116#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2117pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {}
2118
2119#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2120pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections {
2121    /// The list of permissions to request.
2122    ///
2123    /// If this parameter is passed, the `payment_method` permission must be included.
2124    /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
2125    #[serde(skip_serializing_if = "Option::is_none")]
2126    pub permissions: Option<
2127        Vec<UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions>,
2128    >,
2129
2130    /// List of data features that you would like to retrieve upon account creation.
2131    #[serde(skip_serializing_if = "Option::is_none")]
2132    pub prefetch:
2133        Option<Vec<UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch>>,
2134
2135    /// For webview integrations only.
2136    ///
2137    /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
2138    #[serde(skip_serializing_if = "Option::is_none")]
2139    pub return_url: Option<String>,
2140}
2141
2142#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2143pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions {
2144    /// The method used to collect offline mandate customer acceptance.
2145    #[serde(skip_serializing_if = "Option::is_none")]
2146    pub collection_method:
2147        Option<UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod>,
2148}
2149
2150#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2151pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks {
2152    /// Triggers validations to run across the selected networks.
2153    #[serde(skip_serializing_if = "Option::is_none")]
2154    pub requested: Option<Vec<UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested>>,
2155}
2156
2157#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2158pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions {
2159    /// Cartes Bancaires-specific 3DS fields.
2160    #[serde(skip_serializing_if = "Option::is_none")]
2161    pub cartes_bancaires:
2162        Option<CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires>,
2163}
2164
2165#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2166pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions {
2167    /// Cartes Bancaires-specific 3DS fields.
2168    #[serde(skip_serializing_if = "Option::is_none")]
2169    pub cartes_bancaires:
2170        Option<UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires>,
2171}
2172
2173#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2174pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires {
2175    /// The cryptogram calculation algorithm used by the card Issuer's ACS
2176    /// to calculate the Authentication cryptogram.
2177    ///
2178    /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO.
2179    pub cb_avalgo:
2180        CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo,
2181
2182    /// The exemption indicator returned from Cartes Bancaires in the ARes.
2183    /// message extension: CB-EXEMPTION; string (4 characters)
2184    /// This is a 3 byte bitmap (low significant byte first and most significant
2185    /// bit first) that has been Base64 encoded.
2186    #[serde(skip_serializing_if = "Option::is_none")]
2187    pub cb_exemption: Option<String>,
2188
2189    /// The risk score returned from Cartes Bancaires in the ARes.
2190    /// message extension: CB-SCORE; numeric value 0-99.
2191    #[serde(skip_serializing_if = "Option::is_none")]
2192    pub cb_score: Option<i64>,
2193}
2194
2195#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2196pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires {
2197    /// The cryptogram calculation algorithm used by the card Issuer's ACS
2198    /// to calculate the Authentication cryptogram.
2199    ///
2200    /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO.
2201    pub cb_avalgo:
2202        UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo,
2203
2204    /// The exemption indicator returned from Cartes Bancaires in the ARes.
2205    /// message extension: CB-EXEMPTION; string (4 characters)
2206    /// This is a 3 byte bitmap (low significant byte first and most significant
2207    /// bit first) that has been Base64 encoded.
2208    #[serde(skip_serializing_if = "Option::is_none")]
2209    pub cb_exemption: Option<String>,
2210
2211    /// The risk score returned from Cartes Bancaires in the ARes.
2212    /// message extension: CB-SCORE; numeric value 0-99.
2213    #[serde(skip_serializing_if = "Option::is_none")]
2214    pub cb_score: Option<i64>,
2215}
2216
2217/// An enum representing the possible values of an `CreateSetupIntentAutomaticPaymentMethods`'s `allow_redirects` field.
2218#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2219#[serde(rename_all = "snake_case")]
2220pub enum CreateSetupIntentAutomaticPaymentMethodsAllowRedirects {
2221    Always,
2222    Never,
2223}
2224
2225impl CreateSetupIntentAutomaticPaymentMethodsAllowRedirects {
2226    pub fn as_str(self) -> &'static str {
2227        match self {
2228            CreateSetupIntentAutomaticPaymentMethodsAllowRedirects::Always => "always",
2229            CreateSetupIntentAutomaticPaymentMethodsAllowRedirects::Never => "never",
2230        }
2231    }
2232}
2233
2234impl AsRef<str> for CreateSetupIntentAutomaticPaymentMethodsAllowRedirects {
2235    fn as_ref(&self) -> &str {
2236        self.as_str()
2237    }
2238}
2239
2240impl std::fmt::Display for CreateSetupIntentAutomaticPaymentMethodsAllowRedirects {
2241    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2242        self.as_str().fmt(f)
2243    }
2244}
2245impl std::default::Default for CreateSetupIntentAutomaticPaymentMethodsAllowRedirects {
2246    fn default() -> Self {
2247        Self::Always
2248    }
2249}
2250
2251/// An enum representing the possible values of an `CreateSetupIntent`'s `flow_directions` field.
2252#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2253#[serde(rename_all = "snake_case")]
2254pub enum CreateSetupIntentFlowDirections {
2255    Inbound,
2256    Outbound,
2257}
2258
2259impl CreateSetupIntentFlowDirections {
2260    pub fn as_str(self) -> &'static str {
2261        match self {
2262            CreateSetupIntentFlowDirections::Inbound => "inbound",
2263            CreateSetupIntentFlowDirections::Outbound => "outbound",
2264        }
2265    }
2266}
2267
2268impl AsRef<str> for CreateSetupIntentFlowDirections {
2269    fn as_ref(&self) -> &str {
2270        self.as_str()
2271    }
2272}
2273
2274impl std::fmt::Display for CreateSetupIntentFlowDirections {
2275    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2276        self.as_str().fmt(f)
2277    }
2278}
2279impl std::default::Default for CreateSetupIntentFlowDirections {
2280    fn default() -> Self {
2281        Self::Inbound
2282    }
2283}
2284
2285/// An enum representing the possible values of an `CreateSetupIntentMandateDataCustomerAcceptance`'s `type` field.
2286#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2287#[serde(rename_all = "snake_case")]
2288pub enum CreateSetupIntentMandateDataCustomerAcceptanceType {
2289    Offline,
2290    Online,
2291}
2292
2293impl CreateSetupIntentMandateDataCustomerAcceptanceType {
2294    pub fn as_str(self) -> &'static str {
2295        match self {
2296            CreateSetupIntentMandateDataCustomerAcceptanceType::Offline => "offline",
2297            CreateSetupIntentMandateDataCustomerAcceptanceType::Online => "online",
2298        }
2299    }
2300}
2301
2302impl AsRef<str> for CreateSetupIntentMandateDataCustomerAcceptanceType {
2303    fn as_ref(&self) -> &str {
2304        self.as_str()
2305    }
2306}
2307
2308impl std::fmt::Display for CreateSetupIntentMandateDataCustomerAcceptanceType {
2309    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2310        self.as_str().fmt(f)
2311    }
2312}
2313impl std::default::Default for CreateSetupIntentMandateDataCustomerAcceptanceType {
2314    fn default() -> Self {
2315        Self::Offline
2316    }
2317}
2318
2319/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataEps`'s `bank` field.
2320#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2321#[serde(rename_all = "snake_case")]
2322pub enum CreateSetupIntentPaymentMethodDataEpsBank {
2323    ArzteUndApothekerBank,
2324    AustrianAnadiBankAg,
2325    BankAustria,
2326    BankhausCarlSpangler,
2327    BankhausSchelhammerUndSchatteraAg,
2328    BawagPskAg,
2329    BksBankAg,
2330    BrullKallmusBankAg,
2331    BtvVierLanderBank,
2332    CapitalBankGraweGruppeAg,
2333    DeutscheBankAg,
2334    Dolomitenbank,
2335    EasybankAg,
2336    ErsteBankUndSparkassen,
2337    HypoAlpeadriabankInternationalAg,
2338    HypoBankBurgenlandAktiengesellschaft,
2339    HypoNoeLbFurNiederosterreichUWien,
2340    HypoOberosterreichSalzburgSteiermark,
2341    HypoTirolBankAg,
2342    HypoVorarlbergBankAg,
2343    MarchfelderBank,
2344    OberbankAg,
2345    RaiffeisenBankengruppeOsterreich,
2346    SchoellerbankAg,
2347    SpardaBankWien,
2348    VolksbankGruppe,
2349    VolkskreditbankAg,
2350    VrBankBraunau,
2351}
2352
2353impl CreateSetupIntentPaymentMethodDataEpsBank {
2354    pub fn as_str(self) -> &'static str {
2355        match self {
2356            CreateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => {
2357                "arzte_und_apotheker_bank"
2358            }
2359            CreateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => {
2360                "austrian_anadi_bank_ag"
2361            }
2362            CreateSetupIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria",
2363            CreateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => {
2364                "bankhaus_carl_spangler"
2365            }
2366            CreateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => {
2367                "bankhaus_schelhammer_und_schattera_ag"
2368            }
2369            CreateSetupIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag",
2370            CreateSetupIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag",
2371            CreateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => {
2372                "brull_kallmus_bank_ag"
2373            }
2374            CreateSetupIntentPaymentMethodDataEpsBank::BtvVierLanderBank => "btv_vier_lander_bank",
2375            CreateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => {
2376                "capital_bank_grawe_gruppe_ag"
2377            }
2378            CreateSetupIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag",
2379            CreateSetupIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank",
2380            CreateSetupIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag",
2381            CreateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => {
2382                "erste_bank_und_sparkassen"
2383            }
2384            CreateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => {
2385                "hypo_alpeadriabank_international_ag"
2386            }
2387            CreateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => {
2388                "hypo_bank_burgenland_aktiengesellschaft"
2389            }
2390            CreateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => {
2391                "hypo_noe_lb_fur_niederosterreich_u_wien"
2392            }
2393            CreateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => {
2394                "hypo_oberosterreich_salzburg_steiermark"
2395            }
2396            CreateSetupIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag",
2397            CreateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => {
2398                "hypo_vorarlberg_bank_ag"
2399            }
2400            CreateSetupIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank",
2401            CreateSetupIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag",
2402            CreateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => {
2403                "raiffeisen_bankengruppe_osterreich"
2404            }
2405            CreateSetupIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag",
2406            CreateSetupIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien",
2407            CreateSetupIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe",
2408            CreateSetupIntentPaymentMethodDataEpsBank::VolkskreditbankAg => "volkskreditbank_ag",
2409            CreateSetupIntentPaymentMethodDataEpsBank::VrBankBraunau => "vr_bank_braunau",
2410        }
2411    }
2412}
2413
2414impl AsRef<str> for CreateSetupIntentPaymentMethodDataEpsBank {
2415    fn as_ref(&self) -> &str {
2416        self.as_str()
2417    }
2418}
2419
2420impl std::fmt::Display for CreateSetupIntentPaymentMethodDataEpsBank {
2421    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2422        self.as_str().fmt(f)
2423    }
2424}
2425impl std::default::Default for CreateSetupIntentPaymentMethodDataEpsBank {
2426    fn default() -> Self {
2427        Self::ArzteUndApothekerBank
2428    }
2429}
2430
2431/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataFpx`'s `account_holder_type` field.
2432#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2433#[serde(rename_all = "snake_case")]
2434pub enum CreateSetupIntentPaymentMethodDataFpxAccountHolderType {
2435    Company,
2436    Individual,
2437}
2438
2439impl CreateSetupIntentPaymentMethodDataFpxAccountHolderType {
2440    pub fn as_str(self) -> &'static str {
2441        match self {
2442            CreateSetupIntentPaymentMethodDataFpxAccountHolderType::Company => "company",
2443            CreateSetupIntentPaymentMethodDataFpxAccountHolderType::Individual => "individual",
2444        }
2445    }
2446}
2447
2448impl AsRef<str> for CreateSetupIntentPaymentMethodDataFpxAccountHolderType {
2449    fn as_ref(&self) -> &str {
2450        self.as_str()
2451    }
2452}
2453
2454impl std::fmt::Display for CreateSetupIntentPaymentMethodDataFpxAccountHolderType {
2455    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2456        self.as_str().fmt(f)
2457    }
2458}
2459impl std::default::Default for CreateSetupIntentPaymentMethodDataFpxAccountHolderType {
2460    fn default() -> Self {
2461        Self::Company
2462    }
2463}
2464
2465/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataFpx`'s `bank` field.
2466#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2467#[serde(rename_all = "snake_case")]
2468pub enum CreateSetupIntentPaymentMethodDataFpxBank {
2469    AffinBank,
2470    Agrobank,
2471    AllianceBank,
2472    Ambank,
2473    BankIslam,
2474    BankMuamalat,
2475    BankOfChina,
2476    BankRakyat,
2477    Bsn,
2478    Cimb,
2479    DeutscheBank,
2480    HongLeongBank,
2481    Hsbc,
2482    Kfh,
2483    Maybank2e,
2484    Maybank2u,
2485    Ocbc,
2486    PbEnterprise,
2487    PublicBank,
2488    Rhb,
2489    StandardChartered,
2490    Uob,
2491}
2492
2493impl CreateSetupIntentPaymentMethodDataFpxBank {
2494    pub fn as_str(self) -> &'static str {
2495        match self {
2496            CreateSetupIntentPaymentMethodDataFpxBank::AffinBank => "affin_bank",
2497            CreateSetupIntentPaymentMethodDataFpxBank::Agrobank => "agrobank",
2498            CreateSetupIntentPaymentMethodDataFpxBank::AllianceBank => "alliance_bank",
2499            CreateSetupIntentPaymentMethodDataFpxBank::Ambank => "ambank",
2500            CreateSetupIntentPaymentMethodDataFpxBank::BankIslam => "bank_islam",
2501            CreateSetupIntentPaymentMethodDataFpxBank::BankMuamalat => "bank_muamalat",
2502            CreateSetupIntentPaymentMethodDataFpxBank::BankOfChina => "bank_of_china",
2503            CreateSetupIntentPaymentMethodDataFpxBank::BankRakyat => "bank_rakyat",
2504            CreateSetupIntentPaymentMethodDataFpxBank::Bsn => "bsn",
2505            CreateSetupIntentPaymentMethodDataFpxBank::Cimb => "cimb",
2506            CreateSetupIntentPaymentMethodDataFpxBank::DeutscheBank => "deutsche_bank",
2507            CreateSetupIntentPaymentMethodDataFpxBank::HongLeongBank => "hong_leong_bank",
2508            CreateSetupIntentPaymentMethodDataFpxBank::Hsbc => "hsbc",
2509            CreateSetupIntentPaymentMethodDataFpxBank::Kfh => "kfh",
2510            CreateSetupIntentPaymentMethodDataFpxBank::Maybank2e => "maybank2e",
2511            CreateSetupIntentPaymentMethodDataFpxBank::Maybank2u => "maybank2u",
2512            CreateSetupIntentPaymentMethodDataFpxBank::Ocbc => "ocbc",
2513            CreateSetupIntentPaymentMethodDataFpxBank::PbEnterprise => "pb_enterprise",
2514            CreateSetupIntentPaymentMethodDataFpxBank::PublicBank => "public_bank",
2515            CreateSetupIntentPaymentMethodDataFpxBank::Rhb => "rhb",
2516            CreateSetupIntentPaymentMethodDataFpxBank::StandardChartered => "standard_chartered",
2517            CreateSetupIntentPaymentMethodDataFpxBank::Uob => "uob",
2518        }
2519    }
2520}
2521
2522impl AsRef<str> for CreateSetupIntentPaymentMethodDataFpxBank {
2523    fn as_ref(&self) -> &str {
2524        self.as_str()
2525    }
2526}
2527
2528impl std::fmt::Display for CreateSetupIntentPaymentMethodDataFpxBank {
2529    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2530        self.as_str().fmt(f)
2531    }
2532}
2533impl std::default::Default for CreateSetupIntentPaymentMethodDataFpxBank {
2534    fn default() -> Self {
2535        Self::AffinBank
2536    }
2537}
2538
2539/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataIdeal`'s `bank` field.
2540#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2541#[serde(rename_all = "snake_case")]
2542pub enum CreateSetupIntentPaymentMethodDataIdealBank {
2543    AbnAmro,
2544    AsnBank,
2545    Bunq,
2546    Handelsbanken,
2547    Ing,
2548    Knab,
2549    Moneyou,
2550    N26,
2551    Nn,
2552    Rabobank,
2553    Regiobank,
2554    Revolut,
2555    SnsBank,
2556    TriodosBank,
2557    VanLanschot,
2558    Yoursafe,
2559}
2560
2561impl CreateSetupIntentPaymentMethodDataIdealBank {
2562    pub fn as_str(self) -> &'static str {
2563        match self {
2564            CreateSetupIntentPaymentMethodDataIdealBank::AbnAmro => "abn_amro",
2565            CreateSetupIntentPaymentMethodDataIdealBank::AsnBank => "asn_bank",
2566            CreateSetupIntentPaymentMethodDataIdealBank::Bunq => "bunq",
2567            CreateSetupIntentPaymentMethodDataIdealBank::Handelsbanken => "handelsbanken",
2568            CreateSetupIntentPaymentMethodDataIdealBank::Ing => "ing",
2569            CreateSetupIntentPaymentMethodDataIdealBank::Knab => "knab",
2570            CreateSetupIntentPaymentMethodDataIdealBank::Moneyou => "moneyou",
2571            CreateSetupIntentPaymentMethodDataIdealBank::N26 => "n26",
2572            CreateSetupIntentPaymentMethodDataIdealBank::Nn => "nn",
2573            CreateSetupIntentPaymentMethodDataIdealBank::Rabobank => "rabobank",
2574            CreateSetupIntentPaymentMethodDataIdealBank::Regiobank => "regiobank",
2575            CreateSetupIntentPaymentMethodDataIdealBank::Revolut => "revolut",
2576            CreateSetupIntentPaymentMethodDataIdealBank::SnsBank => "sns_bank",
2577            CreateSetupIntentPaymentMethodDataIdealBank::TriodosBank => "triodos_bank",
2578            CreateSetupIntentPaymentMethodDataIdealBank::VanLanschot => "van_lanschot",
2579            CreateSetupIntentPaymentMethodDataIdealBank::Yoursafe => "yoursafe",
2580        }
2581    }
2582}
2583
2584impl AsRef<str> for CreateSetupIntentPaymentMethodDataIdealBank {
2585    fn as_ref(&self) -> &str {
2586        self.as_str()
2587    }
2588}
2589
2590impl std::fmt::Display for CreateSetupIntentPaymentMethodDataIdealBank {
2591    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2592        self.as_str().fmt(f)
2593    }
2594}
2595impl std::default::Default for CreateSetupIntentPaymentMethodDataIdealBank {
2596    fn default() -> Self {
2597        Self::AbnAmro
2598    }
2599}
2600
2601/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataP24`'s `bank` field.
2602#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2603#[serde(rename_all = "snake_case")]
2604pub enum CreateSetupIntentPaymentMethodDataP24Bank {
2605    AliorBank,
2606    BankMillennium,
2607    BankNowyBfgSa,
2608    BankPekaoSa,
2609    BankiSpbdzielcze,
2610    Blik,
2611    BnpParibas,
2612    Boz,
2613    CitiHandlowy,
2614    CreditAgricole,
2615    Envelobank,
2616    EtransferPocztowy24,
2617    GetinBank,
2618    Ideabank,
2619    Ing,
2620    Inteligo,
2621    MbankMtransfer,
2622    NestPrzelew,
2623    NoblePay,
2624    PbacZIpko,
2625    PlusBank,
2626    SantanderPrzelew24,
2627    TmobileUsbugiBankowe,
2628    ToyotaBank,
2629    Velobank,
2630    VolkswagenBank,
2631}
2632
2633impl CreateSetupIntentPaymentMethodDataP24Bank {
2634    pub fn as_str(self) -> &'static str {
2635        match self {
2636            CreateSetupIntentPaymentMethodDataP24Bank::AliorBank => "alior_bank",
2637            CreateSetupIntentPaymentMethodDataP24Bank::BankMillennium => "bank_millennium",
2638            CreateSetupIntentPaymentMethodDataP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa",
2639            CreateSetupIntentPaymentMethodDataP24Bank::BankPekaoSa => "bank_pekao_sa",
2640            CreateSetupIntentPaymentMethodDataP24Bank::BankiSpbdzielcze => "banki_spbdzielcze",
2641            CreateSetupIntentPaymentMethodDataP24Bank::Blik => "blik",
2642            CreateSetupIntentPaymentMethodDataP24Bank::BnpParibas => "bnp_paribas",
2643            CreateSetupIntentPaymentMethodDataP24Bank::Boz => "boz",
2644            CreateSetupIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy",
2645            CreateSetupIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole",
2646            CreateSetupIntentPaymentMethodDataP24Bank::Envelobank => "envelobank",
2647            CreateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => {
2648                "etransfer_pocztowy24"
2649            }
2650            CreateSetupIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank",
2651            CreateSetupIntentPaymentMethodDataP24Bank::Ideabank => "ideabank",
2652            CreateSetupIntentPaymentMethodDataP24Bank::Ing => "ing",
2653            CreateSetupIntentPaymentMethodDataP24Bank::Inteligo => "inteligo",
2654            CreateSetupIntentPaymentMethodDataP24Bank::MbankMtransfer => "mbank_mtransfer",
2655            CreateSetupIntentPaymentMethodDataP24Bank::NestPrzelew => "nest_przelew",
2656            CreateSetupIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay",
2657            CreateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko",
2658            CreateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank",
2659            CreateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24",
2660            CreateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => {
2661                "tmobile_usbugi_bankowe"
2662            }
2663            CreateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
2664            CreateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank",
2665            CreateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
2666        }
2667    }
2668}
2669
2670impl AsRef<str> for CreateSetupIntentPaymentMethodDataP24Bank {
2671    fn as_ref(&self) -> &str {
2672        self.as_str()
2673    }
2674}
2675
2676impl std::fmt::Display for CreateSetupIntentPaymentMethodDataP24Bank {
2677    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2678        self.as_str().fmt(f)
2679    }
2680}
2681impl std::default::Default for CreateSetupIntentPaymentMethodDataP24Bank {
2682    fn default() -> Self {
2683        Self::AliorBank
2684    }
2685}
2686
2687/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataSofort`'s `country` field.
2688#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2689#[serde(rename_all = "snake_case")]
2690pub enum CreateSetupIntentPaymentMethodDataSofortCountry {
2691    #[serde(rename = "AT")]
2692    At,
2693    #[serde(rename = "BE")]
2694    Be,
2695    #[serde(rename = "DE")]
2696    De,
2697    #[serde(rename = "ES")]
2698    Es,
2699    #[serde(rename = "IT")]
2700    It,
2701    #[serde(rename = "NL")]
2702    Nl,
2703}
2704
2705impl CreateSetupIntentPaymentMethodDataSofortCountry {
2706    pub fn as_str(self) -> &'static str {
2707        match self {
2708            CreateSetupIntentPaymentMethodDataSofortCountry::At => "AT",
2709            CreateSetupIntentPaymentMethodDataSofortCountry::Be => "BE",
2710            CreateSetupIntentPaymentMethodDataSofortCountry::De => "DE",
2711            CreateSetupIntentPaymentMethodDataSofortCountry::Es => "ES",
2712            CreateSetupIntentPaymentMethodDataSofortCountry::It => "IT",
2713            CreateSetupIntentPaymentMethodDataSofortCountry::Nl => "NL",
2714        }
2715    }
2716}
2717
2718impl AsRef<str> for CreateSetupIntentPaymentMethodDataSofortCountry {
2719    fn as_ref(&self) -> &str {
2720        self.as_str()
2721    }
2722}
2723
2724impl std::fmt::Display for CreateSetupIntentPaymentMethodDataSofortCountry {
2725    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2726        self.as_str().fmt(f)
2727    }
2728}
2729impl std::default::Default for CreateSetupIntentPaymentMethodDataSofortCountry {
2730    fn default() -> Self {
2731        Self::At
2732    }
2733}
2734
2735/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodData`'s `type` field.
2736#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2737#[serde(rename_all = "snake_case")]
2738pub enum CreateSetupIntentPaymentMethodDataType {
2739    AcssDebit,
2740    Affirm,
2741    AfterpayClearpay,
2742    Alipay,
2743    AuBecsDebit,
2744    BacsDebit,
2745    Bancontact,
2746    Blik,
2747    Boleto,
2748    Cashapp,
2749    CustomerBalance,
2750    Eps,
2751    Fpx,
2752    Giropay,
2753    Grabpay,
2754    Ideal,
2755    Klarna,
2756    Konbini,
2757    Link,
2758    Oxxo,
2759    P24,
2760    Paynow,
2761    Paypal,
2762    Pix,
2763    Promptpay,
2764    RevolutPay,
2765    SepaDebit,
2766    Sofort,
2767    Swish,
2768    UsBankAccount,
2769    WechatPay,
2770    Zip,
2771}
2772
2773impl CreateSetupIntentPaymentMethodDataType {
2774    pub fn as_str(self) -> &'static str {
2775        match self {
2776            CreateSetupIntentPaymentMethodDataType::AcssDebit => "acss_debit",
2777            CreateSetupIntentPaymentMethodDataType::Affirm => "affirm",
2778            CreateSetupIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay",
2779            CreateSetupIntentPaymentMethodDataType::Alipay => "alipay",
2780            CreateSetupIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit",
2781            CreateSetupIntentPaymentMethodDataType::BacsDebit => "bacs_debit",
2782            CreateSetupIntentPaymentMethodDataType::Bancontact => "bancontact",
2783            CreateSetupIntentPaymentMethodDataType::Blik => "blik",
2784            CreateSetupIntentPaymentMethodDataType::Boleto => "boleto",
2785            CreateSetupIntentPaymentMethodDataType::Cashapp => "cashapp",
2786            CreateSetupIntentPaymentMethodDataType::CustomerBalance => "customer_balance",
2787            CreateSetupIntentPaymentMethodDataType::Eps => "eps",
2788            CreateSetupIntentPaymentMethodDataType::Fpx => "fpx",
2789            CreateSetupIntentPaymentMethodDataType::Giropay => "giropay",
2790            CreateSetupIntentPaymentMethodDataType::Grabpay => "grabpay",
2791            CreateSetupIntentPaymentMethodDataType::Ideal => "ideal",
2792            CreateSetupIntentPaymentMethodDataType::Klarna => "klarna",
2793            CreateSetupIntentPaymentMethodDataType::Konbini => "konbini",
2794            CreateSetupIntentPaymentMethodDataType::Link => "link",
2795            CreateSetupIntentPaymentMethodDataType::Oxxo => "oxxo",
2796            CreateSetupIntentPaymentMethodDataType::P24 => "p24",
2797            CreateSetupIntentPaymentMethodDataType::Paynow => "paynow",
2798            CreateSetupIntentPaymentMethodDataType::Paypal => "paypal",
2799            CreateSetupIntentPaymentMethodDataType::Pix => "pix",
2800            CreateSetupIntentPaymentMethodDataType::Promptpay => "promptpay",
2801            CreateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay",
2802            CreateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit",
2803            CreateSetupIntentPaymentMethodDataType::Sofort => "sofort",
2804            CreateSetupIntentPaymentMethodDataType::Swish => "swish",
2805            CreateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account",
2806            CreateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay",
2807            CreateSetupIntentPaymentMethodDataType::Zip => "zip",
2808        }
2809    }
2810}
2811
2812impl AsRef<str> for CreateSetupIntentPaymentMethodDataType {
2813    fn as_ref(&self) -> &str {
2814        self.as_str()
2815    }
2816}
2817
2818impl std::fmt::Display for CreateSetupIntentPaymentMethodDataType {
2819    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2820        self.as_str().fmt(f)
2821    }
2822}
2823impl std::default::Default for CreateSetupIntentPaymentMethodDataType {
2824    fn default() -> Self {
2825        Self::AcssDebit
2826    }
2827}
2828
2829/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataUsBankAccount`'s `account_holder_type` field.
2830#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2831#[serde(rename_all = "snake_case")]
2832pub enum CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
2833    Company,
2834    Individual,
2835}
2836
2837impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
2838    pub fn as_str(self) -> &'static str {
2839        match self {
2840            CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company",
2841            CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => {
2842                "individual"
2843            }
2844        }
2845    }
2846}
2847
2848impl AsRef<str> for CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
2849    fn as_ref(&self) -> &str {
2850        self.as_str()
2851    }
2852}
2853
2854impl std::fmt::Display for CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
2855    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2856        self.as_str().fmt(f)
2857    }
2858}
2859impl std::default::Default for CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
2860    fn default() -> Self {
2861        Self::Company
2862    }
2863}
2864
2865/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataUsBankAccount`'s `account_type` field.
2866#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2867#[serde(rename_all = "snake_case")]
2868pub enum CreateSetupIntentPaymentMethodDataUsBankAccountAccountType {
2869    Checking,
2870    Savings,
2871}
2872
2873impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountType {
2874    pub fn as_str(self) -> &'static str {
2875        match self {
2876            CreateSetupIntentPaymentMethodDataUsBankAccountAccountType::Checking => "checking",
2877            CreateSetupIntentPaymentMethodDataUsBankAccountAccountType::Savings => "savings",
2878        }
2879    }
2880}
2881
2882impl AsRef<str> for CreateSetupIntentPaymentMethodDataUsBankAccountAccountType {
2883    fn as_ref(&self) -> &str {
2884        self.as_str()
2885    }
2886}
2887
2888impl std::fmt::Display for CreateSetupIntentPaymentMethodDataUsBankAccountAccountType {
2889    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2890        self.as_str().fmt(f)
2891    }
2892}
2893impl std::default::Default for CreateSetupIntentPaymentMethodDataUsBankAccountAccountType {
2894    fn default() -> Self {
2895        Self::Checking
2896    }
2897}
2898
2899/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `default_for` field.
2900#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2901#[serde(rename_all = "snake_case")]
2902pub enum CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
2903    Invoice,
2904    Subscription,
2905}
2906
2907impl CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
2908    pub fn as_str(self) -> &'static str {
2909        match self {
2910            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor::Invoice => "invoice",
2911            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor::Subscription => "subscription",
2912        }
2913    }
2914}
2915
2916impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
2917    fn as_ref(&self) -> &str {
2918        self.as_str()
2919    }
2920}
2921
2922impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
2923    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2924        self.as_str().fmt(f)
2925    }
2926}
2927impl std::default::Default
2928    for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor
2929{
2930    fn default() -> Self {
2931        Self::Invoice
2932    }
2933}
2934
2935/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `payment_schedule` field.
2936#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2937#[serde(rename_all = "snake_case")]
2938pub enum CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
2939    Combined,
2940    Interval,
2941    Sporadic,
2942}
2943
2944impl CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
2945    pub fn as_str(self) -> &'static str {
2946        match self {
2947            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Combined => "combined",
2948            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Interval => "interval",
2949            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Sporadic => "sporadic",
2950        }
2951    }
2952}
2953
2954impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
2955    fn as_ref(&self) -> &str {
2956        self.as_str()
2957    }
2958}
2959
2960impl std::fmt::Display
2961    for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
2962{
2963    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2964        self.as_str().fmt(f)
2965    }
2966}
2967impl std::default::Default
2968    for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
2969{
2970    fn default() -> Self {
2971        Self::Combined
2972    }
2973}
2974
2975/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field.
2976#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2977#[serde(rename_all = "snake_case")]
2978pub enum CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
2979    Business,
2980    Personal,
2981}
2982
2983impl CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
2984    pub fn as_str(self) -> &'static str {
2985        match self {
2986            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business",
2987            CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal",
2988        }
2989    }
2990}
2991
2992impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
2993    fn as_ref(&self) -> &str {
2994        self.as_str()
2995    }
2996}
2997
2998impl std::fmt::Display
2999    for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
3000{
3001    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3002        self.as_str().fmt(f)
3003    }
3004}
3005impl std::default::Default
3006    for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
3007{
3008    fn default() -> Self {
3009        Self::Business
3010    }
3011}
3012
3013/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
3014#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3015#[serde(rename_all = "snake_case")]
3016pub enum CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3017    Automatic,
3018    Instant,
3019    Microdeposits,
3020}
3021
3022impl CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3023    pub fn as_str(self) -> &'static str {
3024        match self {
3025            CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => {
3026                "automatic"
3027            }
3028            CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant",
3029            CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
3030                "microdeposits"
3031            }
3032        }
3033    }
3034}
3035
3036impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3037    fn as_ref(&self) -> &str {
3038        self.as_str()
3039    }
3040}
3041
3042impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3043    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3044        self.as_str().fmt(f)
3045    }
3046}
3047impl std::default::Default for CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3048    fn default() -> Self {
3049        Self::Automatic
3050    }
3051}
3052
3053/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
3054#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3055#[serde(rename_all = "snake_case")]
3056pub enum CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3057    Fixed,
3058    Maximum,
3059}
3060
3061impl CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3062    pub fn as_str(self) -> &'static str {
3063        match self {
3064            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
3065            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum",
3066        }
3067    }
3068}
3069
3070impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3071    fn as_ref(&self) -> &str {
3072        self.as_str()
3073    }
3074}
3075
3076impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3077    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3078        self.as_str().fmt(f)
3079    }
3080}
3081impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3082    fn default() -> Self {
3083        Self::Fixed
3084    }
3085}
3086
3087/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `interval` field.
3088#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3089#[serde(rename_all = "snake_case")]
3090pub enum CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3091    Day,
3092    Month,
3093    Sporadic,
3094    Week,
3095    Year,
3096}
3097
3098impl CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3099    pub fn as_str(self) -> &'static str {
3100        match self {
3101            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
3102            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
3103            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic",
3104            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
3105            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
3106        }
3107    }
3108}
3109
3110impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3111    fn as_ref(&self) -> &str {
3112        self.as_str()
3113    }
3114}
3115
3116impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3117    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3118        self.as_str().fmt(f)
3119    }
3120}
3121impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3122    fn default() -> Self {
3123        Self::Day
3124    }
3125}
3126
3127/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
3128#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3129#[serde(rename_all = "snake_case")]
3130pub enum CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3131    India,
3132}
3133
3134impl CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3135    pub fn as_str(self) -> &'static str {
3136        match self {
3137            CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india",
3138        }
3139    }
3140}
3141
3142impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3143    fn as_ref(&self) -> &str {
3144        self.as_str()
3145    }
3146}
3147
3148impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3149    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3150        self.as_str().fmt(f)
3151    }
3152}
3153impl std::default::Default
3154    for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes
3155{
3156    fn default() -> Self {
3157        Self::India
3158    }
3159}
3160
3161/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCard`'s `network` field.
3162#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3163#[serde(rename_all = "snake_case")]
3164pub enum CreateSetupIntentPaymentMethodOptionsCardNetwork {
3165    Amex,
3166    CartesBancaires,
3167    Diners,
3168    Discover,
3169    EftposAu,
3170    Interac,
3171    Jcb,
3172    Mastercard,
3173    Unionpay,
3174    Unknown,
3175    Visa,
3176}
3177
3178impl CreateSetupIntentPaymentMethodOptionsCardNetwork {
3179    pub fn as_str(self) -> &'static str {
3180        match self {
3181            CreateSetupIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
3182            CreateSetupIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires",
3183            CreateSetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
3184            CreateSetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
3185            CreateSetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
3186            CreateSetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
3187            CreateSetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
3188            CreateSetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
3189            CreateSetupIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
3190            CreateSetupIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
3191            CreateSetupIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
3192        }
3193    }
3194}
3195
3196impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardNetwork {
3197    fn as_ref(&self) -> &str {
3198        self.as_str()
3199    }
3200}
3201
3202impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardNetwork {
3203    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3204        self.as_str().fmt(f)
3205    }
3206}
3207impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardNetwork {
3208    fn default() -> Self {
3209        Self::Amex
3210    }
3211}
3212
3213/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
3214#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3215#[serde(rename_all = "snake_case")]
3216pub enum CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3217    Any,
3218    Automatic,
3219    Challenge,
3220}
3221
3222impl CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3223    pub fn as_str(self) -> &'static str {
3224        match self {
3225            CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
3226            CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic",
3227            CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge",
3228        }
3229    }
3230}
3231
3232impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3233    fn as_ref(&self) -> &str {
3234        self.as_str()
3235    }
3236}
3237
3238impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3239    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3240        self.as_str().fmt(f)
3241    }
3242}
3243impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3244    fn default() -> Self {
3245        Self::Any
3246    }
3247}
3248
3249/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field.
3250#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3251#[serde(rename_all = "snake_case")]
3252pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
3253    #[serde(rename = "A")]
3254    A,
3255    #[serde(rename = "C")]
3256    C,
3257    #[serde(rename = "I")]
3258    I,
3259    #[serde(rename = "N")]
3260    N,
3261    #[serde(rename = "R")]
3262    R,
3263    #[serde(rename = "U")]
3264    U,
3265    #[serde(rename = "Y")]
3266    Y,
3267}
3268
3269impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
3270    pub fn as_str(self) -> &'static str {
3271        match self {
3272            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A",
3273            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C",
3274            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I",
3275            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N",
3276            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R",
3277            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U",
3278            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y",
3279        }
3280    }
3281}
3282
3283impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
3284    fn as_ref(&self) -> &str {
3285        self.as_str()
3286    }
3287}
3288
3289impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
3290    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3291        self.as_str().fmt(f)
3292    }
3293}
3294impl std::default::Default
3295    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus
3296{
3297    fn default() -> Self {
3298        Self::A
3299    }
3300}
3301
3302/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field.
3303#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3304#[serde(rename_all = "snake_case")]
3305pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
3306    #[serde(rename = "01")]
3307    V01,
3308    #[serde(rename = "02")]
3309    V02,
3310    #[serde(rename = "05")]
3311    V05,
3312    #[serde(rename = "06")]
3313    V06,
3314    #[serde(rename = "07")]
3315    V07,
3316}
3317
3318impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
3319    pub fn as_str(self) -> &'static str {
3320        match self {
3321            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01",
3322            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02",
3323            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05",
3324            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06",
3325            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07",
3326        }
3327    }
3328}
3329
3330impl AsRef<str>
3331    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
3332{
3333    fn as_ref(&self) -> &str {
3334        self.as_str()
3335    }
3336}
3337
3338impl std::fmt::Display
3339    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
3340{
3341    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3342        self.as_str().fmt(f)
3343    }
3344}
3345impl std::default::Default
3346    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
3347{
3348    fn default() -> Self {
3349        Self::V01
3350    }
3351}
3352
3353/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field.
3354#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3355#[serde(rename_all = "snake_case")]
3356pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
3357{
3358    #[serde(rename = "0")]
3359    V0,
3360    #[serde(rename = "1")]
3361    V1,
3362    #[serde(rename = "2")]
3363    V2,
3364    #[serde(rename = "3")]
3365    V3,
3366    #[serde(rename = "4")]
3367    V4,
3368    #[serde(rename = "A")]
3369    A,
3370}
3371
3372impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo {
3373    pub fn as_str(self) -> &'static str {
3374        match self {
3375            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0",
3376            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1",
3377            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2",
3378            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3",
3379            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4",
3380            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A",
3381        }
3382    }
3383}
3384
3385impl AsRef<str>
3386    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
3387{
3388    fn as_ref(&self) -> &str {
3389        self.as_str()
3390    }
3391}
3392
3393impl std::fmt::Display
3394    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
3395{
3396    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3397        self.as_str().fmt(f)
3398    }
3399}
3400impl std::default::Default
3401    for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
3402{
3403    fn default() -> Self {
3404        Self::V0
3405    }
3406}
3407
3408/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field.
3409#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3410#[serde(rename_all = "snake_case")]
3411pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
3412    #[serde(rename = "1.0.2")]
3413    V1_0_2,
3414    #[serde(rename = "2.1.0")]
3415    V2_1_0,
3416    #[serde(rename = "2.2.0")]
3417    V2_2_0,
3418}
3419
3420impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
3421    pub fn as_str(self) -> &'static str {
3422        match self {
3423            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2",
3424            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0",
3425            CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0",
3426        }
3427    }
3428}
3429
3430impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
3431    fn as_ref(&self) -> &str {
3432        self.as_str()
3433    }
3434}
3435
3436impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
3437    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3438        self.as_str().fmt(f)
3439    }
3440}
3441impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
3442    fn default() -> Self {
3443        Self::V1_0_2
3444    }
3445}
3446
3447/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field.
3448#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3449#[serde(rename_all = "snake_case")]
3450pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
3451    Balances,
3452    Ownership,
3453    PaymentMethod,
3454    Transactions,
3455}
3456
3457impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
3458    pub fn as_str(self) -> &'static str {
3459        match self {
3460            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Balances => "balances",
3461            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Ownership => "ownership",
3462            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::PaymentMethod => "payment_method",
3463            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Transactions => "transactions",
3464        }
3465    }
3466}
3467
3468impl AsRef<str>
3469    for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
3470{
3471    fn as_ref(&self) -> &str {
3472        self.as_str()
3473    }
3474}
3475
3476impl std::fmt::Display
3477    for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
3478{
3479    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3480        self.as_str().fmt(f)
3481    }
3482}
3483impl std::default::Default
3484    for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
3485{
3486    fn default() -> Self {
3487        Self::Balances
3488    }
3489}
3490
3491/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field.
3492#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3493#[serde(rename_all = "snake_case")]
3494pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
3495    Balances,
3496    Transactions,
3497}
3498
3499impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
3500    pub fn as_str(self) -> &'static str {
3501        match self {
3502            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances",
3503            CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions",
3504        }
3505    }
3506}
3507
3508impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
3509    fn as_ref(&self) -> &str {
3510        self.as_str()
3511    }
3512}
3513
3514impl std::fmt::Display
3515    for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
3516{
3517    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3518        self.as_str().fmt(f)
3519    }
3520}
3521impl std::default::Default
3522    for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
3523{
3524    fn default() -> Self {
3525        Self::Balances
3526    }
3527}
3528
3529/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field.
3530#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3531#[serde(rename_all = "snake_case")]
3532pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
3533    Paper,
3534}
3535
3536impl CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
3537    pub fn as_str(self) -> &'static str {
3538        match self {
3539            CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper",
3540        }
3541    }
3542}
3543
3544impl AsRef<str>
3545    for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
3546{
3547    fn as_ref(&self) -> &str {
3548        self.as_str()
3549    }
3550}
3551
3552impl std::fmt::Display
3553    for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
3554{
3555    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3556        self.as_str().fmt(f)
3557    }
3558}
3559impl std::default::Default
3560    for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
3561{
3562    fn default() -> Self {
3563        Self::Paper
3564    }
3565}
3566
3567/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field.
3568#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3569#[serde(rename_all = "snake_case")]
3570pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
3571    Ach,
3572    UsDomesticWire,
3573}
3574
3575impl CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
3576    pub fn as_str(self) -> &'static str {
3577        match self {
3578            CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach",
3579            CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => {
3580                "us_domestic_wire"
3581            }
3582        }
3583    }
3584}
3585
3586impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
3587    fn as_ref(&self) -> &str {
3588        self.as_str()
3589    }
3590}
3591
3592impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
3593    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3594        self.as_str().fmt(f)
3595    }
3596}
3597impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
3598    fn default() -> Self {
3599        Self::Ach
3600    }
3601}
3602
3603/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
3604#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3605#[serde(rename_all = "snake_case")]
3606pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
3607    Automatic,
3608    Instant,
3609    Microdeposits,
3610}
3611
3612impl CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
3613    pub fn as_str(self) -> &'static str {
3614        match self {
3615            CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => {
3616                "automatic"
3617            }
3618            CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => {
3619                "instant"
3620            }
3621            CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => {
3622                "microdeposits"
3623            }
3624        }
3625    }
3626}
3627
3628impl AsRef<str> for CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
3629    fn as_ref(&self) -> &str {
3630        self.as_str()
3631    }
3632}
3633
3634impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
3635    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3636        self.as_str().fmt(f)
3637    }
3638}
3639impl std::default::Default
3640    for CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod
3641{
3642    fn default() -> Self {
3643        Self::Automatic
3644    }
3645}
3646
3647/// An enum representing the possible values of an `PaymentFlowsAutomaticPaymentMethodsSetupIntent`'s `allow_redirects` field.
3648#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3649#[serde(rename_all = "snake_case")]
3650pub enum PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects {
3651    Always,
3652    Never,
3653}
3654
3655impl PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects {
3656    pub fn as_str(self) -> &'static str {
3657        match self {
3658            PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects::Always => "always",
3659            PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects::Never => "never",
3660        }
3661    }
3662}
3663
3664impl AsRef<str> for PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects {
3665    fn as_ref(&self) -> &str {
3666        self.as_str()
3667    }
3668}
3669
3670impl std::fmt::Display for PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects {
3671    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3672        self.as_str().fmt(f)
3673    }
3674}
3675impl std::default::Default for PaymentFlowsAutomaticPaymentMethodsSetupIntentAllowRedirects {
3676    fn default() -> Self {
3677        Self::Always
3678    }
3679}
3680
3681/// An enum representing the possible values of an `SetupIntent`'s `cancellation_reason` field.
3682#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3683#[serde(rename_all = "snake_case")]
3684pub enum SetupIntentCancellationReason {
3685    Abandoned,
3686    Duplicate,
3687    RequestedByCustomer,
3688}
3689
3690impl SetupIntentCancellationReason {
3691    pub fn as_str(self) -> &'static str {
3692        match self {
3693            SetupIntentCancellationReason::Abandoned => "abandoned",
3694            SetupIntentCancellationReason::Duplicate => "duplicate",
3695            SetupIntentCancellationReason::RequestedByCustomer => "requested_by_customer",
3696        }
3697    }
3698}
3699
3700impl AsRef<str> for SetupIntentCancellationReason {
3701    fn as_ref(&self) -> &str {
3702        self.as_str()
3703    }
3704}
3705
3706impl std::fmt::Display for SetupIntentCancellationReason {
3707    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3708        self.as_str().fmt(f)
3709    }
3710}
3711impl std::default::Default for SetupIntentCancellationReason {
3712    fn default() -> Self {
3713        Self::Abandoned
3714    }
3715}
3716
3717/// An enum representing the possible values of an `SetupIntent`'s `flow_directions` field.
3718#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3719#[serde(rename_all = "snake_case")]
3720pub enum SetupIntentFlowDirections {
3721    Inbound,
3722    Outbound,
3723}
3724
3725impl SetupIntentFlowDirections {
3726    pub fn as_str(self) -> &'static str {
3727        match self {
3728            SetupIntentFlowDirections::Inbound => "inbound",
3729            SetupIntentFlowDirections::Outbound => "outbound",
3730        }
3731    }
3732}
3733
3734impl AsRef<str> for SetupIntentFlowDirections {
3735    fn as_ref(&self) -> &str {
3736        self.as_str()
3737    }
3738}
3739
3740impl std::fmt::Display for SetupIntentFlowDirections {
3741    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3742        self.as_str().fmt(f)
3743    }
3744}
3745impl std::default::Default for SetupIntentFlowDirections {
3746    fn default() -> Self {
3747        Self::Inbound
3748    }
3749}
3750
3751/// An enum representing the possible values of an `SetupIntentNextActionVerifyWithMicrodeposits`'s `microdeposit_type` field.
3752#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3753#[serde(rename_all = "snake_case")]
3754pub enum SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType {
3755    Amounts,
3756    DescriptorCode,
3757}
3758
3759impl SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType {
3760    pub fn as_str(self) -> &'static str {
3761        match self {
3762            SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts",
3763            SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => {
3764                "descriptor_code"
3765            }
3766        }
3767    }
3768}
3769
3770impl AsRef<str> for SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType {
3771    fn as_ref(&self) -> &str {
3772        self.as_str()
3773    }
3774}
3775
3776impl std::fmt::Display for SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType {
3777    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3778        self.as_str().fmt(f)
3779    }
3780}
3781impl std::default::Default for SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType {
3782    fn default() -> Self {
3783        Self::Amounts
3784    }
3785}
3786
3787/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
3788#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3789#[serde(rename_all = "snake_case")]
3790pub enum SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3791    Automatic,
3792    Instant,
3793    Microdeposits,
3794}
3795
3796impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3797    pub fn as_str(self) -> &'static str {
3798        match self {
3799            SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic",
3800            SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant",
3801            SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
3802                "microdeposits"
3803            }
3804        }
3805    }
3806}
3807
3808impl AsRef<str> for SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3809    fn as_ref(&self) -> &str {
3810        self.as_str()
3811    }
3812}
3813
3814impl std::fmt::Display for SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3815    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3816        self.as_str().fmt(f)
3817    }
3818}
3819impl std::default::Default for SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
3820    fn default() -> Self {
3821        Self::Automatic
3822    }
3823}
3824
3825/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
3826#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3827#[serde(rename_all = "snake_case")]
3828pub enum SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3829    Fixed,
3830    Maximum,
3831}
3832
3833impl SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3834    pub fn as_str(self) -> &'static str {
3835        match self {
3836            SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
3837            SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum",
3838        }
3839    }
3840}
3841
3842impl AsRef<str> for SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3843    fn as_ref(&self) -> &str {
3844        self.as_str()
3845    }
3846}
3847
3848impl std::fmt::Display for SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3849    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3850        self.as_str().fmt(f)
3851    }
3852}
3853impl std::default::Default for SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
3854    fn default() -> Self {
3855        Self::Fixed
3856    }
3857}
3858
3859/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsCardMandateOptions`'s `interval` field.
3860#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3861#[serde(rename_all = "snake_case")]
3862pub enum SetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3863    Day,
3864    Month,
3865    Sporadic,
3866    Week,
3867    Year,
3868}
3869
3870impl SetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3871    pub fn as_str(self) -> &'static str {
3872        match self {
3873            SetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
3874            SetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
3875            SetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic",
3876            SetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
3877            SetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
3878        }
3879    }
3880}
3881
3882impl AsRef<str> for SetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3883    fn as_ref(&self) -> &str {
3884        self.as_str()
3885    }
3886}
3887
3888impl std::fmt::Display for SetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3889    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3890        self.as_str().fmt(f)
3891    }
3892}
3893impl std::default::Default for SetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
3894    fn default() -> Self {
3895        Self::Day
3896    }
3897}
3898
3899/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
3900#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3901#[serde(rename_all = "snake_case")]
3902pub enum SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3903    India,
3904}
3905
3906impl SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3907    pub fn as_str(self) -> &'static str {
3908        match self {
3909            SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india",
3910        }
3911    }
3912}
3913
3914impl AsRef<str> for SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3915    fn as_ref(&self) -> &str {
3916        self.as_str()
3917    }
3918}
3919
3920impl std::fmt::Display for SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3921    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3922        self.as_str().fmt(f)
3923    }
3924}
3925impl std::default::Default for SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
3926    fn default() -> Self {
3927        Self::India
3928    }
3929}
3930
3931/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsCard`'s `network` field.
3932#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3933#[serde(rename_all = "snake_case")]
3934pub enum SetupIntentPaymentMethodOptionsCardNetwork {
3935    Amex,
3936    CartesBancaires,
3937    Diners,
3938    Discover,
3939    EftposAu,
3940    Interac,
3941    Jcb,
3942    Mastercard,
3943    Unionpay,
3944    Unknown,
3945    Visa,
3946}
3947
3948impl SetupIntentPaymentMethodOptionsCardNetwork {
3949    pub fn as_str(self) -> &'static str {
3950        match self {
3951            SetupIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
3952            SetupIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires",
3953            SetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
3954            SetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
3955            SetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
3956            SetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
3957            SetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
3958            SetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
3959            SetupIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
3960            SetupIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
3961            SetupIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
3962        }
3963    }
3964}
3965
3966impl AsRef<str> for SetupIntentPaymentMethodOptionsCardNetwork {
3967    fn as_ref(&self) -> &str {
3968        self.as_str()
3969    }
3970}
3971
3972impl std::fmt::Display for SetupIntentPaymentMethodOptionsCardNetwork {
3973    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3974        self.as_str().fmt(f)
3975    }
3976}
3977impl std::default::Default for SetupIntentPaymentMethodOptionsCardNetwork {
3978    fn default() -> Self {
3979        Self::Amex
3980    }
3981}
3982
3983/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
3984#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3985#[serde(rename_all = "snake_case")]
3986pub enum SetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3987    Any,
3988    Automatic,
3989    Challenge,
3990}
3991
3992impl SetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
3993    pub fn as_str(self) -> &'static str {
3994        match self {
3995            SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
3996            SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic",
3997            SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge",
3998        }
3999    }
4000}
4001
4002impl AsRef<str> for SetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
4003    fn as_ref(&self) -> &str {
4004        self.as_str()
4005    }
4006}
4007
4008impl std::fmt::Display for SetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
4009    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4010        self.as_str().fmt(f)
4011    }
4012}
4013impl std::default::Default for SetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
4014    fn default() -> Self {
4015        Self::Any
4016    }
4017}
4018
4019/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit`'s `default_for` field.
4020#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4021#[serde(rename_all = "snake_case")]
4022pub enum SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor {
4023    Invoice,
4024    Subscription,
4025}
4026
4027impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor {
4028    pub fn as_str(self) -> &'static str {
4029        match self {
4030            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice",
4031            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => {
4032                "subscription"
4033            }
4034        }
4035    }
4036}
4037
4038impl AsRef<str> for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor {
4039    fn as_ref(&self) -> &str {
4040        self.as_str()
4041    }
4042}
4043
4044impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor {
4045    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4046        self.as_str().fmt(f)
4047    }
4048}
4049impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor {
4050    fn default() -> Self {
4051        Self::Invoice
4052    }
4053}
4054
4055/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit`'s `payment_schedule` field.
4056#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4057#[serde(rename_all = "snake_case")]
4058pub enum SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
4059    Combined,
4060    Interval,
4061    Sporadic,
4062}
4063
4064impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
4065    pub fn as_str(self) -> &'static str {
4066        match self {
4067            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => {
4068                "combined"
4069            }
4070            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => {
4071                "interval"
4072            }
4073            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => {
4074                "sporadic"
4075            }
4076        }
4077    }
4078}
4079
4080impl AsRef<str> for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
4081    fn as_ref(&self) -> &str {
4082        self.as_str()
4083    }
4084}
4085
4086impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
4087    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4088        self.as_str().fmt(f)
4089    }
4090}
4091impl std::default::Default
4092    for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule
4093{
4094    fn default() -> Self {
4095        Self::Combined
4096    }
4097}
4098
4099/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit`'s `transaction_type` field.
4100#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4101#[serde(rename_all = "snake_case")]
4102pub enum SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
4103    Business,
4104    Personal,
4105}
4106
4107impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
4108    pub fn as_str(self) -> &'static str {
4109        match self {
4110            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => {
4111                "business"
4112            }
4113            SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => {
4114                "personal"
4115            }
4116        }
4117    }
4118}
4119
4120impl AsRef<str> for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
4121    fn as_ref(&self) -> &str {
4122        self.as_str()
4123    }
4124}
4125
4126impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
4127    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4128        self.as_str().fmt(f)
4129    }
4130}
4131impl std::default::Default
4132    for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType
4133{
4134    fn default() -> Self {
4135        Self::Business
4136    }
4137}
4138
4139/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
4140#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4141#[serde(rename_all = "snake_case")]
4142pub enum SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
4143    Automatic,
4144    Instant,
4145    Microdeposits,
4146}
4147
4148impl SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
4149    pub fn as_str(self) -> &'static str {
4150        match self {
4151            SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => {
4152                "automatic"
4153            }
4154            SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant",
4155            SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => {
4156                "microdeposits"
4157            }
4158        }
4159    }
4160}
4161
4162impl AsRef<str> for SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
4163    fn as_ref(&self) -> &str {
4164        self.as_str()
4165    }
4166}
4167
4168impl std::fmt::Display for SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
4169    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4170        self.as_str().fmt(f)
4171    }
4172}
4173impl std::default::Default for SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
4174    fn default() -> Self {
4175        Self::Automatic
4176    }
4177}
4178
4179/// An enum representing the possible values of an `SetupIntent`'s `status` field.
4180#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4181#[serde(rename_all = "snake_case")]
4182pub enum SetupIntentStatus {
4183    Canceled,
4184    Processing,
4185    RequiresAction,
4186    RequiresConfirmation,
4187    RequiresPaymentMethod,
4188    Succeeded,
4189}
4190
4191impl SetupIntentStatus {
4192    pub fn as_str(self) -> &'static str {
4193        match self {
4194            SetupIntentStatus::Canceled => "canceled",
4195            SetupIntentStatus::Processing => "processing",
4196            SetupIntentStatus::RequiresAction => "requires_action",
4197            SetupIntentStatus::RequiresConfirmation => "requires_confirmation",
4198            SetupIntentStatus::RequiresPaymentMethod => "requires_payment_method",
4199            SetupIntentStatus::Succeeded => "succeeded",
4200        }
4201    }
4202}
4203
4204impl AsRef<str> for SetupIntentStatus {
4205    fn as_ref(&self) -> &str {
4206        self.as_str()
4207    }
4208}
4209
4210impl std::fmt::Display for SetupIntentStatus {
4211    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4212        self.as_str().fmt(f)
4213    }
4214}
4215impl std::default::Default for SetupIntentStatus {
4216    fn default() -> Self {
4217        Self::Canceled
4218    }
4219}
4220
4221/// An enum representing the possible values of an `UpdateSetupIntent`'s `flow_directions` field.
4222#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4223#[serde(rename_all = "snake_case")]
4224pub enum UpdateSetupIntentFlowDirections {
4225    Inbound,
4226    Outbound,
4227}
4228
4229impl UpdateSetupIntentFlowDirections {
4230    pub fn as_str(self) -> &'static str {
4231        match self {
4232            UpdateSetupIntentFlowDirections::Inbound => "inbound",
4233            UpdateSetupIntentFlowDirections::Outbound => "outbound",
4234        }
4235    }
4236}
4237
4238impl AsRef<str> for UpdateSetupIntentFlowDirections {
4239    fn as_ref(&self) -> &str {
4240        self.as_str()
4241    }
4242}
4243
4244impl std::fmt::Display for UpdateSetupIntentFlowDirections {
4245    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4246        self.as_str().fmt(f)
4247    }
4248}
4249impl std::default::Default for UpdateSetupIntentFlowDirections {
4250    fn default() -> Self {
4251        Self::Inbound
4252    }
4253}
4254
4255/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataEps`'s `bank` field.
4256#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4257#[serde(rename_all = "snake_case")]
4258pub enum UpdateSetupIntentPaymentMethodDataEpsBank {
4259    ArzteUndApothekerBank,
4260    AustrianAnadiBankAg,
4261    BankAustria,
4262    BankhausCarlSpangler,
4263    BankhausSchelhammerUndSchatteraAg,
4264    BawagPskAg,
4265    BksBankAg,
4266    BrullKallmusBankAg,
4267    BtvVierLanderBank,
4268    CapitalBankGraweGruppeAg,
4269    DeutscheBankAg,
4270    Dolomitenbank,
4271    EasybankAg,
4272    ErsteBankUndSparkassen,
4273    HypoAlpeadriabankInternationalAg,
4274    HypoBankBurgenlandAktiengesellschaft,
4275    HypoNoeLbFurNiederosterreichUWien,
4276    HypoOberosterreichSalzburgSteiermark,
4277    HypoTirolBankAg,
4278    HypoVorarlbergBankAg,
4279    MarchfelderBank,
4280    OberbankAg,
4281    RaiffeisenBankengruppeOsterreich,
4282    SchoellerbankAg,
4283    SpardaBankWien,
4284    VolksbankGruppe,
4285    VolkskreditbankAg,
4286    VrBankBraunau,
4287}
4288
4289impl UpdateSetupIntentPaymentMethodDataEpsBank {
4290    pub fn as_str(self) -> &'static str {
4291        match self {
4292            UpdateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => {
4293                "arzte_und_apotheker_bank"
4294            }
4295            UpdateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => {
4296                "austrian_anadi_bank_ag"
4297            }
4298            UpdateSetupIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria",
4299            UpdateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => {
4300                "bankhaus_carl_spangler"
4301            }
4302            UpdateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => {
4303                "bankhaus_schelhammer_und_schattera_ag"
4304            }
4305            UpdateSetupIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag",
4306            UpdateSetupIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag",
4307            UpdateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => {
4308                "brull_kallmus_bank_ag"
4309            }
4310            UpdateSetupIntentPaymentMethodDataEpsBank::BtvVierLanderBank => "btv_vier_lander_bank",
4311            UpdateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => {
4312                "capital_bank_grawe_gruppe_ag"
4313            }
4314            UpdateSetupIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag",
4315            UpdateSetupIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank",
4316            UpdateSetupIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag",
4317            UpdateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => {
4318                "erste_bank_und_sparkassen"
4319            }
4320            UpdateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => {
4321                "hypo_alpeadriabank_international_ag"
4322            }
4323            UpdateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => {
4324                "hypo_bank_burgenland_aktiengesellschaft"
4325            }
4326            UpdateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => {
4327                "hypo_noe_lb_fur_niederosterreich_u_wien"
4328            }
4329            UpdateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => {
4330                "hypo_oberosterreich_salzburg_steiermark"
4331            }
4332            UpdateSetupIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag",
4333            UpdateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => {
4334                "hypo_vorarlberg_bank_ag"
4335            }
4336            UpdateSetupIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank",
4337            UpdateSetupIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag",
4338            UpdateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => {
4339                "raiffeisen_bankengruppe_osterreich"
4340            }
4341            UpdateSetupIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag",
4342            UpdateSetupIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien",
4343            UpdateSetupIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe",
4344            UpdateSetupIntentPaymentMethodDataEpsBank::VolkskreditbankAg => "volkskreditbank_ag",
4345            UpdateSetupIntentPaymentMethodDataEpsBank::VrBankBraunau => "vr_bank_braunau",
4346        }
4347    }
4348}
4349
4350impl AsRef<str> for UpdateSetupIntentPaymentMethodDataEpsBank {
4351    fn as_ref(&self) -> &str {
4352        self.as_str()
4353    }
4354}
4355
4356impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataEpsBank {
4357    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4358        self.as_str().fmt(f)
4359    }
4360}
4361impl std::default::Default for UpdateSetupIntentPaymentMethodDataEpsBank {
4362    fn default() -> Self {
4363        Self::ArzteUndApothekerBank
4364    }
4365}
4366
4367/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataFpx`'s `account_holder_type` field.
4368#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4369#[serde(rename_all = "snake_case")]
4370pub enum UpdateSetupIntentPaymentMethodDataFpxAccountHolderType {
4371    Company,
4372    Individual,
4373}
4374
4375impl UpdateSetupIntentPaymentMethodDataFpxAccountHolderType {
4376    pub fn as_str(self) -> &'static str {
4377        match self {
4378            UpdateSetupIntentPaymentMethodDataFpxAccountHolderType::Company => "company",
4379            UpdateSetupIntentPaymentMethodDataFpxAccountHolderType::Individual => "individual",
4380        }
4381    }
4382}
4383
4384impl AsRef<str> for UpdateSetupIntentPaymentMethodDataFpxAccountHolderType {
4385    fn as_ref(&self) -> &str {
4386        self.as_str()
4387    }
4388}
4389
4390impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataFpxAccountHolderType {
4391    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4392        self.as_str().fmt(f)
4393    }
4394}
4395impl std::default::Default for UpdateSetupIntentPaymentMethodDataFpxAccountHolderType {
4396    fn default() -> Self {
4397        Self::Company
4398    }
4399}
4400
4401/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataFpx`'s `bank` field.
4402#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4403#[serde(rename_all = "snake_case")]
4404pub enum UpdateSetupIntentPaymentMethodDataFpxBank {
4405    AffinBank,
4406    Agrobank,
4407    AllianceBank,
4408    Ambank,
4409    BankIslam,
4410    BankMuamalat,
4411    BankOfChina,
4412    BankRakyat,
4413    Bsn,
4414    Cimb,
4415    DeutscheBank,
4416    HongLeongBank,
4417    Hsbc,
4418    Kfh,
4419    Maybank2e,
4420    Maybank2u,
4421    Ocbc,
4422    PbEnterprise,
4423    PublicBank,
4424    Rhb,
4425    StandardChartered,
4426    Uob,
4427}
4428
4429impl UpdateSetupIntentPaymentMethodDataFpxBank {
4430    pub fn as_str(self) -> &'static str {
4431        match self {
4432            UpdateSetupIntentPaymentMethodDataFpxBank::AffinBank => "affin_bank",
4433            UpdateSetupIntentPaymentMethodDataFpxBank::Agrobank => "agrobank",
4434            UpdateSetupIntentPaymentMethodDataFpxBank::AllianceBank => "alliance_bank",
4435            UpdateSetupIntentPaymentMethodDataFpxBank::Ambank => "ambank",
4436            UpdateSetupIntentPaymentMethodDataFpxBank::BankIslam => "bank_islam",
4437            UpdateSetupIntentPaymentMethodDataFpxBank::BankMuamalat => "bank_muamalat",
4438            UpdateSetupIntentPaymentMethodDataFpxBank::BankOfChina => "bank_of_china",
4439            UpdateSetupIntentPaymentMethodDataFpxBank::BankRakyat => "bank_rakyat",
4440            UpdateSetupIntentPaymentMethodDataFpxBank::Bsn => "bsn",
4441            UpdateSetupIntentPaymentMethodDataFpxBank::Cimb => "cimb",
4442            UpdateSetupIntentPaymentMethodDataFpxBank::DeutscheBank => "deutsche_bank",
4443            UpdateSetupIntentPaymentMethodDataFpxBank::HongLeongBank => "hong_leong_bank",
4444            UpdateSetupIntentPaymentMethodDataFpxBank::Hsbc => "hsbc",
4445            UpdateSetupIntentPaymentMethodDataFpxBank::Kfh => "kfh",
4446            UpdateSetupIntentPaymentMethodDataFpxBank::Maybank2e => "maybank2e",
4447            UpdateSetupIntentPaymentMethodDataFpxBank::Maybank2u => "maybank2u",
4448            UpdateSetupIntentPaymentMethodDataFpxBank::Ocbc => "ocbc",
4449            UpdateSetupIntentPaymentMethodDataFpxBank::PbEnterprise => "pb_enterprise",
4450            UpdateSetupIntentPaymentMethodDataFpxBank::PublicBank => "public_bank",
4451            UpdateSetupIntentPaymentMethodDataFpxBank::Rhb => "rhb",
4452            UpdateSetupIntentPaymentMethodDataFpxBank::StandardChartered => "standard_chartered",
4453            UpdateSetupIntentPaymentMethodDataFpxBank::Uob => "uob",
4454        }
4455    }
4456}
4457
4458impl AsRef<str> for UpdateSetupIntentPaymentMethodDataFpxBank {
4459    fn as_ref(&self) -> &str {
4460        self.as_str()
4461    }
4462}
4463
4464impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataFpxBank {
4465    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4466        self.as_str().fmt(f)
4467    }
4468}
4469impl std::default::Default for UpdateSetupIntentPaymentMethodDataFpxBank {
4470    fn default() -> Self {
4471        Self::AffinBank
4472    }
4473}
4474
4475/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataIdeal`'s `bank` field.
4476#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4477#[serde(rename_all = "snake_case")]
4478pub enum UpdateSetupIntentPaymentMethodDataIdealBank {
4479    AbnAmro,
4480    AsnBank,
4481    Bunq,
4482    Handelsbanken,
4483    Ing,
4484    Knab,
4485    Moneyou,
4486    N26,
4487    Nn,
4488    Rabobank,
4489    Regiobank,
4490    Revolut,
4491    SnsBank,
4492    TriodosBank,
4493    VanLanschot,
4494    Yoursafe,
4495}
4496
4497impl UpdateSetupIntentPaymentMethodDataIdealBank {
4498    pub fn as_str(self) -> &'static str {
4499        match self {
4500            UpdateSetupIntentPaymentMethodDataIdealBank::AbnAmro => "abn_amro",
4501            UpdateSetupIntentPaymentMethodDataIdealBank::AsnBank => "asn_bank",
4502            UpdateSetupIntentPaymentMethodDataIdealBank::Bunq => "bunq",
4503            UpdateSetupIntentPaymentMethodDataIdealBank::Handelsbanken => "handelsbanken",
4504            UpdateSetupIntentPaymentMethodDataIdealBank::Ing => "ing",
4505            UpdateSetupIntentPaymentMethodDataIdealBank::Knab => "knab",
4506            UpdateSetupIntentPaymentMethodDataIdealBank::Moneyou => "moneyou",
4507            UpdateSetupIntentPaymentMethodDataIdealBank::N26 => "n26",
4508            UpdateSetupIntentPaymentMethodDataIdealBank::Nn => "nn",
4509            UpdateSetupIntentPaymentMethodDataIdealBank::Rabobank => "rabobank",
4510            UpdateSetupIntentPaymentMethodDataIdealBank::Regiobank => "regiobank",
4511            UpdateSetupIntentPaymentMethodDataIdealBank::Revolut => "revolut",
4512            UpdateSetupIntentPaymentMethodDataIdealBank::SnsBank => "sns_bank",
4513            UpdateSetupIntentPaymentMethodDataIdealBank::TriodosBank => "triodos_bank",
4514            UpdateSetupIntentPaymentMethodDataIdealBank::VanLanschot => "van_lanschot",
4515            UpdateSetupIntentPaymentMethodDataIdealBank::Yoursafe => "yoursafe",
4516        }
4517    }
4518}
4519
4520impl AsRef<str> for UpdateSetupIntentPaymentMethodDataIdealBank {
4521    fn as_ref(&self) -> &str {
4522        self.as_str()
4523    }
4524}
4525
4526impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataIdealBank {
4527    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4528        self.as_str().fmt(f)
4529    }
4530}
4531impl std::default::Default for UpdateSetupIntentPaymentMethodDataIdealBank {
4532    fn default() -> Self {
4533        Self::AbnAmro
4534    }
4535}
4536
4537/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataP24`'s `bank` field.
4538#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4539#[serde(rename_all = "snake_case")]
4540pub enum UpdateSetupIntentPaymentMethodDataP24Bank {
4541    AliorBank,
4542    BankMillennium,
4543    BankNowyBfgSa,
4544    BankPekaoSa,
4545    BankiSpbdzielcze,
4546    Blik,
4547    BnpParibas,
4548    Boz,
4549    CitiHandlowy,
4550    CreditAgricole,
4551    Envelobank,
4552    EtransferPocztowy24,
4553    GetinBank,
4554    Ideabank,
4555    Ing,
4556    Inteligo,
4557    MbankMtransfer,
4558    NestPrzelew,
4559    NoblePay,
4560    PbacZIpko,
4561    PlusBank,
4562    SantanderPrzelew24,
4563    TmobileUsbugiBankowe,
4564    ToyotaBank,
4565    Velobank,
4566    VolkswagenBank,
4567}
4568
4569impl UpdateSetupIntentPaymentMethodDataP24Bank {
4570    pub fn as_str(self) -> &'static str {
4571        match self {
4572            UpdateSetupIntentPaymentMethodDataP24Bank::AliorBank => "alior_bank",
4573            UpdateSetupIntentPaymentMethodDataP24Bank::BankMillennium => "bank_millennium",
4574            UpdateSetupIntentPaymentMethodDataP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa",
4575            UpdateSetupIntentPaymentMethodDataP24Bank::BankPekaoSa => "bank_pekao_sa",
4576            UpdateSetupIntentPaymentMethodDataP24Bank::BankiSpbdzielcze => "banki_spbdzielcze",
4577            UpdateSetupIntentPaymentMethodDataP24Bank::Blik => "blik",
4578            UpdateSetupIntentPaymentMethodDataP24Bank::BnpParibas => "bnp_paribas",
4579            UpdateSetupIntentPaymentMethodDataP24Bank::Boz => "boz",
4580            UpdateSetupIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy",
4581            UpdateSetupIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole",
4582            UpdateSetupIntentPaymentMethodDataP24Bank::Envelobank => "envelobank",
4583            UpdateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => {
4584                "etransfer_pocztowy24"
4585            }
4586            UpdateSetupIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank",
4587            UpdateSetupIntentPaymentMethodDataP24Bank::Ideabank => "ideabank",
4588            UpdateSetupIntentPaymentMethodDataP24Bank::Ing => "ing",
4589            UpdateSetupIntentPaymentMethodDataP24Bank::Inteligo => "inteligo",
4590            UpdateSetupIntentPaymentMethodDataP24Bank::MbankMtransfer => "mbank_mtransfer",
4591            UpdateSetupIntentPaymentMethodDataP24Bank::NestPrzelew => "nest_przelew",
4592            UpdateSetupIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay",
4593            UpdateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko",
4594            UpdateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank",
4595            UpdateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24",
4596            UpdateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => {
4597                "tmobile_usbugi_bankowe"
4598            }
4599            UpdateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
4600            UpdateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank",
4601            UpdateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
4602        }
4603    }
4604}
4605
4606impl AsRef<str> for UpdateSetupIntentPaymentMethodDataP24Bank {
4607    fn as_ref(&self) -> &str {
4608        self.as_str()
4609    }
4610}
4611
4612impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataP24Bank {
4613    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4614        self.as_str().fmt(f)
4615    }
4616}
4617impl std::default::Default for UpdateSetupIntentPaymentMethodDataP24Bank {
4618    fn default() -> Self {
4619        Self::AliorBank
4620    }
4621}
4622
4623/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataSofort`'s `country` field.
4624#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4625#[serde(rename_all = "snake_case")]
4626pub enum UpdateSetupIntentPaymentMethodDataSofortCountry {
4627    #[serde(rename = "AT")]
4628    At,
4629    #[serde(rename = "BE")]
4630    Be,
4631    #[serde(rename = "DE")]
4632    De,
4633    #[serde(rename = "ES")]
4634    Es,
4635    #[serde(rename = "IT")]
4636    It,
4637    #[serde(rename = "NL")]
4638    Nl,
4639}
4640
4641impl UpdateSetupIntentPaymentMethodDataSofortCountry {
4642    pub fn as_str(self) -> &'static str {
4643        match self {
4644            UpdateSetupIntentPaymentMethodDataSofortCountry::At => "AT",
4645            UpdateSetupIntentPaymentMethodDataSofortCountry::Be => "BE",
4646            UpdateSetupIntentPaymentMethodDataSofortCountry::De => "DE",
4647            UpdateSetupIntentPaymentMethodDataSofortCountry::Es => "ES",
4648            UpdateSetupIntentPaymentMethodDataSofortCountry::It => "IT",
4649            UpdateSetupIntentPaymentMethodDataSofortCountry::Nl => "NL",
4650        }
4651    }
4652}
4653
4654impl AsRef<str> for UpdateSetupIntentPaymentMethodDataSofortCountry {
4655    fn as_ref(&self) -> &str {
4656        self.as_str()
4657    }
4658}
4659
4660impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataSofortCountry {
4661    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4662        self.as_str().fmt(f)
4663    }
4664}
4665impl std::default::Default for UpdateSetupIntentPaymentMethodDataSofortCountry {
4666    fn default() -> Self {
4667        Self::At
4668    }
4669}
4670
4671/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodData`'s `type` field.
4672#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4673#[serde(rename_all = "snake_case")]
4674pub enum UpdateSetupIntentPaymentMethodDataType {
4675    AcssDebit,
4676    Affirm,
4677    AfterpayClearpay,
4678    Alipay,
4679    AuBecsDebit,
4680    BacsDebit,
4681    Bancontact,
4682    Blik,
4683    Boleto,
4684    Cashapp,
4685    CustomerBalance,
4686    Eps,
4687    Fpx,
4688    Giropay,
4689    Grabpay,
4690    Ideal,
4691    Klarna,
4692    Konbini,
4693    Link,
4694    Oxxo,
4695    P24,
4696    Paynow,
4697    Paypal,
4698    Pix,
4699    Promptpay,
4700    RevolutPay,
4701    SepaDebit,
4702    Sofort,
4703    Swish,
4704    UsBankAccount,
4705    WechatPay,
4706    Zip,
4707}
4708
4709impl UpdateSetupIntentPaymentMethodDataType {
4710    pub fn as_str(self) -> &'static str {
4711        match self {
4712            UpdateSetupIntentPaymentMethodDataType::AcssDebit => "acss_debit",
4713            UpdateSetupIntentPaymentMethodDataType::Affirm => "affirm",
4714            UpdateSetupIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay",
4715            UpdateSetupIntentPaymentMethodDataType::Alipay => "alipay",
4716            UpdateSetupIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit",
4717            UpdateSetupIntentPaymentMethodDataType::BacsDebit => "bacs_debit",
4718            UpdateSetupIntentPaymentMethodDataType::Bancontact => "bancontact",
4719            UpdateSetupIntentPaymentMethodDataType::Blik => "blik",
4720            UpdateSetupIntentPaymentMethodDataType::Boleto => "boleto",
4721            UpdateSetupIntentPaymentMethodDataType::Cashapp => "cashapp",
4722            UpdateSetupIntentPaymentMethodDataType::CustomerBalance => "customer_balance",
4723            UpdateSetupIntentPaymentMethodDataType::Eps => "eps",
4724            UpdateSetupIntentPaymentMethodDataType::Fpx => "fpx",
4725            UpdateSetupIntentPaymentMethodDataType::Giropay => "giropay",
4726            UpdateSetupIntentPaymentMethodDataType::Grabpay => "grabpay",
4727            UpdateSetupIntentPaymentMethodDataType::Ideal => "ideal",
4728            UpdateSetupIntentPaymentMethodDataType::Klarna => "klarna",
4729            UpdateSetupIntentPaymentMethodDataType::Konbini => "konbini",
4730            UpdateSetupIntentPaymentMethodDataType::Link => "link",
4731            UpdateSetupIntentPaymentMethodDataType::Oxxo => "oxxo",
4732            UpdateSetupIntentPaymentMethodDataType::P24 => "p24",
4733            UpdateSetupIntentPaymentMethodDataType::Paynow => "paynow",
4734            UpdateSetupIntentPaymentMethodDataType::Paypal => "paypal",
4735            UpdateSetupIntentPaymentMethodDataType::Pix => "pix",
4736            UpdateSetupIntentPaymentMethodDataType::Promptpay => "promptpay",
4737            UpdateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay",
4738            UpdateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit",
4739            UpdateSetupIntentPaymentMethodDataType::Sofort => "sofort",
4740            UpdateSetupIntentPaymentMethodDataType::Swish => "swish",
4741            UpdateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account",
4742            UpdateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay",
4743            UpdateSetupIntentPaymentMethodDataType::Zip => "zip",
4744        }
4745    }
4746}
4747
4748impl AsRef<str> for UpdateSetupIntentPaymentMethodDataType {
4749    fn as_ref(&self) -> &str {
4750        self.as_str()
4751    }
4752}
4753
4754impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataType {
4755    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4756        self.as_str().fmt(f)
4757    }
4758}
4759impl std::default::Default for UpdateSetupIntentPaymentMethodDataType {
4760    fn default() -> Self {
4761        Self::AcssDebit
4762    }
4763}
4764
4765/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataUsBankAccount`'s `account_holder_type` field.
4766#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4767#[serde(rename_all = "snake_case")]
4768pub enum UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
4769    Company,
4770    Individual,
4771}
4772
4773impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
4774    pub fn as_str(self) -> &'static str {
4775        match self {
4776            UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company",
4777            UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => {
4778                "individual"
4779            }
4780        }
4781    }
4782}
4783
4784impl AsRef<str> for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
4785    fn as_ref(&self) -> &str {
4786        self.as_str()
4787    }
4788}
4789
4790impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
4791    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4792        self.as_str().fmt(f)
4793    }
4794}
4795impl std::default::Default for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType {
4796    fn default() -> Self {
4797        Self::Company
4798    }
4799}
4800
4801/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataUsBankAccount`'s `account_type` field.
4802#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4803#[serde(rename_all = "snake_case")]
4804pub enum UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType {
4805    Checking,
4806    Savings,
4807}
4808
4809impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType {
4810    pub fn as_str(self) -> &'static str {
4811        match self {
4812            UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType::Checking => "checking",
4813            UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType::Savings => "savings",
4814        }
4815    }
4816}
4817
4818impl AsRef<str> for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType {
4819    fn as_ref(&self) -> &str {
4820        self.as_str()
4821    }
4822}
4823
4824impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType {
4825    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4826        self.as_str().fmt(f)
4827    }
4828}
4829impl std::default::Default for UpdateSetupIntentPaymentMethodDataUsBankAccountAccountType {
4830    fn default() -> Self {
4831        Self::Checking
4832    }
4833}
4834
4835/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `default_for` field.
4836#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4837#[serde(rename_all = "snake_case")]
4838pub enum UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
4839    Invoice,
4840    Subscription,
4841}
4842
4843impl UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
4844    pub fn as_str(self) -> &'static str {
4845        match self {
4846            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor::Invoice => "invoice",
4847            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor::Subscription => "subscription",
4848        }
4849    }
4850}
4851
4852impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
4853    fn as_ref(&self) -> &str {
4854        self.as_str()
4855    }
4856}
4857
4858impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor {
4859    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4860        self.as_str().fmt(f)
4861    }
4862}
4863impl std::default::Default
4864    for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor
4865{
4866    fn default() -> Self {
4867        Self::Invoice
4868    }
4869}
4870
4871/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `payment_schedule` field.
4872#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4873#[serde(rename_all = "snake_case")]
4874pub enum UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
4875    Combined,
4876    Interval,
4877    Sporadic,
4878}
4879
4880impl UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
4881    pub fn as_str(self) -> &'static str {
4882        match self {
4883            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Combined => "combined",
4884            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Interval => "interval",
4885            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Sporadic => "sporadic",
4886        }
4887    }
4888}
4889
4890impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
4891    fn as_ref(&self) -> &str {
4892        self.as_str()
4893    }
4894}
4895
4896impl std::fmt::Display
4897    for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
4898{
4899    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4900        self.as_str().fmt(f)
4901    }
4902}
4903impl std::default::Default
4904    for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
4905{
4906    fn default() -> Self {
4907        Self::Combined
4908    }
4909}
4910
4911/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field.
4912#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4913#[serde(rename_all = "snake_case")]
4914pub enum UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
4915    Business,
4916    Personal,
4917}
4918
4919impl UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
4920    pub fn as_str(self) -> &'static str {
4921        match self {
4922            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business",
4923            UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal",
4924        }
4925    }
4926}
4927
4928impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
4929    fn as_ref(&self) -> &str {
4930        self.as_str()
4931    }
4932}
4933
4934impl std::fmt::Display
4935    for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
4936{
4937    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4938        self.as_str().fmt(f)
4939    }
4940}
4941impl std::default::Default
4942    for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
4943{
4944    fn default() -> Self {
4945        Self::Business
4946    }
4947}
4948
4949/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
4950#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4951#[serde(rename_all = "snake_case")]
4952pub enum UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
4953    Automatic,
4954    Instant,
4955    Microdeposits,
4956}
4957
4958impl UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
4959    pub fn as_str(self) -> &'static str {
4960        match self {
4961            UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => {
4962                "automatic"
4963            }
4964            UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant",
4965            UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
4966                "microdeposits"
4967            }
4968        }
4969    }
4970}
4971
4972impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
4973    fn as_ref(&self) -> &str {
4974        self.as_str()
4975    }
4976}
4977
4978impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
4979    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4980        self.as_str().fmt(f)
4981    }
4982}
4983impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod {
4984    fn default() -> Self {
4985        Self::Automatic
4986    }
4987}
4988
4989/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
4990#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4991#[serde(rename_all = "snake_case")]
4992pub enum UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
4993    Fixed,
4994    Maximum,
4995}
4996
4997impl UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
4998    pub fn as_str(self) -> &'static str {
4999        match self {
5000            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
5001            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum",
5002        }
5003    }
5004}
5005
5006impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
5007    fn as_ref(&self) -> &str {
5008        self.as_str()
5009    }
5010}
5011
5012impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
5013    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5014        self.as_str().fmt(f)
5015    }
5016}
5017impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsAmountType {
5018    fn default() -> Self {
5019        Self::Fixed
5020    }
5021}
5022
5023/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `interval` field.
5024#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5025#[serde(rename_all = "snake_case")]
5026pub enum UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
5027    Day,
5028    Month,
5029    Sporadic,
5030    Week,
5031    Year,
5032}
5033
5034impl UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
5035    pub fn as_str(self) -> &'static str {
5036        match self {
5037            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
5038            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
5039            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic",
5040            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
5041            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
5042        }
5043    }
5044}
5045
5046impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
5047    fn as_ref(&self) -> &str {
5048        self.as_str()
5049    }
5050}
5051
5052impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
5053    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5054        self.as_str().fmt(f)
5055    }
5056}
5057impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsInterval {
5058    fn default() -> Self {
5059        Self::Day
5060    }
5061}
5062
5063/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
5064#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5065#[serde(rename_all = "snake_case")]
5066pub enum UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
5067    India,
5068}
5069
5070impl UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
5071    pub fn as_str(self) -> &'static str {
5072        match self {
5073            UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india",
5074        }
5075    }
5076}
5077
5078impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
5079    fn as_ref(&self) -> &str {
5080        self.as_str()
5081    }
5082}
5083
5084impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
5085    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5086        self.as_str().fmt(f)
5087    }
5088}
5089impl std::default::Default
5090    for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes
5091{
5092    fn default() -> Self {
5093        Self::India
5094    }
5095}
5096
5097/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCard`'s `network` field.
5098#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5099#[serde(rename_all = "snake_case")]
5100pub enum UpdateSetupIntentPaymentMethodOptionsCardNetwork {
5101    Amex,
5102    CartesBancaires,
5103    Diners,
5104    Discover,
5105    EftposAu,
5106    Interac,
5107    Jcb,
5108    Mastercard,
5109    Unionpay,
5110    Unknown,
5111    Visa,
5112}
5113
5114impl UpdateSetupIntentPaymentMethodOptionsCardNetwork {
5115    pub fn as_str(self) -> &'static str {
5116        match self {
5117            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
5118            UpdateSetupIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires",
5119            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
5120            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
5121            UpdateSetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
5122            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
5123            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
5124            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
5125            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
5126            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
5127            UpdateSetupIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
5128        }
5129    }
5130}
5131
5132impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardNetwork {
5133    fn as_ref(&self) -> &str {
5134        self.as_str()
5135    }
5136}
5137
5138impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardNetwork {
5139    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5140        self.as_str().fmt(f)
5141    }
5142}
5143impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardNetwork {
5144    fn default() -> Self {
5145        Self::Amex
5146    }
5147}
5148
5149/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
5150#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5151#[serde(rename_all = "snake_case")]
5152pub enum UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
5153    Any,
5154    Automatic,
5155    Challenge,
5156}
5157
5158impl UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
5159    pub fn as_str(self) -> &'static str {
5160        match self {
5161            UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
5162            UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic",
5163            UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge",
5164        }
5165    }
5166}
5167
5168impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
5169    fn as_ref(&self) -> &str {
5170        self.as_str()
5171    }
5172}
5173
5174impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
5175    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5176        self.as_str().fmt(f)
5177    }
5178}
5179impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure {
5180    fn default() -> Self {
5181        Self::Any
5182    }
5183}
5184
5185/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field.
5186#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5187#[serde(rename_all = "snake_case")]
5188pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
5189    #[serde(rename = "A")]
5190    A,
5191    #[serde(rename = "C")]
5192    C,
5193    #[serde(rename = "I")]
5194    I,
5195    #[serde(rename = "N")]
5196    N,
5197    #[serde(rename = "R")]
5198    R,
5199    #[serde(rename = "U")]
5200    U,
5201    #[serde(rename = "Y")]
5202    Y,
5203}
5204
5205impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
5206    pub fn as_str(self) -> &'static str {
5207        match self {
5208            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A",
5209            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C",
5210            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I",
5211            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N",
5212            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R",
5213            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U",
5214            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y",
5215        }
5216    }
5217}
5218
5219impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
5220    fn as_ref(&self) -> &str {
5221        self.as_str()
5222    }
5223}
5224
5225impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
5226    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5227        self.as_str().fmt(f)
5228    }
5229}
5230impl std::default::Default
5231    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus
5232{
5233    fn default() -> Self {
5234        Self::A
5235    }
5236}
5237
5238/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field.
5239#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5240#[serde(rename_all = "snake_case")]
5241pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
5242    #[serde(rename = "01")]
5243    V01,
5244    #[serde(rename = "02")]
5245    V02,
5246    #[serde(rename = "05")]
5247    V05,
5248    #[serde(rename = "06")]
5249    V06,
5250    #[serde(rename = "07")]
5251    V07,
5252}
5253
5254impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
5255    pub fn as_str(self) -> &'static str {
5256        match self {
5257            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01",
5258            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02",
5259            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05",
5260            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06",
5261            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07",
5262        }
5263    }
5264}
5265
5266impl AsRef<str>
5267    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
5268{
5269    fn as_ref(&self) -> &str {
5270        self.as_str()
5271    }
5272}
5273
5274impl std::fmt::Display
5275    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
5276{
5277    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5278        self.as_str().fmt(f)
5279    }
5280}
5281impl std::default::Default
5282    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
5283{
5284    fn default() -> Self {
5285        Self::V01
5286    }
5287}
5288
5289/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field.
5290#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5291#[serde(rename_all = "snake_case")]
5292pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
5293{
5294    #[serde(rename = "0")]
5295    V0,
5296    #[serde(rename = "1")]
5297    V1,
5298    #[serde(rename = "2")]
5299    V2,
5300    #[serde(rename = "3")]
5301    V3,
5302    #[serde(rename = "4")]
5303    V4,
5304    #[serde(rename = "A")]
5305    A,
5306}
5307
5308impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo {
5309    pub fn as_str(self) -> &'static str {
5310        match self {
5311            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0",
5312            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1",
5313            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2",
5314            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3",
5315            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4",
5316            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A",
5317        }
5318    }
5319}
5320
5321impl AsRef<str>
5322    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
5323{
5324    fn as_ref(&self) -> &str {
5325        self.as_str()
5326    }
5327}
5328
5329impl std::fmt::Display
5330    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
5331{
5332    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5333        self.as_str().fmt(f)
5334    }
5335}
5336impl std::default::Default
5337    for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
5338{
5339    fn default() -> Self {
5340        Self::V0
5341    }
5342}
5343
5344/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field.
5345#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5346#[serde(rename_all = "snake_case")]
5347pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
5348    #[serde(rename = "1.0.2")]
5349    V1_0_2,
5350    #[serde(rename = "2.1.0")]
5351    V2_1_0,
5352    #[serde(rename = "2.2.0")]
5353    V2_2_0,
5354}
5355
5356impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
5357    pub fn as_str(self) -> &'static str {
5358        match self {
5359            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2",
5360            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0",
5361            UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0",
5362        }
5363    }
5364}
5365
5366impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
5367    fn as_ref(&self) -> &str {
5368        self.as_str()
5369    }
5370}
5371
5372impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
5373    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5374        self.as_str().fmt(f)
5375    }
5376}
5377impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion {
5378    fn default() -> Self {
5379        Self::V1_0_2
5380    }
5381}
5382
5383/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field.
5384#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5385#[serde(rename_all = "snake_case")]
5386pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
5387    Balances,
5388    Ownership,
5389    PaymentMethod,
5390    Transactions,
5391}
5392
5393impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
5394    pub fn as_str(self) -> &'static str {
5395        match self {
5396            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Balances => "balances",
5397            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Ownership => "ownership",
5398            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::PaymentMethod => "payment_method",
5399            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Transactions => "transactions",
5400        }
5401    }
5402}
5403
5404impl AsRef<str>
5405    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
5406{
5407    fn as_ref(&self) -> &str {
5408        self.as_str()
5409    }
5410}
5411
5412impl std::fmt::Display
5413    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
5414{
5415    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5416        self.as_str().fmt(f)
5417    }
5418}
5419impl std::default::Default
5420    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
5421{
5422    fn default() -> Self {
5423        Self::Balances
5424    }
5425}
5426
5427/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field.
5428#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5429#[serde(rename_all = "snake_case")]
5430pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
5431    Balances,
5432    Transactions,
5433}
5434
5435impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
5436    pub fn as_str(self) -> &'static str {
5437        match self {
5438            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances",
5439            UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions",
5440        }
5441    }
5442}
5443
5444impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
5445    fn as_ref(&self) -> &str {
5446        self.as_str()
5447    }
5448}
5449
5450impl std::fmt::Display
5451    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
5452{
5453    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5454        self.as_str().fmt(f)
5455    }
5456}
5457impl std::default::Default
5458    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
5459{
5460    fn default() -> Self {
5461        Self::Balances
5462    }
5463}
5464
5465/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field.
5466#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5467#[serde(rename_all = "snake_case")]
5468pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
5469    Paper,
5470}
5471
5472impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
5473    pub fn as_str(self) -> &'static str {
5474        match self {
5475            UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper",
5476        }
5477    }
5478}
5479
5480impl AsRef<str>
5481    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
5482{
5483    fn as_ref(&self) -> &str {
5484        self.as_str()
5485    }
5486}
5487
5488impl std::fmt::Display
5489    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
5490{
5491    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5492        self.as_str().fmt(f)
5493    }
5494}
5495impl std::default::Default
5496    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
5497{
5498    fn default() -> Self {
5499        Self::Paper
5500    }
5501}
5502
5503/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field.
5504#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5505#[serde(rename_all = "snake_case")]
5506pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
5507    Ach,
5508    UsDomesticWire,
5509}
5510
5511impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
5512    pub fn as_str(self) -> &'static str {
5513        match self {
5514            UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach",
5515            UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => {
5516                "us_domestic_wire"
5517            }
5518        }
5519    }
5520}
5521
5522impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
5523    fn as_ref(&self) -> &str {
5524        self.as_str()
5525    }
5526}
5527
5528impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
5529    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5530        self.as_str().fmt(f)
5531    }
5532}
5533impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
5534    fn default() -> Self {
5535        Self::Ach
5536    }
5537}
5538
5539/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
5540#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5541#[serde(rename_all = "snake_case")]
5542pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
5543    Automatic,
5544    Instant,
5545    Microdeposits,
5546}
5547
5548impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
5549    pub fn as_str(self) -> &'static str {
5550        match self {
5551            UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => {
5552                "automatic"
5553            }
5554            UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => {
5555                "instant"
5556            }
5557            UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => {
5558                "microdeposits"
5559            }
5560        }
5561    }
5562}
5563
5564impl AsRef<str> for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
5565    fn as_ref(&self) -> &str {
5566        self.as_str()
5567    }
5568}
5569
5570impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
5571    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5572        self.as_str().fmt(f)
5573    }
5574}
5575impl std::default::Default
5576    for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod
5577{
5578    fn default() -> Self {
5579        Self::Automatic
5580    }
5581}