Skip to main content

stripe/resources/generated/
setup_intent.rs

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