// ======================================
// This file was automatically generated.
// ======================================
use crate::client::{Client, Response};
use crate::ids::{
CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId,
};
use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp};
use crate::resources::{
Account, ApiErrors, Application, Charge, Currency, Customer, Invoice,
LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode,
PaymentIntentOffSession, PaymentMethod,
PaymentMethodConfigBizPaymentMethodConfigurationDetails,
PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount,
PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping,
};
use serde::{Deserialize, Serialize};
/// The resource representing a Stripe "PaymentIntent".
///
/// For more details see <https://stripe.com/docs/api/payment_intents/object>
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntent {
/// Unique identifier for the object.
pub id: PaymentIntentId,
/// Amount intended to be collected by this PaymentIntent.
///
/// 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).
/// The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
/// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
pub amount: i64,
/// Amount that can be captured from this PaymentIntent.
pub amount_capturable: i64,
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_details: Option<PaymentFlowsAmountDetails>,
/// Amount that this PaymentIntent collects.
pub amount_received: i64,
/// ID of the Connect application that created the PaymentIntent.
pub application: Option<Expandable<Application>>,
/// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
///
/// The amount of the application fee collected will be capped at the total payment amount.
/// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
pub application_fee_amount: Option<i64>,
/// Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
pub automatic_payment_methods: Option<PaymentFlowsAutomaticPaymentMethodsPaymentIntent>,
/// Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled.
///
/// Measured in seconds since the Unix epoch.
pub canceled_at: Option<Timestamp>,
/// Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
pub cancellation_reason: Option<PaymentIntentCancellationReason>,
/// Controls when the funds will be captured from the customer's account.
pub capture_method: PaymentIntentCaptureMethod,
/// The client secret of this PaymentIntent.
///
/// Used for client-side retrieval using a publishable key.
/// The client secret can be used to complete a payment from your frontend.
/// It should not be stored, logged, or exposed to anyone other than the customer.
/// Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
pub client_secret: Option<String>,
/// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
pub confirmation_method: PaymentIntentConfirmationMethod,
/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
pub created: Timestamp,
/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
///
/// Must be a [supported currency](https://stripe.com/docs/currencies).
pub currency: Currency,
/// ID of the Customer this PaymentIntent belongs to, if one exists.
///
/// Payment methods attached to other Customers cannot be used with this PaymentIntent.
///
/// If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
pub customer: Option<Expandable<Customer>>,
/// An arbitrary string attached to the object.
///
/// Often useful for displaying to users.
pub description: Option<String>,
/// ID of the invoice that created this PaymentIntent, if it exists.
pub invoice: Option<Expandable<Invoice>>,
/// The payment error encountered in the previous PaymentIntent confirmation.
///
/// It will be cleared if the PaymentIntent is later updated for any reason.
pub last_payment_error: Option<Box<ApiErrors>>,
/// The latest charge created by this PaymentIntent.
pub latest_charge: Option<Expandable<Charge>>,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
/// Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
pub metadata: Metadata,
/// If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
pub next_action: Option<PaymentIntentNextAction>,
/// The account (if any) for which the funds of the PaymentIntent are intended.
///
/// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
pub on_behalf_of: Option<Expandable<Account>>,
/// ID of the payment method used in this PaymentIntent.
pub payment_method: Option<Expandable<PaymentMethod>>,
/// Information about the payment method configuration used for this PaymentIntent.
pub payment_method_configuration_details:
Option<PaymentMethodConfigBizPaymentMethodConfigurationDetails>,
/// Payment-method-specific configuration for this PaymentIntent.
pub payment_method_options: Option<PaymentIntentPaymentMethodOptions>,
/// The list of payment method types (e.g.
///
/// card) that this PaymentIntent is allowed to use.
pub payment_method_types: Vec<String>,
/// If present, this property tells you about the processing state of the payment.
pub processing: Option<PaymentIntentProcessing>,
/// Email address that the receipt for the resulting payment will be sent to.
///
/// If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
pub receipt_email: Option<String>,
/// ID of the review associated with this PaymentIntent, if any.
pub review: Option<Expandable<Review>>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
pub setup_future_usage: Option<PaymentIntentSetupFutureUsage>,
/// Shipping information for this PaymentIntent.
pub shipping: Option<Shipping>,
/// This is a legacy field that will be removed in the future.
///
/// It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
pub source: Option<Expandable<PaymentSource>>,
/// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic).
///
/// Otherwise, you can use this value as the complete description of a charge on your customers' statements.
/// It must contain at least one letter and be 1–22 characters long.
pub statement_descriptor: Option<String>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 22 characters for the concatenated descriptor.
pub statement_descriptor_suffix: Option<String>,
/// Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`.
///
/// Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
pub status: PaymentIntentStatus,
/// The data that automatically creates a Transfer after the payment finalizes.
///
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
pub transfer_data: Option<TransferData>,
/// A string that identifies the resulting payment as part of a group.
///
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
pub transfer_group: Option<String>,
}
impl PaymentIntent {
/// Returns a list of PaymentIntents.
pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response<List<PaymentIntent>> {
client.get_query("/payment_intents", params)
}
/// Creates a PaymentIntent object.
///
/// After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
/// to continue the payment.
///
/// Learn more about [the available payment flows with the Payment Intents API](https://stripe.com/docs/payments/payment-intents). When you use `confirm=true` during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call.
/// You can use any parameters available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply `confirm=true`.
pub fn create(client: &Client, params: CreatePaymentIntent<'_>) -> Response<PaymentIntent> {
#[allow(clippy::needless_borrows_for_generic_args)]
client.post_form("/payment_intents", ¶ms)
}
/// Retrieves the details of a PaymentIntent that has previously been created.
///
/// You can retrieve a PaymentIntent client-side using a publishable key when the `client_secret` is in the query string.
/// If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties.
/// Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details.
pub fn retrieve(
client: &Client,
id: &PaymentIntentId,
expand: &[&str],
) -> Response<PaymentIntent> {
client.get_query(&format!("/payment_intents/{}", id), Expand { expand })
}
/// Updates properties on a PaymentIntent object without confirming.
///
/// Depending on which properties you update, you might need to confirm the
/// PaymentIntent again.
///
/// For example, updating the `payment_method` always requires you to confirm the PaymentIntent again.
/// If you prefer to update and confirm at the same time, we recommend updating properties through the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
pub fn update(
client: &Client,
id: &PaymentIntentId,
params: UpdatePaymentIntent<'_>,
) -> Response<PaymentIntent> {
#[allow(clippy::needless_borrows_for_generic_args)]
client.post_form(&format!("/payment_intents/{}", id), ¶ms)
}
}
impl Object for PaymentIntent {
type Id = PaymentIntentId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"payment_intent"
}
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentFlowsAmountDetails {
#[serde(skip_serializing_if = "Option::is_none")]
pub tip: Option<PaymentFlowsAmountDetailsResourceTip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentFlowsAmountDetailsResourceTip {
/// Portion of the amount that corresponds to a tip.
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentFlowsAutomaticPaymentMethodsPaymentIntent {
/// Controls whether this PaymentIntent will accept redirect-based payment methods.
///
/// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
///
/// To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_redirects: Option<PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects>,
/// Automatically calculates compatible payment methods.
pub enabled: bool,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextAction {
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay_handle_redirect: Option<PaymentIntentNextActionAlipayHandleRedirect>,
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto_display_details: Option<PaymentIntentNextActionBoleto>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card_await_notification: Option<PaymentIntentNextActionCardAwaitNotification>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp_handle_redirect_or_display_qr_code:
Option<PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_bank_transfer_instructions:
Option<PaymentIntentNextActionDisplayBankTransferInstructions>,
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini_display_details: Option<PaymentIntentNextActionKonbini>,
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo_display_details: Option<PaymentIntentNextActionDisplayOxxoDetails>,
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow_display_qr_code: Option<PaymentIntentNextActionPaynowDisplayQrCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pix_display_qr_code: Option<PaymentIntentNextActionPixDisplayQrCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay_display_qr_code: Option<PaymentIntentNextActionPromptpayDisplayQrCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub redirect_to_url: Option<PaymentIntentNextActionRedirectToUrl>,
#[serde(skip_serializing_if = "Option::is_none")]
pub swish_handle_redirect_or_display_qr_code:
Option<PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode>,
/// 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`.
#[serde(rename = "type")]
pub type_: String,
/// When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows.
///
/// The shape of the contents is subject to change and is only intended to be used by Stripe.js.
#[serde(skip_serializing_if = "Option::is_none")]
pub use_stripe_sdk: Option<serde_json::Value>,
#[serde(skip_serializing_if = "Option::is_none")]
pub verify_with_microdeposits: Option<PaymentIntentNextActionVerifyWithMicrodeposits>,
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay_display_qr_code: Option<PaymentIntentNextActionWechatPayDisplayQrCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay_redirect_to_android_app:
Option<PaymentIntentNextActionWechatPayRedirectToAndroidApp>,
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay_redirect_to_ios_app: Option<PaymentIntentNextActionWechatPayRedirectToIosApp>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionAlipayHandleRedirect {
/// The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App.
pub native_data: Option<String>,
/// The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.
pub native_url: Option<String>,
/// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
pub return_url: Option<String>,
/// The URL you must redirect your customer to in order to authenticate the payment.
pub url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionBoleto {
/// The timestamp after which the boleto expires.
pub expires_at: Option<Timestamp>,
/// The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.
pub hosted_voucher_url: Option<String>,
/// The boleto number.
pub number: Option<String>,
/// The URL to the downloadable boleto voucher PDF.
pub pdf: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionCardAwaitNotification {
/// The time that payment will be attempted.
///
/// If customer approval is required, they need to provide approval before this time.
pub charge_attempt_at: Option<Timestamp>,
/// For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank.
///
/// For payments of lower amount, no customer action is required.
pub customer_approval_required: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionDisplayBankTransferInstructions {
/// The remaining amount that needs to be transferred to complete the payment.
pub amount_remaining: Option<i64>,
/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
///
/// Must be a [supported currency](https://stripe.com/docs/currencies).
pub currency: Option<Currency>,
/// A list of financial addresses that can be used to fund the customer balance.
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_addresses: Option<Vec<FundingInstructionsBankTransferFinancialAddress>>,
/// A link to a hosted page that guides your customer through completing the transfer.
pub hosted_instructions_url: Option<String>,
/// A string identifying this payment.
///
/// Instruct your customer to include this code in the reference or memo field of their bank transfer.
pub reference: Option<String>,
/// Type of bank transfer.
#[serde(rename = "type")]
pub type_: PaymentIntentNextActionDisplayBankTransferInstructionsType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferFinancialAddress {
#[serde(skip_serializing_if = "Option::is_none")]
pub aba: Option<FundingInstructionsBankTransferAbaRecord>,
#[serde(skip_serializing_if = "Option::is_none")]
pub iban: Option<FundingInstructionsBankTransferIbanRecord>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_code: Option<FundingInstructionsBankTransferSortCodeRecord>,
#[serde(skip_serializing_if = "Option::is_none")]
pub spei: Option<FundingInstructionsBankTransferSpeiRecord>,
/// The payment networks supported by this FinancialAddress.
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_networks:
Option<Vec<FundingInstructionsBankTransferFinancialAddressSupportedNetworks>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub swift: Option<FundingInstructionsBankTransferSwiftRecord>,
/// The type of financial address.
#[serde(rename = "type")]
pub type_: FundingInstructionsBankTransferFinancialAddressType,
#[serde(skip_serializing_if = "Option::is_none")]
pub zengin: Option<FundingInstructionsBankTransferZenginRecord>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferAbaRecord {
/// The ABA account number.
pub account_number: String,
/// The bank name.
pub bank_name: String,
/// The ABA routing number.
pub routing_number: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferIbanRecord {
/// The name of the person or business that owns the bank account.
pub account_holder_name: String,
/// The BIC/SWIFT code of the account.
pub bic: String,
/// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
pub country: String,
/// The IBAN of the account.
pub iban: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferSortCodeRecord {
/// The name of the person or business that owns the bank account.
pub account_holder_name: String,
/// The account number.
pub account_number: String,
/// The six-digit sort code.
pub sort_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferSpeiRecord {
/// The three-digit bank code.
pub bank_code: String,
/// The short banking institution name.
pub bank_name: String,
/// The CLABE number.
pub clabe: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferSwiftRecord {
/// The account number.
pub account_number: String,
/// The bank name.
pub bank_name: String,
/// The SWIFT code.
pub swift_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FundingInstructionsBankTransferZenginRecord {
/// The account holder name.
pub account_holder_name: Option<String>,
/// The account number.
pub account_number: Option<String>,
/// The bank account type.
///
/// In Japan, this can only be `futsu` or `toza`.
pub account_type: Option<String>,
/// The bank code of the account.
pub bank_code: Option<String>,
/// The bank name of the account.
pub bank_name: Option<String>,
/// The branch code of the account.
pub branch_code: Option<String>,
/// The branch name of the account.
pub branch_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionDisplayOxxoDetails {
/// The timestamp after which the OXXO voucher expires.
pub expires_after: Option<Timestamp>,
/// The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.
pub hosted_voucher_url: Option<String>,
/// OXXO reference number.
pub number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbini {
/// The timestamp at which the pending Konbini payment expires.
pub expires_at: Timestamp,
/// The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.
pub hosted_voucher_url: Option<String>,
pub stores: PaymentIntentNextActionKonbiniStores,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbiniStores {
/// FamilyMart instruction details.
pub familymart: Option<PaymentIntentNextActionKonbiniFamilymart>,
/// Lawson instruction details.
pub lawson: Option<PaymentIntentNextActionKonbiniLawson>,
/// Ministop instruction details.
pub ministop: Option<PaymentIntentNextActionKonbiniMinistop>,
/// Seicomart instruction details.
pub seicomart: Option<PaymentIntentNextActionKonbiniSeicomart>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbiniFamilymart {
/// The confirmation number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The payment code.
pub payment_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbiniLawson {
/// The confirmation number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The payment code.
pub payment_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbiniMinistop {
/// The confirmation number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The payment code.
pub payment_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionKonbiniSeicomart {
/// The confirmation number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The payment code.
pub payment_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionPaynowDisplayQrCode {
/// The raw data string used to generate QR code, it should be used together with QR code library.
pub data: String,
/// The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.
pub hosted_instructions_url: Option<String>,
/// The image_url_png string used to render QR code.
pub image_url_png: String,
/// The image_url_svg string used to render QR code.
pub image_url_svg: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionPixDisplayQrCode {
/// The raw data string used to generate QR code, it should be used together with QR code library.
#[serde(skip_serializing_if = "Option::is_none")]
pub data: Option<String>,
/// The date (unix timestamp) when the PIX expires.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<i64>,
/// The URL to the hosted pix instructions page, which allows customers to view the pix QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub hosted_instructions_url: Option<String>,
/// The image_url_png string used to render png QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub image_url_png: Option<String>,
/// The image_url_svg string used to render svg QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub image_url_svg: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionPromptpayDisplayQrCode {
/// The raw data string used to generate QR code, it should be used together with QR code library.
pub data: String,
/// The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.
pub hosted_instructions_url: String,
/// The PNG path used to render the QR code, can be used as the source in an HTML img tag.
pub image_url_png: String,
/// The SVG path used to render the QR code, can be used as the source in an HTML img tag.
pub image_url_svg: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionRedirectToUrl {
/// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
pub return_url: Option<String>,
/// The URL you must redirect your customer to in order to authenticate the payment.
pub url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode {
/// The URL to the hosted Swish instructions page, which allows customers to view the QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub hosted_instructions_url: Option<String>,
/// The url for mobile redirect based auth.
#[serde(skip_serializing_if = "Option::is_none")]
pub mobile_auth_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub qr_code: Option<PaymentIntentNextActionSwishQrCode>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionSwishQrCode {
/// The raw data string used to generate QR code, it should be used together with QR code library.
#[serde(skip_serializing_if = "Option::is_none")]
pub data: Option<String>,
/// The image_url_png string used to render QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub image_url_png: Option<String>,
/// The image_url_svg string used to render QR code.
#[serde(skip_serializing_if = "Option::is_none")]
pub image_url_svg: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionVerifyWithMicrodeposits {
/// The timestamp when the microdeposits are expected to land.
pub arrival_date: Timestamp,
/// The URL for the hosted verification page, which allows customers to verify their bank account.
pub hosted_verification_url: String,
/// The type of the microdeposit sent to the customer.
///
/// Used to distinguish between different verification methods.
pub microdeposit_type: Option<PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionWechatPayDisplayQrCode {
/// The data being used to generate QR code.
pub data: String,
/// The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.
pub hosted_instructions_url: String,
/// The base64 image data for a pre-generated QR code.
pub image_data_url: String,
/// The image_url_png string used to render QR code.
pub image_url_png: String,
/// The image_url_svg string used to render QR code.
pub image_url_svg: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionWechatPayRedirectToAndroidApp {
/// app_id is the APP ID registered on WeChat open platform.
pub app_id: String,
/// nonce_str is a random string.
pub nonce_str: String,
/// package is static value.
pub package: String,
/// an unique merchant ID assigned by WeChat Pay.
pub partner_id: String,
/// an unique trading ID assigned by WeChat Pay.
pub prepay_id: String,
/// A signature.
pub sign: String,
/// Specifies the current time in epoch format.
pub timestamp: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentNextActionWechatPayRedirectToIosApp {
/// An universal link that redirect to WeChat Pay app.
pub native_url: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptions {
#[serde(skip_serializing_if = "Option::is_none")]
pub acss_debit: Option<PaymentIntentPaymentMethodOptionsAcssDebit>,
#[serde(skip_serializing_if = "Option::is_none")]
pub affirm: Option<PaymentMethodOptionsAffirm>,
#[serde(skip_serializing_if = "Option::is_none")]
pub afterpay_clearpay: Option<PaymentMethodOptionsAfterpayClearpay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay: Option<PaymentMethodOptionsAlipay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub au_becs_debit: Option<PaymentIntentPaymentMethodOptionsAuBecsDebit>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bacs_debit: Option<PaymentMethodOptionsBacsDebit>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bancontact: Option<PaymentMethodOptionsBancontact>,
#[serde(skip_serializing_if = "Option::is_none")]
pub blik: Option<PaymentIntentPaymentMethodOptionsBlik>,
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto: Option<PaymentMethodOptionsBoleto>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card: Option<PaymentIntentPaymentMethodOptionsCard>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card_present: Option<PaymentMethodOptionsCardPresent>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp: Option<PaymentMethodOptionsCashapp>,
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_balance: Option<PaymentMethodOptionsCustomerBalance>,
#[serde(skip_serializing_if = "Option::is_none")]
pub eps: Option<PaymentIntentPaymentMethodOptionsEps>,
#[serde(skip_serializing_if = "Option::is_none")]
pub fpx: Option<PaymentMethodOptionsFpx>,
#[serde(skip_serializing_if = "Option::is_none")]
pub giropay: Option<PaymentMethodOptionsGiropay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub grabpay: Option<PaymentMethodOptionsGrabpay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ideal: Option<PaymentMethodOptionsIdeal>,
#[serde(skip_serializing_if = "Option::is_none")]
pub interac_present: Option<PaymentMethodOptionsInteracPresent>,
#[serde(skip_serializing_if = "Option::is_none")]
pub klarna: Option<PaymentMethodOptionsKlarna>,
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini: Option<PaymentMethodOptionsKonbini>,
#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<PaymentIntentPaymentMethodOptionsLink>,
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo: Option<PaymentMethodOptionsOxxo>,
#[serde(skip_serializing_if = "Option::is_none")]
pub p24: Option<PaymentMethodOptionsP24>,
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow: Option<PaymentMethodOptionsPaynow>,
#[serde(skip_serializing_if = "Option::is_none")]
pub paypal: Option<PaymentMethodOptionsPaypal>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pix: Option<PaymentMethodOptionsPix>,
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay: Option<PaymentMethodOptionsPromptpay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub revolut_pay: Option<PaymentMethodOptionsRevolutPay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sepa_debit: Option<PaymentIntentPaymentMethodOptionsSepaDebit>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sofort: Option<PaymentMethodOptionsSofort>,
#[serde(skip_serializing_if = "Option::is_none")]
pub swish: Option<PaymentIntentPaymentMethodOptionsSwish>,
#[serde(skip_serializing_if = "Option::is_none")]
pub us_bank_account: Option<PaymentIntentPaymentMethodOptionsUsBankAccount>,
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay: Option<PaymentMethodOptionsWechatPay>,
#[serde(skip_serializing_if = "Option::is_none")]
pub zip: Option<PaymentMethodOptionsZip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsAcssDebit {
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method: Option<PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsAuBecsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsBlik {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsCard {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentIntentPaymentMethodOptionsCardCaptureMethod>,
/// Installment details for this payment (Mexico only).
///
/// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
pub installments: Option<PaymentMethodOptionsCardInstallments>,
/// Configuration options for setting up an eMandate for cards issued in India.
pub mandate_options: Option<PaymentMethodOptionsCardMandateOptions>,
/// Selected network to process this payment intent on.
///
/// Depends on the available networks of the card attached to the payment intent.
/// Can be only set confirm-time.
pub network: Option<PaymentIntentPaymentMethodOptionsCardNetwork>,
/// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_extended_authorization:
Option<PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization>,
/// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_incremental_authorization:
Option<PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization>,
/// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_multicapture: Option<PaymentIntentPaymentMethodOptionsCardRequestMulticapture>,
/// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_overcapture: Option<PaymentIntentPaymentMethodOptionsCardRequestOvercapture>,
/// 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).
///
/// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
/// If not provided, this value defaults to `automatic`.
/// 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.
pub request_three_d_secure: Option<PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,
/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsCardSetupFutureUsage>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 22 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kana: Option<String>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 17 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kanji: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsEps {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsLink {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentIntentPaymentMethodOptionsLinkCaptureMethod>,
/// [Deprecated] This is a legacy parameter that no longer has any function.
pub persistent_token: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit {
/// A URL for custom mandate text.
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_mandate_url: Option<String>,
/// Description of the interval.
///
/// Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
pub interval_description: Option<String>,
/// Payment schedule for the mandate.
pub payment_schedule:
Option<PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule>,
/// Transaction type of the mandate.
pub transaction_type:
Option<PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsSepaDebit {
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsSwish {
/// The order ID displayed in the Swish app after the payment is authorized.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsUsBankAccount {
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_connections: Option<LinkedAccountOptionsUsBankAccount>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<PaymentMethodOptionsUsBankAccountMandateOptions>,
/// Preferred transaction settlement speed.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_settlement_speed:
Option<PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method:
Option<PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentProcessing {
#[serde(skip_serializing_if = "Option::is_none")]
pub card: Option<PaymentIntentCardProcessing>,
/// Type of the payment method for which payment is in `processing` state, one of `card`.
#[serde(rename = "type")]
pub type_: PaymentIntentProcessingType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentCardProcessing {
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_notification: Option<PaymentIntentProcessingCustomerNotification>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentProcessingCustomerNotification {
/// Whether customer approval has been requested for this payment.
///
/// For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.
pub approval_requested: Option<bool>,
/// If customer approval is required, they need to provide approval before this time.
pub completes_at: Option<Timestamp>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsAffirm {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentMethodOptionsAffirmCaptureMethod>,
/// Preferred language of the Affirm authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsAffirmSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsAfterpayClearpay {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentMethodOptionsAfterpayClearpayCaptureMethod>,
/// An internal identifier or reference that this payment corresponds to.
///
/// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name.
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsAfterpayClearpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsAlipay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsAlipaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsBacsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsBacsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsBancontact {
/// Preferred language of the Bancontact authorization page that the customer is redirected to.
pub preferred_language: PaymentMethodOptionsBancontactPreferredLanguage,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsBancontactSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsBoleto {
/// The number of calendar days before a Boleto voucher expires.
///
/// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
pub expires_after_days: u32,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsBoletoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCardInstallments {
/// Installment plans that may be selected for this PaymentIntent.
pub available_plans: Option<Vec<PaymentMethodDetailsCardInstallmentsPlan>>,
/// Whether Installments are enabled for this PaymentIntent.
pub enabled: bool,
/// Installment plan selected for this PaymentIntent.
pub plan: Option<PaymentMethodDetailsCardInstallmentsPlan>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCardMandateOptions {
/// Amount to be charged for future payments.
pub amount: i64,
/// One of `fixed` or `maximum`.
///
/// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
/// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
pub amount_type: PaymentMethodOptionsCardMandateOptionsAmountType,
/// A description of the mandate or subscription that is meant to be displayed to the customer.
pub description: Option<String>,
/// End date of the mandate or subscription.
///
/// If not provided, the mandate will be active until canceled.
/// If provided, end date should be after start date.
pub end_date: Option<Timestamp>,
/// Specifies payment frequency.
///
/// One of `day`, `week`, `month`, `year`, or `sporadic`.
pub interval: PaymentMethodOptionsCardMandateOptionsInterval,
/// The number of intervals between payments.
///
/// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
/// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
/// This parameter is optional when `interval=sporadic`.
pub interval_count: Option<u64>,
/// Unique identifier for the mandate or subscription.
pub reference: String,
/// Start date of the mandate or subscription.
///
/// Start date should not be lesser than yesterday.
pub start_date: Timestamp,
/// Specifies the type of mandates supported.
///
/// Possible values are `india`.
pub supported_types: Option<Vec<PaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCardPresent {
/// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity).
pub request_extended_authorization: Option<bool>,
/// Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible.
///
/// Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
pub request_incremental_authorization_support: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCashapp {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentMethodOptionsCashappCaptureMethod>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsCashappSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCustomerBalance {
#[serde(skip_serializing_if = "Option::is_none")]
pub bank_transfer: Option<PaymentMethodOptionsCustomerBalanceBankTransfer>,
/// The funding method type to be used when there are not enough funds in the customer balance.
///
/// Permitted values include: `bank_transfer`.
pub funding_type: Option<PaymentMethodOptionsCustomerBalanceFundingType>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsCustomerBalanceSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsCustomerBalanceBankTransfer {
#[serde(skip_serializing_if = "Option::is_none")]
pub eu_bank_transfer: Option<PaymentMethodOptionsCustomerBalanceEuBankAccount>,
/// List of address types that should be returned in the financial_addresses response.
///
/// If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_address_types:
Option<Vec<PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes>>,
/// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
#[serde(rename = "type")]
pub type_: Option<PaymentMethodOptionsCustomerBalanceBankTransferType>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsFpx {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsFpxSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsGiropay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsGiropaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsGrabpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsGrabpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsIdeal {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsIdealSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsInteracPresent {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsKlarna {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentMethodOptionsKlarnaCaptureMethod>,
/// Preferred locale of the Klarna checkout page that the customer is redirected to.
pub preferred_locale: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsKlarnaSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsKonbini {
/// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
pub confirmation_number: Option<String>,
/// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire.
///
/// For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
pub expires_after_days: Option<u32>,
/// The timestamp at which the Konbini payment instructions will expire.
///
/// Only one of `expires_after_days` or `expires_at` may be set.
pub expires_at: Option<Timestamp>,
/// A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
pub product_description: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsKonbiniSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsOxxo {
/// The number of calendar days before an OXXO invoice expires.
///
/// For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
pub expires_after_days: u32,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsOxxoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsP24 {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsP24SetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsPaynow {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsPaynowSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsPaypal {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentMethodOptionsPaypalCaptureMethod>,
/// Preferred locale of the PayPal checkout page that the customer is redirected to.
pub preferred_locale: Option<String>,
/// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID.
///
/// This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsPaypalSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsPix {
/// The number of seconds (between 10 and 1209600) after which Pix payment will expire.
pub expires_after_seconds: Option<i64>,
/// The timestamp at which the Pix expires.
pub expires_at: Option<i64>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsPixSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsPromptpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsPromptpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsRevolutPay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsSofort {
/// Preferred language of the SOFORT authorization page that the customer is redirected to.
pub preferred_language: Option<PaymentMethodOptionsSofortPreferredLanguage>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsSofortSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsWechatPay {
/// The app ID registered with WeChat Pay.
///
/// Only required when client is ios or android.
pub app_id: Option<String>,
/// The client type that the end customer will pay from.
pub client: Option<PaymentMethodOptionsWechatPayClient>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsWechatPaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodOptionsZip {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentMethodOptionsZipSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct TransferData {
/// Amount intended to be collected by this PaymentIntent.
///
/// 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).
/// The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
/// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option<i64>,
/// The account (if any) that the payment is attributed to for tax
/// reporting, and where funds from the payment are transferred to after
/// payment success.
pub destination: Expandable<Account>,
}
/// The parameters for `PaymentIntent::create`.
#[derive(Clone, Debug, Serialize)]
pub struct CreatePaymentIntent<'a> {
/// Amount intended to be collected by this PaymentIntent.
///
/// 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).
/// The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
/// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
pub amount: i64,
/// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
///
/// The amount of the application fee collected will be capped at the total payment amount.
/// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub application_fee_amount: Option<i64>,
/// When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
#[serde(skip_serializing_if = "Option::is_none")]
pub automatic_payment_methods: Option<CreatePaymentIntentAutomaticPaymentMethods>,
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentIntentCaptureMethod>,
/// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately.
///
/// This parameter defaults to `false`.
/// When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub confirm: Option<bool>,
/// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_method: Option<PaymentIntentConfirmationMethod>,
/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
///
/// Must be a [supported currency](https://stripe.com/docs/currencies).
pub currency: Currency,
/// ID of the Customer this PaymentIntent belongs to, if one exists.
///
/// Payment methods attached to other Customers cannot be used with this PaymentIntent.
///
/// If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer: Option<CustomerId>,
/// An arbitrary string attached to the object.
///
/// Often useful for displaying to users.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<&'a str>,
/// Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`.
///
/// Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
/// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub error_on_requires_action: Option<bool>,
/// Specifies which fields in the response should be expanded.
#[serde(skip_serializing_if = "Expand::is_empty")]
pub expand: &'a [&'a str],
/// ID of the mandate that's used for this payment.
///
/// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate: Option<MandateId>,
/// This hash contains details about the Mandate to create.
///
/// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_data: Option<CreatePaymentIntentMandateData>,
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<Metadata>,
/// Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate.
///
/// Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
/// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub off_session: Option<PaymentIntentOffSession>,
/// The Stripe account ID that these funds are intended for.
///
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub on_behalf_of: Option<&'a str>,
/// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
///
/// If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API.
///
/// We recommend that you explicitly provide the `payment_method` moving forward.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method: Option<PaymentMethodId>,
/// The ID of the payment method configuration to use with this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_configuration: Option<PaymentMethodConfigurationId>,
/// If provided, this hash will be used to create a PaymentMethod.
///
/// The new PaymentMethod will appear in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) property on the PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_data: Option<CreatePaymentIntentPaymentMethodData>,
/// Payment method-specific configuration for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_options: Option<CreatePaymentIntentPaymentMethodOptions>,
/// The list of payment method types (for example, a card) that this PaymentIntent can use.
///
/// If you don't provide this, it defaults to ["card"].
/// Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_types: Option<Vec<String>>,
/// Options to configure Radar.
///
/// Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
#[serde(skip_serializing_if = "Option::is_none")]
pub radar_options: Option<CreatePaymentIntentRadarOptions>,
/// Email address to send the receipt to.
///
/// If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
#[serde(skip_serializing_if = "Option::is_none")]
pub receipt_email: Option<&'a str>,
/// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
///
/// If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
/// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
#[serde(skip_serializing_if = "Option::is_none")]
pub return_url: Option<&'a str>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentSetupFutureUsage>,
/// Shipping information for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub shipping: Option<CreatePaymentIntentShipping>,
/// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic).
///
/// Otherwise, you can use this value as the complete description of a charge on your customers' statements.
/// It must contain at least one letter and be 1–22 characters long.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor: Option<&'a str>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor.
/// The concatenated descriptor must contain 1-22 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix: Option<&'a str>,
/// The parameters that you can use to automatically create a Transfer.
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_data: Option<CreatePaymentIntentTransferData>,
/// A string that identifies the resulting payment as part of a group.
///
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_group: Option<&'a str>,
/// Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
#[serde(skip_serializing_if = "Option::is_none")]
pub use_stripe_sdk: Option<bool>,
}
impl<'a> CreatePaymentIntent<'a> {
pub fn new(amount: i64, currency: Currency) -> Self {
CreatePaymentIntent {
amount,
application_fee_amount: Default::default(),
automatic_payment_methods: Default::default(),
capture_method: Default::default(),
confirm: Default::default(),
confirmation_method: Default::default(),
currency,
customer: Default::default(),
description: Default::default(),
error_on_requires_action: Default::default(),
expand: Default::default(),
mandate: Default::default(),
mandate_data: Default::default(),
metadata: Default::default(),
off_session: Default::default(),
on_behalf_of: Default::default(),
payment_method: Default::default(),
payment_method_configuration: Default::default(),
payment_method_data: Default::default(),
payment_method_options: Default::default(),
payment_method_types: Default::default(),
radar_options: Default::default(),
receipt_email: Default::default(),
return_url: Default::default(),
setup_future_usage: Default::default(),
shipping: Default::default(),
statement_descriptor: Default::default(),
statement_descriptor_suffix: Default::default(),
transfer_data: Default::default(),
transfer_group: Default::default(),
use_stripe_sdk: Default::default(),
}
}
}
/// The parameters for `PaymentIntent::list`.
#[derive(Clone, Debug, Serialize, Default)]
pub struct ListPaymentIntents<'a> {
/// A filter on the list, based on the object `created` field.
///
/// The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.
#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<RangeQuery<Timestamp>>,
/// Only return PaymentIntents for the customer that this customer ID specifies.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer: Option<CustomerId>,
/// A cursor for use in pagination.
///
/// `ending_before` is an object ID that defines your place in the list.
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub ending_before: Option<PaymentIntentId>,
/// Specifies which fields in the response should be expanded.
#[serde(skip_serializing_if = "Expand::is_empty")]
pub expand: &'a [&'a str],
/// A limit on the number of objects to be returned.
///
/// Limit can range between 1 and 100, and the default is 10.
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<u64>,
/// A cursor for use in pagination.
///
/// `starting_after` is an object ID that defines your place in the list.
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub starting_after: Option<PaymentIntentId>,
}
impl<'a> ListPaymentIntents<'a> {
pub fn new() -> Self {
ListPaymentIntents {
created: Default::default(),
customer: Default::default(),
ending_before: Default::default(),
expand: Default::default(),
limit: Default::default(),
starting_after: Default::default(),
}
}
}
impl Paginable for ListPaymentIntents<'_> {
type O = PaymentIntent;
fn set_last(&mut self, item: Self::O) {
self.starting_after = Some(item.id());
}
}
/// The parameters for `PaymentIntent::update`.
#[derive(Clone, Debug, Serialize, Default)]
pub struct UpdatePaymentIntent<'a> {
/// Amount intended to be collected by this PaymentIntent.
///
/// 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).
/// The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
/// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option<i64>,
/// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
///
/// The amount of the application fee collected will be capped at the total payment amount.
/// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub application_fee_amount: Option<i64>,
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<PaymentIntentCaptureMethod>,
/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
///
/// Must be a [supported currency](https://stripe.com/docs/currencies).
#[serde(skip_serializing_if = "Option::is_none")]
pub currency: Option<Currency>,
/// ID of the Customer this PaymentIntent belongs to, if one exists.
///
/// Payment methods attached to other Customers cannot be used with this PaymentIntent.
///
/// If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer: Option<CustomerId>,
/// An arbitrary string attached to the object.
///
/// Often useful for displaying to users.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<&'a str>,
/// Specifies which fields in the response should be expanded.
#[serde(skip_serializing_if = "Expand::is_empty")]
pub expand: &'a [&'a str],
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<Metadata>,
/// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method: Option<PaymentMethodId>,
/// The ID of the payment method configuration to use with this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_configuration: Option<PaymentMethodConfigurationId>,
/// If provided, this hash will be used to create a PaymentMethod.
///
/// The new PaymentMethod will appear in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) property on the PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_data: Option<UpdatePaymentIntentPaymentMethodData>,
/// Payment-method-specific configuration for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_options: Option<UpdatePaymentIntentPaymentMethodOptions>,
/// The list of payment method types (for example, card) that this PaymentIntent can use.
///
/// Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_method_types: Option<Vec<String>>,
/// Email address that the receipt for the resulting payment will be sent to.
///
/// If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
#[serde(skip_serializing_if = "Option::is_none")]
pub receipt_email: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentSetupFutureUsageFilter>,
/// Shipping information for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub shipping: Option<UpdatePaymentIntentShipping>,
/// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic).
///
/// Otherwise, you can use this value as the complete description of a charge on your customers' statements.
/// It must contain at least one letter and be 1–22 characters long.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor: Option<&'a str>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 22 characters for the concatenated descriptor.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix: Option<&'a str>,
/// Use this parameter to automatically create a Transfer when the payment succeeds.
///
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_data: Option<UpdatePaymentIntentTransferData>,
/// A string that identifies the resulting payment as part of a group.
///
/// You can only provide `transfer_group` if it hasn't been set.
/// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_group: Option<&'a str>,
}
impl<'a> UpdatePaymentIntent<'a> {
pub fn new() -> Self {
UpdatePaymentIntent {
amount: Default::default(),
application_fee_amount: Default::default(),
capture_method: Default::default(),
currency: Default::default(),
customer: Default::default(),
description: Default::default(),
expand: Default::default(),
metadata: Default::default(),
payment_method: Default::default(),
payment_method_configuration: Default::default(),
payment_method_data: Default::default(),
payment_method_options: Default::default(),
payment_method_types: Default::default(),
receipt_email: Default::default(),
setup_future_usage: Default::default(),
shipping: Default::default(),
statement_descriptor: Default::default(),
statement_descriptor_suffix: Default::default(),
transfer_data: Default::default(),
transfer_group: Default::default(),
}
}
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentAutomaticPaymentMethods {
/// Controls whether this PaymentIntent will accept redirect-based payment methods.
///
/// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
///
/// To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_redirects: Option<CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects>,
/// Whether this feature is enabled.
pub enabled: bool,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentMandateData {
/// This hash contains details about the customer acceptance of the Mandate.
pub customer_acceptance: CreatePaymentIntentMandateDataCustomerAcceptance,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodData {
/// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub acss_debit: Option<CreatePaymentIntentPaymentMethodDataAcssDebit>,
/// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub affirm: Option<CreatePaymentIntentPaymentMethodDataAffirm>,
/// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub afterpay_clearpay: Option<CreatePaymentIntentPaymentMethodDataAfterpayClearpay>,
/// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay: Option<CreatePaymentIntentPaymentMethodDataAlipay>,
/// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub au_becs_debit: Option<CreatePaymentIntentPaymentMethodDataAuBecsDebit>,
/// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub bacs_debit: Option<CreatePaymentIntentPaymentMethodDataBacsDebit>,
/// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub bancontact: Option<CreatePaymentIntentPaymentMethodDataBancontact>,
/// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_details: Option<CreatePaymentIntentPaymentMethodDataBillingDetails>,
/// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub blik: Option<CreatePaymentIntentPaymentMethodDataBlik>,
/// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto: Option<CreatePaymentIntentPaymentMethodDataBoleto>,
/// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp: Option<CreatePaymentIntentPaymentMethodDataCashapp>,
/// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_balance: Option<CreatePaymentIntentPaymentMethodDataCustomerBalance>,
/// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub eps: Option<CreatePaymentIntentPaymentMethodDataEps>,
/// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub fpx: Option<CreatePaymentIntentPaymentMethodDataFpx>,
/// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub giropay: Option<CreatePaymentIntentPaymentMethodDataGiropay>,
/// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub grabpay: Option<CreatePaymentIntentPaymentMethodDataGrabpay>,
/// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub ideal: Option<CreatePaymentIntentPaymentMethodDataIdeal>,
/// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub interac_present: Option<CreatePaymentIntentPaymentMethodDataInteracPresent>,
/// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub klarna: Option<CreatePaymentIntentPaymentMethodDataKlarna>,
/// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini: Option<CreatePaymentIntentPaymentMethodDataKonbini>,
/// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<CreatePaymentIntentPaymentMethodDataLink>,
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<Metadata>,
/// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo: Option<CreatePaymentIntentPaymentMethodDataOxxo>,
/// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub p24: Option<CreatePaymentIntentPaymentMethodDataP24>,
/// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow: Option<CreatePaymentIntentPaymentMethodDataPaynow>,
/// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub paypal: Option<CreatePaymentIntentPaymentMethodDataPaypal>,
/// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub pix: Option<CreatePaymentIntentPaymentMethodDataPix>,
/// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay: Option<CreatePaymentIntentPaymentMethodDataPromptpay>,
/// Options to configure Radar.
///
/// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
#[serde(skip_serializing_if = "Option::is_none")]
pub radar_options: Option<CreatePaymentIntentPaymentMethodDataRadarOptions>,
/// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub revolut_pay: Option<CreatePaymentIntentPaymentMethodDataRevolutPay>,
/// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub sepa_debit: Option<CreatePaymentIntentPaymentMethodDataSepaDebit>,
/// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub sofort: Option<CreatePaymentIntentPaymentMethodDataSofort>,
/// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub swish: Option<CreatePaymentIntentPaymentMethodDataSwish>,
/// The type of the PaymentMethod.
///
/// An additional hash is included on the PaymentMethod with a name matching this value.
/// It contains additional information specific to the PaymentMethod type.
#[serde(rename = "type")]
pub type_: CreatePaymentIntentPaymentMethodDataType,
/// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub us_bank_account: Option<CreatePaymentIntentPaymentMethodDataUsBankAccount>,
/// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay: Option<CreatePaymentIntentPaymentMethodDataWechatPay>,
/// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub zip: Option<CreatePaymentIntentPaymentMethodDataZip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptions {
/// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub acss_debit: Option<CreatePaymentIntentPaymentMethodOptionsAcssDebit>,
/// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub affirm: Option<CreatePaymentIntentPaymentMethodOptionsAffirm>,
/// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub afterpay_clearpay: Option<CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay>,
/// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay: Option<CreatePaymentIntentPaymentMethodOptionsAlipay>,
/// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub au_becs_debit: Option<CreatePaymentIntentPaymentMethodOptionsAuBecsDebit>,
/// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub bacs_debit: Option<CreatePaymentIntentPaymentMethodOptionsBacsDebit>,
/// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub bancontact: Option<CreatePaymentIntentPaymentMethodOptionsBancontact>,
/// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub blik: Option<CreatePaymentIntentPaymentMethodOptionsBlik>,
/// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto: Option<CreatePaymentIntentPaymentMethodOptionsBoleto>,
/// Configuration for any card payments attempted on this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub card: Option<CreatePaymentIntentPaymentMethodOptionsCard>,
/// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub card_present: Option<CreatePaymentIntentPaymentMethodOptionsCardPresent>,
/// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp: Option<CreatePaymentIntentPaymentMethodOptionsCashapp>,
/// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_balance: Option<CreatePaymentIntentPaymentMethodOptionsCustomerBalance>,
/// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub eps: Option<CreatePaymentIntentPaymentMethodOptionsEps>,
/// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub fpx: Option<CreatePaymentIntentPaymentMethodOptionsFpx>,
/// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub giropay: Option<CreatePaymentIntentPaymentMethodOptionsGiropay>,
/// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub grabpay: Option<CreatePaymentIntentPaymentMethodOptionsGrabpay>,
/// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub ideal: Option<CreatePaymentIntentPaymentMethodOptionsIdeal>,
/// If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub interac_present: Option<CreatePaymentIntentPaymentMethodOptionsInteracPresent>,
/// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub klarna: Option<CreatePaymentIntentPaymentMethodOptionsKlarna>,
/// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini: Option<CreatePaymentIntentPaymentMethodOptionsKonbini>,
/// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<CreatePaymentIntentPaymentMethodOptionsLink>,
/// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo: Option<CreatePaymentIntentPaymentMethodOptionsOxxo>,
/// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub p24: Option<CreatePaymentIntentPaymentMethodOptionsP24>,
/// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow: Option<CreatePaymentIntentPaymentMethodOptionsPaynow>,
/// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub paypal: Option<CreatePaymentIntentPaymentMethodOptionsPaypal>,
/// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub pix: Option<CreatePaymentIntentPaymentMethodOptionsPix>,
/// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay: Option<CreatePaymentIntentPaymentMethodOptionsPromptpay>,
/// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub revolut_pay: Option<CreatePaymentIntentPaymentMethodOptionsRevolutPay>,
/// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub sepa_debit: Option<CreatePaymentIntentPaymentMethodOptionsSepaDebit>,
/// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub sofort: Option<CreatePaymentIntentPaymentMethodOptionsSofort>,
/// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub swish: Option<CreatePaymentIntentPaymentMethodOptionsSwish>,
/// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub us_bank_account: Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccount>,
/// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay: Option<CreatePaymentIntentPaymentMethodOptionsWechatPay>,
/// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub zip: Option<CreatePaymentIntentPaymentMethodOptionsZip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentRadarOptions {
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentShipping {
/// Shipping address.
pub address: CreatePaymentIntentShippingAddress,
/// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
#[serde(skip_serializing_if = "Option::is_none")]
pub carrier: Option<String>,
/// Recipient name.
pub name: String,
/// Recipient phone (including extension).
#[serde(skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// The tracking number for a physical product, obtained from the delivery service.
///
/// If multiple tracking numbers were generated for this purchase, please separate them with commas.
#[serde(skip_serializing_if = "Option::is_none")]
pub tracking_number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentTransferData {
/// The amount that will be transferred automatically when a charge succeeds.
/// The amount is capped at the total transaction amount and if no amount is set,
/// the full amount is transferred.
///
/// If you intend to collect a fee and you need a more robust reporting experience, using
/// [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
/// might be a better fit for your integration.
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option<i64>,
/// If specified, successful charges will be attributed to the destination
/// account for tax reporting, and the funds from charges will be transferred
/// to the destination account.
///
/// The ID of the resulting transfer will be returned on the successful charge's `transfer` field.
pub destination: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodData {
/// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub acss_debit: Option<UpdatePaymentIntentPaymentMethodDataAcssDebit>,
/// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub affirm: Option<UpdatePaymentIntentPaymentMethodDataAffirm>,
/// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub afterpay_clearpay: Option<UpdatePaymentIntentPaymentMethodDataAfterpayClearpay>,
/// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay: Option<UpdatePaymentIntentPaymentMethodDataAlipay>,
/// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub au_becs_debit: Option<UpdatePaymentIntentPaymentMethodDataAuBecsDebit>,
/// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub bacs_debit: Option<UpdatePaymentIntentPaymentMethodDataBacsDebit>,
/// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub bancontact: Option<UpdatePaymentIntentPaymentMethodDataBancontact>,
/// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_details: Option<UpdatePaymentIntentPaymentMethodDataBillingDetails>,
/// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub blik: Option<UpdatePaymentIntentPaymentMethodDataBlik>,
/// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto: Option<UpdatePaymentIntentPaymentMethodDataBoleto>,
/// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp: Option<UpdatePaymentIntentPaymentMethodDataCashapp>,
/// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_balance: Option<UpdatePaymentIntentPaymentMethodDataCustomerBalance>,
/// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub eps: Option<UpdatePaymentIntentPaymentMethodDataEps>,
/// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub fpx: Option<UpdatePaymentIntentPaymentMethodDataFpx>,
/// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub giropay: Option<UpdatePaymentIntentPaymentMethodDataGiropay>,
/// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub grabpay: Option<UpdatePaymentIntentPaymentMethodDataGrabpay>,
/// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub ideal: Option<UpdatePaymentIntentPaymentMethodDataIdeal>,
/// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub interac_present: Option<UpdatePaymentIntentPaymentMethodDataInteracPresent>,
/// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub klarna: Option<UpdatePaymentIntentPaymentMethodDataKlarna>,
/// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini: Option<UpdatePaymentIntentPaymentMethodDataKonbini>,
/// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<UpdatePaymentIntentPaymentMethodDataLink>,
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<Metadata>,
/// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo: Option<UpdatePaymentIntentPaymentMethodDataOxxo>,
/// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub p24: Option<UpdatePaymentIntentPaymentMethodDataP24>,
/// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow: Option<UpdatePaymentIntentPaymentMethodDataPaynow>,
/// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub paypal: Option<UpdatePaymentIntentPaymentMethodDataPaypal>,
/// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub pix: Option<UpdatePaymentIntentPaymentMethodDataPix>,
/// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay: Option<UpdatePaymentIntentPaymentMethodDataPromptpay>,
/// Options to configure Radar.
///
/// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
#[serde(skip_serializing_if = "Option::is_none")]
pub radar_options: Option<UpdatePaymentIntentPaymentMethodDataRadarOptions>,
/// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub revolut_pay: Option<UpdatePaymentIntentPaymentMethodDataRevolutPay>,
/// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub sepa_debit: Option<UpdatePaymentIntentPaymentMethodDataSepaDebit>,
/// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub sofort: Option<UpdatePaymentIntentPaymentMethodDataSofort>,
/// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub swish: Option<UpdatePaymentIntentPaymentMethodDataSwish>,
/// The type of the PaymentMethod.
///
/// An additional hash is included on the PaymentMethod with a name matching this value.
/// It contains additional information specific to the PaymentMethod type.
#[serde(rename = "type")]
pub type_: UpdatePaymentIntentPaymentMethodDataType,
/// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub us_bank_account: Option<UpdatePaymentIntentPaymentMethodDataUsBankAccount>,
/// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay: Option<UpdatePaymentIntentPaymentMethodDataWechatPay>,
/// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub zip: Option<UpdatePaymentIntentPaymentMethodDataZip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptions {
/// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub acss_debit: Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebit>,
/// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub affirm: Option<UpdatePaymentIntentPaymentMethodOptionsAffirm>,
/// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub afterpay_clearpay: Option<UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay>,
/// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub alipay: Option<UpdatePaymentIntentPaymentMethodOptionsAlipay>,
/// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub au_becs_debit: Option<UpdatePaymentIntentPaymentMethodOptionsAuBecsDebit>,
/// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub bacs_debit: Option<UpdatePaymentIntentPaymentMethodOptionsBacsDebit>,
/// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub bancontact: Option<UpdatePaymentIntentPaymentMethodOptionsBancontact>,
/// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub blik: Option<UpdatePaymentIntentPaymentMethodOptionsBlik>,
/// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub boleto: Option<UpdatePaymentIntentPaymentMethodOptionsBoleto>,
/// Configuration for any card payments attempted on this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub card: Option<UpdatePaymentIntentPaymentMethodOptionsCard>,
/// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub card_present: Option<UpdatePaymentIntentPaymentMethodOptionsCardPresent>,
/// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub cashapp: Option<UpdatePaymentIntentPaymentMethodOptionsCashapp>,
/// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_balance: Option<UpdatePaymentIntentPaymentMethodOptionsCustomerBalance>,
/// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub eps: Option<UpdatePaymentIntentPaymentMethodOptionsEps>,
/// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub fpx: Option<UpdatePaymentIntentPaymentMethodOptionsFpx>,
/// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub giropay: Option<UpdatePaymentIntentPaymentMethodOptionsGiropay>,
/// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub grabpay: Option<UpdatePaymentIntentPaymentMethodOptionsGrabpay>,
/// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub ideal: Option<UpdatePaymentIntentPaymentMethodOptionsIdeal>,
/// If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub interac_present: Option<UpdatePaymentIntentPaymentMethodOptionsInteracPresent>,
/// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub klarna: Option<UpdatePaymentIntentPaymentMethodOptionsKlarna>,
/// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub konbini: Option<UpdatePaymentIntentPaymentMethodOptionsKonbini>,
/// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<UpdatePaymentIntentPaymentMethodOptionsLink>,
/// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub oxxo: Option<UpdatePaymentIntentPaymentMethodOptionsOxxo>,
/// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub p24: Option<UpdatePaymentIntentPaymentMethodOptionsP24>,
/// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub paynow: Option<UpdatePaymentIntentPaymentMethodOptionsPaynow>,
/// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub paypal: Option<UpdatePaymentIntentPaymentMethodOptionsPaypal>,
/// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub pix: Option<UpdatePaymentIntentPaymentMethodOptionsPix>,
/// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub promptpay: Option<UpdatePaymentIntentPaymentMethodOptionsPromptpay>,
/// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub revolut_pay: Option<UpdatePaymentIntentPaymentMethodOptionsRevolutPay>,
/// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub sepa_debit: Option<UpdatePaymentIntentPaymentMethodOptionsSepaDebit>,
/// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub sofort: Option<UpdatePaymentIntentPaymentMethodOptionsSofort>,
/// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub swish: Option<UpdatePaymentIntentPaymentMethodOptionsSwish>,
/// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub us_bank_account: Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccount>,
/// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub wechat_pay: Option<UpdatePaymentIntentPaymentMethodOptionsWechatPay>,
/// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
#[serde(skip_serializing_if = "Option::is_none")]
pub zip: Option<UpdatePaymentIntentPaymentMethodOptionsZip>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentShipping {
/// Shipping address.
pub address: UpdatePaymentIntentShippingAddress,
/// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
#[serde(skip_serializing_if = "Option::is_none")]
pub carrier: Option<String>,
/// Recipient name.
pub name: String,
/// Recipient phone (including extension).
#[serde(skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// The tracking number for a physical product, obtained from the delivery service.
///
/// If multiple tracking numbers were generated for this purchase, please separate them with commas.
#[serde(skip_serializing_if = "Option::is_none")]
pub tracking_number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentTransferData {
/// The amount that will be transferred automatically when a charge succeeds.
#[serde(skip_serializing_if = "Option::is_none")]
pub amount: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentMandateDataCustomerAcceptance {
/// The time at which the customer accepted the Mandate.
#[serde(skip_serializing_if = "Option::is_none")]
pub accepted_at: Option<Timestamp>,
/// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
#[serde(skip_serializing_if = "Option::is_none")]
pub offline: Option<CreatePaymentIntentMandateDataCustomerAcceptanceOffline>,
/// If this is a Mandate accepted online, this hash contains details about the online acceptance.
#[serde(skip_serializing_if = "Option::is_none")]
pub online: Option<CreatePaymentIntentMandateDataCustomerAcceptanceOnline>,
/// The type of customer acceptance information included with the Mandate.
///
/// One of `online` or `offline`.
#[serde(rename = "type")]
pub type_: CreatePaymentIntentMandateDataCustomerAcceptanceType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataAcssDebit {
/// Customer's bank account number.
pub account_number: String,
/// Institution number of the customer's bank.
pub institution_number: String,
/// Transit number of the customer's bank.
pub transit_number: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataAffirm {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataAfterpayClearpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataAlipay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataAuBecsDebit {
/// The account number for the bank account.
pub account_number: String,
/// Bank-State-Branch number of the bank account.
pub bsb_number: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBacsDebit {
/// Account number of the bank account that the funds will be debited from.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_number: Option<String>,
/// Sort code of the bank account.
///
/// (e.g., `10-20-30`).
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_code: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBancontact {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBillingDetails {
/// Billing address.
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<CreatePaymentIntentPaymentMethodDataBillingDetailsAddress>,
/// Email address.
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// Full name.
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Billing phone number (including extension).
#[serde(skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBlik {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBoleto {
/// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
pub tax_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataCashapp {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataCustomerBalance {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataEps {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<CreatePaymentIntentPaymentMethodDataEpsBank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataFpx {
/// Account holder type for FPX transaction.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_holder_type: Option<CreatePaymentIntentPaymentMethodDataFpxAccountHolderType>,
/// The customer's bank.
pub bank: CreatePaymentIntentPaymentMethodDataFpxBank,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataGiropay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataGrabpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataIdeal {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<CreatePaymentIntentPaymentMethodDataIdealBank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataInteracPresent {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataKlarna {
/// Customer's date of birth.
#[serde(skip_serializing_if = "Option::is_none")]
pub dob: Option<CreatePaymentIntentPaymentMethodDataKlarnaDob>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataKonbini {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataLink {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataOxxo {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataP24 {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<CreatePaymentIntentPaymentMethodDataP24Bank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataPaynow {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataPaypal {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataPix {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataPromptpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataRadarOptions {
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataRevolutPay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataSepaDebit {
/// IBAN of the bank account.
pub iban: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataSofort {
/// Two-letter ISO code representing the country the bank account is located in.
pub country: CreatePaymentIntentPaymentMethodDataSofortCountry,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataSwish {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataUsBankAccount {
/// Account holder type: individual or company.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_holder_type:
Option<CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType>,
/// Account number of the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_number: Option<String>,
/// Account type: checkings or savings.
///
/// Defaults to checking if omitted.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_type: Option<CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType>,
/// The ID of a Financial Connections Account to use as a payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_connections_account: Option<String>,
/// Routing number of the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub routing_number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataWechatPay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataZip {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebit {
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method:
Option<CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAffirm {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod>,
/// Preferred language of the Affirm authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method:
Option<CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod>,
/// An internal identifier or reference that this payment corresponds to.
///
/// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAlipay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAuBecsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsBacsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsBancontact {
/// Preferred language of the Bancontact authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_language:
Option<CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsBlik {
/// The 6-digit BLIK code that a customer has generated using their banking application.
///
/// Can only be set on confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsBoleto {
/// The number of calendar days before a Boleto voucher expires.
///
/// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCard {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod>,
/// A single-use `cvc_update` Token that represents a card CVC value.
///
/// When provided, the CVC value will be verified during the card payment attempt.
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub cvc_token: Option<String>,
/// Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
///
/// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
#[serde(skip_serializing_if = "Option::is_none")]
pub installments: Option<CreatePaymentIntentPaymentMethodOptionsCardInstallments>,
/// Configuration options for setting up an eMandate for cards issued in India.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<CreatePaymentIntentPaymentMethodOptionsCardMandateOptions>,
/// When specified, this parameter indicates that a transaction will be marked
/// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA.
///
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub moto: Option<bool>,
/// Selected network to process this PaymentIntent on.
///
/// Depends on the available networks of the card attached to the PaymentIntent.
/// Can be only set confirm-time.
#[serde(skip_serializing_if = "Option::is_none")]
pub network: Option<CreatePaymentIntentPaymentMethodOptionsCardNetwork>,
/// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_extended_authorization:
Option<CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization>,
/// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_incremental_authorization:
Option<CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization>,
/// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_multicapture:
Option<CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture>,
/// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_overcapture: Option<CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture>,
/// 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).
///
/// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
/// If not provided, this value defaults to `automatic`.
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_three_d_secure:
Option<CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,
/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 22 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kana: Option<String>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 17 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kanji: Option<String>,
/// If 3D Secure authentication was performed with a third-party provider,
/// the authentication details to use for this payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub three_d_secure: Option<CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardPresent {
/// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity).
#[serde(skip_serializing_if = "Option::is_none")]
pub request_extended_authorization: Option<bool>,
/// Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible.
///
/// Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_incremental_authorization_support: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCashapp {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalance {
/// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank_transfer: Option<CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer>,
/// The funding method type to be used when there are not enough funds in the customer balance.
///
/// Permitted values include: `bank_transfer`.
#[serde(skip_serializing_if = "Option::is_none")]
pub funding_type: Option<CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsEps {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsFpx {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsGiropay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsGrabpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsIdeal {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsInteracPresent {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsKlarna {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod>,
/// Preferred language of the Klarna authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsKonbini {
/// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
///
/// Must not consist of only zeroes and could be rejected in case of insufficient uniqueness.
/// We recommend to use the customer's phone number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire.
///
/// For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
/// Defaults to 3 days.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// The timestamp at which the Konbini payment instructions will expire.
///
/// Only one of `expires_after_days` or `expires_at` may be set.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<Timestamp>,
/// A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
#[serde(skip_serializing_if = "Option::is_none")]
pub product_description: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsLink {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod>,
/// [Deprecated] This is a legacy parameter that no longer has any function.
#[serde(skip_serializing_if = "Option::is_none")]
pub persistent_token: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsOxxo {
/// The number of calendar days before an OXXO voucher expires.
///
/// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsP24 {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage>,
/// Confirm that the payer has accepted the P24 terms and conditions.
#[serde(skip_serializing_if = "Option::is_none")]
pub tos_shown_and_accepted: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsPaynow {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsPaypal {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod>,
/// [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale>,
/// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID.
///
/// This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// The risk correlation ID for an on-session payment using a saved PayPal payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_correlation_id: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsPix {
/// The number of seconds (between 10 and 1209600) after which Pix payment will expire.
///
/// Defaults to 86400 seconds.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_seconds: Option<i64>,
/// The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future).
///
/// Defaults to 1 day in the future.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<Timestamp>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsPromptpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsRevolutPay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebit {
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsSofort {
/// Language shown to the payer on redirect.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_language: Option<CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsSwish {
/// The order ID displayed in the Swish app after the payment is authorized.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount {
/// Additional fields for Financial Connections Session creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_connections:
Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections>,
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions>,
/// Additional fields for network related functions.
#[serde(skip_serializing_if = "Option::is_none")]
pub networks: Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks>,
/// Preferred transaction settlement speed.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_settlement_speed:
Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method:
Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay {
/// The app ID registered with WeChat Pay.
///
/// Only required when client is ios or android.
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
/// The client type that the end customer will pay from.
pub client: CreatePaymentIntentPaymentMethodOptionsWechatPayClient,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsZip {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentShippingAddress {
/// City, district, suburb, town, or village.
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// Address line 1 (e.g., street, PO Box, or company name).
#[serde(skip_serializing_if = "Option::is_none")]
pub line1: Option<String>,
/// Address line 2 (e.g., apartment, suite, unit, or building).
#[serde(skip_serializing_if = "Option::is_none")]
pub line2: Option<String>,
/// ZIP or postal code.
#[serde(skip_serializing_if = "Option::is_none")]
pub postal_code: Option<String>,
/// State, county, province, or region.
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit {
/// Customer's bank account number.
pub account_number: String,
/// Institution number of the customer's bank.
pub institution_number: String,
/// Transit number of the customer's bank.
pub transit_number: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataAffirm {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataAfterpayClearpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataAlipay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataAuBecsDebit {
/// The account number for the bank account.
pub account_number: String,
/// Bank-State-Branch number of the bank account.
pub bsb_number: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBacsDebit {
/// Account number of the bank account that the funds will be debited from.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_number: Option<String>,
/// Sort code of the bank account.
///
/// (e.g., `10-20-30`).
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_code: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBancontact {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBillingDetails {
/// Billing address.
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress>,
/// Email address.
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// Full name.
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Billing phone number (including extension).
#[serde(skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBlik {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBoleto {
/// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
pub tax_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataCashapp {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataCustomerBalance {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataEps {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<UpdatePaymentIntentPaymentMethodDataEpsBank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataFpx {
/// Account holder type for FPX transaction.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_holder_type: Option<UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType>,
/// The customer's bank.
pub bank: UpdatePaymentIntentPaymentMethodDataFpxBank,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataGiropay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataGrabpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataIdeal {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<UpdatePaymentIntentPaymentMethodDataIdealBank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataInteracPresent {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataKlarna {
/// Customer's date of birth.
#[serde(skip_serializing_if = "Option::is_none")]
pub dob: Option<UpdatePaymentIntentPaymentMethodDataKlarnaDob>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataKonbini {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataLink {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataOxxo {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataP24 {
/// The customer's bank.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank: Option<UpdatePaymentIntentPaymentMethodDataP24Bank>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataPaynow {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataPaypal {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataPix {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataPromptpay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataRadarOptions {
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataRevolutPay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataSepaDebit {
/// IBAN of the bank account.
pub iban: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataSofort {
/// Two-letter ISO code representing the country the bank account is located in.
pub country: UpdatePaymentIntentPaymentMethodDataSofortCountry,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataSwish {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataUsBankAccount {
/// Account holder type: individual or company.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_holder_type:
Option<UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType>,
/// Account number of the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_number: Option<String>,
/// Account type: checkings or savings.
///
/// Defaults to checking if omitted.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_type: Option<UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType>,
/// The ID of a Financial Connections Account to use as a payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_connections_account: Option<String>,
/// Routing number of the bank account.
#[serde(skip_serializing_if = "Option::is_none")]
pub routing_number: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataWechatPay {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataZip {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebit {
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method:
Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod>,
/// Preferred language of the Affirm authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method:
Option<UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod>,
/// An internal identifier or reference that this payment corresponds to.
///
/// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAlipay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAuBecsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsBacsDebit {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsBancontact {
/// Preferred language of the Bancontact authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_language:
Option<UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsBlik {
/// The 6-digit BLIK code that a customer has generated using their banking application.
///
/// Can only be set on confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsBoleto {
/// The number of calendar days before a Boleto voucher expires.
///
/// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCard {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod>,
/// A single-use `cvc_update` Token that represents a card CVC value.
///
/// When provided, the CVC value will be verified during the card payment attempt.
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub cvc_token: Option<String>,
/// Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
///
/// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
#[serde(skip_serializing_if = "Option::is_none")]
pub installments: Option<UpdatePaymentIntentPaymentMethodOptionsCardInstallments>,
/// Configuration options for setting up an eMandate for cards issued in India.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions>,
/// When specified, this parameter indicates that a transaction will be marked
/// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA.
///
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub moto: Option<bool>,
/// Selected network to process this PaymentIntent on.
///
/// Depends on the available networks of the card attached to the PaymentIntent.
/// Can be only set confirm-time.
#[serde(skip_serializing_if = "Option::is_none")]
pub network: Option<UpdatePaymentIntentPaymentMethodOptionsCardNetwork>,
/// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_extended_authorization:
Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization>,
/// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_incremental_authorization:
Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization>,
/// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_multicapture:
Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture>,
/// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_overcapture: Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture>,
/// 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).
///
/// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
/// If not provided, this value defaults to `automatic`.
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_three_d_secure:
Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,
/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 22 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kana: Option<String>,
/// Provides information about a card payment that customers see on their statements.
///
/// Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor.
/// Maximum 17 characters.
/// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub statement_descriptor_suffix_kanji: Option<String>,
/// If 3D Secure authentication was performed with a third-party provider,
/// the authentication details to use for this payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub three_d_secure: Option<UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresent {
/// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity).
#[serde(skip_serializing_if = "Option::is_none")]
pub request_extended_authorization: Option<bool>,
/// Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible.
///
/// Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
#[serde(skip_serializing_if = "Option::is_none")]
pub request_incremental_authorization_support: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalance {
/// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
#[serde(skip_serializing_if = "Option::is_none")]
pub bank_transfer: Option<UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer>,
/// The funding method type to be used when there are not enough funds in the customer balance.
///
/// Permitted values include: `bank_transfer`.
#[serde(skip_serializing_if = "Option::is_none")]
pub funding_type: Option<UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsEps {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsFpx {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsGiropay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsGrabpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsIdeal {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsInteracPresent {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod>,
/// Preferred language of the Klarna authorization page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsKonbini {
/// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
///
/// Must not consist of only zeroes and could be rejected in case of insufficient uniqueness.
/// We recommend to use the customer's phone number.
#[serde(skip_serializing_if = "Option::is_none")]
pub confirmation_number: Option<String>,
/// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire.
///
/// For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
/// Defaults to 3 days.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// The timestamp at which the Konbini payment instructions will expire.
///
/// Only one of `expires_after_days` or `expires_at` may be set.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<Timestamp>,
/// A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
#[serde(skip_serializing_if = "Option::is_none")]
pub product_description: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsLink {
/// Controls when the funds will be captured from the customer's account.
///
/// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
///
/// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod>,
/// [Deprecated] This is a legacy parameter that no longer has any function.
#[serde(skip_serializing_if = "Option::is_none")]
pub persistent_token: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsOxxo {
/// The number of calendar days before an OXXO voucher expires.
///
/// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_days: Option<u32>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsP24 {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage>,
/// Confirm that the payer has accepted the P24 terms and conditions.
#[serde(skip_serializing_if = "Option::is_none")]
pub tos_shown_and_accepted: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsPaynow {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsPaypal {
/// Controls when the funds will be captured from the customer's account.
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_method: Option<UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod>,
/// [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_locale: Option<UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale>,
/// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID.
///
/// This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// The risk correlation ID for an on-session payment using a saved PayPal payment method.
#[serde(skip_serializing_if = "Option::is_none")]
pub risk_correlation_id: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsPix {
/// The number of seconds (between 10 and 1209600) after which Pix payment will expire.
///
/// Defaults to 86400 seconds.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after_seconds: Option<i64>,
/// The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future).
///
/// Defaults to 1 day in the future.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<Timestamp>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsPromptpay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsRevolutPay {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebit {
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsSofort {
/// Language shown to the payer on redirect.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_language: Option<UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsSwish {
/// The order ID displayed in the Swish app after the payment is authorized.
#[serde(skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount {
/// Additional fields for Financial Connections Session creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub financial_connections:
Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections>,
/// Additional fields for Mandate creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub mandate_options: Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions>,
/// Additional fields for network related functions.
#[serde(skip_serializing_if = "Option::is_none")]
pub networks: Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks>,
/// Preferred transaction settlement speed.
#[serde(skip_serializing_if = "Option::is_none")]
pub preferred_settlement_speed:
Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed>,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage>,
/// Bank account verification method.
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_method:
Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay {
/// The app ID registered with WeChat Pay.
///
/// Only required when client is ios or android.
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
/// The client type that the end customer will pay from.
pub client: UpdatePaymentIntentPaymentMethodOptionsWechatPayClient,
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage:
Option<UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsZip {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentShippingAddress {
/// City, district, suburb, town, or village.
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// Address line 1 (e.g., street, PO Box, or company name).
#[serde(skip_serializing_if = "Option::is_none")]
pub line1: Option<String>,
/// Address line 2 (e.g., apartment, suite, unit, or building).
#[serde(skip_serializing_if = "Option::is_none")]
pub line2: Option<String>,
/// ZIP or postal code.
#[serde(skip_serializing_if = "Option::is_none")]
pub postal_code: Option<String>,
/// State, county, province, or region.
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentMandateDataCustomerAcceptanceOffline {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentMandateDataCustomerAcceptanceOnline {
/// The IP address from which the Mandate was accepted by the customer.
pub ip_address: String,
/// The user agent of the browser from which the Mandate was accepted by the customer.
pub user_agent: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress {
/// City, district, suburb, town, or village.
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// Address line 1 (e.g., street, PO Box, or company name).
#[serde(skip_serializing_if = "Option::is_none")]
pub line1: Option<String>,
/// Address line 2 (e.g., apartment, suite, unit, or building).
#[serde(skip_serializing_if = "Option::is_none")]
pub line2: Option<String>,
/// ZIP or postal code.
#[serde(skip_serializing_if = "Option::is_none")]
pub postal_code: Option<String>,
/// State, county, province, or region.
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob {
/// The day of birth, between 1 and 31.
pub day: i64,
/// The month of birth, between 1 and 12.
pub month: i64,
/// The four-digit year of birth.
pub year: i64,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions {
/// A URL for custom mandate text to render during confirmation step.
/// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
/// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_mandate_url: Option<String>,
/// Description of the mandate interval.
///
/// Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_description: Option<String>,
/// Payment schedule for the mandate.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_schedule:
Option<CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule>,
/// Transaction type of the mandate.
#[serde(skip_serializing_if = "Option::is_none")]
pub transaction_type:
Option<CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments {
/// Setting to true enables installments for this PaymentIntent.
/// This will cause the response to contain a list of available installment plans.
/// Setting to false will prevent any selected plan from applying to a charge.
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// The selected installment plan to use for this payment attempt.
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub plan: Option<CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions {
/// Amount to be charged for future payments.
pub amount: i64,
/// One of `fixed` or `maximum`.
///
/// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
/// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
pub amount_type: CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType,
/// A description of the mandate or subscription that is meant to be displayed to the customer.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// End date of the mandate or subscription.
///
/// If not provided, the mandate will be active until canceled.
/// If provided, end date should be after start date.
#[serde(skip_serializing_if = "Option::is_none")]
pub end_date: Option<Timestamp>,
/// Specifies payment frequency.
///
/// One of `day`, `week`, `month`, `year`, or `sporadic`.
pub interval: CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval,
/// The number of intervals between payments.
///
/// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
/// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
/// This parameter is optional when `interval=sporadic`.
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_count: Option<u64>,
/// Unique identifier for the mandate or subscription.
pub reference: String,
/// Start date of the mandate or subscription.
///
/// Start date should not be lesser than yesterday.
pub start_date: Timestamp,
/// Specifies the type of mandates supported.
///
/// Possible values are `india`.
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_types:
Option<Vec<CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure {
/// The `transStatus` returned from the card Issuer’s ACS in the ARes.
#[serde(skip_serializing_if = "Option::is_none")]
pub ares_trans_status:
Option<CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus>,
/// The cryptogram, also known as the "authentication value" (AAV, CAVV or
/// AEVV).
///
/// 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.).
pub cryptogram: String,
/// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
/// provider and indicates what degree of authentication was performed.
#[serde(skip_serializing_if = "Option::is_none")]
pub electronic_commerce_indicator:
Option<CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator>,
/// The exemption requested via 3DS and accepted by the issuer at authentication time.
#[serde(skip_serializing_if = "Option::is_none")]
pub exemption_indicator:
Option<CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator>,
/// Network specific 3DS fields.
///
/// Network specific arguments require an explicit card brand choice.
/// The parameter `payment_method_options.card.network`` must be populated accordingly.
#[serde(skip_serializing_if = "Option::is_none")]
pub network_options:
Option<CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions>,
/// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
/// AReq sent to the card Issuer's ACS.
///
/// A string containing 2 digits from 01-99.
#[serde(skip_serializing_if = "Option::is_none")]
pub requestor_challenge_indicator: Option<String>,
/// For 3D Secure 1, the XID.
///
/// For 3D Secure 2, the Directory Server Transaction ID (dsTransID).
pub transaction_id: String,
/// The version of 3D Secure that was performed.
pub version: CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer {
/// Configuration for the eu_bank_transfer funding type.
#[serde(skip_serializing_if = "Option::is_none")]
pub eu_bank_transfer:
Option<CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer>,
/// List of address types that should be returned in the financial_addresses response.
///
/// If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_address_types: Option<
Vec<
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes,
>,
>,
/// The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
#[serde(rename = "type")]
pub type_: CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections {
/// The list of permissions to request.
///
/// If this parameter is passed, the `payment_method` permission must be included.
/// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
#[serde(skip_serializing_if = "Option::is_none")]
pub permissions: Option<
Vec<CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions>,
>,
/// List of data features that you would like to retrieve upon account creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub prefetch: Option<
Vec<CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch>,
>,
/// For webview integrations only.
///
/// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
#[serde(skip_serializing_if = "Option::is_none")]
pub return_url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions {
/// The method used to collect offline mandate customer acceptance.
#[serde(skip_serializing_if = "Option::is_none")]
pub collection_method:
Option<CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks {
/// Triggers validations to run across the selected networks.
#[serde(skip_serializing_if = "Option::is_none")]
pub requested:
Option<Vec<CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested>>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress {
/// City, district, suburb, town, or village.
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// Address line 1 (e.g., street, PO Box, or company name).
#[serde(skip_serializing_if = "Option::is_none")]
pub line1: Option<String>,
/// Address line 2 (e.g., apartment, suite, unit, or building).
#[serde(skip_serializing_if = "Option::is_none")]
pub line2: Option<String>,
/// ZIP or postal code.
#[serde(skip_serializing_if = "Option::is_none")]
pub postal_code: Option<String>,
/// State, county, province, or region.
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob {
/// The day of birth, between 1 and 31.
pub day: i64,
/// The month of birth, between 1 and 12.
pub month: i64,
/// The four-digit year of birth.
pub year: i64,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions {
/// A URL for custom mandate text to render during confirmation step.
/// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
/// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_mandate_url: Option<String>,
/// Description of the mandate interval.
///
/// Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_description: Option<String>,
/// Payment schedule for the mandate.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_schedule:
Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule>,
/// Transaction type of the mandate.
#[serde(skip_serializing_if = "Option::is_none")]
pub transaction_type:
Option<UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments {
/// Setting to true enables installments for this PaymentIntent.
/// This will cause the response to contain a list of available installment plans.
/// Setting to false will prevent any selected plan from applying to a charge.
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// The selected installment plan to use for this payment attempt.
/// This parameter can only be provided during confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub plan: Option<UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions {
/// Amount to be charged for future payments.
pub amount: i64,
/// One of `fixed` or `maximum`.
///
/// If `fixed`, the `amount` param refers to the exact amount to be charged in future payments.
/// If `maximum`, the amount charged can be up to the value passed for the `amount` param.
pub amount_type: UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType,
/// A description of the mandate or subscription that is meant to be displayed to the customer.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// End date of the mandate or subscription.
///
/// If not provided, the mandate will be active until canceled.
/// If provided, end date should be after start date.
#[serde(skip_serializing_if = "Option::is_none")]
pub end_date: Option<Timestamp>,
/// Specifies payment frequency.
///
/// One of `day`, `week`, `month`, `year`, or `sporadic`.
pub interval: UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval,
/// The number of intervals between payments.
///
/// For example, `interval=month` and `interval_count=3` indicates one payment every three months.
/// Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
/// This parameter is optional when `interval=sporadic`.
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_count: Option<u64>,
/// Unique identifier for the mandate or subscription.
pub reference: String,
/// Start date of the mandate or subscription.
///
/// Start date should not be lesser than yesterday.
pub start_date: Timestamp,
/// Specifies the type of mandates supported.
///
/// Possible values are `india`.
#[serde(skip_serializing_if = "Option::is_none")]
pub supported_types:
Option<Vec<UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes>>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure {
/// The `transStatus` returned from the card Issuer’s ACS in the ARes.
#[serde(skip_serializing_if = "Option::is_none")]
pub ares_trans_status:
Option<UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus>,
/// The cryptogram, also known as the "authentication value" (AAV, CAVV or
/// AEVV).
///
/// 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.).
pub cryptogram: String,
/// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
/// provider and indicates what degree of authentication was performed.
#[serde(skip_serializing_if = "Option::is_none")]
pub electronic_commerce_indicator:
Option<UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator>,
/// The exemption requested via 3DS and accepted by the issuer at authentication time.
#[serde(skip_serializing_if = "Option::is_none")]
pub exemption_indicator:
Option<UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator>,
/// Network specific 3DS fields.
///
/// Network specific arguments require an explicit card brand choice.
/// The parameter `payment_method_options.card.network`` must be populated accordingly.
#[serde(skip_serializing_if = "Option::is_none")]
pub network_options:
Option<UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions>,
/// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
/// AReq sent to the card Issuer's ACS.
///
/// A string containing 2 digits from 01-99.
#[serde(skip_serializing_if = "Option::is_none")]
pub requestor_challenge_indicator: Option<String>,
/// For 3D Secure 1, the XID.
///
/// For 3D Secure 2, the Directory Server Transaction ID (dsTransID).
pub transaction_id: String,
/// The version of 3D Secure that was performed.
pub version: UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer {
/// Configuration for the eu_bank_transfer funding type.
#[serde(skip_serializing_if = "Option::is_none")]
pub eu_bank_transfer:
Option<UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer>,
/// List of address types that should be returned in the financial_addresses response.
///
/// If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_address_types: Option<
Vec<
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes,
>,
>,
/// The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
#[serde(rename = "type")]
pub type_: UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections {
/// The list of permissions to request.
///
/// If this parameter is passed, the `payment_method` permission must be included.
/// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
#[serde(skip_serializing_if = "Option::is_none")]
pub permissions: Option<
Vec<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions>,
>,
/// List of data features that you would like to retrieve upon account creation.
#[serde(skip_serializing_if = "Option::is_none")]
pub prefetch: Option<
Vec<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch>,
>,
/// For webview integrations only.
///
/// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
#[serde(skip_serializing_if = "Option::is_none")]
pub return_url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions {
/// The method used to collect offline mandate customer acceptance.
#[serde(skip_serializing_if = "Option::is_none")]
pub collection_method:
Option<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks {
/// Triggers validations to run across the selected networks.
#[serde(skip_serializing_if = "Option::is_none")]
pub requested:
Option<Vec<UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested>>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan {
/// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
pub count: u64,
/// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
/// One of `month`.
pub interval: CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval,
/// Type of installment plan, one of `fixed_count`.
#[serde(rename = "type")]
pub type_: CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions {
/// Cartes Bancaires-specific 3DS fields.
#[serde(skip_serializing_if = "Option::is_none")]
pub cartes_bancaires: Option<
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires,
>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer {
/// The desired country code of the bank account information.
///
/// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
pub country: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan {
/// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
pub count: u64,
/// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
/// One of `month`.
pub interval: UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval,
/// Type of installment plan, one of `fixed_count`.
#[serde(rename = "type")]
pub type_: UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions {
/// Cartes Bancaires-specific 3DS fields.
#[serde(skip_serializing_if = "Option::is_none")]
pub cartes_bancaires: Option<
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires,
>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer {
/// The desired country code of the bank account information.
///
/// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
pub country: String,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires {
/// The cryptogram calculation algorithm used by the card Issuer's ACS
/// to calculate the Authentication cryptogram.
///
/// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO.
pub cb_avalgo: CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo,
/// The exemption indicator returned from Cartes Bancaires in the ARes.
/// message extension: CB-EXEMPTION; string (4 characters)
/// This is a 3 byte bitmap (low significant byte first and most significant
/// bit first) that has been Base64 encoded.
#[serde(skip_serializing_if = "Option::is_none")]
pub cb_exemption: Option<String>,
/// The risk score returned from Cartes Bancaires in the ARes.
/// message extension: CB-SCORE; numeric value 0-99.
#[serde(skip_serializing_if = "Option::is_none")]
pub cb_score: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires {
/// The cryptogram calculation algorithm used by the card Issuer's ACS
/// to calculate the Authentication cryptogram.
///
/// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO.
pub cb_avalgo: UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo,
/// The exemption indicator returned from Cartes Bancaires in the ARes.
/// message extension: CB-EXEMPTION; string (4 characters)
/// This is a 3 byte bitmap (low significant byte first and most significant
/// bit first) that has been Base64 encoded.
#[serde(skip_serializing_if = "Option::is_none")]
pub cb_exemption: Option<String>,
/// The risk score returned from Cartes Bancaires in the ARes.
/// message extension: CB-SCORE; numeric value 0-99.
#[serde(skip_serializing_if = "Option::is_none")]
pub cb_score: Option<i64>,
}
/// An enum representing the possible values of an `CreatePaymentIntentAutomaticPaymentMethods`'s `allow_redirects` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
Always,
Never,
}
impl CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects::Always => "always",
CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects::Never => "never",
}
}
}
impl AsRef<str> for CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
fn default() -> Self {
Self::Always
}
}
/// An enum representing the possible values of an `CreatePaymentIntentMandateDataCustomerAcceptance`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentMandateDataCustomerAcceptanceType {
Offline,
Online,
}
impl CreatePaymentIntentMandateDataCustomerAcceptanceType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentMandateDataCustomerAcceptanceType::Offline => "offline",
CreatePaymentIntentMandateDataCustomerAcceptanceType::Online => "online",
}
}
}
impl AsRef<str> for CreatePaymentIntentMandateDataCustomerAcceptanceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentMandateDataCustomerAcceptanceType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentMandateDataCustomerAcceptanceType {
fn default() -> Self {
Self::Offline
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataEps`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataEpsBank {
ArzteUndApothekerBank,
AustrianAnadiBankAg,
BankAustria,
BankhausCarlSpangler,
BankhausSchelhammerUndSchatteraAg,
BawagPskAg,
BksBankAg,
BrullKallmusBankAg,
BtvVierLanderBank,
CapitalBankGraweGruppeAg,
DeutscheBankAg,
Dolomitenbank,
EasybankAg,
ErsteBankUndSparkassen,
HypoAlpeadriabankInternationalAg,
HypoBankBurgenlandAktiengesellschaft,
HypoNoeLbFurNiederosterreichUWien,
HypoOberosterreichSalzburgSteiermark,
HypoTirolBankAg,
HypoVorarlbergBankAg,
MarchfelderBank,
OberbankAg,
RaiffeisenBankengruppeOsterreich,
SchoellerbankAg,
SpardaBankWien,
VolksbankGruppe,
VolkskreditbankAg,
VrBankBraunau,
}
impl CreatePaymentIntentPaymentMethodDataEpsBank {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => {
"arzte_und_apotheker_bank"
}
CreatePaymentIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => {
"austrian_anadi_bank_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria",
CreatePaymentIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => {
"bankhaus_carl_spangler"
}
CreatePaymentIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => {
"bankhaus_schelhammer_und_schattera_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => {
"brull_kallmus_bank_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::BtvVierLanderBank => {
"btv_vier_lander_bank"
}
CreatePaymentIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => {
"capital_bank_grawe_gruppe_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank",
CreatePaymentIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => {
"erste_bank_und_sparkassen"
}
CreatePaymentIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => {
"hypo_alpeadriabank_international_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => {
"hypo_bank_burgenland_aktiengesellschaft"
}
CreatePaymentIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => {
"hypo_noe_lb_fur_niederosterreich_u_wien"
}
CreatePaymentIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => {
"hypo_oberosterreich_salzburg_steiermark"
}
CreatePaymentIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => {
"hypo_vorarlberg_bank_ag"
}
CreatePaymentIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank",
CreatePaymentIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => {
"raiffeisen_bankengruppe_osterreich"
}
CreatePaymentIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien",
CreatePaymentIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe",
CreatePaymentIntentPaymentMethodDataEpsBank::VolkskreditbankAg => "volkskreditbank_ag",
CreatePaymentIntentPaymentMethodDataEpsBank::VrBankBraunau => "vr_bank_braunau",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataEpsBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataEpsBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataEpsBank {
fn default() -> Self {
Self::ArzteUndApothekerBank
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataFpx`'s `account_holder_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataFpxAccountHolderType {
Company,
Individual,
}
impl CreatePaymentIntentPaymentMethodDataFpxAccountHolderType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataFpxAccountHolderType::Company => "company",
CreatePaymentIntentPaymentMethodDataFpxAccountHolderType::Individual => "individual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn default() -> Self {
Self::Company
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataFpx`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataFpxBank {
AffinBank,
Agrobank,
AllianceBank,
Ambank,
BankIslam,
BankMuamalat,
BankOfChina,
BankRakyat,
Bsn,
Cimb,
DeutscheBank,
HongLeongBank,
Hsbc,
Kfh,
Maybank2e,
Maybank2u,
Ocbc,
PbEnterprise,
PublicBank,
Rhb,
StandardChartered,
Uob,
}
impl CreatePaymentIntentPaymentMethodDataFpxBank {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataFpxBank::AffinBank => "affin_bank",
CreatePaymentIntentPaymentMethodDataFpxBank::Agrobank => "agrobank",
CreatePaymentIntentPaymentMethodDataFpxBank::AllianceBank => "alliance_bank",
CreatePaymentIntentPaymentMethodDataFpxBank::Ambank => "ambank",
CreatePaymentIntentPaymentMethodDataFpxBank::BankIslam => "bank_islam",
CreatePaymentIntentPaymentMethodDataFpxBank::BankMuamalat => "bank_muamalat",
CreatePaymentIntentPaymentMethodDataFpxBank::BankOfChina => "bank_of_china",
CreatePaymentIntentPaymentMethodDataFpxBank::BankRakyat => "bank_rakyat",
CreatePaymentIntentPaymentMethodDataFpxBank::Bsn => "bsn",
CreatePaymentIntentPaymentMethodDataFpxBank::Cimb => "cimb",
CreatePaymentIntentPaymentMethodDataFpxBank::DeutscheBank => "deutsche_bank",
CreatePaymentIntentPaymentMethodDataFpxBank::HongLeongBank => "hong_leong_bank",
CreatePaymentIntentPaymentMethodDataFpxBank::Hsbc => "hsbc",
CreatePaymentIntentPaymentMethodDataFpxBank::Kfh => "kfh",
CreatePaymentIntentPaymentMethodDataFpxBank::Maybank2e => "maybank2e",
CreatePaymentIntentPaymentMethodDataFpxBank::Maybank2u => "maybank2u",
CreatePaymentIntentPaymentMethodDataFpxBank::Ocbc => "ocbc",
CreatePaymentIntentPaymentMethodDataFpxBank::PbEnterprise => "pb_enterprise",
CreatePaymentIntentPaymentMethodDataFpxBank::PublicBank => "public_bank",
CreatePaymentIntentPaymentMethodDataFpxBank::Rhb => "rhb",
CreatePaymentIntentPaymentMethodDataFpxBank::StandardChartered => "standard_chartered",
CreatePaymentIntentPaymentMethodDataFpxBank::Uob => "uob",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataFpxBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataFpxBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataFpxBank {
fn default() -> Self {
Self::AffinBank
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataIdeal`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataIdealBank {
AbnAmro,
AsnBank,
Bunq,
Handelsbanken,
Ing,
Knab,
Moneyou,
N26,
Nn,
Rabobank,
Regiobank,
Revolut,
SnsBank,
TriodosBank,
VanLanschot,
Yoursafe,
}
impl CreatePaymentIntentPaymentMethodDataIdealBank {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataIdealBank::AbnAmro => "abn_amro",
CreatePaymentIntentPaymentMethodDataIdealBank::AsnBank => "asn_bank",
CreatePaymentIntentPaymentMethodDataIdealBank::Bunq => "bunq",
CreatePaymentIntentPaymentMethodDataIdealBank::Handelsbanken => "handelsbanken",
CreatePaymentIntentPaymentMethodDataIdealBank::Ing => "ing",
CreatePaymentIntentPaymentMethodDataIdealBank::Knab => "knab",
CreatePaymentIntentPaymentMethodDataIdealBank::Moneyou => "moneyou",
CreatePaymentIntentPaymentMethodDataIdealBank::N26 => "n26",
CreatePaymentIntentPaymentMethodDataIdealBank::Nn => "nn",
CreatePaymentIntentPaymentMethodDataIdealBank::Rabobank => "rabobank",
CreatePaymentIntentPaymentMethodDataIdealBank::Regiobank => "regiobank",
CreatePaymentIntentPaymentMethodDataIdealBank::Revolut => "revolut",
CreatePaymentIntentPaymentMethodDataIdealBank::SnsBank => "sns_bank",
CreatePaymentIntentPaymentMethodDataIdealBank::TriodosBank => "triodos_bank",
CreatePaymentIntentPaymentMethodDataIdealBank::VanLanschot => "van_lanschot",
CreatePaymentIntentPaymentMethodDataIdealBank::Yoursafe => "yoursafe",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataIdealBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataIdealBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataIdealBank {
fn default() -> Self {
Self::AbnAmro
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataP24`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataP24Bank {
AliorBank,
BankMillennium,
BankNowyBfgSa,
BankPekaoSa,
BankiSpbdzielcze,
Blik,
BnpParibas,
Boz,
CitiHandlowy,
CreditAgricole,
Envelobank,
EtransferPocztowy24,
GetinBank,
Ideabank,
Ing,
Inteligo,
MbankMtransfer,
NestPrzelew,
NoblePay,
PbacZIpko,
PlusBank,
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}
impl CreatePaymentIntentPaymentMethodDataP24Bank {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataP24Bank::AliorBank => "alior_bank",
CreatePaymentIntentPaymentMethodDataP24Bank::BankMillennium => "bank_millennium",
CreatePaymentIntentPaymentMethodDataP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa",
CreatePaymentIntentPaymentMethodDataP24Bank::BankPekaoSa => "bank_pekao_sa",
CreatePaymentIntentPaymentMethodDataP24Bank::BankiSpbdzielcze => "banki_spbdzielcze",
CreatePaymentIntentPaymentMethodDataP24Bank::Blik => "blik",
CreatePaymentIntentPaymentMethodDataP24Bank::BnpParibas => "bnp_paribas",
CreatePaymentIntentPaymentMethodDataP24Bank::Boz => "boz",
CreatePaymentIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy",
CreatePaymentIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole",
CreatePaymentIntentPaymentMethodDataP24Bank::Envelobank => "envelobank",
CreatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => {
"etransfer_pocztowy24"
}
CreatePaymentIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank",
CreatePaymentIntentPaymentMethodDataP24Bank::Ideabank => "ideabank",
CreatePaymentIntentPaymentMethodDataP24Bank::Ing => "ing",
CreatePaymentIntentPaymentMethodDataP24Bank::Inteligo => "inteligo",
CreatePaymentIntentPaymentMethodDataP24Bank::MbankMtransfer => "mbank_mtransfer",
CreatePaymentIntentPaymentMethodDataP24Bank::NestPrzelew => "nest_przelew",
CreatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay",
CreatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko",
CreatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank",
CreatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => {
"santander_przelew24"
}
CreatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => {
"tmobile_usbugi_bankowe"
}
CreatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
CreatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank",
CreatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataP24Bank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataP24Bank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataP24Bank {
fn default() -> Self {
Self::AliorBank
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataSofort`'s `country` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataSofortCountry {
#[serde(rename = "AT")]
At,
#[serde(rename = "BE")]
Be,
#[serde(rename = "DE")]
De,
#[serde(rename = "ES")]
Es,
#[serde(rename = "IT")]
It,
#[serde(rename = "NL")]
Nl,
}
impl CreatePaymentIntentPaymentMethodDataSofortCountry {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataSofortCountry::At => "AT",
CreatePaymentIntentPaymentMethodDataSofortCountry::Be => "BE",
CreatePaymentIntentPaymentMethodDataSofortCountry::De => "DE",
CreatePaymentIntentPaymentMethodDataSofortCountry::Es => "ES",
CreatePaymentIntentPaymentMethodDataSofortCountry::It => "IT",
CreatePaymentIntentPaymentMethodDataSofortCountry::Nl => "NL",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataSofortCountry {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataSofortCountry {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataSofortCountry {
fn default() -> Self {
Self::At
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodData`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataType {
AcssDebit,
Affirm,
AfterpayClearpay,
Alipay,
AuBecsDebit,
BacsDebit,
Bancontact,
Blik,
Boleto,
Cashapp,
CustomerBalance,
Eps,
Fpx,
Giropay,
Grabpay,
Ideal,
Klarna,
Konbini,
Link,
Oxxo,
P24,
Paynow,
Paypal,
Pix,
Promptpay,
RevolutPay,
SepaDebit,
Sofort,
Swish,
UsBankAccount,
WechatPay,
Zip,
}
impl CreatePaymentIntentPaymentMethodDataType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataType::AcssDebit => "acss_debit",
CreatePaymentIntentPaymentMethodDataType::Affirm => "affirm",
CreatePaymentIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay",
CreatePaymentIntentPaymentMethodDataType::Alipay => "alipay",
CreatePaymentIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit",
CreatePaymentIntentPaymentMethodDataType::BacsDebit => "bacs_debit",
CreatePaymentIntentPaymentMethodDataType::Bancontact => "bancontact",
CreatePaymentIntentPaymentMethodDataType::Blik => "blik",
CreatePaymentIntentPaymentMethodDataType::Boleto => "boleto",
CreatePaymentIntentPaymentMethodDataType::Cashapp => "cashapp",
CreatePaymentIntentPaymentMethodDataType::CustomerBalance => "customer_balance",
CreatePaymentIntentPaymentMethodDataType::Eps => "eps",
CreatePaymentIntentPaymentMethodDataType::Fpx => "fpx",
CreatePaymentIntentPaymentMethodDataType::Giropay => "giropay",
CreatePaymentIntentPaymentMethodDataType::Grabpay => "grabpay",
CreatePaymentIntentPaymentMethodDataType::Ideal => "ideal",
CreatePaymentIntentPaymentMethodDataType::Klarna => "klarna",
CreatePaymentIntentPaymentMethodDataType::Konbini => "konbini",
CreatePaymentIntentPaymentMethodDataType::Link => "link",
CreatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo",
CreatePaymentIntentPaymentMethodDataType::P24 => "p24",
CreatePaymentIntentPaymentMethodDataType::Paynow => "paynow",
CreatePaymentIntentPaymentMethodDataType::Paypal => "paypal",
CreatePaymentIntentPaymentMethodDataType::Pix => "pix",
CreatePaymentIntentPaymentMethodDataType::Promptpay => "promptpay",
CreatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay",
CreatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit",
CreatePaymentIntentPaymentMethodDataType::Sofort => "sofort",
CreatePaymentIntentPaymentMethodDataType::Swish => "swish",
CreatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account",
CreatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay",
CreatePaymentIntentPaymentMethodDataType::Zip => "zip",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataType {
fn default() -> Self {
Self::AcssDebit
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataUsBankAccount`'s `account_holder_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
Company,
Individual,
}
impl CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => {
"company"
}
CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => {
"individual"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn default() -> Self {
Self::Company
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataUsBankAccount`'s `account_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
Checking,
Savings,
}
impl CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType::Checking => "checking",
CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType::Savings => "savings",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn default() -> Self {
Self::Checking
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `payment_schedule` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
Combined,
Interval,
Sporadic,
}
impl CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Combined => "combined",
CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Interval => "interval",
CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Sporadic => "sporadic",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
{
fn default() -> Self {
Self::Combined
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
Business,
Personal,
}
impl CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business",
CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
{
fn default() -> Self {
Self::Business
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAcssDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => {
"automatic"
}
CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => {
"instant"
}
CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
"microdeposits"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAffirm`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAffirm`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => {
"manual"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod
{
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAlipay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAuBecsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBacsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBancontact`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
De,
En,
Fr,
Nl,
}
impl CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::De => "de",
CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::En => "en",
CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::Fr => "fr",
CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::Nl => "nl",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBancontact`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBoleto`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan`'s `interval` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
Month,
}
impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn default() -> Self {
Self::Month
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
FixedCount,
}
impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => {
"fixed_count"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn default() -> Self {
Self::FixedCount
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
Fixed,
Maximum,
}
impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => {
"maximum"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn default() -> Self {
Self::Fixed
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `interval` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
Day,
Month,
Sporadic,
Week,
Year,
}
impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => {
"sporadic"
}
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn default() -> Self {
Self::Day
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
India,
}
impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => {
"india"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes
{
fn default() -> Self {
Self::India
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `network` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardNetwork {
Amex,
CartesBancaires,
Diners,
Discover,
EftposAu,
Interac,
Jcb,
Mastercard,
Unionpay,
Unknown,
Visa,
}
impl CreatePaymentIntentPaymentMethodOptionsCardNetwork {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => {
"cartes_bancaires"
}
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
CreatePaymentIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardNetwork {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardNetwork {
fn default() -> Self {
Self::Amex
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
IfAvailable,
Never,
}
impl CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available",
CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
{
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
IfAvailable,
Never,
}
impl CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available",
CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
{
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
IfAvailable,
Never,
}
impl CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => {
"if_available"
}
CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
IfAvailable,
Never,
}
impl CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => {
"if_available"
}
CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
Any,
Automatic,
Challenge,
}
impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => {
"automatic"
}
CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => {
"challenge"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn default() -> Self {
Self::Any
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
#[serde(rename = "A")]
A,
#[serde(rename = "C")]
C,
#[serde(rename = "I")]
I,
#[serde(rename = "N")]
N,
#[serde(rename = "R")]
R,
#[serde(rename = "U")]
U,
#[serde(rename = "Y")]
Y,
}
impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus
{
fn default() -> Self {
Self::A
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
#[serde(rename = "01")]
V01,
#[serde(rename = "02")]
V02,
#[serde(rename = "05")]
V05,
#[serde(rename = "06")]
V06,
#[serde(rename = "07")]
V07,
}
impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn default() -> Self {
Self::V01
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `exemption_indicator` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
LowRisk,
None,
}
impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => {
"low_risk"
}
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => {
"none"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator
{
fn default() -> Self {
Self::LowRisk
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
#[serde(rename = "0")]
V0,
#[serde(rename = "1")]
V1,
#[serde(rename = "2")]
V2,
#[serde(rename = "3")]
V3,
#[serde(rename = "4")]
V4,
#[serde(rename = "A")]
A,
}
impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn default() -> Self {
Self::V0
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
#[serde(rename = "1.0.2")]
V1_0_2,
#[serde(rename = "2.1.0")]
V2_1_0,
#[serde(rename = "2.2.0")]
V2_2_0,
}
impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0",
CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn default() -> Self {
Self::V1_0_2
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `requested_address_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
Aba,
Iban,
Sepa,
SortCode,
Spei,
Swift,
Zengin,
}
impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => "sort_code",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => "zengin",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn default() -> Self {
Self::Aba
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
EuBankTransfer,
GbBankTransfer,
JpBankTransfer,
MxBankTransfer,
UsBankTransfer,
}
impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::EuBankTransfer => "eu_bank_transfer",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::GbBankTransfer => "gb_bank_transfer",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::JpBankTransfer => "jp_bank_transfer",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::MxBankTransfer => "mx_bank_transfer",
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::UsBankTransfer => "us_bank_transfer",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType
{
fn default() -> Self {
Self::EuBankTransfer
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalance`'s `funding_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
BankTransfer,
}
impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => {
"bank_transfer"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn default() -> Self {
Self::BankTransfer
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalance`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsEps`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsFpx`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsGiropay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsGrabpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsIdeal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsKlarna`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsKlarna`'s `preferred_locale` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
#[serde(rename = "cs-CZ")]
CsCz,
#[serde(rename = "da-DK")]
DaDk,
#[serde(rename = "de-AT")]
DeAt,
#[serde(rename = "de-CH")]
DeCh,
#[serde(rename = "de-DE")]
DeDe,
#[serde(rename = "el-GR")]
ElGr,
#[serde(rename = "en-AT")]
EnAt,
#[serde(rename = "en-AU")]
EnAu,
#[serde(rename = "en-BE")]
EnBe,
#[serde(rename = "en-CA")]
EnCa,
#[serde(rename = "en-CH")]
EnCh,
#[serde(rename = "en-CZ")]
EnCz,
#[serde(rename = "en-DE")]
EnDe,
#[serde(rename = "en-DK")]
EnDk,
#[serde(rename = "en-ES")]
EnEs,
#[serde(rename = "en-FI")]
EnFi,
#[serde(rename = "en-FR")]
EnFr,
#[serde(rename = "en-GB")]
EnGb,
#[serde(rename = "en-GR")]
EnGr,
#[serde(rename = "en-IE")]
EnIe,
#[serde(rename = "en-IT")]
EnIt,
#[serde(rename = "en-NL")]
EnNl,
#[serde(rename = "en-NO")]
EnNo,
#[serde(rename = "en-NZ")]
EnNz,
#[serde(rename = "en-PL")]
EnPl,
#[serde(rename = "en-PT")]
EnPt,
#[serde(rename = "en-SE")]
EnSe,
#[serde(rename = "en-US")]
EnUs,
#[serde(rename = "es-ES")]
EsEs,
#[serde(rename = "es-US")]
EsUs,
#[serde(rename = "fi-FI")]
FiFi,
#[serde(rename = "fr-BE")]
FrBe,
#[serde(rename = "fr-CA")]
FrCa,
#[serde(rename = "fr-CH")]
FrCh,
#[serde(rename = "fr-FR")]
FrFr,
#[serde(rename = "it-CH")]
ItCh,
#[serde(rename = "it-IT")]
ItIt,
#[serde(rename = "nb-NO")]
NbNo,
#[serde(rename = "nl-BE")]
NlBe,
#[serde(rename = "nl-NL")]
NlNl,
#[serde(rename = "pl-PL")]
PlPl,
#[serde(rename = "pt-PT")]
PtPt,
#[serde(rename = "sv-FI")]
SvFi,
#[serde(rename = "sv-SE")]
SvSe,
}
impl CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::CsCz => "cs-CZ",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DaDk => "da-DK",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeAt => "de-AT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeCh => "de-CH",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeDe => "de-DE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ElGr => "el-GR",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnAt => "en-AT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnAu => "en-AU",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnBe => "en-BE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCa => "en-CA",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCh => "en-CH",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCz => "en-CZ",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnDe => "en-DE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnDk => "en-DK",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnEs => "en-ES",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnFi => "en-FI",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnFr => "en-FR",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnGb => "en-GB",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnGr => "en-GR",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnIe => "en-IE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnIt => "en-IT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNl => "en-NL",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNo => "en-NO",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNz => "en-NZ",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPl => "en-PL",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPt => "en-PT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnSe => "en-SE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnUs => "en-US",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsEs => "es-ES",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsUs => "es-US",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FiFi => "fi-FI",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrBe => "fr-BE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrCa => "fr-CA",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrCh => "fr-CH",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrFr => "fr-FR",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ItCh => "it-CH",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ItIt => "it-IT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NbNo => "nb-NO",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlBe => "nl-BE",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlNl => "nl-NL",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PlPl => "pl-PL",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PtPt => "pt-PT",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvFi => "sv-FI",
CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvSe => "sv-SE",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn default() -> Self {
Self::CsCz
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsKlarna`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsKonbini`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsLink`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsLink`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsP24`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPaynow`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPaypal`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
Manual,
}
impl CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPaypal`'s `preferred_locale` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
#[serde(rename = "cs-CZ")]
CsCz,
#[serde(rename = "da-DK")]
DaDk,
#[serde(rename = "de-AT")]
DeAt,
#[serde(rename = "de-DE")]
DeDe,
#[serde(rename = "de-LU")]
DeLu,
#[serde(rename = "el-GR")]
ElGr,
#[serde(rename = "en-GB")]
EnGb,
#[serde(rename = "en-US")]
EnUs,
#[serde(rename = "es-ES")]
EsEs,
#[serde(rename = "fi-FI")]
FiFi,
#[serde(rename = "fr-BE")]
FrBe,
#[serde(rename = "fr-FR")]
FrFr,
#[serde(rename = "fr-LU")]
FrLu,
#[serde(rename = "hu-HU")]
HuHu,
#[serde(rename = "it-IT")]
ItIt,
#[serde(rename = "nl-BE")]
NlBe,
#[serde(rename = "nl-NL")]
NlNl,
#[serde(rename = "pl-PL")]
PlPl,
#[serde(rename = "pt-PT")]
PtPt,
#[serde(rename = "sk-SK")]
SkSk,
#[serde(rename = "sv-SE")]
SvSe,
}
impl CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::CsCz => "cs-CZ",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DaDk => "da-DK",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeAt => "de-AT",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeDe => "de-DE",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeLu => "de-LU",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::ElGr => "el-GR",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EnGb => "en-GB",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EnUs => "en-US",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EsEs => "es-ES",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FiFi => "fi-FI",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrBe => "fr-BE",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrFr => "fr-FR",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrLu => "fr-LU",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::HuHu => "hu-HU",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::ItIt => "it-IT",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::NlBe => "nl-BE",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::NlNl => "nl-NL",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::PlPl => "pl-PL",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::PtPt => "pt-PT",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::SkSk => "sk-SK",
CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::SvSe => "sv-SE",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn default() -> Self {
Self::CsCz
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPaypal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPix`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsPromptpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsRevolutPay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSofort`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
De,
En,
Es,
Fr,
It,
Nl,
Pl,
}
impl CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::De => "de",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::En => "en",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Es => "es",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Fr => "fr",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::It => "it",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Nl => "nl",
CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Pl => "pl",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSofort`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
None,
OffSession,
}
impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
Balances,
Ownership,
PaymentMethod,
Transactions,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Balances => "balances",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Ownership => "ownership",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::PaymentMethod => "payment_method",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Transactions => "transactions",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn default() -> Self {
Self::Balances
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
Balances,
Transactions,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn default() -> Self {
Self::Balances
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
Paper,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper",
}
}
}
impl AsRef<str>
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn default() -> Self {
Self::Paper
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
Ach,
UsDomesticWire,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => "us_domestic_wire",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested
{
fn default() -> Self {
Self::Ach
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
Fastest,
Standard,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => "fastest",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => "standard",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed
{
fn default() -> Self {
Self::Fastest
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => {
"off_session"
}
CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant",
CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod
{
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsWechatPay`'s `client` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsWechatPayClient {
Android,
Ios,
Web,
}
impl CreatePaymentIntentPaymentMethodOptionsWechatPayClient {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsWechatPayClient::Android => "android",
CreatePaymentIntentPaymentMethodOptionsWechatPayClient::Ios => "ios",
CreatePaymentIntentPaymentMethodOptionsWechatPayClient::Web => "web",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn default() -> Self {
Self::Android
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsWechatPay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsZip`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
None,
}
impl CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `FundingInstructionsBankTransferFinancialAddress`'s `supported_networks` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum FundingInstructionsBankTransferFinancialAddressSupportedNetworks {
Ach,
Bacs,
DomesticWireUs,
Fps,
Sepa,
Spei,
Swift,
Zengin,
}
impl FundingInstructionsBankTransferFinancialAddressSupportedNetworks {
pub fn as_str(self) -> &'static str {
match self {
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Ach => "ach",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Bacs => "bacs",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => {
"domestic_wire_us"
}
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Fps => "fps",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Sepa => "sepa",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Spei => "spei",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Swift => "swift",
FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Zengin => "zengin",
}
}
}
impl AsRef<str> for FundingInstructionsBankTransferFinancialAddressSupportedNetworks {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressSupportedNetworks {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for FundingInstructionsBankTransferFinancialAddressSupportedNetworks {
fn default() -> Self {
Self::Ach
}
}
/// An enum representing the possible values of an `FundingInstructionsBankTransferFinancialAddress`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum FundingInstructionsBankTransferFinancialAddressType {
Aba,
Iban,
SortCode,
Spei,
Swift,
Zengin,
}
impl FundingInstructionsBankTransferFinancialAddressType {
pub fn as_str(self) -> &'static str {
match self {
FundingInstructionsBankTransferFinancialAddressType::Aba => "aba",
FundingInstructionsBankTransferFinancialAddressType::Iban => "iban",
FundingInstructionsBankTransferFinancialAddressType::SortCode => "sort_code",
FundingInstructionsBankTransferFinancialAddressType::Spei => "spei",
FundingInstructionsBankTransferFinancialAddressType::Swift => "swift",
FundingInstructionsBankTransferFinancialAddressType::Zengin => "zengin",
}
}
}
impl AsRef<str> for FundingInstructionsBankTransferFinancialAddressType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for FundingInstructionsBankTransferFinancialAddressType {
fn default() -> Self {
Self::Aba
}
}
/// An enum representing the possible values of an `PaymentFlowsAutomaticPaymentMethodsPaymentIntent`'s `allow_redirects` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
Always,
Never,
}
impl PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
pub fn as_str(self) -> &'static str {
match self {
PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects::Always => "always",
PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects::Never => "never",
}
}
}
impl AsRef<str> for PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
fn default() -> Self {
Self::Always
}
}
/// An enum representing the possible values of an `PaymentIntent`'s `cancellation_reason` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentCancellationReason {
Abandoned,
Automatic,
Duplicate,
FailedInvoice,
Fraudulent,
RequestedByCustomer,
VoidInvoice,
}
impl PaymentIntentCancellationReason {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentCancellationReason::Abandoned => "abandoned",
PaymentIntentCancellationReason::Automatic => "automatic",
PaymentIntentCancellationReason::Duplicate => "duplicate",
PaymentIntentCancellationReason::FailedInvoice => "failed_invoice",
PaymentIntentCancellationReason::Fraudulent => "fraudulent",
PaymentIntentCancellationReason::RequestedByCustomer => "requested_by_customer",
PaymentIntentCancellationReason::VoidInvoice => "void_invoice",
}
}
}
impl AsRef<str> for PaymentIntentCancellationReason {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentCancellationReason {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentCancellationReason {
fn default() -> Self {
Self::Abandoned
}
}
/// An enum representing the possible values of an `PaymentIntent`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentCaptureMethod {
Automatic,
AutomaticAsync,
Manual,
}
impl PaymentIntentCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentCaptureMethod::Automatic => "automatic",
PaymentIntentCaptureMethod::AutomaticAsync => "automatic_async",
PaymentIntentCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentIntentCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentCaptureMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `PaymentIntent`'s `confirmation_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentConfirmationMethod {
Automatic,
Manual,
}
impl PaymentIntentConfirmationMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentConfirmationMethod::Automatic => "automatic",
PaymentIntentConfirmationMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentIntentConfirmationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentConfirmationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentConfirmationMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `PaymentIntentNextActionDisplayBankTransferInstructions`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentNextActionDisplayBankTransferInstructionsType {
EuBankTransfer,
GbBankTransfer,
JpBankTransfer,
MxBankTransfer,
UsBankTransfer,
}
impl PaymentIntentNextActionDisplayBankTransferInstructionsType {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentNextActionDisplayBankTransferInstructionsType::EuBankTransfer => {
"eu_bank_transfer"
}
PaymentIntentNextActionDisplayBankTransferInstructionsType::GbBankTransfer => {
"gb_bank_transfer"
}
PaymentIntentNextActionDisplayBankTransferInstructionsType::JpBankTransfer => {
"jp_bank_transfer"
}
PaymentIntentNextActionDisplayBankTransferInstructionsType::MxBankTransfer => {
"mx_bank_transfer"
}
PaymentIntentNextActionDisplayBankTransferInstructionsType::UsBankTransfer => {
"us_bank_transfer"
}
}
}
}
impl AsRef<str> for PaymentIntentNextActionDisplayBankTransferInstructionsType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentNextActionDisplayBankTransferInstructionsType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentNextActionDisplayBankTransferInstructionsType {
fn default() -> Self {
Self::EuBankTransfer
}
}
/// An enum representing the possible values of an `PaymentIntentNextActionVerifyWithMicrodeposits`'s `microdeposit_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType {
Amounts,
DescriptorCode,
}
impl PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts",
PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => {
"descriptor_code"
}
}
}
}
impl AsRef<str> for PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType {
fn default() -> Self {
Self::Amounts
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsAcssDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => "off_session",
PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic",
PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant",
PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
"microdeposits"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsAuBecsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => {
"off_session"
}
PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}
impl PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardCaptureMethod {
Manual,
}
impl PaymentIntentPaymentMethodOptionsCardCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `network` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardNetwork {
Amex,
CartesBancaires,
Diners,
Discover,
EftposAu,
Interac,
Jcb,
Mastercard,
Unionpay,
Unknown,
Visa,
}
impl PaymentIntentPaymentMethodOptionsCardNetwork {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
PaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires",
PaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
PaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
PaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
PaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
PaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
PaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
PaymentIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
PaymentIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
PaymentIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardNetwork {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardNetwork {
fn default() -> Self {
Self::Amex
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
IfAvailable,
Never,
}
impl PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => {
"if_available"
}
PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
IfAvailable,
Never,
}
impl PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => {
"if_available"
}
PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
{
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardRequestMulticapture {
IfAvailable,
Never,
}
impl PaymentIntentPaymentMethodOptionsCardRequestMulticapture {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available",
PaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardRequestOvercapture {
IfAvailable,
Never,
}
impl PaymentIntentPaymentMethodOptionsCardRequestOvercapture {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available",
PaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
Any,
Automatic,
Challenge,
}
impl PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic",
PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn default() -> Self {
Self::Any
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session",
PaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsEps`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
None,
}
impl PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsLink`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsLinkCaptureMethod {
Manual,
}
impl PaymentIntentPaymentMethodOptionsLinkCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsLinkCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsLink`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
None,
OffSession,
}
impl PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit`'s `payment_schedule` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
Combined,
Interval,
Sporadic,
}
impl PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => {
"combined"
}
PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => {
"interval"
}
PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => {
"sporadic"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule
{
fn default() -> Self {
Self::Combined
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit`'s `transaction_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
Business,
Personal,
}
impl PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => {
"business"
}
PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => {
"personal"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType
{
fn default() -> Self {
Self::Business
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => "off_session",
PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
None,
}
impl PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
Fastest,
Standard,
}
impl PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => {
"fastest"
}
PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => {
"standard"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed
{
fn default() -> Self {
Self::Fastest
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none",
PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => {
"off_session"
}
PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => {
"automatic"
}
PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant",
PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => {
"microdeposits"
}
}
}
}
impl AsRef<str> for PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `PaymentIntentProcessing`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentProcessingType {
Card,
}
impl PaymentIntentProcessingType {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentProcessingType::Card => "card",
}
}
}
impl AsRef<str> for PaymentIntentProcessingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentProcessingType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentProcessingType {
fn default() -> Self {
Self::Card
}
}
/// An enum representing the possible values of an `PaymentIntent`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentSetupFutureUsage {
OffSession,
OnSession,
}
impl PaymentIntentSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentSetupFutureUsage::OffSession => "off_session",
PaymentIntentSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentSetupFutureUsage {
fn default() -> Self {
Self::OffSession
}
}
/// An enum representing the possible values of an `UpdatePaymentIntent`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentSetupFutureUsageFilter {
OffSession,
OnSession,
}
impl PaymentIntentSetupFutureUsageFilter {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentSetupFutureUsageFilter::OffSession => "off_session",
PaymentIntentSetupFutureUsageFilter::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentIntentSetupFutureUsageFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentSetupFutureUsageFilter {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentSetupFutureUsageFilter {
fn default() -> Self {
Self::OffSession
}
}
/// An enum representing the possible values of an `PaymentIntent`'s `status` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentStatus {
Canceled,
Processing,
RequiresAction,
RequiresCapture,
RequiresConfirmation,
RequiresPaymentMethod,
Succeeded,
}
impl PaymentIntentStatus {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentStatus::Canceled => "canceled",
PaymentIntentStatus::Processing => "processing",
PaymentIntentStatus::RequiresAction => "requires_action",
PaymentIntentStatus::RequiresCapture => "requires_capture",
PaymentIntentStatus::RequiresConfirmation => "requires_confirmation",
PaymentIntentStatus::RequiresPaymentMethod => "requires_payment_method",
PaymentIntentStatus::Succeeded => "succeeded",
}
}
}
impl AsRef<str> for PaymentIntentStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentIntentStatus {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentStatus {
fn default() -> Self {
Self::Canceled
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsAffirm`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsAffirmCaptureMethod {
Manual,
}
impl PaymentMethodOptionsAffirmCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsAffirmCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentMethodOptionsAffirmCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsAffirmCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsAffirmCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsAffirm`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsAffirmSetupFutureUsage {
None,
}
impl PaymentMethodOptionsAffirmSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsAffirmSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsAffirmSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsAffirmSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsAffirmSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsAfterpayClearpay`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsAfterpayClearpayCaptureMethod {
Manual,
}
impl PaymentMethodOptionsAfterpayClearpayCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsAfterpayClearpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
None,
}
impl PaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsAlipay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsAlipaySetupFutureUsage {
None,
OffSession,
}
impl PaymentMethodOptionsAlipaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsAlipaySetupFutureUsage::None => "none",
PaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsAlipaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsAlipaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsAlipaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsBacsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsBacsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentMethodOptionsBacsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none",
PaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session",
PaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsBacsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsBacsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsBacsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsBancontact`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsBancontactPreferredLanguage {
De,
En,
Fr,
Nl,
}
impl PaymentMethodOptionsBancontactPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsBancontactPreferredLanguage::De => "de",
PaymentMethodOptionsBancontactPreferredLanguage::En => "en",
PaymentMethodOptionsBancontactPreferredLanguage::Fr => "fr",
PaymentMethodOptionsBancontactPreferredLanguage::Nl => "nl",
}
}
}
impl AsRef<str> for PaymentMethodOptionsBancontactPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsBancontactPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsBancontactPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsBancontact`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsBancontactSetupFutureUsage {
None,
OffSession,
}
impl PaymentMethodOptionsBancontactSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsBancontactSetupFutureUsage::None => "none",
PaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsBancontactSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsBancontactSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsBancontactSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsBoleto`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsBoletoSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentMethodOptionsBoletoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsBoletoSetupFutureUsage::None => "none",
PaymentMethodOptionsBoletoSetupFutureUsage::OffSession => "off_session",
PaymentMethodOptionsBoletoSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsBoletoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsBoletoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsBoletoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCardMandateOptionsAmountType {
Fixed,
Maximum,
}
impl PaymentMethodOptionsCardMandateOptionsAmountType {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
PaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCardMandateOptionsAmountType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCardMandateOptionsAmountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCardMandateOptionsAmountType {
fn default() -> Self {
Self::Fixed
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCardMandateOptions`'s `interval` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCardMandateOptionsInterval {
Day,
Month,
Sporadic,
Week,
Year,
}
impl PaymentMethodOptionsCardMandateOptionsInterval {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
PaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
PaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic",
PaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
PaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCardMandateOptionsInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCardMandateOptionsInterval {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCardMandateOptionsInterval {
fn default() -> Self {
Self::Day
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCardMandateOptionsSupportedTypes {
India,
}
impl PaymentMethodOptionsCardMandateOptionsSupportedTypes {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn default() -> Self {
Self::India
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCashapp`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCashappCaptureMethod {
Manual,
}
impl PaymentMethodOptionsCashappCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCashappCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCashappCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCashappCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCashappCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCashapp`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCashappSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl PaymentMethodOptionsCashappSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCashappSetupFutureUsage::None => "none",
PaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session",
PaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCashappSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCashappSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCashappSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCustomerBalanceBankTransfer`'s `requested_address_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
Aba,
Iban,
Sepa,
SortCode,
Spei,
Swift,
Zengin,
}
impl PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba",
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban",
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa",
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => {
"sort_code"
}
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei",
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift",
PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => {
"zengin"
}
}
}
}
impl AsRef<str> for PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn default() -> Self {
Self::Aba
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCustomerBalanceBankTransfer`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCustomerBalanceBankTransferType {
EuBankTransfer,
GbBankTransfer,
JpBankTransfer,
MxBankTransfer,
UsBankTransfer,
}
impl PaymentMethodOptionsCustomerBalanceBankTransferType {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCustomerBalanceBankTransferType::EuBankTransfer => {
"eu_bank_transfer"
}
PaymentMethodOptionsCustomerBalanceBankTransferType::GbBankTransfer => {
"gb_bank_transfer"
}
PaymentMethodOptionsCustomerBalanceBankTransferType::JpBankTransfer => {
"jp_bank_transfer"
}
PaymentMethodOptionsCustomerBalanceBankTransferType::MxBankTransfer => {
"mx_bank_transfer"
}
PaymentMethodOptionsCustomerBalanceBankTransferType::UsBankTransfer => {
"us_bank_transfer"
}
}
}
}
impl AsRef<str> for PaymentMethodOptionsCustomerBalanceBankTransferType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCustomerBalanceBankTransferType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCustomerBalanceBankTransferType {
fn default() -> Self {
Self::EuBankTransfer
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCustomerBalance`'s `funding_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCustomerBalanceFundingType {
BankTransfer,
}
impl PaymentMethodOptionsCustomerBalanceFundingType {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCustomerBalanceFundingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCustomerBalanceFundingType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCustomerBalanceFundingType {
fn default() -> Self {
Self::BankTransfer
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsCustomerBalance`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsCustomerBalanceSetupFutureUsage {
None,
}
impl PaymentMethodOptionsCustomerBalanceSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsFpx`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsFpxSetupFutureUsage {
None,
}
impl PaymentMethodOptionsFpxSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsFpxSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsFpxSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsFpxSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsFpxSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsGiropay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsGiropaySetupFutureUsage {
None,
}
impl PaymentMethodOptionsGiropaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsGiropaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsGiropaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsGiropaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsGiropaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsGrabpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsGrabpaySetupFutureUsage {
None,
}
impl PaymentMethodOptionsGrabpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsGrabpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsGrabpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsGrabpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsGrabpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsIdeal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsIdealSetupFutureUsage {
None,
OffSession,
}
impl PaymentMethodOptionsIdealSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsIdealSetupFutureUsage::None => "none",
PaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsIdealSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsIdealSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsIdealSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsKlarna`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsKlarnaCaptureMethod {
Manual,
}
impl PaymentMethodOptionsKlarnaCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsKlarnaCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentMethodOptionsKlarnaCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsKlarnaCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsKlarnaCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsKlarna`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsKlarnaSetupFutureUsage {
None,
}
impl PaymentMethodOptionsKlarnaSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsKlarnaSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsKlarnaSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsKlarnaSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsKlarnaSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsKonbini`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsKonbiniSetupFutureUsage {
None,
}
impl PaymentMethodOptionsKonbiniSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsKonbiniSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsKonbiniSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsKonbiniSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsKonbiniSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsOxxo`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsOxxoSetupFutureUsage {
None,
}
impl PaymentMethodOptionsOxxoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsOxxoSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsOxxoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsOxxoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsOxxoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsP24`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsP24SetupFutureUsage {
None,
}
impl PaymentMethodOptionsP24SetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsP24SetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsP24SetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsP24SetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsP24SetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsPaynow`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsPaynowSetupFutureUsage {
None,
}
impl PaymentMethodOptionsPaynowSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsPaynowSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsPaynowSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsPaynowSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsPaynowSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsPaypal`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsPaypalCaptureMethod {
Manual,
}
impl PaymentMethodOptionsPaypalCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsPaypalCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for PaymentMethodOptionsPaypalCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsPaypalCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsPaypalCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsPaypal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsPaypalSetupFutureUsage {
None,
OffSession,
}
impl PaymentMethodOptionsPaypalSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsPaypalSetupFutureUsage::None => "none",
PaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsPaypalSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsPaypalSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsPaypalSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsPix`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsPixSetupFutureUsage {
None,
}
impl PaymentMethodOptionsPixSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsPixSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsPixSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsPixSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsPixSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsPromptpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsPromptpaySetupFutureUsage {
None,
}
impl PaymentMethodOptionsPromptpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsPromptpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsPromptpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsPromptpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsPromptpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsSofort`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsSofortPreferredLanguage {
De,
En,
Es,
Fr,
It,
Nl,
Pl,
}
impl PaymentMethodOptionsSofortPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsSofortPreferredLanguage::De => "de",
PaymentMethodOptionsSofortPreferredLanguage::En => "en",
PaymentMethodOptionsSofortPreferredLanguage::Es => "es",
PaymentMethodOptionsSofortPreferredLanguage::Fr => "fr",
PaymentMethodOptionsSofortPreferredLanguage::It => "it",
PaymentMethodOptionsSofortPreferredLanguage::Nl => "nl",
PaymentMethodOptionsSofortPreferredLanguage::Pl => "pl",
}
}
}
impl AsRef<str> for PaymentMethodOptionsSofortPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsSofortPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsSofortPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsSofort`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsSofortSetupFutureUsage {
None,
OffSession,
}
impl PaymentMethodOptionsSofortSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsSofortSetupFutureUsage::None => "none",
PaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session",
}
}
}
impl AsRef<str> for PaymentMethodOptionsSofortSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsSofortSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsSofortSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsWechatPay`'s `client` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsWechatPayClient {
Android,
Ios,
Web,
}
impl PaymentMethodOptionsWechatPayClient {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsWechatPayClient::Android => "android",
PaymentMethodOptionsWechatPayClient::Ios => "ios",
PaymentMethodOptionsWechatPayClient::Web => "web",
}
}
}
impl AsRef<str> for PaymentMethodOptionsWechatPayClient {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsWechatPayClient {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsWechatPayClient {
fn default() -> Self {
Self::Android
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsWechatPay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsWechatPaySetupFutureUsage {
None,
}
impl PaymentMethodOptionsWechatPaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsWechatPaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsWechatPaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsWechatPaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsWechatPaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `PaymentMethodOptionsZip`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentMethodOptionsZipSetupFutureUsage {
None,
}
impl PaymentMethodOptionsZipSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentMethodOptionsZipSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for PaymentMethodOptionsZipSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for PaymentMethodOptionsZipSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentMethodOptionsZipSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataEps`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataEpsBank {
ArzteUndApothekerBank,
AustrianAnadiBankAg,
BankAustria,
BankhausCarlSpangler,
BankhausSchelhammerUndSchatteraAg,
BawagPskAg,
BksBankAg,
BrullKallmusBankAg,
BtvVierLanderBank,
CapitalBankGraweGruppeAg,
DeutscheBankAg,
Dolomitenbank,
EasybankAg,
ErsteBankUndSparkassen,
HypoAlpeadriabankInternationalAg,
HypoBankBurgenlandAktiengesellschaft,
HypoNoeLbFurNiederosterreichUWien,
HypoOberosterreichSalzburgSteiermark,
HypoTirolBankAg,
HypoVorarlbergBankAg,
MarchfelderBank,
OberbankAg,
RaiffeisenBankengruppeOsterreich,
SchoellerbankAg,
SpardaBankWien,
VolksbankGruppe,
VolkskreditbankAg,
VrBankBraunau,
}
impl UpdatePaymentIntentPaymentMethodDataEpsBank {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => {
"arzte_und_apotheker_bank"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => {
"austrian_anadi_bank_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria",
UpdatePaymentIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => {
"bankhaus_carl_spangler"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => {
"bankhaus_schelhammer_und_schattera_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => {
"brull_kallmus_bank_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::BtvVierLanderBank => {
"btv_vier_lander_bank"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => {
"capital_bank_grawe_gruppe_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank",
UpdatePaymentIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => {
"erste_bank_und_sparkassen"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => {
"hypo_alpeadriabank_international_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => {
"hypo_bank_burgenland_aktiengesellschaft"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => {
"hypo_noe_lb_fur_niederosterreich_u_wien"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => {
"hypo_oberosterreich_salzburg_steiermark"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => {
"hypo_vorarlberg_bank_ag"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank",
UpdatePaymentIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => {
"raiffeisen_bankengruppe_osterreich"
}
UpdatePaymentIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien",
UpdatePaymentIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe",
UpdatePaymentIntentPaymentMethodDataEpsBank::VolkskreditbankAg => "volkskreditbank_ag",
UpdatePaymentIntentPaymentMethodDataEpsBank::VrBankBraunau => "vr_bank_braunau",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataEpsBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataEpsBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataEpsBank {
fn default() -> Self {
Self::ArzteUndApothekerBank
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataFpx`'s `account_holder_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType {
Company,
Individual,
}
impl UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType::Company => "company",
UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType::Individual => "individual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataFpxAccountHolderType {
fn default() -> Self {
Self::Company
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataFpx`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataFpxBank {
AffinBank,
Agrobank,
AllianceBank,
Ambank,
BankIslam,
BankMuamalat,
BankOfChina,
BankRakyat,
Bsn,
Cimb,
DeutscheBank,
HongLeongBank,
Hsbc,
Kfh,
Maybank2e,
Maybank2u,
Ocbc,
PbEnterprise,
PublicBank,
Rhb,
StandardChartered,
Uob,
}
impl UpdatePaymentIntentPaymentMethodDataFpxBank {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataFpxBank::AffinBank => "affin_bank",
UpdatePaymentIntentPaymentMethodDataFpxBank::Agrobank => "agrobank",
UpdatePaymentIntentPaymentMethodDataFpxBank::AllianceBank => "alliance_bank",
UpdatePaymentIntentPaymentMethodDataFpxBank::Ambank => "ambank",
UpdatePaymentIntentPaymentMethodDataFpxBank::BankIslam => "bank_islam",
UpdatePaymentIntentPaymentMethodDataFpxBank::BankMuamalat => "bank_muamalat",
UpdatePaymentIntentPaymentMethodDataFpxBank::BankOfChina => "bank_of_china",
UpdatePaymentIntentPaymentMethodDataFpxBank::BankRakyat => "bank_rakyat",
UpdatePaymentIntentPaymentMethodDataFpxBank::Bsn => "bsn",
UpdatePaymentIntentPaymentMethodDataFpxBank::Cimb => "cimb",
UpdatePaymentIntentPaymentMethodDataFpxBank::DeutscheBank => "deutsche_bank",
UpdatePaymentIntentPaymentMethodDataFpxBank::HongLeongBank => "hong_leong_bank",
UpdatePaymentIntentPaymentMethodDataFpxBank::Hsbc => "hsbc",
UpdatePaymentIntentPaymentMethodDataFpxBank::Kfh => "kfh",
UpdatePaymentIntentPaymentMethodDataFpxBank::Maybank2e => "maybank2e",
UpdatePaymentIntentPaymentMethodDataFpxBank::Maybank2u => "maybank2u",
UpdatePaymentIntentPaymentMethodDataFpxBank::Ocbc => "ocbc",
UpdatePaymentIntentPaymentMethodDataFpxBank::PbEnterprise => "pb_enterprise",
UpdatePaymentIntentPaymentMethodDataFpxBank::PublicBank => "public_bank",
UpdatePaymentIntentPaymentMethodDataFpxBank::Rhb => "rhb",
UpdatePaymentIntentPaymentMethodDataFpxBank::StandardChartered => "standard_chartered",
UpdatePaymentIntentPaymentMethodDataFpxBank::Uob => "uob",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataFpxBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataFpxBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataFpxBank {
fn default() -> Self {
Self::AffinBank
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataIdeal`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataIdealBank {
AbnAmro,
AsnBank,
Bunq,
Handelsbanken,
Ing,
Knab,
Moneyou,
N26,
Nn,
Rabobank,
Regiobank,
Revolut,
SnsBank,
TriodosBank,
VanLanschot,
Yoursafe,
}
impl UpdatePaymentIntentPaymentMethodDataIdealBank {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataIdealBank::AbnAmro => "abn_amro",
UpdatePaymentIntentPaymentMethodDataIdealBank::AsnBank => "asn_bank",
UpdatePaymentIntentPaymentMethodDataIdealBank::Bunq => "bunq",
UpdatePaymentIntentPaymentMethodDataIdealBank::Handelsbanken => "handelsbanken",
UpdatePaymentIntentPaymentMethodDataIdealBank::Ing => "ing",
UpdatePaymentIntentPaymentMethodDataIdealBank::Knab => "knab",
UpdatePaymentIntentPaymentMethodDataIdealBank::Moneyou => "moneyou",
UpdatePaymentIntentPaymentMethodDataIdealBank::N26 => "n26",
UpdatePaymentIntentPaymentMethodDataIdealBank::Nn => "nn",
UpdatePaymentIntentPaymentMethodDataIdealBank::Rabobank => "rabobank",
UpdatePaymentIntentPaymentMethodDataIdealBank::Regiobank => "regiobank",
UpdatePaymentIntentPaymentMethodDataIdealBank::Revolut => "revolut",
UpdatePaymentIntentPaymentMethodDataIdealBank::SnsBank => "sns_bank",
UpdatePaymentIntentPaymentMethodDataIdealBank::TriodosBank => "triodos_bank",
UpdatePaymentIntentPaymentMethodDataIdealBank::VanLanschot => "van_lanschot",
UpdatePaymentIntentPaymentMethodDataIdealBank::Yoursafe => "yoursafe",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataIdealBank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataIdealBank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataIdealBank {
fn default() -> Self {
Self::AbnAmro
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataP24`'s `bank` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataP24Bank {
AliorBank,
BankMillennium,
BankNowyBfgSa,
BankPekaoSa,
BankiSpbdzielcze,
Blik,
BnpParibas,
Boz,
CitiHandlowy,
CreditAgricole,
Envelobank,
EtransferPocztowy24,
GetinBank,
Ideabank,
Ing,
Inteligo,
MbankMtransfer,
NestPrzelew,
NoblePay,
PbacZIpko,
PlusBank,
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}
impl UpdatePaymentIntentPaymentMethodDataP24Bank {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataP24Bank::AliorBank => "alior_bank",
UpdatePaymentIntentPaymentMethodDataP24Bank::BankMillennium => "bank_millennium",
UpdatePaymentIntentPaymentMethodDataP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa",
UpdatePaymentIntentPaymentMethodDataP24Bank::BankPekaoSa => "bank_pekao_sa",
UpdatePaymentIntentPaymentMethodDataP24Bank::BankiSpbdzielcze => "banki_spbdzielcze",
UpdatePaymentIntentPaymentMethodDataP24Bank::Blik => "blik",
UpdatePaymentIntentPaymentMethodDataP24Bank::BnpParibas => "bnp_paribas",
UpdatePaymentIntentPaymentMethodDataP24Bank::Boz => "boz",
UpdatePaymentIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy",
UpdatePaymentIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole",
UpdatePaymentIntentPaymentMethodDataP24Bank::Envelobank => "envelobank",
UpdatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => {
"etransfer_pocztowy24"
}
UpdatePaymentIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank",
UpdatePaymentIntentPaymentMethodDataP24Bank::Ideabank => "ideabank",
UpdatePaymentIntentPaymentMethodDataP24Bank::Ing => "ing",
UpdatePaymentIntentPaymentMethodDataP24Bank::Inteligo => "inteligo",
UpdatePaymentIntentPaymentMethodDataP24Bank::MbankMtransfer => "mbank_mtransfer",
UpdatePaymentIntentPaymentMethodDataP24Bank::NestPrzelew => "nest_przelew",
UpdatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay",
UpdatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko",
UpdatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank",
UpdatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => {
"santander_przelew24"
}
UpdatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => {
"tmobile_usbugi_bankowe"
}
UpdatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
UpdatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank",
UpdatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataP24Bank {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataP24Bank {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataP24Bank {
fn default() -> Self {
Self::AliorBank
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataSofort`'s `country` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataSofortCountry {
#[serde(rename = "AT")]
At,
#[serde(rename = "BE")]
Be,
#[serde(rename = "DE")]
De,
#[serde(rename = "ES")]
Es,
#[serde(rename = "IT")]
It,
#[serde(rename = "NL")]
Nl,
}
impl UpdatePaymentIntentPaymentMethodDataSofortCountry {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataSofortCountry::At => "AT",
UpdatePaymentIntentPaymentMethodDataSofortCountry::Be => "BE",
UpdatePaymentIntentPaymentMethodDataSofortCountry::De => "DE",
UpdatePaymentIntentPaymentMethodDataSofortCountry::Es => "ES",
UpdatePaymentIntentPaymentMethodDataSofortCountry::It => "IT",
UpdatePaymentIntentPaymentMethodDataSofortCountry::Nl => "NL",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataSofortCountry {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataSofortCountry {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataSofortCountry {
fn default() -> Self {
Self::At
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodData`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataType {
AcssDebit,
Affirm,
AfterpayClearpay,
Alipay,
AuBecsDebit,
BacsDebit,
Bancontact,
Blik,
Boleto,
Cashapp,
CustomerBalance,
Eps,
Fpx,
Giropay,
Grabpay,
Ideal,
Klarna,
Konbini,
Link,
Oxxo,
P24,
Paynow,
Paypal,
Pix,
Promptpay,
RevolutPay,
SepaDebit,
Sofort,
Swish,
UsBankAccount,
WechatPay,
Zip,
}
impl UpdatePaymentIntentPaymentMethodDataType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataType::AcssDebit => "acss_debit",
UpdatePaymentIntentPaymentMethodDataType::Affirm => "affirm",
UpdatePaymentIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay",
UpdatePaymentIntentPaymentMethodDataType::Alipay => "alipay",
UpdatePaymentIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit",
UpdatePaymentIntentPaymentMethodDataType::BacsDebit => "bacs_debit",
UpdatePaymentIntentPaymentMethodDataType::Bancontact => "bancontact",
UpdatePaymentIntentPaymentMethodDataType::Blik => "blik",
UpdatePaymentIntentPaymentMethodDataType::Boleto => "boleto",
UpdatePaymentIntentPaymentMethodDataType::Cashapp => "cashapp",
UpdatePaymentIntentPaymentMethodDataType::CustomerBalance => "customer_balance",
UpdatePaymentIntentPaymentMethodDataType::Eps => "eps",
UpdatePaymentIntentPaymentMethodDataType::Fpx => "fpx",
UpdatePaymentIntentPaymentMethodDataType::Giropay => "giropay",
UpdatePaymentIntentPaymentMethodDataType::Grabpay => "grabpay",
UpdatePaymentIntentPaymentMethodDataType::Ideal => "ideal",
UpdatePaymentIntentPaymentMethodDataType::Klarna => "klarna",
UpdatePaymentIntentPaymentMethodDataType::Konbini => "konbini",
UpdatePaymentIntentPaymentMethodDataType::Link => "link",
UpdatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo",
UpdatePaymentIntentPaymentMethodDataType::P24 => "p24",
UpdatePaymentIntentPaymentMethodDataType::Paynow => "paynow",
UpdatePaymentIntentPaymentMethodDataType::Paypal => "paypal",
UpdatePaymentIntentPaymentMethodDataType::Pix => "pix",
UpdatePaymentIntentPaymentMethodDataType::Promptpay => "promptpay",
UpdatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay",
UpdatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit",
UpdatePaymentIntentPaymentMethodDataType::Sofort => "sofort",
UpdatePaymentIntentPaymentMethodDataType::Swish => "swish",
UpdatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account",
UpdatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay",
UpdatePaymentIntentPaymentMethodDataType::Zip => "zip",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataType {
fn default() -> Self {
Self::AcssDebit
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataUsBankAccount`'s `account_holder_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
Company,
Individual,
}
impl UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => {
"company"
}
UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => {
"individual"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType {
fn default() -> Self {
Self::Company
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodDataUsBankAccount`'s `account_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
Checking,
Savings,
}
impl UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType::Checking => "checking",
UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType::Savings => "savings",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountType {
fn default() -> Self {
Self::Checking
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `payment_schedule` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
Combined,
Interval,
Sporadic,
}
impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Combined => "combined",
UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Interval => "interval",
UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule::Sporadic => "sporadic",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule
{
fn default() -> Self {
Self::Combined
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
Business,
Personal,
}
impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business",
UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType
{
fn default() -> Self {
Self::Business
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAcssDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAcssDebit`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => {
"automatic"
}
UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => {
"instant"
}
UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
"microdeposits"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod {
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAffirm`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAffirmCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAffirm`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => {
"manual"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod
{
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAlipay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAuBecsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBacsDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBancontact`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
De,
En,
Fr,
Nl,
}
impl UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::De => "de",
UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::En => "en",
UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::Fr => "fr",
UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage::Nl => "nl",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBancontactPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBancontact`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBoleto`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan`'s `interval` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
Month,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval {
fn default() -> Self {
Self::Month
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
FixedCount,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => {
"fixed_count"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType {
fn default() -> Self {
Self::FixedCount
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `amount_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
Fixed,
Maximum,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed",
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => {
"maximum"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType {
fn default() -> Self {
Self::Fixed
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `interval` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
Day,
Month,
Sporadic,
Week,
Year,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day",
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month",
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => {
"sporadic"
}
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week",
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval {
fn default() -> Self {
Self::Day
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions`'s `supported_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
India,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => {
"india"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes
{
fn default() -> Self {
Self::India
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `network` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardNetwork {
Amex,
CartesBancaires,
Diners,
Discover,
EftposAu,
Interac,
Jcb,
Mastercard,
Unionpay,
Unknown,
Visa,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardNetwork {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => {
"cartes_bancaires"
}
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown",
UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Visa => "visa",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardNetwork {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardNetwork {
fn default() -> Self {
Self::Amex
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
IfAvailable,
Never,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available",
UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
{
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
IfAvailable,
Never,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available",
UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization
{
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
IfAvailable,
Never,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => {
"if_available"
}
UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
IfAvailable,
Never,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => {
"if_available"
}
UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture {
fn default() -> Self {
Self::IfAvailable
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
Any,
Automatic,
Challenge,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any",
UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => {
"automatic"
}
UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => {
"challenge"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure {
fn default() -> Self {
Self::Any
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
#[serde(rename = "A")]
A,
#[serde(rename = "C")]
C,
#[serde(rename = "I")]
I,
#[serde(rename = "N")]
N,
#[serde(rename = "R")]
R,
#[serde(rename = "U")]
U,
#[serde(rename = "Y")]
Y,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus
{
fn default() -> Self {
Self::A
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
#[serde(rename = "01")]
V01,
#[serde(rename = "02")]
V02,
#[serde(rename = "05")]
V05,
#[serde(rename = "06")]
V06,
#[serde(rename = "07")]
V07,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator
{
fn default() -> Self {
Self::V01
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `exemption_indicator` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
LowRisk,
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => {
"low_risk"
}
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => {
"none"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator
{
fn default() -> Self {
Self::LowRisk
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
#[serde(rename = "0")]
V0,
#[serde(rename = "1")]
V1,
#[serde(rename = "2")]
V2,
#[serde(rename = "3")]
V3,
#[serde(rename = "4")]
V4,
#[serde(rename = "A")]
A,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo
{
fn default() -> Self {
Self::V0
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
#[serde(rename = "1.0.2")]
V1_0_2,
#[serde(rename = "2.1.0")]
V2_1_0,
#[serde(rename = "2.2.0")]
V2_2_0,
}
impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0",
UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion {
fn default() -> Self {
Self::V1_0_2
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCashapp`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCashappCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCashapp`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `requested_address_types` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
Aba,
Iban,
Sepa,
SortCode,
Spei,
Swift,
Zengin,
}
impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => "sort_code",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => "zengin",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes
{
fn default() -> Self {
Self::Aba
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
EuBankTransfer,
GbBankTransfer,
JpBankTransfer,
MxBankTransfer,
UsBankTransfer,
}
impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::EuBankTransfer => "eu_bank_transfer",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::GbBankTransfer => "gb_bank_transfer",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::JpBankTransfer => "jp_bank_transfer",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::MxBankTransfer => "mx_bank_transfer",
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::UsBankTransfer => "us_bank_transfer",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType
{
fn default() -> Self {
Self::EuBankTransfer
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCustomerBalance`'s `funding_type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
BankTransfer,
}
impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => {
"bank_transfer"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType {
fn default() -> Self {
Self::BankTransfer
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCustomerBalance`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsEps`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsEpsSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsFpx`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsFpxSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsGiropay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsGrabpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsIdeal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsKlarna`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsKlarnaCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsKlarna`'s `preferred_locale` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
#[serde(rename = "cs-CZ")]
CsCz,
#[serde(rename = "da-DK")]
DaDk,
#[serde(rename = "de-AT")]
DeAt,
#[serde(rename = "de-CH")]
DeCh,
#[serde(rename = "de-DE")]
DeDe,
#[serde(rename = "el-GR")]
ElGr,
#[serde(rename = "en-AT")]
EnAt,
#[serde(rename = "en-AU")]
EnAu,
#[serde(rename = "en-BE")]
EnBe,
#[serde(rename = "en-CA")]
EnCa,
#[serde(rename = "en-CH")]
EnCh,
#[serde(rename = "en-CZ")]
EnCz,
#[serde(rename = "en-DE")]
EnDe,
#[serde(rename = "en-DK")]
EnDk,
#[serde(rename = "en-ES")]
EnEs,
#[serde(rename = "en-FI")]
EnFi,
#[serde(rename = "en-FR")]
EnFr,
#[serde(rename = "en-GB")]
EnGb,
#[serde(rename = "en-GR")]
EnGr,
#[serde(rename = "en-IE")]
EnIe,
#[serde(rename = "en-IT")]
EnIt,
#[serde(rename = "en-NL")]
EnNl,
#[serde(rename = "en-NO")]
EnNo,
#[serde(rename = "en-NZ")]
EnNz,
#[serde(rename = "en-PL")]
EnPl,
#[serde(rename = "en-PT")]
EnPt,
#[serde(rename = "en-SE")]
EnSe,
#[serde(rename = "en-US")]
EnUs,
#[serde(rename = "es-ES")]
EsEs,
#[serde(rename = "es-US")]
EsUs,
#[serde(rename = "fi-FI")]
FiFi,
#[serde(rename = "fr-BE")]
FrBe,
#[serde(rename = "fr-CA")]
FrCa,
#[serde(rename = "fr-CH")]
FrCh,
#[serde(rename = "fr-FR")]
FrFr,
#[serde(rename = "it-CH")]
ItCh,
#[serde(rename = "it-IT")]
ItIt,
#[serde(rename = "nb-NO")]
NbNo,
#[serde(rename = "nl-BE")]
NlBe,
#[serde(rename = "nl-NL")]
NlNl,
#[serde(rename = "pl-PL")]
PlPl,
#[serde(rename = "pt-PT")]
PtPt,
#[serde(rename = "sv-FI")]
SvFi,
#[serde(rename = "sv-SE")]
SvSe,
}
impl UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::CsCz => "cs-CZ",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DaDk => "da-DK",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeAt => "de-AT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeCh => "de-CH",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::DeDe => "de-DE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ElGr => "el-GR",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnAt => "en-AT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnAu => "en-AU",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnBe => "en-BE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCa => "en-CA",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCh => "en-CH",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnCz => "en-CZ",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnDe => "en-DE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnDk => "en-DK",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnEs => "en-ES",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnFi => "en-FI",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnFr => "en-FR",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnGb => "en-GB",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnGr => "en-GR",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnIe => "en-IE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnIt => "en-IT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNl => "en-NL",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNo => "en-NO",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNz => "en-NZ",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPl => "en-PL",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPt => "en-PT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnSe => "en-SE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnUs => "en-US",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsEs => "es-ES",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsUs => "es-US",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FiFi => "fi-FI",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrBe => "fr-BE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrCa => "fr-CA",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrCh => "fr-CH",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::FrFr => "fr-FR",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ItCh => "it-CH",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::ItIt => "it-IT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NbNo => "nb-NO",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlBe => "nl-BE",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlNl => "nl-NL",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PlPl => "pl-PL",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PtPt => "pt-PT",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvFi => "sv-FI",
UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvSe => "sv-SE",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale {
fn default() -> Self {
Self::CsCz
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsKlarna`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsKonbini`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsLink`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsLinkCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsLink`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsOxxoSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsP24`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsP24SetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPaynow`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPaynowSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPaypal`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
Manual,
}
impl UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod::Manual => "manual",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPaypalCaptureMethod {
fn default() -> Self {
Self::Manual
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPaypal`'s `preferred_locale` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
#[serde(rename = "cs-CZ")]
CsCz,
#[serde(rename = "da-DK")]
DaDk,
#[serde(rename = "de-AT")]
DeAt,
#[serde(rename = "de-DE")]
DeDe,
#[serde(rename = "de-LU")]
DeLu,
#[serde(rename = "el-GR")]
ElGr,
#[serde(rename = "en-GB")]
EnGb,
#[serde(rename = "en-US")]
EnUs,
#[serde(rename = "es-ES")]
EsEs,
#[serde(rename = "fi-FI")]
FiFi,
#[serde(rename = "fr-BE")]
FrBe,
#[serde(rename = "fr-FR")]
FrFr,
#[serde(rename = "fr-LU")]
FrLu,
#[serde(rename = "hu-HU")]
HuHu,
#[serde(rename = "it-IT")]
ItIt,
#[serde(rename = "nl-BE")]
NlBe,
#[serde(rename = "nl-NL")]
NlNl,
#[serde(rename = "pl-PL")]
PlPl,
#[serde(rename = "pt-PT")]
PtPt,
#[serde(rename = "sk-SK")]
SkSk,
#[serde(rename = "sv-SE")]
SvSe,
}
impl UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::CsCz => "cs-CZ",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DaDk => "da-DK",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeAt => "de-AT",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeDe => "de-DE",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::DeLu => "de-LU",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::ElGr => "el-GR",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EnGb => "en-GB",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EnUs => "en-US",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::EsEs => "es-ES",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FiFi => "fi-FI",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrBe => "fr-BE",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrFr => "fr-FR",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::FrLu => "fr-LU",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::HuHu => "hu-HU",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::ItIt => "it-IT",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::NlBe => "nl-BE",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::NlNl => "nl-NL",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::PlPl => "pl-PL",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::PtPt => "pt-PT",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::SkSk => "sk-SK",
UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale::SvSe => "sv-SE",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPaypalPreferredLocale {
fn default() -> Self {
Self::CsCz
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPaypal`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPix`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPixSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsPromptpay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsRevolutPay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSofort`'s `preferred_language` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
De,
En,
Es,
Fr,
It,
Nl,
Pl,
}
impl UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::De => "de",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::En => "en",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Es => "es",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Fr => "fr",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::It => "it",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Nl => "nl",
UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Pl => "pl",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage {
fn default() -> Self {
Self::De
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSofort`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
None,
OffSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => {
"off_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
Balances,
Ownership,
PaymentMethod,
Transactions,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Balances => "balances",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Ownership => "ownership",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::PaymentMethod => "payment_method",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions::Transactions => "transactions",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions
{
fn default() -> Self {
Self::Balances
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
Balances,
Transactions,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch
{
fn default() -> Self {
Self::Balances
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
Paper,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper",
}
}
}
impl AsRef<str>
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod
{
fn default() -> Self {
Self::Paper
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
Ach,
UsDomesticWire,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => "us_domestic_wire",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested
{
fn default() -> Self {
Self::Ach
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
Fastest,
Standard,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => "fastest",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => "standard",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed
{
fn default() -> Self {
Self::Fastest
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
None,
OffSession,
OnSession,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => {
"off_session"
}
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => {
"on_session"
}
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage
{
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
Automatic,
Instant,
Microdeposits,
}
impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant",
UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default
for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod
{
fn default() -> Self {
Self::Automatic
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsWechatPay`'s `client` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsWechatPayClient {
Android,
Ios,
Web,
}
impl UpdatePaymentIntentPaymentMethodOptionsWechatPayClient {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsWechatPayClient::Android => "android",
UpdatePaymentIntentPaymentMethodOptionsWechatPayClient::Ios => "ios",
UpdatePaymentIntentPaymentMethodOptionsWechatPayClient::Web => "web",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsWechatPayClient {
fn default() -> Self {
Self::Android
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsWechatPay`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsWechatPaySetupFutureUsage {
fn default() -> Self {
Self::None
}
}
/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsZip`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
None,
}
impl UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage::None => "none",
}
}
}
impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsZipSetupFutureUsage {
fn default() -> Self {
Self::None
}
}