diff --git a/openapi/version.json b/openapi/version.json index 5e803d3a0..3d0520796 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v814" + "version": "v1203" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index bb3a6bb5b..daac75fcf 100644 --- a/src/resources/generated/account.rs +++ b/src/resources/generated/account.rs @@ -2,21 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::AccountId; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, TaxId, - VerificationDocumentParams, -}; +use crate::ids::{AccountId}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, TaxId, VerificationDocumentParams}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Account". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Account { /// Unique identifier for the object. @@ -28,7 +22,7 @@ pub struct Account { /// The business type. /// - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts. + /// After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub business_type: Option, @@ -67,7 +61,8 @@ pub struct Account { /// Whether account details have been submitted. /// - /// Standard accounts cannot receive payouts before this is true. + /// Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. + /// Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. #[serde(skip_serializing_if = "Option::is_none")] pub details_submitted: Option, @@ -111,19 +106,21 @@ pub struct Account { /// The Stripe account type. /// - /// Can be `standard`, `express`, or `custom`. + /// Can be `standard`, `express`, `custom`, or `none`. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option, } impl Account { + /// Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). /// /// If you’re not a platform, the list is empty. - pub fn list(client: &Client, params: &ListAccounts<'_>) -> Response> { - client.get_query("/accounts", params) - } +pub fn list(client: &Client, params: &ListAccounts<'_>) -> Response> { + client.get_query("/accounts", params) +} + /// With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. /// To do this, you’ll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). @@ -142,23 +139,22 @@ impl Account { client.get_query(&format!("/accounts/{}", id), Expand { expand }) } - /// Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. + /// Updates a connected account by setting the values of the parameters passed. /// - /// Any parameters not provided are left unchanged. For Custom accounts, you can update any information on the account. - /// For other accounts, you can update all information until that account has started to go through Connect Onboarding. - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), some properties can only be changed or updated for Custom accounts. To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). + /// Any parameters not provided are left unchanged. For accounts where controller.requirement_collection is `application`, which includes Custom accounts, you can update any information on the account. For accounts where controller.requirement_collection is `stripe`, which includes Standard and Express accounts, you can update all information until you create an Account Link or Account Session to start Connect onboarding, after which some properties can no longer be updated. To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). /// Refer to our [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. pub fn update(client: &Client, id: &AccountId, params: UpdateAccount<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/accounts/{}", id), ¶ms) } - /// With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage. + /// With Connect, you can delete accounts you manage. + /// + /// Test-mode accounts can be deleted at any time. /// - /// Accounts created using test-mode keys can be deleted at any time. + /// Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. /// - /// Standard accounts created using live-mode keys cannot be deleted. - /// Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + /// Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. pub fn delete(client: &Client, id: &AccountId) -> Response> { client.delete(&format!("/accounts/{}", id)) } @@ -176,6 +172,7 @@ impl Object for Account { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BusinessProfile { + /// The applicant's gross annual revenue for its preceding fiscal year. pub annual_revenue: Option, @@ -184,7 +181,7 @@ pub struct BusinessProfile { /// currently working for the business. pub estimated_worker_count: Option, - /// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). + /// [The merchant category code for the account](/connect/setting-mcc). /// /// MCCs are used to classify businesses based on the goods or services they provide. pub mcc: Option, @@ -219,7 +216,8 @@ pub struct BusinessProfile { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountAnnualRevenue { - /// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + + /// A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). pub amount: Option, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -236,6 +234,7 @@ pub struct AccountAnnualRevenue { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountCapabilities { + /// The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit_payments: Option, @@ -248,6 +247,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -296,6 +299,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub fpx_payments: Option, + /// The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub gb_bank_transfer_payments: Option, + /// The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. #[serde(skip_serializing_if = "Option::is_none")] pub giropay_payments: Option, @@ -316,6 +323,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub jcb_payments: Option, + /// The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub jp_bank_transfer_payments: Option, + /// The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. #[serde(skip_serializing_if = "Option::is_none")] pub klarna_payments: Option, @@ -332,6 +343,18 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + + /// The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco_payments: Option, + + /// The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub mx_bank_transfer_payments: Option, + /// The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -352,6 +375,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub revolut_pay_payments: Option, + /// The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_bank_transfer_payments: Option, + /// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -380,10 +407,18 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub treasury: Option, + /// The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint_payments: Option, + /// The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account_ach_payments: Option, + /// The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_transfer_payments: Option, + /// The status of the Zip capability of the account, or whether the account can directly process Zip charges. #[serde(skip_serializing_if = "Option::is_none")] pub zip_payments: Option, @@ -391,6 +426,7 @@ pub struct AccountCapabilities { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountFutureRequirements { + /// Fields that are due and can be satisfied by providing the corresponding alternative fields instead. pub alternatives: Option>, @@ -421,16 +457,18 @@ pub struct AccountFutureRequirements { /// New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. pub past_due: Option>, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due` or `currently_due`. + /// Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountMonthlyEstimatedRevenue { - /// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + + /// A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). pub amount: i64, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -441,6 +479,7 @@ pub struct AccountMonthlyEstimatedRevenue { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirements { + /// Fields that are due and can be satisfied by providing the corresponding alternative fields instead. pub alternatives: Option>, @@ -473,15 +512,17 @@ pub struct AccountRequirements { /// These fields need to be collected to enable the account. pub past_due: Option>, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + /// Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsAlternative { + /// Fields that can be provided to satisfy all fields in `original_fields_due`. pub alternative_fields_due: Vec, @@ -491,6 +532,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -503,6 +545,7 @@ pub struct AccountRequirementsError { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettings { + #[serde(skip_serializing_if = "Option::is_none")] pub bacs_debit_payments: Option, @@ -532,6 +575,7 @@ pub struct AccountSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountBacsDebitPaymentsSettings { + /// The Bacs Direct Debit display name for this account. /// /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. @@ -550,6 +594,7 @@ pub struct AccountBacsDebitPaymentsSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BrandingSettings { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. /// /// Must be square and at least 128px x 128px. @@ -569,12 +614,14 @@ pub struct BrandingSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountCardIssuingSettings { + #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CardPaymentsSettings { + #[serde(skip_serializing_if = "Option::is_none")] pub decline_on: Option, @@ -599,6 +646,7 @@ pub struct CardPaymentsSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DashboardSettings { + /// The display name for this account. /// /// This is used on the Stripe Dashboard to differentiate between accounts. @@ -612,6 +660,7 @@ pub struct DashboardSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DeclineChargeOn { + /// Whether Stripe automatically declines charges with an incorrect ZIP or postal code. /// /// This setting only applies when a ZIP or postal code is provided and they fail bank verification. @@ -625,6 +674,7 @@ pub struct DeclineChargeOn { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountInvoicesSettings { + /// The list of default Account Tax IDs to automatically include on invoices. /// /// Account Tax IDs get added when an invoice is finalized. @@ -633,36 +683,40 @@ pub struct AccountInvoicesSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentsSettings { + /// The default text that appears on credit card statements when a charge is made. /// /// This field prefixes any dynamic `statement_descriptor` specified on the charge. pub statement_descriptor: Option, - /// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kana variation of `statement_descriptor` used for charges in Japan. + /// + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). pub statement_descriptor_kana: Option, - /// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kanji variation of `statement_descriptor` used for charges in Japan. + /// + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). pub statement_descriptor_kanji: Option, - /// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. /// - /// This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. - /// `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). pub statement_descriptor_prefix_kana: Option, - /// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. /// - /// This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. - /// `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). pub statement_descriptor_prefix_kanji: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PayoutSettings { + /// A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. /// - /// See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. - /// Default value is `false` for Custom accounts, otherwise `true`. + /// See [Understanding Connect account balances](/connect/account-balances) for details. + /// The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. pub debit_negative_balances: bool, pub schedule: TransferSchedule, @@ -675,6 +729,7 @@ pub struct PayoutSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSepaDebitPaymentsSettings { + /// SEPA creditor identifier that identifies the company making the payment. #[serde(skip_serializing_if = "Option::is_none")] pub creditor_id: Option, @@ -682,6 +737,7 @@ pub struct AccountSepaDebitPaymentsSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TosAcceptance { + /// The Unix timestamp marking when the account representative accepted their service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -701,12 +757,14 @@ pub struct TosAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountTreasurySettings { + #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountTermsOfService { + /// The Unix timestamp marking when the account representative accepted the service agreement. pub date: Option, @@ -720,12 +778,28 @@ pub struct AccountTermsOfService { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountUnificationAccountController { + + #[serde(skip_serializing_if = "Option::is_none")] + pub fees: Option, + /// `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). /// /// Otherwise, this field is null. #[serde(skip_serializing_if = "Option::is_none")] pub is_controller: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub losses: Option, + + /// A value indicating responsibility for collecting requirements on this account. + /// + /// Only returned when the Connect application retrieving the resource controls the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub requirement_collection: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub stripe_dashboard: Option, + /// The controller type. /// /// Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. @@ -733,8 +807,33 @@ pub struct AccountUnificationAccountController { pub type_: AccountUnificationAccountControllerType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountUnificationAccountControllerFees { + + /// A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. + /// + /// Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + pub payer: AccountUnificationAccountControllerFeesPayer, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountUnificationAccountControllerLosses { + + /// A value indicating who is liable when this account can't pay back negative balances from payments. + pub payments: AccountUnificationAccountControllerLossesPayments, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountUnificationAccountControllerStripeDashboard { + + /// A value indicating the Stripe dashboard this account has access to independent of the Connect application. + #[serde(rename = "type")] + pub type_: AccountUnificationAccountControllerStripeDashboardType, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CardIssuingAccountTermsOfService { + /// The Unix timestamp marking when the account representative accepted the service agreement. pub date: Option, @@ -748,6 +847,7 @@ pub struct CardIssuingAccountTermsOfService { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Company { + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -831,11 +931,13 @@ pub struct Company { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CompanyVerification { + pub document: CompanyVerificationDocument, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CompanyVerificationDocument { + /// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. pub back: Option>, @@ -853,6 +955,7 @@ pub struct CompanyVerificationDocument { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LegalEntityUboDeclaration { + /// The Unix timestamp marking when the beneficial owner attestation was made. pub date: Option, @@ -865,6 +968,7 @@ pub struct LegalEntityUboDeclaration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferSchedule { + /// The number of days charges for the account will be held before being paid out. pub delay_days: u32, @@ -890,6 +994,7 @@ pub struct TransferSchedule { /// The parameters for `Account::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateAccount<'a> { + /// An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. #[serde(skip_serializing_if = "Option::is_none")] pub account_token: Option<&'a str>, @@ -900,25 +1005,29 @@ pub struct CreateAccount<'a> { /// The business type. /// - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub business_type: Option, - /// Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. + /// Each key of the dictionary represents a capability, and each capability + /// maps to its settings (for example, whether it has been requested or not). /// - /// whether it has been requested or not). - /// Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. - /// An account may have some of its requested capabilities be active and some be inactive. + /// Each capability is inactive until you have provided its specific requirements and Stripe has verified them. + /// An account might have some of its requested capabilities be active and some be inactive. Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) is `none`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub capabilities: Option, /// Information about the company or business. /// /// This field is available for any `business_type`. - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub company: Option, + /// A hash of configuration describing the account controller's attributes. + #[serde(skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// The country in which the account holder resides, or in which the business is legally established. /// /// This should be an ISO 3166-1 alpha-2 country code. @@ -929,7 +1038,7 @@ pub struct CreateAccount<'a> { /// Three-letter ISO currency code representing the default currency for the account. /// - /// This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + /// This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). #[serde(skip_serializing_if = "Option::is_none")] pub default_currency: Option, @@ -940,7 +1049,7 @@ pub struct CreateAccount<'a> { /// The email address of the account holder. /// /// This is only to make the account easier to identify to you. - /// Stripe only emails Custom accounts with your consent. + /// If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. #[serde(skip_serializing_if = "Option::is_none")] pub email: Option<&'a str>, @@ -948,19 +1057,19 @@ pub struct CreateAccount<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). + /// A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). /// - /// You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. + /// You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation. /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. - /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. - /// After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. + /// After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub external_account: Option<&'a str>, /// Information about the person represented by the account. /// /// This field is null unless `business_type` is set to `individual`. - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub individual: Option, @@ -976,7 +1085,10 @@ pub struct CreateAccount<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub settings: Option, - /// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts. + /// Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). + /// + /// This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + /// This property defaults to a `full` service agreement when empty. #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, @@ -996,6 +1108,7 @@ impl<'a> CreateAccount<'a> { business_type: Default::default(), capabilities: Default::default(), company: Default::default(), + controller: Default::default(), country: Default::default(), default_currency: Default::default(), documents: Default::default(), @@ -1014,6 +1127,8 @@ impl<'a> CreateAccount<'a> { /// The parameters for `Account::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListAccounts<'a> { + + /// Only return connected accounts that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1056,12 +1171,12 @@ impl<'a> ListAccounts<'a> { impl Paginable for ListAccounts<'_> { type O = Account; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Account::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateAccount<'a> { + /// An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. #[serde(skip_serializing_if = "Option::is_none")] pub account_token: Option<&'a str>, @@ -1072,28 +1187,28 @@ pub struct UpdateAccount<'a> { /// The business type. /// - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub business_type: Option, - /// Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. + /// Each key of the dictionary represents a capability, and each capability + /// maps to its settings (for example, whether it has been requested or not). /// - /// whether it has been requested or not). - /// Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. - /// An account may have some of its requested capabilities be active and some be inactive. + /// Each capability is inactive until you have provided its specific requirements and Stripe has verified them. + /// An account might have some of its requested capabilities be active and some be inactive. Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) is `none`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub capabilities: Option, /// Information about the company or business. /// /// This field is available for any `business_type`. - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub company: Option, /// Three-letter ISO currency code representing the default currency for the account. /// - /// This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + /// This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). #[serde(skip_serializing_if = "Option::is_none")] pub default_currency: Option, @@ -1104,7 +1219,7 @@ pub struct UpdateAccount<'a> { /// The email address of the account holder. /// /// This is only to make the account easier to identify to you. - /// Stripe only emails Custom accounts with your consent. + /// If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. #[serde(skip_serializing_if = "Option::is_none")] pub email: Option<&'a str>, @@ -1112,19 +1227,19 @@ pub struct UpdateAccount<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). + /// A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). /// - /// You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. + /// You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation. /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. - /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. - /// After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. + /// After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub external_account: Option<&'a str>, /// Information about the person represented by the account. /// /// This field is null unless `business_type` is set to `individual`. - /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub individual: Option, @@ -1140,7 +1255,10 @@ pub struct UpdateAccount<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub settings: Option, - /// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts. + /// Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). + /// + /// This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + /// This property defaults to a `full` service agreement when empty. #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, } @@ -1168,6 +1286,7 @@ impl<'a> UpdateAccount<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AcceptTos { + /// The Unix timestamp marking when the account representative accepted their service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -1187,6 +1306,7 @@ pub struct AcceptTos { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParams { + /// Settings specific to Bacs Direct Debit. #[serde(skip_serializing_if = "Option::is_none")] pub bacs_debit_payments: Option, @@ -1218,6 +1338,7 @@ pub struct AccountSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CompanyParams { + /// The company's primary address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -1232,14 +1353,14 @@ pub struct CompanyParams { /// Whether the company's directors have been provided. /// - /// Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. + /// Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. /// This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. #[serde(skip_serializing_if = "Option::is_none")] pub directors_provided: Option, /// Whether the company's executives have been provided. /// - /// Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. + /// Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. #[serde(skip_serializing_if = "Option::is_none")] pub executives_provided: Option, @@ -1265,7 +1386,7 @@ pub struct CompanyParams { /// Whether the company's owners have been provided. /// - /// Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. + /// Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. #[serde(skip_serializing_if = "Option::is_none")] pub owners_provided: Option, @@ -1285,7 +1406,7 @@ pub struct CompanyParams { /// The category identifying the legal structure of the company or legal entity. /// - /// See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + /// See [Business structure](/connect/identity-verification#business-structure) for more details. /// Pass an empty string to unset this value. #[serde(skip_serializing_if = "Option::is_none")] pub structure: Option, @@ -1311,6 +1432,7 @@ pub struct CompanyParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilities { + /// The acss_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit_payments: Option, @@ -1323,6 +1445,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The amazon_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The au_becs_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -1371,6 +1497,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub fpx_payments: Option, + /// The gb_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub gb_bank_transfer_payments: Option, + /// The giropay_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub giropay_payments: Option, @@ -1391,6 +1521,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub jcb_payments: Option, + /// The jp_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub jp_bank_transfer_payments: Option, + /// The klarna_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub klarna_payments: Option, @@ -1407,6 +1541,18 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The mobilepay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + + /// The multibanco_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco_payments: Option, + + /// The mx_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mx_bank_transfer_payments: Option, + /// The oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1427,6 +1573,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub revolut_pay_payments: Option, + /// The sepa_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_bank_transfer_payments: Option, + /// The sepa_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -1455,23 +1605,53 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub treasury: Option, + /// The twint_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint_payments: Option, + /// The us_bank_account_ach_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account_ach_payments: Option, + /// The us_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_transfer_payments: Option, + /// The zip_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub zip_payments: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountController { + + /// A hash of configuration for who pays Stripe fees for product usage on this account. + #[serde(skip_serializing_if = "Option::is_none")] + pub fees: Option, + + /// A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + #[serde(skip_serializing_if = "Option::is_none")] + pub losses: Option, + + /// A value indicating responsibility for collecting updated information when requirements on the account are due or change. + /// + /// Defaults to `stripe`. + #[serde(skip_serializing_if = "Option::is_none")] + pub requirement_collection: Option, + + /// A hash of configuration for Stripe-hosted dashboards. + #[serde(skip_serializing_if = "Option::is_none")] + pub stripe_dashboard: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocuments { + /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// - /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. #[serde(skip_serializing_if = "Option::is_none")] - pub bank_account_ownership_verification: - Option, + pub bank_account_ownership_verification: Option, /// One or more documents that demonstrate proof of a company's license to operate. #[serde(skip_serializing_if = "Option::is_none")] @@ -1479,8 +1659,7 @@ pub struct CreateAccountDocuments { /// One or more documents showing the company's Memorandum of Association. #[serde(skip_serializing_if = "Option::is_none")] - pub company_memorandum_of_association: - Option, + pub company_memorandum_of_association: Option, /// (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. #[serde(skip_serializing_if = "Option::is_none")] @@ -1488,8 +1667,7 @@ pub struct CreateAccountDocuments { /// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. #[serde(skip_serializing_if = "Option::is_none")] - pub company_registration_verification: - Option, + pub company_registration_verification: Option, /// One or more documents that demonstrate proof of a company's tax ID. #[serde(skip_serializing_if = "Option::is_none")] @@ -1502,15 +1680,16 @@ pub struct CreateAccountDocuments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParams { + /// The individual's primary address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, - /// The Kana variation of the the individual's primary address (Japan only). + /// The Kana variation of the individual's primary address (Japan only). #[serde(skip_serializing_if = "Option::is_none")] pub address_kana: Option
, - /// The Kanji variation of the the individual's primary address (Japan only). + /// The Kanji variation of the individual's primary address (Japan only). #[serde(skip_serializing_if = "Option::is_none")] pub address_kanji: Option
, @@ -1526,7 +1705,7 @@ pub struct PersonParams { #[serde(skip_serializing_if = "Option::is_none")] pub first_name: Option, - /// The Kana variation of the the individual's first name (Japan only). + /// The Kana variation of the individual's first name (Japan only). #[serde(skip_serializing_if = "Option::is_none")] pub first_name_kana: Option, @@ -1545,14 +1724,14 @@ pub struct PersonParams { /// The government-issued ID number of the individual, as appropriate for the representative's country. /// /// (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). - /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, /// The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. /// /// In Thailand, this would be the laser code found on the back of an ID card. - /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). #[serde(skip_serializing_if = "Option::is_none")] pub id_number_secondary: Option, @@ -1609,6 +1788,7 @@ pub struct PersonParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilities { + /// The acss_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit_payments: Option, @@ -1621,6 +1801,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The amazon_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The au_becs_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -1669,6 +1853,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub fpx_payments: Option, + /// The gb_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub gb_bank_transfer_payments: Option, + /// The giropay_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub giropay_payments: Option, @@ -1689,6 +1877,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub jcb_payments: Option, + /// The jp_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub jp_bank_transfer_payments: Option, + /// The klarna_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub klarna_payments: Option, @@ -1705,6 +1897,18 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The mobilepay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + + /// The multibanco_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco_payments: Option, + + /// The mx_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mx_bank_transfer_payments: Option, + /// The oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1725,6 +1929,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub revolut_pay_payments: Option, + /// The sepa_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_bank_transfer_payments: Option, + /// The sepa_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -1753,10 +1961,18 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub treasury: Option, + /// The twint_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint_payments: Option, + /// The us_bank_account_ach_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account_ach_payments: Option, + /// The us_bank_transfer_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_transfer_payments: Option, + /// The zip_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub zip_payments: Option, @@ -1764,12 +1980,12 @@ pub struct UpdateAccountCapabilities { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocuments { + /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// - /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. #[serde(skip_serializing_if = "Option::is_none")] - pub bank_account_ownership_verification: - Option, + pub bank_account_ownership_verification: Option, /// One or more documents that demonstrate proof of a company's license to operate. #[serde(skip_serializing_if = "Option::is_none")] @@ -1777,8 +1993,7 @@ pub struct UpdateAccountDocuments { /// One or more documents showing the company's Memorandum of Association. #[serde(skip_serializing_if = "Option::is_none")] - pub company_memorandum_of_association: - Option, + pub company_memorandum_of_association: Option, /// (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. #[serde(skip_serializing_if = "Option::is_none")] @@ -1786,8 +2001,7 @@ pub struct UpdateAccountDocuments { /// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. #[serde(skip_serializing_if = "Option::is_none")] - pub company_registration_verification: - Option, + pub company_registration_verification: Option, /// One or more documents that demonstrate proof of a company's tax ID. #[serde(skip_serializing_if = "Option::is_none")] @@ -1800,6 +2014,7 @@ pub struct UpdateAccountDocuments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsBacsDebitPayments { + /// The Bacs Direct Debit Display Name for this account. /// /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. @@ -1813,13 +2028,15 @@ pub struct AccountSettingsParamsBacsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsCardIssuing { - /// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance). + + /// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsTreasury { + /// Details on the account's acceptance of the Stripe Treasury Services Agreement. #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, @@ -1827,6 +2044,7 @@ pub struct AccountSettingsParamsTreasury { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BrandingSettingsParams { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. /// /// Must be square and at least 128px x 128px. @@ -1850,6 +2068,7 @@ pub struct BrandingSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CardPaymentsSettingsParams { + /// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. #[serde(skip_serializing_if = "Option::is_none")] pub decline_on: Option, @@ -1878,6 +2097,7 @@ pub struct CardPaymentsSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CompanyParamsOwnershipDeclaration { + /// The Unix timestamp marking when the beneficial owner attestation was made. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -1893,6 +2113,7 @@ pub struct CompanyParamsOwnershipDeclaration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CompanyVerificationParams { + /// A document verifying the business. #[serde(skip_serializing_if = "Option::is_none")] pub document: Option, @@ -1900,6 +2121,7 @@ pub struct CompanyVerificationParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesAcssDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1910,6 +2132,7 @@ pub struct CreateAccountCapabilitiesAcssDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesAffirmPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1920,6 +2143,18 @@ pub struct CreateAccountCapabilitiesAffirmPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesAfterpayClearpayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesAmazonPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1930,6 +2165,7 @@ pub struct CreateAccountCapabilitiesAfterpayClearpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesAuBecsDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1940,6 +2176,7 @@ pub struct CreateAccountCapabilitiesAuBecsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesBacsDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1950,6 +2187,7 @@ pub struct CreateAccountCapabilitiesBacsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesBancontactPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1960,6 +2198,7 @@ pub struct CreateAccountCapabilitiesBancontactPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1970,6 +2209,7 @@ pub struct CreateAccountCapabilitiesBankTransferPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesBlikPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1980,6 +2220,7 @@ pub struct CreateAccountCapabilitiesBlikPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesBoletoPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1990,6 +2231,7 @@ pub struct CreateAccountCapabilitiesBoletoPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesCardIssuing { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2000,6 +2242,7 @@ pub struct CreateAccountCapabilitiesCardIssuing { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesCardPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2010,6 +2253,7 @@ pub struct CreateAccountCapabilitiesCardPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesCartesBancairesPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2020,6 +2264,7 @@ pub struct CreateAccountCapabilitiesCartesBancairesPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesCashappPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2030,6 +2275,7 @@ pub struct CreateAccountCapabilitiesCashappPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesEpsPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2040,6 +2286,18 @@ pub struct CreateAccountCapabilitiesEpsPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesFpxPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesGbBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2050,6 +2308,7 @@ pub struct CreateAccountCapabilitiesFpxPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesGiropayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2060,6 +2319,7 @@ pub struct CreateAccountCapabilitiesGiropayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesGrabpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2070,6 +2330,7 @@ pub struct CreateAccountCapabilitiesGrabpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesIdealPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2080,6 +2341,7 @@ pub struct CreateAccountCapabilitiesIdealPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesIndiaInternationalPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2090,6 +2352,18 @@ pub struct CreateAccountCapabilitiesIndiaInternationalPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesJcbPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesJpBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2100,6 +2374,7 @@ pub struct CreateAccountCapabilitiesJcbPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesKlarnaPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2110,6 +2385,7 @@ pub struct CreateAccountCapabilitiesKlarnaPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesKonbiniPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2120,6 +2396,7 @@ pub struct CreateAccountCapabilitiesKonbiniPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesLegacyPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2130,6 +2407,7 @@ pub struct CreateAccountCapabilitiesLegacyPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesLinkPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2139,7 +2417,8 @@ pub struct CreateAccountCapabilitiesLinkPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesOxxoPayments { +pub struct CreateAccountCapabilitiesMobilepayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2149,7 +2428,8 @@ pub struct CreateAccountCapabilitiesOxxoPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesP24Payments { +pub struct CreateAccountCapabilitiesMultibancoPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2159,7 +2439,8 @@ pub struct CreateAccountCapabilitiesP24Payments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesPaynowPayments { +pub struct CreateAccountCapabilitiesMxBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2169,7 +2450,8 @@ pub struct CreateAccountCapabilitiesPaynowPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesPromptpayPayments { +pub struct CreateAccountCapabilitiesOxxoPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2179,7 +2461,8 @@ pub struct CreateAccountCapabilitiesPromptpayPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesRevolutPayPayments { +pub struct CreateAccountCapabilitiesP24Payments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2189,7 +2472,8 @@ pub struct CreateAccountCapabilitiesRevolutPayPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesSepaDebitPayments { +pub struct CreateAccountCapabilitiesPaynowPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2199,7 +2483,8 @@ pub struct CreateAccountCapabilitiesSepaDebitPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesSofortPayments { +pub struct CreateAccountCapabilitiesPromptpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2209,7 +2494,8 @@ pub struct CreateAccountCapabilitiesSofortPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesSwishPayments { +pub struct CreateAccountCapabilitiesRevolutPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2219,7 +2505,8 @@ pub struct CreateAccountCapabilitiesSwishPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesTaxReportingUs1099K { +pub struct CreateAccountCapabilitiesSepaBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2229,7 +2516,8 @@ pub struct CreateAccountCapabilitiesTaxReportingUs1099K { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesTaxReportingUs1099Misc { +pub struct CreateAccountCapabilitiesSepaDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2239,7 +2527,8 @@ pub struct CreateAccountCapabilitiesTaxReportingUs1099Misc { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesTransfers { +pub struct CreateAccountCapabilitiesSofortPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2249,7 +2538,8 @@ pub struct CreateAccountCapabilitiesTransfers { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesTreasury { +pub struct CreateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2259,7 +2549,8 @@ pub struct CreateAccountCapabilitiesTreasury { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesUsBankAccountAchPayments { +pub struct CreateAccountCapabilitiesTaxReportingUs1099K { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2269,7 +2560,8 @@ pub struct CreateAccountCapabilitiesUsBankAccountAchPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountCapabilitiesZipPayments { +pub struct CreateAccountCapabilitiesTaxReportingUs1099Misc { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2279,7 +2571,106 @@ pub struct CreateAccountCapabilitiesZipPayments { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateAccountDocumentsBankAccountOwnershipVerification { +pub struct CreateAccountCapabilitiesTransfers { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesTreasury { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesTwintPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesUsBankAccountAchPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesUsBankTransferPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesZipPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountControllerFees { + + /// A value indicating the responsible payer of Stripe fees on this account. + /// + /// Defaults to `account`. + /// Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + #[serde(skip_serializing_if = "Option::is_none")] + pub payer: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountControllerLosses { + + /// A value indicating who is liable when this account can't pay back negative balances resulting from payments. + /// + /// Defaults to `stripe`. + #[serde(skip_serializing_if = "Option::is_none")] + pub payments: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountControllerStripeDashboard { + + /// Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). + /// + /// Defaults to `full`. + #[serde(rename = "type")] + #[serde(skip_serializing_if = "Option::is_none")] + pub type_: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountDocumentsBankAccountOwnershipVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2287,6 +2678,7 @@ pub struct CreateAccountDocumentsBankAccountOwnershipVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsCompanyLicense { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2294,6 +2686,7 @@ pub struct CreateAccountDocumentsCompanyLicense { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsCompanyMemorandumOfAssociation { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2301,6 +2694,7 @@ pub struct CreateAccountDocumentsCompanyMemorandumOfAssociation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsCompanyMinisterialDecree { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2308,6 +2702,7 @@ pub struct CreateAccountDocumentsCompanyMinisterialDecree { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsCompanyRegistrationVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2315,6 +2710,7 @@ pub struct CreateAccountDocumentsCompanyRegistrationVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsCompanyTaxIdVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2322,6 +2718,7 @@ pub struct CreateAccountDocumentsCompanyTaxIdVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountDocumentsProofOfRegistration { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2329,32 +2726,40 @@ pub struct CreateAccountDocumentsProofOfRegistration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentsSettingsParams { - /// The default text that appears on credit card statements when a charge is made. + + /// The default text that appears on statements for non-card charges outside of Japan. /// - /// This field prefixes any dynamic `statement_descriptor` specified on the charge. + /// For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. + /// In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. + /// For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option, - /// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kana variation of `statement_descriptor` used for charges in Japan. + /// + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_kana: Option, - /// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + /// The Kanji variation of `statement_descriptor` used for charges in Japan. + /// + /// Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_kanji: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PayoutSettingsParams { + /// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. /// - /// For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + /// For details, see [Understanding Connect Account Balances](/connect/account-balances). #[serde(skip_serializing_if = "Option::is_none")] pub debit_negative_balances: Option, /// Details on when funds from charges are available, and when they are paid out to an external account. /// - /// For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation. + /// For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. #[serde(skip_serializing_if = "Option::is_none")] pub schedule: Option, @@ -2367,6 +2772,7 @@ pub struct PayoutSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -2379,6 +2785,7 @@ pub struct PersonParamsDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsRegisteredAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -2406,6 +2813,7 @@ pub struct PersonParamsRegisteredAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsRelationship { + /// Whether the person is a director of the account's legal entity. /// /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -2431,6 +2839,7 @@ pub struct PersonParamsRelationship { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAcssDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2441,6 +2850,7 @@ pub struct UpdateAccountCapabilitiesAcssDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAffirmPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2451,6 +2861,18 @@ pub struct UpdateAccountCapabilitiesAffirmPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAfterpayClearpayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesAmazonPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2461,6 +2883,7 @@ pub struct UpdateAccountCapabilitiesAfterpayClearpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAuBecsDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2471,6 +2894,7 @@ pub struct UpdateAccountCapabilitiesAuBecsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesBacsDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2481,6 +2905,7 @@ pub struct UpdateAccountCapabilitiesBacsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesBancontactPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2491,6 +2916,7 @@ pub struct UpdateAccountCapabilitiesBancontactPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2501,6 +2927,7 @@ pub struct UpdateAccountCapabilitiesBankTransferPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesBlikPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2511,6 +2938,7 @@ pub struct UpdateAccountCapabilitiesBlikPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesBoletoPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2521,6 +2949,7 @@ pub struct UpdateAccountCapabilitiesBoletoPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesCardIssuing { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2531,6 +2960,7 @@ pub struct UpdateAccountCapabilitiesCardIssuing { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesCardPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2541,6 +2971,7 @@ pub struct UpdateAccountCapabilitiesCardPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesCartesBancairesPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2551,6 +2982,7 @@ pub struct UpdateAccountCapabilitiesCartesBancairesPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesCashappPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2561,6 +2993,7 @@ pub struct UpdateAccountCapabilitiesCashappPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesEpsPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2571,6 +3004,18 @@ pub struct UpdateAccountCapabilitiesEpsPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesFpxPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesGbBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2581,6 +3026,7 @@ pub struct UpdateAccountCapabilitiesFpxPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesGiropayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2591,6 +3037,7 @@ pub struct UpdateAccountCapabilitiesGiropayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesGrabpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2601,6 +3048,7 @@ pub struct UpdateAccountCapabilitiesGrabpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesIdealPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2611,6 +3059,7 @@ pub struct UpdateAccountCapabilitiesIdealPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesIndiaInternationalPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2621,6 +3070,18 @@ pub struct UpdateAccountCapabilitiesIndiaInternationalPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesJcbPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesJpBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2631,6 +3092,7 @@ pub struct UpdateAccountCapabilitiesJcbPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesKlarnaPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2641,6 +3103,7 @@ pub struct UpdateAccountCapabilitiesKlarnaPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesKonbiniPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2651,6 +3114,7 @@ pub struct UpdateAccountCapabilitiesKonbiniPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesLegacyPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2661,6 +3125,40 @@ pub struct UpdateAccountCapabilitiesLegacyPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesLinkPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesMobilepayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesMultibancoPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesMxBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2671,6 +3169,7 @@ pub struct UpdateAccountCapabilitiesLinkPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesOxxoPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2681,6 +3180,7 @@ pub struct UpdateAccountCapabilitiesOxxoPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesP24Payments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2691,6 +3191,7 @@ pub struct UpdateAccountCapabilitiesP24Payments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesPaynowPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2701,6 +3202,7 @@ pub struct UpdateAccountCapabilitiesPaynowPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesPromptpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2711,6 +3213,18 @@ pub struct UpdateAccountCapabilitiesPromptpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesRevolutPayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesSepaBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2721,6 +3235,7 @@ pub struct UpdateAccountCapabilitiesRevolutPayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesSepaDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2731,6 +3246,7 @@ pub struct UpdateAccountCapabilitiesSepaDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesSofortPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2741,6 +3257,7 @@ pub struct UpdateAccountCapabilitiesSofortPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2751,6 +3268,7 @@ pub struct UpdateAccountCapabilitiesSwishPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTaxReportingUs1099K { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2761,6 +3279,7 @@ pub struct UpdateAccountCapabilitiesTaxReportingUs1099K { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTaxReportingUs1099Misc { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2771,6 +3290,7 @@ pub struct UpdateAccountCapabilitiesTaxReportingUs1099Misc { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTransfers { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2781,6 +3301,18 @@ pub struct UpdateAccountCapabilitiesTransfers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTreasury { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesTwintPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2791,6 +3323,18 @@ pub struct UpdateAccountCapabilitiesTreasury { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesUsBankAccountAchPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesUsBankTransferPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2801,6 +3345,7 @@ pub struct UpdateAccountCapabilitiesUsBankAccountAchPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesZipPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2811,6 +3356,7 @@ pub struct UpdateAccountCapabilitiesZipPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsBankAccountOwnershipVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2818,6 +3364,7 @@ pub struct UpdateAccountDocumentsBankAccountOwnershipVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsCompanyLicense { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2825,6 +3372,7 @@ pub struct UpdateAccountDocumentsCompanyLicense { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsCompanyMemorandumOfAssociation { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2832,6 +3380,7 @@ pub struct UpdateAccountDocumentsCompanyMemorandumOfAssociation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsCompanyMinisterialDecree { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2839,6 +3388,7 @@ pub struct UpdateAccountDocumentsCompanyMinisterialDecree { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsCompanyRegistrationVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2846,6 +3396,7 @@ pub struct UpdateAccountDocumentsCompanyRegistrationVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsCompanyTaxIdVerification { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2853,6 +3404,7 @@ pub struct UpdateAccountDocumentsCompanyTaxIdVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountDocumentsProofOfRegistration { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -2860,6 +3412,7 @@ pub struct UpdateAccountDocumentsProofOfRegistration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsCardIssuingTosAcceptance { + /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -2875,6 +3428,7 @@ pub struct AccountSettingsParamsCardIssuingTosAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsTreasuryTosAcceptance { + /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -2890,6 +3444,7 @@ pub struct AccountSettingsParamsTreasuryTosAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DeclineChargeOnParams { + /// Whether Stripe automatically declines charges with an incorrect ZIP or postal code. /// /// This setting only applies when a ZIP or postal code is provided and they fail bank verification. @@ -2905,12 +3460,13 @@ pub struct DeclineChargeOnParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferScheduleParams { + /// The number of days charge funds are held before being paid out. /// /// May also be set to `minimum`, representing the lowest available value for the account country. /// Default is `minimum`. /// The `delay_days` parameter remains at the last configured value if `interval` is `manual`. - /// [Learn more about controlling payout delay days](https://stripe.com/docs/connect/manage-payout-schedule). + /// [Learn more about controlling payout delay days](/connect/manage-payout-schedule). #[serde(skip_serializing_if = "Option::is_none")] pub delay_days: Option, @@ -3081,52 +3637,88 @@ impl std::default::Default for AccountCapabilitiesAfterpayClearpayPayments { } } -/// An enum representing the possible values of an `AccountCapabilities`'s `bacs_debit_payments` field. +/// An enum representing the possible values of an `AccountCapabilities`'s `amazon_pay_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum AccountCapabilitiesBacsDebitPayments { +pub enum AccountCapabilitiesAmazonPayPayments { Active, Inactive, Pending, } -impl AccountCapabilitiesBacsDebitPayments { +impl AccountCapabilitiesAmazonPayPayments { pub fn as_str(self) -> &'static str { match self { - AccountCapabilitiesBacsDebitPayments::Active => "active", - AccountCapabilitiesBacsDebitPayments::Inactive => "inactive", - AccountCapabilitiesBacsDebitPayments::Pending => "pending", + AccountCapabilitiesAmazonPayPayments::Active => "active", + AccountCapabilitiesAmazonPayPayments::Inactive => "inactive", + AccountCapabilitiesAmazonPayPayments::Pending => "pending", } } } -impl AsRef for AccountCapabilitiesBacsDebitPayments { +impl AsRef for AccountCapabilitiesAmazonPayPayments { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for AccountCapabilitiesBacsDebitPayments { +impl std::fmt::Display for AccountCapabilitiesAmazonPayPayments { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for AccountCapabilitiesBacsDebitPayments { +impl std::default::Default for AccountCapabilitiesAmazonPayPayments { fn default() -> Self { Self::Active } } -/// An enum representing the possible values of an `AccountCapabilities`'s `bancontact_payments` field. +/// An enum representing the possible values of an `AccountCapabilities`'s `bacs_debit_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum AccountCapabilitiesBancontactPayments { +pub enum AccountCapabilitiesBacsDebitPayments { Active, Inactive, Pending, } -impl AccountCapabilitiesBancontactPayments { +impl AccountCapabilitiesBacsDebitPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesBacsDebitPayments::Active => "active", + AccountCapabilitiesBacsDebitPayments::Inactive => "inactive", + AccountCapabilitiesBacsDebitPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesBacsDebitPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesBacsDebitPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesBacsDebitPayments { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `AccountCapabilities`'s `bancontact_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesBancontactPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesBancontactPayments { pub fn as_str(self) -> &'static str { match self { AccountCapabilitiesBancontactPayments::Active => "active", @@ -3405,6 +3997,42 @@ impl std::default::Default for AccountCapabilitiesFpxPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `gb_bank_transfer_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesGbBankTransferPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesGbBankTransferPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesGbBankTransferPayments::Active => "active", + AccountCapabilitiesGbBankTransferPayments::Inactive => "inactive", + AccountCapabilitiesGbBankTransferPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesGbBankTransferPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesGbBankTransferPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesGbBankTransferPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `giropay_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3549,6 +4177,42 @@ impl std::default::Default for AccountCapabilitiesIndiaInternationalPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `jp_bank_transfer_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesJpBankTransferPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesJpBankTransferPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesJpBankTransferPayments::Active => "active", + AccountCapabilitiesJpBankTransferPayments::Inactive => "inactive", + AccountCapabilitiesJpBankTransferPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesJpBankTransferPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesJpBankTransferPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesJpBankTransferPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `klarna_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3657,6 +4321,114 @@ impl std::default::Default for AccountCapabilitiesLinkPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `mobilepay_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesMobilepayPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesMobilepayPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesMobilepayPayments::Active => "active", + AccountCapabilitiesMobilepayPayments::Inactive => "inactive", + AccountCapabilitiesMobilepayPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesMobilepayPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesMobilepayPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesMobilepayPayments { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `AccountCapabilities`'s `multibanco_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesMultibancoPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesMultibancoPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesMultibancoPayments::Active => "active", + AccountCapabilitiesMultibancoPayments::Inactive => "inactive", + AccountCapabilitiesMultibancoPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesMultibancoPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesMultibancoPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesMultibancoPayments { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `AccountCapabilities`'s `mx_bank_transfer_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesMxBankTransferPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesMxBankTransferPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesMxBankTransferPayments::Active => "active", + AccountCapabilitiesMxBankTransferPayments::Inactive => "inactive", + AccountCapabilitiesMxBankTransferPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesMxBankTransferPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesMxBankTransferPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesMxBankTransferPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `oxxo_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3837,6 +4609,42 @@ impl std::default::Default for AccountCapabilitiesRevolutPayPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `sepa_bank_transfer_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesSepaBankTransferPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesSepaBankTransferPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesSepaBankTransferPayments::Active => "active", + AccountCapabilitiesSepaBankTransferPayments::Inactive => "inactive", + AccountCapabilitiesSepaBankTransferPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesSepaBankTransferPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesSepaBankTransferPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesSepaBankTransferPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `sepa_debit_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3981,6 +4789,42 @@ impl std::default::Default for AccountCapabilitiesTreasury { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `twint_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesTwintPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesTwintPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesTwintPayments::Active => "active", + AccountCapabilitiesTwintPayments::Inactive => "inactive", + AccountCapabilitiesTwintPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesTwintPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesTwintPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesTwintPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `us_bank_account_ach_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4017,6 +4861,42 @@ impl std::default::Default for AccountCapabilitiesUsBankAccountAchPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `us_bank_transfer_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesUsBankTransferPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesUsBankTransferPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesUsBankTransferPayments::Active => "active", + AccountCapabilitiesUsBankTransferPayments::Inactive => "inactive", + AccountCapabilitiesUsBankTransferPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesUsBankTransferPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesUsBankTransferPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesUsBankTransferPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `zip_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4138,6 +5018,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -4145,6 +5026,7 @@ pub enum AccountRequirementsErrorCode { VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, + VerificationRequiresAdditionalProofOfRegistration, } impl AccountRequirementsErrorCode { @@ -4230,6 +5112,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", @@ -4237,6 +5120,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", + AccountRequirementsErrorCode::VerificationRequiresAdditionalProofOfRegistration => "verification_requires_additional_proof_of_registration", } } } @@ -4294,6 +5178,148 @@ impl std::default::Default for AccountType { } } +/// An enum representing the possible values of an `AccountUnificationAccountControllerFees`'s `payer` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountUnificationAccountControllerFeesPayer { + Account, + Application, + ApplicationCustom, + ApplicationExpress, +} + +impl AccountUnificationAccountControllerFeesPayer { + pub fn as_str(self) -> &'static str { + match self { + AccountUnificationAccountControllerFeesPayer::Account => "account", + AccountUnificationAccountControllerFeesPayer::Application => "application", + AccountUnificationAccountControllerFeesPayer::ApplicationCustom => "application_custom", + AccountUnificationAccountControllerFeesPayer::ApplicationExpress => "application_express", + } + } +} + +impl AsRef for AccountUnificationAccountControllerFeesPayer { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountUnificationAccountControllerFeesPayer { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountUnificationAccountControllerFeesPayer { + fn default() -> Self { + Self::Account + } +} + +/// An enum representing the possible values of an `AccountUnificationAccountControllerLosses`'s `payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountUnificationAccountControllerLossesPayments { + Application, + Stripe, +} + +impl AccountUnificationAccountControllerLossesPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountUnificationAccountControllerLossesPayments::Application => "application", + AccountUnificationAccountControllerLossesPayments::Stripe => "stripe", + } + } +} + +impl AsRef for AccountUnificationAccountControllerLossesPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountUnificationAccountControllerLossesPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountUnificationAccountControllerLossesPayments { + fn default() -> Self { + Self::Application + } +} + +/// An enum representing the possible values of an `AccountUnificationAccountController`'s `requirement_collection` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountUnificationAccountControllerRequirementCollection { + Application, + Stripe, +} + +impl AccountUnificationAccountControllerRequirementCollection { + pub fn as_str(self) -> &'static str { + match self { + AccountUnificationAccountControllerRequirementCollection::Application => "application", + AccountUnificationAccountControllerRequirementCollection::Stripe => "stripe", + } + } +} + +impl AsRef for AccountUnificationAccountControllerRequirementCollection { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountUnificationAccountControllerRequirementCollection { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountUnificationAccountControllerRequirementCollection { + fn default() -> Self { + Self::Application + } +} + +/// An enum representing the possible values of an `AccountUnificationAccountControllerStripeDashboard`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountUnificationAccountControllerStripeDashboardType { + Express, + Full, + None, +} + +impl AccountUnificationAccountControllerStripeDashboardType { + pub fn as_str(self) -> &'static str { + match self { + AccountUnificationAccountControllerStripeDashboardType::Express => "express", + AccountUnificationAccountControllerStripeDashboardType::Full => "full", + AccountUnificationAccountControllerStripeDashboardType::None => "none", + } + } +} + +impl AsRef for AccountUnificationAccountControllerStripeDashboardType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountUnificationAccountControllerStripeDashboardType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountUnificationAccountControllerStripeDashboardType { + fn default() -> Self { + Self::Express + } +} + /// An enum representing the possible values of an `AccountUnificationAccountController`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4415,9 +5441,7 @@ impl CompanyParamsStructure { CompanyParamsStructure::SingleMemberLlc => "single_member_llc", CompanyParamsStructure::SoleEstablishment => "sole_establishment", CompanyParamsStructure::SoleProprietorship => "sole_proprietorship", - CompanyParamsStructure::TaxExemptGovernmentInstrumentality => { - "tax_exempt_government_instrumentality" - } + CompanyParamsStructure::TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality", CompanyParamsStructure::UnincorporatedAssociation => "unincorporated_association", CompanyParamsStructure::UnincorporatedNonProfit => "unincorporated_non_profit", CompanyParamsStructure::UnincorporatedPartnership => "unincorporated_partnership", @@ -4493,9 +5517,7 @@ impl CompanyStructure { CompanyStructure::SingleMemberLlc => "single_member_llc", CompanyStructure::SoleEstablishment => "sole_establishment", CompanyStructure::SoleProprietorship => "sole_proprietorship", - CompanyStructure::TaxExemptGovernmentInstrumentality => { - "tax_exempt_government_instrumentality" - } + CompanyStructure::TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality", CompanyStructure::UnincorporatedAssociation => "unincorporated_association", CompanyStructure::UnincorporatedNonProfit => "unincorporated_non_profit", CompanyStructure::UnincorporatedPartnership => "unincorporated_partnership", @@ -4520,6 +5542,144 @@ impl std::default::Default for CompanyStructure { } } +/// An enum representing the possible values of an `CreateAccountControllerFees`'s `payer` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateAccountControllerFeesPayer { + Account, + Application, +} + +impl CreateAccountControllerFeesPayer { + pub fn as_str(self) -> &'static str { + match self { + CreateAccountControllerFeesPayer::Account => "account", + CreateAccountControllerFeesPayer::Application => "application", + } + } +} + +impl AsRef for CreateAccountControllerFeesPayer { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateAccountControllerFeesPayer { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateAccountControllerFeesPayer { + fn default() -> Self { + Self::Account + } +} + +/// An enum representing the possible values of an `CreateAccountControllerLosses`'s `payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateAccountControllerLossesPayments { + Application, + Stripe, +} + +impl CreateAccountControllerLossesPayments { + pub fn as_str(self) -> &'static str { + match self { + CreateAccountControllerLossesPayments::Application => "application", + CreateAccountControllerLossesPayments::Stripe => "stripe", + } + } +} + +impl AsRef for CreateAccountControllerLossesPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateAccountControllerLossesPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateAccountControllerLossesPayments { + fn default() -> Self { + Self::Application + } +} + +/// An enum representing the possible values of an `CreateAccountController`'s `requirement_collection` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateAccountControllerRequirementCollection { + Application, + Stripe, +} + +impl CreateAccountControllerRequirementCollection { + pub fn as_str(self) -> &'static str { + match self { + CreateAccountControllerRequirementCollection::Application => "application", + CreateAccountControllerRequirementCollection::Stripe => "stripe", + } + } +} + +impl AsRef for CreateAccountControllerRequirementCollection { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateAccountControllerRequirementCollection { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateAccountControllerRequirementCollection { + fn default() -> Self { + Self::Application + } +} + +/// An enum representing the possible values of an `CreateAccountControllerStripeDashboard`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateAccountControllerStripeDashboardType { + Express, + Full, + None, +} + +impl CreateAccountControllerStripeDashboardType { + pub fn as_str(self) -> &'static str { + match self { + CreateAccountControllerStripeDashboardType::Express => "express", + CreateAccountControllerStripeDashboardType::Full => "full", + CreateAccountControllerStripeDashboardType::None => "none", + } + } +} + +impl AsRef for CreateAccountControllerStripeDashboardType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateAccountControllerStripeDashboardType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateAccountControllerStripeDashboardType { + fn default() -> Self { + Self::Express + } +} + /// An enum representing the possible values of an `PersonParams`'s `political_exposure` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/account_link.rs b/src/resources/generated/account_link.rs index b3c2c91f6..1fd9b87de 100644 --- a/src/resources/generated/account_link.rs +++ b/src/resources/generated/account_link.rs @@ -2,17 +2,17 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::AccountId; +use crate::ids::{AccountId}; use crate::params::{Expand, Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "AccountLink". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountLink { + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. @@ -26,6 +26,7 @@ pub struct AccountLink { } impl AccountLink { + /// Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. pub fn create(client: &Client, params: CreateAccountLink<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] @@ -44,6 +45,7 @@ impl Object for AccountLink { /// The parameters for `AccountLink::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateAccountLink<'a> { + /// The identifier of the account to create an account link for. pub account: AccountId, @@ -95,6 +97,7 @@ impl<'a> CreateAccountLink<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountLinkCollectionOptions { + /// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). /// /// If you don't specify `collection_options`, the default value is `currently_due`. diff --git a/src/resources/generated/account_session.rs b/src/resources/generated/account_session.rs index ec2521b5d..004559276 100644 --- a/src/resources/generated/account_session.rs +++ b/src/resources/generated/account_session.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSession { @@ -52,13 +52,46 @@ impl Object for AccountSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectEmbeddedAccountSessionCreateComponents { - pub account_onboarding: ConnectEmbeddedBaseConfigClaim, + pub account_management: ConnectEmbeddedAccountConfigClaim, - pub payment_details: ConnectEmbeddedPaymentsConfig, + pub account_onboarding: ConnectEmbeddedAccountConfigClaim, - pub payments: ConnectEmbeddedPaymentsConfig, + pub balances: ConnectEmbeddedPayoutsConfigClaim, - pub payouts: ConnectEmbeddedPayoutsConfig, + pub documents: ConnectEmbeddedBaseConfigClaim, + + pub notification_banner: ConnectEmbeddedAccountConfigClaim, + + pub payment_details: ConnectEmbeddedPaymentsConfigClaim, + + pub payments: ConnectEmbeddedPaymentsConfigClaim, + + pub payouts: ConnectEmbeddedPayoutsConfigClaim, + + pub payouts_list: ConnectEmbeddedBaseConfigClaim, + + pub tax_registrations: ConnectEmbeddedBaseConfigClaim, + + pub tax_settings: ConnectEmbeddedBaseConfigClaim, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedAccountConfigClaim { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + pub features: ConnectEmbeddedAccountFeaturesClaim, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedAccountFeaturesClaim { + + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + pub external_account_collection: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -75,7 +108,7 @@ pub struct ConnectEmbeddedBaseFeatures { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedPaymentsConfig { +pub struct ConnectEmbeddedPaymentsConfigClaim { /// Whether the embedded component is enabled. pub enabled: bool, @@ -91,6 +124,11 @@ pub struct ConnectEmbeddedPaymentsFeatures { /// This is `true` by default. pub capture_payments: bool, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + pub destination_on_behalf_of_charge_management: bool, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. @@ -103,7 +141,7 @@ pub struct ConnectEmbeddedPaymentsFeatures { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedPayoutsConfig { +pub struct ConnectEmbeddedPayoutsConfigClaim { /// Whether the embedded component is enabled. pub enabled: bool, @@ -119,6 +157,12 @@ pub struct ConnectEmbeddedPayoutsFeatures { /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. pub edit_payout_schedule: bool, + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + pub external_account_collection: bool, + /// Whether to allow creation of instant payouts. /// /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -160,10 +204,26 @@ impl<'a> CreateAccountSession<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponents { + /// Configuration for the account management embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_management: Option, + /// Configuration for the account onboarding embedded component. #[serde(skip_serializing_if = "Option::is_none")] pub account_onboarding: Option, + /// Configuration for the balances embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub balances: Option, + + /// Configuration for the documents embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub documents: Option, + + /// Configuration for the notification banner embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub notification_banner: Option, + /// Configuration for the payment details embedded component. #[serde(skip_serializing_if = "Option::is_none")] pub payment_details: Option, @@ -175,6 +235,29 @@ pub struct CreateAccountSessionComponents { /// Configuration for the payouts embedded component. #[serde(skip_serializing_if = "Option::is_none")] pub payouts: Option, + + /// Configuration for the payouts list embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub payouts_list: Option, + + /// Configuration for the tax registrations embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_registrations: Option, + + /// Configuration for the tax settings embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_settings: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsAccountManagement { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -188,6 +271,39 @@ pub struct CreateAccountSessionComponentsAccountOnboarding { pub features: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsBalances { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsDocuments { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsNotificationBanner { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponentsPaymentDetails { @@ -221,8 +337,103 @@ pub struct CreateAccountSessionComponentsPayouts { pub features: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsPayoutsList { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsTaxRegistrations { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsTaxSettings { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsAccountManagementFeatures { + + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + #[serde(skip_serializing_if = "Option::is_none")] + pub external_account_collection: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponentsAccountOnboardingFeatures { + + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + #[serde(skip_serializing_if = "Option::is_none")] + pub external_account_collection: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsBalancesFeatures { + + /// Whether to allow payout schedule to be changed. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub edit_payout_schedule: Option, + + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + #[serde(skip_serializing_if = "Option::is_none")] + pub external_account_collection: Option, + + /// Whether to allow creation of instant payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub instant_payouts: Option, + + /// Whether to allow creation of standard payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub standard_payouts: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsDocumentsFeatures { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsNotificationBannerFeatures { + + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + #[serde(skip_serializing_if = "Option::is_none")] + pub external_account_collection: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -234,6 +445,12 @@ pub struct CreateAccountSessionComponentsPaymentDetailsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub capture_payments: Option, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_on_behalf_of_charge_management: Option, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. @@ -256,6 +473,12 @@ pub struct CreateAccountSessionComponentsPaymentsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub capture_payments: Option, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_on_behalf_of_charge_management: Option, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. @@ -278,6 +501,13 @@ pub struct CreateAccountSessionComponentsPayoutsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub edit_payout_schedule: Option, + /// Whether to allow platforms to control bank account collection for their connected accounts. + /// + /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). + /// Otherwise, bank account collection is determined by compliance requirements. + #[serde(skip_serializing_if = "Option::is_none")] + pub external_account_collection: Option, + /// Whether to allow creation of instant payouts. /// /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -290,3 +520,15 @@ pub struct CreateAccountSessionComponentsPayoutsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub standard_payouts: Option, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsPayoutsListFeatures { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsTaxRegistrationsFeatures { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsTaxSettingsFeatures { +} diff --git a/src/resources/generated/address.rs b/src/resources/generated/address.rs index 0bb574529..1b04d46d3 100644 --- a/src/resources/generated/address.rs +++ b/src/resources/generated/address.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Address". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Address { + /// City, district, suburb, town, or village. pub city: Option, diff --git a/src/resources/generated/api_errors.rs b/src/resources/generated/api_errors.rs index ba4195c7b..8970e3187 100644 --- a/src/resources/generated/api_errors.rs +++ b/src/resources/generated/api_errors.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::resources::{PaymentIntent, PaymentMethod, PaymentSource, SetupIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "APIErrors". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApiErrors { + /// For card errors, the ID of the failed charge. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, @@ -103,6 +103,7 @@ pub enum ApiErrorsCode { ChargeAlreadyRefunded, ChargeDisputed, ChargeExceedsSourceLimit, + ChargeExceedsTransactionLimit, ChargeExpiredForCapture, ChargeInvalidParameter, ChargeNotRefundable, @@ -118,6 +119,10 @@ pub enum ApiErrorsCode { ExpiredCard, FinancialConnectionsAccountInactive, FinancialConnectionsNoSuccessfulTransactionRefresh, + ForwardingApiInactive, + ForwardingApiInvalidParameter, + ForwardingApiUpstreamConnectionError, + ForwardingApiUpstreamConnectionTimeout, IdempotencyKeyInUse, IncorrectAddress, IncorrectCvc, @@ -136,6 +141,7 @@ pub enum ApiErrorsCode { InvalidCvc, InvalidExpiryMonth, InvalidExpiryYear, + InvalidMandateReferencePrefixFormat, InvalidNumber, InvalidSourceUsage, InvalidTaxLocation, @@ -213,6 +219,7 @@ pub enum ApiErrorsCode { SetupIntentMandateInvalid, SetupIntentSetupAttemptExpired, SetupIntentUnexpectedState, + ShippingAddressInvalid, ShippingCalculationFailed, SkuInactive, StateUnsupported, @@ -223,6 +230,7 @@ pub enum ApiErrorsCode { TerminalLocationCountryUnsupported, TerminalReaderBusy, TerminalReaderHardwareFault, + TerminalReaderInvalidLocationForPayment, TerminalReaderOffline, TerminalReaderTimeout, TestmodeChargesOnly, @@ -240,9 +248,7 @@ impl ApiErrorsCode { match self { ApiErrorsCode::AccountClosed => "account_closed", ApiErrorsCode::AccountCountryInvalidAddress => "account_country_invalid_address", - ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => { - "account_error_country_change_requires_additional_steps" - } + ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => "account_error_country_change_requires_additional_steps", ApiErrorsCode::AccountInformationMismatch => "account_information_mismatch", ApiErrorsCode::AccountInvalid => "account_invalid", ApiErrorsCode::AccountNumberInvalid => "account_number_invalid", @@ -264,9 +270,7 @@ impl ApiErrorsCode { ApiErrorsCode::BankAccountVerificationFailed => "bank_account_verification_failed", ApiErrorsCode::BillingInvalidMandate => "billing_invalid_mandate", ApiErrorsCode::BitcoinUpgradeRequired => "bitcoin_upgrade_required", - ApiErrorsCode::CaptureChargeAuthorizationExpired => { - "capture_charge_authorization_expired" - } + ApiErrorsCode::CaptureChargeAuthorizationExpired => "capture_charge_authorization_expired", ApiErrorsCode::CaptureUnauthorizedPayment => "capture_unauthorized_payment", ApiErrorsCode::CardDeclineRateLimitExceeded => "card_decline_rate_limit_exceeded", ApiErrorsCode::CardDeclined => "card_declined", @@ -275,6 +279,7 @@ impl ApiErrorsCode { ApiErrorsCode::ChargeAlreadyRefunded => "charge_already_refunded", ApiErrorsCode::ChargeDisputed => "charge_disputed", ApiErrorsCode::ChargeExceedsSourceLimit => "charge_exceeds_source_limit", + ApiErrorsCode::ChargeExceedsTransactionLimit => "charge_exceeds_transaction_limit", ApiErrorsCode::ChargeExpiredForCapture => "charge_expired_for_capture", ApiErrorsCode::ChargeInvalidParameter => "charge_invalid_parameter", ApiErrorsCode::ChargeNotRefundable => "charge_not_refundable", @@ -288,12 +293,12 @@ impl ApiErrorsCode { ApiErrorsCode::DebitNotAuthorized => "debit_not_authorized", ApiErrorsCode::EmailInvalid => "email_invalid", ApiErrorsCode::ExpiredCard => "expired_card", - ApiErrorsCode::FinancialConnectionsAccountInactive => { - "financial_connections_account_inactive" - } - ApiErrorsCode::FinancialConnectionsNoSuccessfulTransactionRefresh => { - "financial_connections_no_successful_transaction_refresh" - } + ApiErrorsCode::FinancialConnectionsAccountInactive => "financial_connections_account_inactive", + ApiErrorsCode::FinancialConnectionsNoSuccessfulTransactionRefresh => "financial_connections_no_successful_transaction_refresh", + ApiErrorsCode::ForwardingApiInactive => "forwarding_api_inactive", + ApiErrorsCode::ForwardingApiInvalidParameter => "forwarding_api_invalid_parameter", + ApiErrorsCode::ForwardingApiUpstreamConnectionError => "forwarding_api_upstream_connection_error", + ApiErrorsCode::ForwardingApiUpstreamConnectionTimeout => "forwarding_api_upstream_connection_timeout", ApiErrorsCode::IdempotencyKeyInUse => "idempotency_key_in_use", ApiErrorsCode::IncorrectAddress => "incorrect_address", ApiErrorsCode::IncorrectCvc => "incorrect_cvc", @@ -312,6 +317,7 @@ impl ApiErrorsCode { ApiErrorsCode::InvalidCvc => "invalid_cvc", ApiErrorsCode::InvalidExpiryMonth => "invalid_expiry_month", ApiErrorsCode::InvalidExpiryYear => "invalid_expiry_year", + ApiErrorsCode::InvalidMandateReferencePrefixFormat => "invalid_mandate_reference_prefix_format", ApiErrorsCode::InvalidNumber => "invalid_number", ApiErrorsCode::InvalidSourceUsage => "invalid_source_usage", ApiErrorsCode::InvalidTaxLocation => "invalid_tax_location", @@ -320,9 +326,7 @@ impl ApiErrorsCode { ApiErrorsCode::InvoiceNoSubscriptionLineItems => "invoice_no_subscription_line_items", ApiErrorsCode::InvoiceNotEditable => "invoice_not_editable", ApiErrorsCode::InvoiceOnBehalfOfNotEditable => "invoice_on_behalf_of_not_editable", - ApiErrorsCode::InvoicePaymentIntentRequiresAction => { - "invoice_payment_intent_requires_action" - } + ApiErrorsCode::InvoicePaymentIntentRequiresAction => "invoice_payment_intent_requires_action", ApiErrorsCode::InvoiceUpcomingNone => "invoice_upcoming_none", ApiErrorsCode::LivemodeMismatch => "livemode_mismatch", ApiErrorsCode::LockTimeout => "lock_timeout", @@ -339,56 +343,28 @@ impl ApiErrorsCode { ApiErrorsCode::ParameterUnknown => "parameter_unknown", ApiErrorsCode::ParametersExclusive => "parameters_exclusive", ApiErrorsCode::PaymentIntentActionRequired => "payment_intent_action_required", - ApiErrorsCode::PaymentIntentAuthenticationFailure => { - "payment_intent_authentication_failure" - } - ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => { - "payment_intent_incompatible_payment_method" - } + ApiErrorsCode::PaymentIntentAuthenticationFailure => "payment_intent_authentication_failure", + ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => "payment_intent_incompatible_payment_method", ApiErrorsCode::PaymentIntentInvalidParameter => "payment_intent_invalid_parameter", - ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => { - "payment_intent_konbini_rejected_confirmation_number" - } + ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => "payment_intent_konbini_rejected_confirmation_number", ApiErrorsCode::PaymentIntentMandateInvalid => "payment_intent_mandate_invalid", - ApiErrorsCode::PaymentIntentPaymentAttemptExpired => { - "payment_intent_payment_attempt_expired" - } - ApiErrorsCode::PaymentIntentPaymentAttemptFailed => { - "payment_intent_payment_attempt_failed" - } + ApiErrorsCode::PaymentIntentPaymentAttemptExpired => "payment_intent_payment_attempt_expired", + ApiErrorsCode::PaymentIntentPaymentAttemptFailed => "payment_intent_payment_attempt_failed", ApiErrorsCode::PaymentIntentUnexpectedState => "payment_intent_unexpected_state", - ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => { - "payment_method_bank_account_already_verified" - } + ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => "payment_method_bank_account_already_verified", ApiErrorsCode::PaymentMethodBankAccountBlocked => "payment_method_bank_account_blocked", - ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => { - "payment_method_billing_details_address_missing" - } - ApiErrorsCode::PaymentMethodConfigurationFailures => { - "payment_method_configuration_failures" - } + ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => "payment_method_billing_details_address_missing", + ApiErrorsCode::PaymentMethodConfigurationFailures => "payment_method_configuration_failures", ApiErrorsCode::PaymentMethodCurrencyMismatch => "payment_method_currency_mismatch", ApiErrorsCode::PaymentMethodCustomerDecline => "payment_method_customer_decline", ApiErrorsCode::PaymentMethodInvalidParameter => "payment_method_invalid_parameter", - ApiErrorsCode::PaymentMethodInvalidParameterTestmode => { - "payment_method_invalid_parameter_testmode" - } + ApiErrorsCode::PaymentMethodInvalidParameterTestmode => "payment_method_invalid_parameter_testmode", ApiErrorsCode::PaymentMethodMicrodepositFailed => "payment_method_microdeposit_failed", - ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => { - "payment_method_microdeposit_verification_amounts_invalid" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => { - "payment_method_microdeposit_verification_amounts_mismatch" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => { - "payment_method_microdeposit_verification_attempts_exceeded" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => { - "payment_method_microdeposit_verification_descriptor_code_mismatch" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => { - "payment_method_microdeposit_verification_timeout" - } + ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => "payment_method_microdeposit_verification_amounts_invalid", + ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => "payment_method_microdeposit_verification_amounts_mismatch", + ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => "payment_method_microdeposit_verification_attempts_exceeded", + ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => "payment_method_microdeposit_verification_descriptor_code_mismatch", + ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => "payment_method_microdeposit_verification_timeout", ApiErrorsCode::PaymentMethodNotAvailable => "payment_method_not_available", ApiErrorsCode::PaymentMethodProviderDecline => "payment_method_provider_decline", ApiErrorsCode::PaymentMethodProviderTimeout => "payment_method_provider_timeout", @@ -403,9 +379,7 @@ impl ApiErrorsCode { ApiErrorsCode::PostalCodeInvalid => "postal_code_invalid", ApiErrorsCode::ProcessingError => "processing_error", ApiErrorsCode::ProductInactive => "product_inactive", - ApiErrorsCode::ProgressiveOnboardingLimitExceeded => { - "progressive_onboarding_limit_exceeded" - } + ApiErrorsCode::ProgressiveOnboardingLimitExceeded => "progressive_onboarding_limit_exceeded", ApiErrorsCode::RateLimit => "rate_limit", ApiErrorsCode::ReferToCustomer => "refer_to_customer", ApiErrorsCode::RefundDisputedPayment => "refund_disputed_payment", @@ -416,13 +390,12 @@ impl ApiErrorsCode { ApiErrorsCode::SecretKeyRequired => "secret_key_required", ApiErrorsCode::SepaUnsupportedAccount => "sepa_unsupported_account", ApiErrorsCode::SetupAttemptFailed => "setup_attempt_failed", - ApiErrorsCode::SetupIntentAuthenticationFailure => { - "setup_intent_authentication_failure" - } + ApiErrorsCode::SetupIntentAuthenticationFailure => "setup_intent_authentication_failure", ApiErrorsCode::SetupIntentInvalidParameter => "setup_intent_invalid_parameter", ApiErrorsCode::SetupIntentMandateInvalid => "setup_intent_mandate_invalid", ApiErrorsCode::SetupIntentSetupAttemptExpired => "setup_intent_setup_attempt_expired", ApiErrorsCode::SetupIntentUnexpectedState => "setup_intent_unexpected_state", + ApiErrorsCode::ShippingAddressInvalid => "shipping_address_invalid", ApiErrorsCode::ShippingCalculationFailed => "shipping_calculation_failed", ApiErrorsCode::SkuInactive => "sku_inactive", ApiErrorsCode::StateUnsupported => "state_unsupported", @@ -430,11 +403,10 @@ impl ApiErrorsCode { ApiErrorsCode::StripeTaxInactive => "stripe_tax_inactive", ApiErrorsCode::TaxIdInvalid => "tax_id_invalid", ApiErrorsCode::TaxesCalculationFailed => "taxes_calculation_failed", - ApiErrorsCode::TerminalLocationCountryUnsupported => { - "terminal_location_country_unsupported" - } + ApiErrorsCode::TerminalLocationCountryUnsupported => "terminal_location_country_unsupported", ApiErrorsCode::TerminalReaderBusy => "terminal_reader_busy", ApiErrorsCode::TerminalReaderHardwareFault => "terminal_reader_hardware_fault", + ApiErrorsCode::TerminalReaderInvalidLocationForPayment => "terminal_reader_invalid_location_for_payment", ApiErrorsCode::TerminalReaderOffline => "terminal_reader_offline", ApiErrorsCode::TerminalReaderTimeout => "terminal_reader_timeout", ApiErrorsCode::TestmodeChargesOnly => "testmode_charges_only", @@ -442,9 +414,7 @@ impl ApiErrorsCode { ApiErrorsCode::TokenAlreadyUsed => "token_already_used", ApiErrorsCode::TokenCardNetworkInvalid => "token_card_network_invalid", ApiErrorsCode::TokenInUse => "token_in_use", - ApiErrorsCode::TransferSourceBalanceParametersMismatch => { - "transfer_source_balance_parameters_mismatch" - } + ApiErrorsCode::TransferSourceBalanceParametersMismatch => "transfer_source_balance_parameters_mismatch", ApiErrorsCode::TransfersNotAllowed => "transfers_not_allowed", ApiErrorsCode::UrlInvalid => "url_invalid", } diff --git a/src/resources/generated/application.rs b/src/resources/generated/application.rs index 1ce12ce2c..763fd898b 100644 --- a/src/resources/generated/application.rs +++ b/src/resources/generated/application.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{ApplicationId}; +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::ids::ApplicationId; -use crate::params::Object; - /// The resource representing a Stripe "Application". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Application { diff --git a/src/resources/generated/application_fee.rs b/src/resources/generated/application_fee.rs index 08954d596..4e11ae50b 100644 --- a/src/resources/generated/application_fee.rs +++ b/src/resources/generated/application_fee.rs @@ -2,18 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ApplicationFeeId, ChargeId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Application, ApplicationFeeRefund, BalanceTransaction, Charge, Currency, -}; +use crate::resources::{Account, Application, ApplicationFeeRefund, BalanceTransaction, Charge, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PlatformFee". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFee { /// Unique identifier for the object. @@ -47,6 +44,11 @@ pub struct ApplicationFee { /// Must be a [supported currency](https://stripe.com/docs/currencies). pub currency: Currency, + /// Polymorphic source of the application fee. + /// + /// Includes the ID of the object the application fee was created from. + pub fee_source: Option, + /// 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, @@ -63,24 +65,19 @@ pub struct ApplicationFee { } impl ApplicationFee { + /// Returns a list of application fees you’ve previously collected. /// /// The application fees are returned in sorted order, with the most recent fees appearing first. - pub fn list( - client: &Client, - params: &ListApplicationFees<'_>, - ) -> Response> { - client.get_query("/application_fees", params) - } +pub fn list(client: &Client, params: &ListApplicationFees<'_>) -> Response> { + client.get_query("/application_fees", params) +} + /// Retrieves the details of an application fee that your account has collected. /// /// The same information is returned when refunding the application fee. - pub fn retrieve( - client: &Client, - id: &ApplicationFeeId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &ApplicationFeeId, expand: &[&str]) -> Response { client.get_query(&format!("/application_fees/{}", id), Expand { expand }) } } @@ -95,13 +92,31 @@ impl Object for ApplicationFee { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PlatformEarningFeeSource { + + /// Charge ID that created this application fee. + #[serde(skip_serializing_if = "Option::is_none")] + pub charge: Option, + + /// Payout ID that created this application fee. + #[serde(skip_serializing_if = "Option::is_none")] + pub payout: Option, + + /// Type of object that created the application fee, either `charge` or `payout`. + #[serde(rename = "type")] + pub type_: PlatformEarningFeeSourceType, +} + /// The parameters for `ApplicationFee::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListApplicationFees<'a> { + /// Only return application fees for the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, + /// Only return applications fees that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -145,6 +160,38 @@ impl<'a> ListApplicationFees<'a> { impl Paginable for ListApplicationFees<'_> { type O = ApplicationFee; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); + self.starting_after = Some(item.id()); + }} +/// An enum representing the possible values of an `PlatformEarningFeeSource`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PlatformEarningFeeSourceType { + Charge, + Payout, +} + +impl PlatformEarningFeeSourceType { + pub fn as_str(self) -> &'static str { + match self { + PlatformEarningFeeSourceType::Charge => "charge", + PlatformEarningFeeSourceType::Payout => "payout", + } + } +} + +impl AsRef for PlatformEarningFeeSourceType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PlatformEarningFeeSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PlatformEarningFeeSourceType { + fn default() -> Self { + Self::Charge } } diff --git a/src/resources/generated/apps_secret.rs b/src/resources/generated/apps_secret.rs index 41af70203..b658d5366 100644 --- a/src/resources/generated/apps_secret.rs +++ b/src/resources/generated/apps_secret.rs @@ -31,6 +31,7 @@ pub struct AppsSecret { pub name: String, /// The plaintext secret value to be stored. + #[serde(skip_serializing_if = "Option::is_none")] pub payload: Option, pub scope: SecretServiceResourceScope, diff --git a/src/resources/generated/balance.rs b/src/resources/generated/balance.rs index fa9738044..61cb9551a 100644 --- a/src/resources/generated/balance.rs +++ b/src/resources/generated/balance.rs @@ -2,22 +2,22 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::params::Object; +use crate::params::{Object}; use crate::resources::{BalanceAmountBySourceType, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Balance". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Balance { + /// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). /// /// You can find the available balance for each currency and payment type in the `source_types` property. pub available: Vec, - /// Funds held due to negative balances on connected Custom accounts. + /// Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. /// /// You can find the connect reserve balance for each currency and payment type in the `source_types` property. #[serde(skip_serializing_if = "Option::is_none")] @@ -49,6 +49,7 @@ impl Object for Balance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmount { + /// Balance amount. pub amount: i64, @@ -63,6 +64,7 @@ pub struct BalanceAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmountNet { + /// Balance amount. pub amount: i64, @@ -71,12 +73,30 @@ pub struct BalanceAmountNet { /// Must be a [supported currency](https://stripe.com/docs/currencies). pub currency: Currency, + /// Breakdown of balance by destination. + #[serde(skip_serializing_if = "Option::is_none")] + pub net_available: Option>, + #[serde(skip_serializing_if = "Option::is_none")] pub source_types: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceDetail { + /// Funds that are available for use. pub available: Vec, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BalanceNetAvailable { + + /// Net balance amount, subtracting fees from platform-set pricing. + pub amount: i64, + + /// ID of the external account for this net balance (not expandable). + pub destination: String, + + #[serde(skip_serializing_if = "Option::is_none")] + pub source_types: Option, +} diff --git a/src/resources/generated/balance_amount_by_source_type.rs b/src/resources/generated/balance_amount_by_source_type.rs index c83859bf5..cb5f1e0ea 100644 --- a/src/resources/generated/balance_amount_by_source_type.rs +++ b/src/resources/generated/balance_amount_by_source_type.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BalanceAmountBySourceType". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmountBySourceType { + /// Amount for bank account. #[serde(skip_serializing_if = "Option::is_none")] pub bank_account: Option, diff --git a/src/resources/generated/balance_transaction.rs b/src/resources/generated/balance_transaction.rs index 629dbe1d5..c44872caa 100644 --- a/src/resources/generated/balance_transaction.rs +++ b/src/resources/generated/balance_transaction.rs @@ -2,18 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{BalanceTransactionId, PayoutId, SourceId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - BalanceTransactionSourceUnion, BalanceTransactionStatus, Currency, FeeType, -}; +use crate::resources::{BalanceTransactionSourceUnion, BalanceTransactionStatus, Currency, FeeType}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BalanceTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceTransaction { /// Unique identifier for the object. @@ -81,24 +78,19 @@ pub struct BalanceTransaction { } impl BalanceTransaction { + /// Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). /// /// The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. - pub fn list( - client: &Client, - params: &ListBalanceTransactions<'_>, - ) -> Response> { - client.get_query("/balance_transactions", params) - } +pub fn list(client: &Client, params: &ListBalanceTransactions<'_>) -> Response> { + client.get_query("/balance_transactions", params) +} + /// Retrieves the balance transaction with the given ID. /// /// Note that this endpoint previously used the path `/v1/balance/history/:id`. - pub fn retrieve( - client: &Client, - id: &BalanceTransactionId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &BalanceTransactionId, expand: &[&str]) -> Response { client.get_query(&format!("/balance_transactions/{}", id), Expand { expand }) } } @@ -115,6 +107,7 @@ impl Object for BalanceTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Fee { + /// Amount of the fee, in cents. pub amount: i64, @@ -131,7 +124,7 @@ pub struct Fee { /// Often useful for displaying to users. pub description: Option, - /// Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. + /// Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. #[serde(rename = "type")] pub type_: FeeType, } @@ -139,6 +132,8 @@ pub struct Fee { /// The parameters for `BalanceTransaction::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListBalanceTransactions<'a> { + + /// Only return transactions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -207,9 +202,8 @@ impl<'a> ListBalanceTransactions<'a> { impl Paginable for ListBalanceTransactions<'_> { type O = BalanceTransaction; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `BalanceTransaction`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -279,9 +273,7 @@ impl BalanceTransactionType { BalanceTransactionType::Payment => "payment", BalanceTransactionType::PaymentFailureRefund => "payment_failure_refund", BalanceTransactionType::PaymentNetworkReserveHold => "payment_network_reserve_hold", - BalanceTransactionType::PaymentNetworkReserveRelease => { - "payment_network_reserve_release" - } + BalanceTransactionType::PaymentNetworkReserveRelease => "payment_network_reserve_release", BalanceTransactionType::PaymentRefund => "payment_refund", BalanceTransactionType::PaymentReversal => "payment_reversal", BalanceTransactionType::PaymentUnreconciled => "payment_unreconciled", diff --git a/src/resources/generated/bank_account.rs b/src/resources/generated/bank_account.rs index 5a845ec68..a01f57096 100644 --- a/src/resources/generated/bank_account.rs +++ b/src/resources/generated/bank_account.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::BankAccountId; +use crate::ids::{BankAccountId}; use crate::params::{Expandable, Metadata, Object}; use crate::resources::{Account, BankAccountStatus, Currency, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BankAccount". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -100,8 +99,8 @@ pub struct BankAccount { /// If customer bank account verification has succeeded, the bank account status will be `verified`. /// If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. /// If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. For external accounts, possible values are `new`, `errored` and `verification_failed`. - /// If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. - /// In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. + /// If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. + /// In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. /// Other validations aren't run against external accounts because they're only used for payouts. /// This means the other statuses don't apply. #[serde(skip_serializing_if = "Option::is_none")] @@ -120,6 +119,7 @@ impl Object for BankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ExternalAccountRequirements { + /// Fields that need to be collected to keep the external account enabled. /// /// If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. @@ -133,15 +133,17 @@ pub struct ExternalAccountRequirements { /// These fields need to be collected to enable the external account. pub past_due: Option>, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + /// Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -237,6 +239,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -244,6 +247,7 @@ pub enum AccountRequirementsErrorCode { VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, + VerificationRequiresAdditionalProofOfRegistration, } impl AccountRequirementsErrorCode { @@ -329,6 +333,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", @@ -336,6 +341,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", + AccountRequirementsErrorCode::VerificationRequiresAdditionalProofOfRegistration => "verification_requires_additional_proof_of_registration", } } } diff --git a/src/resources/generated/billing_alert.rs b/src/resources/generated/billing_alert.rs new file mode 100644 index 000000000..b7cc9d8c9 --- /dev/null +++ b/src/resources/generated/billing_alert.rs @@ -0,0 +1,167 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{BillingAlertId}; +use crate::params::{Expandable, Object}; +use crate::resources::{BillingMeter, Customer}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ThresholdsResourceAlert". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingAlert { + /// Unique identifier for the object. + pub id: BillingAlertId, + + /// Defines the type of the alert. + pub alert_type: BillingAlertAlertType, + + /// Limits the scope of the alert to a specific [customer](https://stripe.com/docs/api/customers). + pub filter: Option, + + /// 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, + + /// Status of the alert. + /// + /// This can be active, inactive or archived. + pub status: Option, + + /// Title of the alert. + pub title: String, + + /// Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + pub usage_threshold_config: Option, +} + +impl Object for BillingAlert { + type Id = BillingAlertId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "billing.alert" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThresholdsResourceAlertFilter { + + /// Limit the scope of the alert to this customer ID. + pub customer: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThresholdsResourceUsageThresholdConfig { + + /// The value at which this alert will trigger. + pub gte: i64, + + /// The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + pub meter: Expandable, + + /// Defines how the alert will behave. + pub recurrence: ThresholdsResourceUsageThresholdConfigRecurrence, +} + +/// An enum representing the possible values of an `BillingAlert`'s `alert_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingAlertAlertType { + UsageThreshold, +} + +impl BillingAlertAlertType { + pub fn as_str(self) -> &'static str { + match self { + BillingAlertAlertType::UsageThreshold => "usage_threshold", + } + } +} + +impl AsRef for BillingAlertAlertType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingAlertAlertType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingAlertAlertType { + fn default() -> Self { + Self::UsageThreshold + } +} + +/// An enum representing the possible values of an `BillingAlert`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingAlertStatus { + Active, + Archived, + Inactive, +} + +impl BillingAlertStatus { + pub fn as_str(self) -> &'static str { + match self { + BillingAlertStatus::Active => "active", + BillingAlertStatus::Archived => "archived", + BillingAlertStatus::Inactive => "inactive", + } + } +} + +impl AsRef for BillingAlertStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingAlertStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingAlertStatus { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `ThresholdsResourceUsageThresholdConfig`'s `recurrence` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThresholdsResourceUsageThresholdConfigRecurrence { + OneTime, +} + +impl ThresholdsResourceUsageThresholdConfigRecurrence { + pub fn as_str(self) -> &'static str { + match self { + ThresholdsResourceUsageThresholdConfigRecurrence::OneTime => "one_time", + } + } +} + +impl AsRef for ThresholdsResourceUsageThresholdConfigRecurrence { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThresholdsResourceUsageThresholdConfigRecurrence { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThresholdsResourceUsageThresholdConfigRecurrence { + fn default() -> Self { + Self::OneTime + } +} diff --git a/src/resources/generated/billing_alert_triggered.rs b/src/resources/generated/billing_alert_triggered.rs new file mode 100644 index 000000000..26a6040ba --- /dev/null +++ b/src/resources/generated/billing_alert_triggered.rs @@ -0,0 +1,36 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Object, Timestamp}; +use crate::resources::{BillingAlert}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ThresholdsResourceAlert". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingAlertTriggered { + + pub alert: BillingAlert, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// ID of customer for which the alert triggered. + pub customer: String, + + /// 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, + + /// The value triggering the alert. + pub value: i64, +} + +impl Object for BillingAlertTriggered { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "billing.alert_triggered" + } +} diff --git a/src/resources/generated/billing_details.rs b/src/resources/generated/billing_details.rs index 76f9626cb..cd089bc0d 100644 --- a/src/resources/generated/billing_details.rs +++ b/src/resources/generated/billing_details.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::resources::{Address}; use serde::{Deserialize, Serialize}; -use crate::resources::Address; - /// The resource representing a Stripe "billing_details". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BillingDetails { + /// Billing address. pub address: Option
, diff --git a/src/resources/generated/billing_meter.rs b/src/resources/generated/billing_meter.rs new file mode 100644 index 000000000..0a0af7aee --- /dev/null +++ b/src/resources/generated/billing_meter.rs @@ -0,0 +1,229 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{BillingMeterId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeter". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeter { + /// Unique identifier for the object. + pub id: BillingMeterId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + pub customer_mapping: BillingMeterResourceCustomerMappingSettings, + + pub default_aggregation: BillingMeterResourceAggregationSettings, + + /// The meter's name. + pub display_name: String, + + /// The name of the meter event to record usage for. + /// + /// Corresponds with the `event_name` field on meter events. + pub event_name: String, + + /// The time window to pre-aggregate meter events for, if any. + pub event_time_window: Option, + + /// 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, + + /// The meter's status. + pub status: BillingMeterStatus, + + pub status_transitions: BillingMeterResourceBillingMeterStatusTransitions, + + /// Time at which the object was last updated. + /// + /// Measured in seconds since the Unix epoch. + pub updated: Timestamp, + + pub value_settings: BillingMeterResourceBillingMeterValue, +} + +impl Object for BillingMeter { + type Id = BillingMeterId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "billing.meter" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceAggregationSettings { + + /// Specifies how events are aggregated. + pub formula: BillingMeterResourceAggregationSettingsFormula, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceBillingMeterStatusTransitions { + + /// The time the meter was deactivated, if any. + /// + /// Measured in seconds since Unix epoch. + pub deactivated_at: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceBillingMeterValue { + + /// The key in the meter event payload to use as the value for this meter. + pub event_payload_key: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceCustomerMappingSettings { + + /// The key in the meter event payload to use for mapping the event to a customer. + pub event_payload_key: String, + + /// The method for mapping a meter event to a customer. + #[serde(rename = "type")] + pub type_: BillingMeterResourceCustomerMappingSettingsType, +} + +/// An enum representing the possible values of an `BillingMeter`'s `event_time_window` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterEventTimeWindow { + Day, + Hour, +} + +impl BillingMeterEventTimeWindow { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterEventTimeWindow::Day => "day", + BillingMeterEventTimeWindow::Hour => "hour", + } + } +} + +impl AsRef for BillingMeterEventTimeWindow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterEventTimeWindow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterEventTimeWindow { + fn default() -> Self { + Self::Day + } +} + +/// An enum representing the possible values of an `BillingMeterResourceAggregationSettings`'s `formula` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterResourceAggregationSettingsFormula { + Count, + Sum, +} + +impl BillingMeterResourceAggregationSettingsFormula { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterResourceAggregationSettingsFormula::Count => "count", + BillingMeterResourceAggregationSettingsFormula::Sum => "sum", + } + } +} + +impl AsRef for BillingMeterResourceAggregationSettingsFormula { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterResourceAggregationSettingsFormula { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterResourceAggregationSettingsFormula { + fn default() -> Self { + Self::Count + } +} + +/// An enum representing the possible values of an `BillingMeterResourceCustomerMappingSettings`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterResourceCustomerMappingSettingsType { + ById, +} + +impl BillingMeterResourceCustomerMappingSettingsType { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterResourceCustomerMappingSettingsType::ById => "by_id", + } + } +} + +impl AsRef for BillingMeterResourceCustomerMappingSettingsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterResourceCustomerMappingSettingsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterResourceCustomerMappingSettingsType { + fn default() -> Self { + Self::ById + } +} + +/// An enum representing the possible values of an `BillingMeter`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterStatus { + Active, + Inactive, +} + +impl BillingMeterStatus { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterStatus::Active => "active", + BillingMeterStatus::Inactive => "inactive", + } + } +} + +impl AsRef for BillingMeterStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterStatus { + fn default() -> Self { + Self::Active + } +} diff --git a/src/resources/generated/billing_meter_event.rs b/src/resources/generated/billing_meter_event.rs new file mode 100644 index 000000000..d2c25ee4d --- /dev/null +++ b/src/resources/generated/billing_meter_event.rs @@ -0,0 +1,48 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEvent". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEvent { + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// The name of the meter event. + /// + /// Corresponds with the `event_name` field on a meter. + pub event_name: String, + + /// A unique identifier for the event. + pub identifier: String, + + /// 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, + + /// The payload of the event. + /// + /// This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). + /// Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + pub payload: String, + + /// The timestamp passed in when creating the event. + /// + /// Measured in seconds since the Unix epoch. + pub timestamp: Timestamp, +} + +impl Object for BillingMeterEvent { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "billing.meter_event" + } +} diff --git a/src/resources/generated/billing_meter_event_adjustment.rs b/src/resources/generated/billing_meter_event_adjustment.rs new file mode 100644 index 000000000..6ec135096 --- /dev/null +++ b/src/resources/generated/billing_meter_event_adjustment.rs @@ -0,0 +1,114 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEventAdjustment". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEventAdjustment { + + /// Specifies which event to cancel. + pub cancel: Option, + + /// The name of the meter event. + /// + /// Corresponds with the `event_name` field on a meter. + pub event_name: String, + + /// 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, + + /// The meter event adjustment's status. + pub status: BillingMeterEventAdjustmentStatus, + + /// Specifies whether to cancel a single event or a range of events for a time period. + /// + /// Time period cancellation is not supported yet. + #[serde(rename = "type")] + pub type_: BillingMeterEventAdjustmentType, +} + +impl Object for BillingMeterEventAdjustment { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "billing.meter_event_adjustment" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceBillingMeterEventAdjustmentCancel { + + /// Unique identifier for the event. + pub identifier: Option, +} + +/// An enum representing the possible values of an `BillingMeterEventAdjustment`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterEventAdjustmentStatus { + Complete, + Pending, +} + +impl BillingMeterEventAdjustmentStatus { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterEventAdjustmentStatus::Complete => "complete", + BillingMeterEventAdjustmentStatus::Pending => "pending", + } + } +} + +impl AsRef for BillingMeterEventAdjustmentStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterEventAdjustmentStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterEventAdjustmentStatus { + fn default() -> Self { + Self::Complete + } +} + +/// An enum representing the possible values of an `BillingMeterEventAdjustment`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterEventAdjustmentType { + Cancel, +} + +impl BillingMeterEventAdjustmentType { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterEventAdjustmentType::Cancel => "cancel", + } + } +} + +impl AsRef for BillingMeterEventAdjustmentType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterEventAdjustmentType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterEventAdjustmentType { + fn default() -> Self { + Self::Cancel + } +} diff --git a/src/resources/generated/billing_meter_event_summary.rs b/src/resources/generated/billing_meter_event_summary.rs new file mode 100644 index 000000000..e2bac7f72 --- /dev/null +++ b/src/resources/generated/billing_meter_event_summary.rs @@ -0,0 +1,47 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{BillingMeterEventSummaryId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEventSummary". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEventSummary { + /// Unique identifier for the object. + pub id: BillingMeterEventSummaryId, + + /// Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). + /// + /// The aggregation strategy is defined on meter via `default_aggregation`. + pub aggregated_value: f64, + + /// End timestamp for this event summary (exclusive). + /// + /// Must be aligned with minute boundaries. + pub end_time: Timestamp, + + /// 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, + + /// The meter associated with this event summary. + pub meter: String, + + /// Start timestamp for this event summary (inclusive). + /// + /// Must be aligned with minute boundaries. + pub start_time: Timestamp, +} + +impl Object for BillingMeterEventSummary { + type Id = BillingMeterEventSummaryId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "billing.meter_event_summary" + } +} diff --git a/src/resources/generated/billing_portal_configuration.rs b/src/resources/generated/billing_portal_configuration.rs index 6a27997c3..abd4235c1 100644 --- a/src/resources/generated/billing_portal_configuration.rs +++ b/src/resources/generated/billing_portal_configuration.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::BillingPortalConfigurationId; +use crate::ids::{BillingPortalConfigurationId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::Application; +use crate::resources::{Application}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PortalConfiguration". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -67,6 +66,7 @@ impl Object for BillingPortalConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalBusinessProfile { + /// The messaging shown to customers in the portal. pub headline: Option, @@ -79,6 +79,7 @@ pub struct PortalBusinessProfile { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFeatures { + pub customer_update: PortalCustomerUpdate, pub invoice_history: PortalInvoiceList, @@ -87,13 +88,12 @@ pub struct PortalFeatures { pub subscription_cancel: PortalSubscriptionCancel, - pub subscription_pause: PortalSubscriptionPause, - pub subscription_update: PortalSubscriptionUpdate, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalCustomerUpdate { + /// The types of customer updates that are supported. /// /// When empty, customers are not updateable. @@ -105,12 +105,14 @@ pub struct PortalCustomerUpdate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalInvoiceList { + /// Whether the feature is enabled. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalLoginPage { + /// If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. /// /// If `false`, the previously generated `url`, if any, will be deactivated. @@ -124,12 +126,14 @@ pub struct PortalLoginPage { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalPaymentMethodUpdate { + /// Whether the feature is enabled. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionCancel { + pub cancellation_reason: PortalSubscriptionCancellationReason, /// Whether the feature is enabled. @@ -146,6 +150,7 @@ pub struct PortalSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionCancellationReason { + /// Whether the feature is enabled. pub enabled: bool, @@ -153,14 +158,9 @@ pub struct PortalSubscriptionCancellationReason { pub options: Vec, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PortalSubscriptionPause { - /// Whether the feature is enabled. - pub enabled: bool, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionUpdate { + /// The types of subscription updates that are supported for items listed in the `products` attribute. /// /// When empty, subscriptions are not updateable. @@ -170,16 +170,19 @@ pub struct PortalSubscriptionUpdate { pub enabled: bool, /// The list of up to 10 products that support subscription updates. + #[serde(skip_serializing_if = "Option::is_none")] pub products: Option>, /// Determines how to handle prorations resulting from subscription updates. /// /// Valid values are `none`, `create_prorations`, and `always_invoice`. + /// Defaults to a value of `none` if you don't set it during creation. pub proration_behavior: PortalSubscriptionUpdateProrationBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionUpdateProduct { + /// The list of price IDs which, when subscribed to, a subscription can be updated. pub prices: Vec, diff --git a/src/resources/generated/billing_portal_session.rs b/src/resources/generated/billing_portal_session.rs index 70ea41ebe..7de7afc4c 100644 --- a/src/resources/generated/billing_portal_session.rs +++ b/src/resources/generated/billing_portal_session.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{BillingPortalSessionId, CustomerId}; use crate::params::{Expand, Expandable, Object, Timestamp}; -use crate::resources::BillingPortalConfiguration; +use crate::resources::{BillingPortalConfiguration}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PortalSession". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -42,7 +41,7 @@ pub struct BillingPortalSession { /// The account for which the session was created on behalf of. /// /// When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. - /// For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + /// For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). /// Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. pub on_behalf_of: Option, @@ -54,11 +53,9 @@ pub struct BillingPortalSession { } impl BillingPortalSession { + /// Creates a session of the customer portal. - pub fn create( - client: &Client, - params: CreateBillingPortalSession<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateBillingPortalSession<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/billing_portal/sessions", ¶ms) } @@ -76,6 +73,7 @@ impl Object for BillingPortalSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlow { + pub after_completion: PortalFlowsFlowAfterCompletion, /// Configuration when `flow.type=subscription_cancel`. @@ -94,6 +92,7 @@ pub struct PortalFlowsFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowAfterCompletion { + /// Configuration when `after_completion.type=hosted_confirmation`. pub hosted_confirmation: Option, @@ -107,18 +106,21 @@ pub struct PortalFlowsFlowAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the flow is completed. pub custom_message: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsAfterCompletionRedirect { + /// The URL the customer will be redirected to after the flow is completed. pub return_url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. pub retention: Option, @@ -128,12 +130,14 @@ pub struct PortalFlowsFlowSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionUpdate { + /// The ID of the subscription to be updated. pub subscription: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionUpdateConfirm { + /// The coupon or promotion code to apply to this subscription update. /// /// Currently, only up to one may be specified. @@ -150,6 +154,7 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsRetention { + /// Configuration when `retention.type=coupon_offer`. pub coupon_offer: Option, @@ -160,12 +165,14 @@ pub struct PortalFlowsRetention { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsCouponOffer { + /// The ID of the coupon to be offered. pub coupon: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsSubscriptionUpdateConfirmDiscount { + /// The ID of the coupon to apply to this subscription update. pub coupon: Option, @@ -175,6 +182,7 @@ pub struct PortalFlowsSubscriptionUpdateConfirmDiscount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsSubscriptionUpdateConfirmItem { + /// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. pub id: Option, @@ -191,6 +199,7 @@ pub struct PortalFlowsSubscriptionUpdateConfirmItem { /// The parameters for `BillingPortalSession::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateBillingPortalSession<'a> { + /// The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. /// /// If not specified, the session uses the default configuration. @@ -219,7 +228,7 @@ pub struct CreateBillingPortalSession<'a> { /// The `on_behalf_of` account to use for this session. /// /// When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. - /// For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + /// For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). /// Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. #[serde(skip_serializing_if = "Option::is_none")] pub on_behalf_of: Option<&'a str>, @@ -245,6 +254,7 @@ impl<'a> CreateBillingPortalSession<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowData { + /// Behavior after the flow is completed. #[serde(skip_serializing_if = "Option::is_none")] pub after_completion: Option, @@ -259,8 +269,7 @@ pub struct CreateBillingPortalSessionFlowData { /// Configuration when `flow_data.type=subscription_update_confirm`. #[serde(skip_serializing_if = "Option::is_none")] - pub subscription_update_confirm: - Option, + pub subscription_update_confirm: Option, /// Type of flow that the customer will go through. #[serde(rename = "type")] @@ -269,10 +278,10 @@ pub struct CreateBillingPortalSessionFlowData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataAfterCompletion { + /// Configuration when `after_completion.type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] - pub hosted_confirmation: - Option, + pub hosted_confirmation: Option, /// Configuration when `after_completion.type=redirect`. #[serde(skip_serializing_if = "Option::is_none")] @@ -285,6 +294,7 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. #[serde(skip_serializing_if = "Option::is_none")] pub retention: Option, @@ -295,18 +305,19 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdate { + /// The ID of the subscription to be updated. pub subscription: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm { + /// The coupon or promotion code to apply to this subscription update. /// /// Currently, only up to one may be specified. #[serde(skip_serializing_if = "Option::is_none")] - pub discounts: - Option>, + pub discounts: Option>, /// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. /// @@ -319,6 +330,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the flow is completed. #[serde(skip_serializing_if = "Option::is_none")] pub custom_message: Option, @@ -326,12 +338,14 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletionHostedConfirmation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataAfterCompletionRedirect { + /// The URL the customer will be redirected to after the flow is completed. pub return_url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention { + /// Configuration when `retention.type=coupon_offer`. pub coupon_offer: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer, @@ -342,6 +356,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscounts { + /// The ID of the coupon to apply to this subscription update. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -353,6 +368,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscounts #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems { + /// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. pub id: String, @@ -369,6 +385,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer { + /// The ID of the coupon to be offered. pub coupon: String, } @@ -521,12 +538,8 @@ pub enum CreateBillingPortalSessionFlowDataAfterCompletionType { impl CreateBillingPortalSessionFlowDataAfterCompletionType { pub fn as_str(self) -> &'static str { match self { - CreateBillingPortalSessionFlowDataAfterCompletionType::HostedConfirmation => { - "hosted_confirmation" - } - CreateBillingPortalSessionFlowDataAfterCompletionType::PortalHomepage => { - "portal_homepage" - } + CreateBillingPortalSessionFlowDataAfterCompletionType::HostedConfirmation => "hosted_confirmation", + CreateBillingPortalSessionFlowDataAfterCompletionType::PortalHomepage => "portal_homepage", CreateBillingPortalSessionFlowDataAfterCompletionType::Redirect => "redirect", } } @@ -559,9 +572,7 @@ pub enum CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { impl CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { pub fn as_str(self) -> &'static str { match self { - CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => { - "coupon_offer" - } + CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => "coupon_offer", } } } @@ -599,9 +610,7 @@ impl CreateBillingPortalSessionFlowDataType { CreateBillingPortalSessionFlowDataType::PaymentMethodUpdate => "payment_method_update", CreateBillingPortalSessionFlowDataType::SubscriptionCancel => "subscription_cancel", CreateBillingPortalSessionFlowDataType::SubscriptionUpdate => "subscription_update", - CreateBillingPortalSessionFlowDataType::SubscriptionUpdateConfirm => { - "subscription_update_confirm" - } + CreateBillingPortalSessionFlowDataType::SubscriptionUpdateConfirm => "subscription_update_confirm", } } } diff --git a/src/resources/generated/capability.rs b/src/resources/generated/capability.rs index c3b906ebb..cfae1ea1e 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "AccountCapability". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Capability { /// The identifier for the capability. @@ -64,8 +64,8 @@ pub struct AccountCapabilityFutureRequirements { /// If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. pub currently_due: Vec, - /// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. - pub disabled_reason: Option, + /// This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + pub disabled_reason: Option, /// Fields that are `currently_due` and need to be collected again because validation or verification failed. pub errors: Vec, @@ -81,10 +81,11 @@ pub struct AccountCapabilityFutureRequirements { /// New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. pub past_due: Vec, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due` or `currently_due`. + /// Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Vec, } @@ -104,11 +105,10 @@ pub struct AccountCapabilityRequirements { /// If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. pub currently_due: Vec, - /// If the capability is disabled, this string describes why. + /// Description of why the capability is disabled. /// - /// Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. `rejected.unsupported_business` means that the account's business is not supported by the capability. - /// For example, payment methods may restrict the businesses they support in their terms of service: - [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses) If you believe that the rejection is in error, please contact support at for assistance. - pub disabled_reason: Option, + /// [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + pub disabled_reason: Option, /// Fields that are `currently_due` and need to be collected again because validation or verification failed. pub errors: Vec, @@ -123,10 +123,11 @@ pub struct AccountCapabilityRequirements { /// These fields need to be collected to enable the capability on the account. pub past_due: Vec, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + /// Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Vec, } @@ -153,6 +154,120 @@ pub struct AccountRequirementsError { pub requirement: String, } +/// An enum representing the possible values of an `AccountCapabilityFutureRequirements`'s `disabled_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilityFutureRequirementsDisabledReason { + Other, + #[serde(rename = "paused.inactivity")] + PausedInactivity, + #[serde(rename = "pending.onboarding")] + PendingOnboarding, + #[serde(rename = "pending.review")] + PendingReview, + PlatformDisabled, + PlatformPaused, + #[serde(rename = "rejected.inactivity")] + RejectedInactivity, + #[serde(rename = "rejected.other")] + RejectedOther, + #[serde(rename = "rejected.unsupported_business")] + RejectedUnsupportedBusiness, + #[serde(rename = "requirements.fields_needed")] + RequirementsFieldsNeeded, +} + +impl AccountCapabilityFutureRequirementsDisabledReason { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilityFutureRequirementsDisabledReason::Other => "other", + AccountCapabilityFutureRequirementsDisabledReason::PausedInactivity => "paused.inactivity", + AccountCapabilityFutureRequirementsDisabledReason::PendingOnboarding => "pending.onboarding", + AccountCapabilityFutureRequirementsDisabledReason::PendingReview => "pending.review", + AccountCapabilityFutureRequirementsDisabledReason::PlatformDisabled => "platform_disabled", + AccountCapabilityFutureRequirementsDisabledReason::PlatformPaused => "platform_paused", + AccountCapabilityFutureRequirementsDisabledReason::RejectedInactivity => "rejected.inactivity", + AccountCapabilityFutureRequirementsDisabledReason::RejectedOther => "rejected.other", + AccountCapabilityFutureRequirementsDisabledReason::RejectedUnsupportedBusiness => "rejected.unsupported_business", + AccountCapabilityFutureRequirementsDisabledReason::RequirementsFieldsNeeded => "requirements.fields_needed", + } + } +} + +impl AsRef for AccountCapabilityFutureRequirementsDisabledReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilityFutureRequirementsDisabledReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilityFutureRequirementsDisabledReason { + fn default() -> Self { + Self::Other + } +} + +/// An enum representing the possible values of an `AccountCapabilityRequirements`'s `disabled_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilityRequirementsDisabledReason { + Other, + #[serde(rename = "paused.inactivity")] + PausedInactivity, + #[serde(rename = "pending.onboarding")] + PendingOnboarding, + #[serde(rename = "pending.review")] + PendingReview, + PlatformDisabled, + PlatformPaused, + #[serde(rename = "rejected.inactivity")] + RejectedInactivity, + #[serde(rename = "rejected.other")] + RejectedOther, + #[serde(rename = "rejected.unsupported_business")] + RejectedUnsupportedBusiness, + #[serde(rename = "requirements.fields_needed")] + RequirementsFieldsNeeded, +} + +impl AccountCapabilityRequirementsDisabledReason { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilityRequirementsDisabledReason::Other => "other", + AccountCapabilityRequirementsDisabledReason::PausedInactivity => "paused.inactivity", + AccountCapabilityRequirementsDisabledReason::PendingOnboarding => "pending.onboarding", + AccountCapabilityRequirementsDisabledReason::PendingReview => "pending.review", + AccountCapabilityRequirementsDisabledReason::PlatformDisabled => "platform_disabled", + AccountCapabilityRequirementsDisabledReason::PlatformPaused => "platform_paused", + AccountCapabilityRequirementsDisabledReason::RejectedInactivity => "rejected.inactivity", + AccountCapabilityRequirementsDisabledReason::RejectedOther => "rejected.other", + AccountCapabilityRequirementsDisabledReason::RejectedUnsupportedBusiness => "rejected.unsupported_business", + AccountCapabilityRequirementsDisabledReason::RequirementsFieldsNeeded => "requirements.fields_needed", + } + } +} + +impl AsRef for AccountCapabilityRequirementsDisabledReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilityRequirementsDisabledReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilityRequirementsDisabledReason { + fn default() -> Self { + Self::Other + } +} + /// An enum representing the possible values of an `AccountRequirementsError`'s `code` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -238,6 +353,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -245,6 +361,7 @@ pub enum AccountRequirementsErrorCode { VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, + VerificationRequiresAdditionalProofOfRegistration, } impl AccountRequirementsErrorCode { @@ -330,6 +447,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", @@ -337,6 +455,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", + AccountRequirementsErrorCode::VerificationRequiresAdditionalProofOfRegistration => "verification_requires_additional_proof_of_registration", } } } diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index 458001f38..d4c825f59 100644 --- a/src/resources/generated/card.rs +++ b/src/resources/generated/card.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CardId; +use crate::ids::{CardId}; use crate::params::{Expandable, Metadata, Object}; use crate::resources::{Account, Currency, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Card". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Card { /// Unique identifier for the object. @@ -19,6 +18,7 @@ pub struct Card { /// The account this card belongs to. /// /// This attribute will not be in the card object if the card belongs to a customer or recipient instead. + /// This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option>, @@ -62,7 +62,7 @@ pub struct Card { /// Card brand. /// - /// Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + /// Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. #[serde(skip_serializing_if = "Option::is_none")] pub brand: Option, @@ -72,10 +72,12 @@ pub struct Card { #[serde(skip_serializing_if = "Option::is_none")] pub country: Option, - /// Three-letter [ISO code for currency](https://stripe.com/docs/payouts). + /// Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. /// + /// Must be a [supported currency](https://docs.stripe.com/currencies). /// Only applicable on accounts (not customers or recipients). /// The card can be used as a transfer destination for funds in this currency. + /// This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub currency: Option, @@ -94,6 +96,8 @@ pub struct Card { pub cvc_check: Option, /// Whether this card is the default external account for its currency. + /// + /// This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub default_for_currency: Option, @@ -158,6 +162,9 @@ pub struct Card { #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, + /// For external accounts that are cards, possible values are `new` and `errored`. /// /// If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. @@ -181,6 +188,15 @@ impl Object for Card { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TokenCardNetworks { + + /// The preferred network for co-branded cards. + /// + /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + pub preferred: Option, +} + /// An enum representing the possible values of an `Card`'s `available_payout_methods` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/cash_balance.rs b/src/resources/generated/cash_balance.rs index d92f14760..6f83615a2 100644 --- a/src/resources/generated/cash_balance.rs +++ b/src/resources/generated/cash_balance.rs @@ -2,15 +2,15 @@ // This file was automatically generated. // ====================================== +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::params::Object; - /// The resource representing a Stripe "cash_balance". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CashBalance { + /// A hash of all cash balances available to this customer. /// /// You cannot delete a customer with any cash balances, even if the balance is 0. @@ -36,6 +36,7 @@ impl Object for CashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceCustomerBalanceSettings { + /// The configuration for how funds that land in the customer cash balance are reconciled. pub reconciliation_mode: CustomerBalanceCustomerBalanceSettingsReconciliationMode, diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index 6ec262e75..fe60308dc 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -2,22 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, CustomerId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, - ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, - PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardWalletApplePay, - PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, - Shipping, Transfer, -}; +use crate::resources::{Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardPresent, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, Shipping, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Charge". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Charge { /// Unique identifier for the object. @@ -41,12 +34,12 @@ pub struct Charge { /// The application fee (if any) for the charge. /// - /// [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + /// [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. pub application_fee: Option>, /// The amount of the application fee (if any) requested for the charge. /// - /// [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + /// [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. pub application_fee_amount: Option, /// Authorization code on the charge. @@ -61,6 +54,7 @@ pub struct Charge { /// The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. /// /// Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + /// This value only exists for card payments. pub calculated_statement_descriptor: Option, /// If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. @@ -158,6 +152,7 @@ pub struct Charge { pub refunded: bool, /// A list of refunds that have been applied to the charge. + #[serde(skip_serializing_if = "Option::is_none")] pub refunds: Option>, /// ID of the review associated with this charge if one exists. @@ -175,19 +170,19 @@ pub struct Charge { /// The transfer ID which created this charge. /// /// Only present if the charge came from another Stripe account. - /// [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + /// [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. pub source_transfer: Option>, - /// For card charges, use `statement_descriptor_suffix` instead. + /// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). /// - /// Otherwise, you can use this value as the complete description of a charge on your customers’ statements. - /// Must contain at least one letter, maximum 22 characters. + /// This value overrides the account's default statement descriptor. + /// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. pub statement_descriptor: Option, - /// Provides information about the charge that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + /// If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. pub statement_descriptor_suffix: Option, /// The status of the payment is either `succeeded`, `pending`, or `failed`. @@ -209,12 +204,14 @@ pub struct Charge { } impl Charge { + /// Returns a list of charges you’ve previously created. /// /// The charges are returned in sorted order, with the most recent charges appearing first. - pub fn list(client: &Client, params: &ListCharges<'_>) -> Response> { - client.get_query("/charges", params) - } +pub fn list(client: &Client, params: &ListCharges<'_>) -> Response> { + client.get_query("/charges", params) +} + /// This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) /// to initiate a new payment instead. @@ -254,6 +251,7 @@ impl Object for Charge { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FraudDetails { + /// Assessments from Stripe. /// /// If set, the value is `fraudulent`. @@ -269,6 +267,7 @@ pub struct FraudDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ChargeOutcome { + /// Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. /// /// The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. @@ -315,6 +314,7 @@ pub struct ChargeOutcome { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferData { + /// The amount transferred to the destination account, if specified. /// /// By default, the entire charge amount is transferred to the destination account. @@ -326,6 +326,7 @@ pub struct TransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3 { + #[serde(skip_serializing_if = "Option::is_none")] pub customer_reference: Option, @@ -345,6 +346,7 @@ pub struct Level3 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3LineItems { + pub discount_amount: Option, pub product_code: String, @@ -360,6 +362,7 @@ pub struct Level3LineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub ach_credit_transfer: Option, @@ -378,6 +381,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -432,6 +438,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub multibanco: Option, @@ -471,6 +480,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. /// An additional hash is included on `payment_method_details` with a name matching this value. /// It contains information specific to the payment method. @@ -492,6 +504,7 @@ pub struct PaymentMethodDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetails { + /// Uniquely identifies this particular Alipay account. /// /// You can use this attribute to check whether two Alipay accounts are the same. @@ -509,6 +522,7 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAchCreditTransfer { + /// Account number to transfer funds to. pub account_number: Option, @@ -524,6 +538,7 @@ pub struct PaymentMethodDetailsAchCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAchDebit { + /// Type of entity that holds the account. /// /// This can be either `individual` or `company`. @@ -549,6 +564,7 @@ pub struct PaymentMethodDetailsAchDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAcssDebit { + /// Name of the bank associated with the bank account. pub bank_name: Option, @@ -572,10 +588,15 @@ pub struct PaymentMethodDetailsAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsAffirm {} +pub struct PaymentMethodDetailsAffirm { + + /// The Affirm transaction ID associated with this payment. + pub transaction_id: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAfterpayClearpay { + /// The Afterpay order ID associated with this payment intent. pub order_id: Option, @@ -583,8 +604,13 @@ pub struct PaymentMethodDetailsAfterpayClearpay { pub reference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsAmazonPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAuBecsDebit { + /// Bank-State-Branch number of the bank account. pub bsb_number: Option, @@ -603,6 +629,7 @@ pub struct PaymentMethodDetailsAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsBacsDebit { + /// Uniquely identifies this particular bank account. /// /// You can use this attribute to check whether two bank accounts are the same. @@ -622,6 +649,7 @@ pub struct PaymentMethodDetailsBacsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsBancontact { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -652,10 +680,15 @@ pub struct PaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsBlik {} +pub struct PaymentMethodDetailsBlik { + + /// A unique and immutable identifier assigned by BLIK to every buyer. + pub buyer_id: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsBoleto { + /// The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers). pub tax_id: String, } @@ -666,6 +699,9 @@ pub struct PaymentMethodDetailsCard { /// The authorized amount. pub amount_authorized: Option, + /// Authorization code on the charge. + pub authorization_code: Option, + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -788,12 +824,14 @@ pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeat #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture { + /// Indicates whether or not multiple captures are supported. pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardChecks { + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. pub address_line1_check: Option, @@ -806,156 +844,21 @@ pub struct PaymentMethodDetailsCardChecks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardInstallments { + /// Installment plan selected for the payment. pub plan: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardNetworkToken { + /// Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. pub used: bool, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardPresent { - /// The authorized amount. - pub amount_authorized: Option, - - /// Card brand. - /// - /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub brand: Option, - - /// When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. - #[serde(skip_serializing_if = "Option::is_none")] - pub capture_before: Option, - - /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. - /// - /// May include alphanumeric characters, special characters and first/last name separator (`/`). - /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. - /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - pub cardholder_name: Option, - - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, - - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Authorization response cryptogram. - pub emv_auth_data: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, - - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, - - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - pub fingerprint: Option, - - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: Option, - - /// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. - /// - /// Only present if it was possible to generate a card PaymentMethod. - pub generated_card: Option, - - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, - - /// Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. - /// - /// Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). - pub incremental_authorization_supported: bool, - - /// The name of the card's issuing bank. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: Option, - - /// Identifies which network this charge was processed on. - /// - /// Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub network: Option, - - /// Details about payments collected offline. - pub offline: Option, - - /// Defines whether the authorized amount can be over-captured or not. - pub overcapture_supported: bool, - - /// How card details were read in this transaction. - pub read_method: Option, - - /// A collection of fields required to be displayed on receipts. - /// - /// Only required for EMV transactions. - pub receipt: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardPresentOffline { - /// Time at which the payment was collected while offline. - pub stored_at: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardPresentReceipt { - /// The type of account being debited or credited. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_type: Option, - - /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. - pub application_cryptogram: Option, - - /// Mnenomic of the Application Identifier. - pub application_preferred_name: Option, - - /// Identifier for this transaction. - pub authorization_code: Option, - - /// EMV tag 8A. - /// - /// A code returned by the card issuer. - pub authorization_response_code: Option, - - /// How the cardholder verified ownership of the card. - pub cardholder_verification_method: Option, - - /// EMV tag 84. - /// - /// Similar to the application identifier stored on the integrated circuit chip. - pub dedicated_file_name: Option, - - /// The outcome of a series of EMV functions performed by the card reader. - pub terminal_verification_results: Option, - - /// An indication of various EMV functions performed during the transaction. - pub transaction_status_information: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardWallet { + #[serde(skip_serializing_if = "Option::is_none")] pub amex_express_checkout: Option, @@ -989,13 +892,16 @@ pub struct PaymentMethodDetailsCardWallet { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletAmexExpressCheckout {} +pub struct PaymentMethodDetailsCardWalletAmexExpressCheckout { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletLink {} +pub struct PaymentMethodDetailsCardWalletLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardWalletMasterpass { + /// Owner's verified billing address. /// /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. @@ -1022,10 +928,12 @@ pub struct PaymentMethodDetailsCardWalletMasterpass { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletSamsungPay {} +pub struct PaymentMethodDetailsCardWalletSamsungPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardWalletVisaCheckout { + /// Owner's verified billing address. /// /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. @@ -1053,6 +961,7 @@ pub struct PaymentMethodDetailsCardWalletVisaCheckout { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCashapp { + /// A unique and immutable identifier assigned by Cash App to every buyer. pub buyer_id: Option, @@ -1061,10 +970,12 @@ pub struct PaymentMethodDetailsCashapp { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCustomerBalance {} +pub struct PaymentMethodDetailsCustomerBalance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsEps { + /// The customer's bank. /// /// Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. @@ -1079,6 +990,7 @@ pub struct PaymentMethodDetailsEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsFpx { + /// Account holder type, if provided. /// /// Can be one of `individual` or `company`. @@ -1095,6 +1007,7 @@ pub struct PaymentMethodDetailsFpx { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsGiropay { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1113,12 +1026,14 @@ pub struct PaymentMethodDetailsGiropay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsGrabpay { + /// Unique transaction id generated by GrabPay. pub transaction_id: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsIdeal { + /// The customer's bank. /// /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -1145,6 +1060,7 @@ pub struct PaymentMethodDetailsIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -1213,6 +1129,13 @@ pub struct PaymentMethodDetailsInteracPresent { /// Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. pub network: Option, + /// This is used by the financial networks to identify a transaction. + /// + /// Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + /// The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + /// This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + pub network_transaction_id: Option, + /// EMV tag 5F2D. /// /// Preferred languages specified by the integrated circuit chip. @@ -1229,6 +1152,7 @@ pub struct PaymentMethodDetailsInteracPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresentReceipt { + /// The type of account being debited or credited. #[serde(skip_serializing_if = "Option::is_none")] pub account_type: Option, @@ -1247,7 +1171,9 @@ pub struct PaymentMethodDetailsInteracPresentReceipt { /// A code returned by the card issuer. pub authorization_response_code: Option, - /// How the cardholder verified ownership of the card. + /// Describes the method used by the cardholder to verify ownership of the card. + /// + /// One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. pub cardholder_verification_method: Option, /// EMV tag 84. @@ -1264,36 +1190,67 @@ pub struct PaymentMethodDetailsInteracPresentReceipt { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsKlarna { + /// The Klarna payment method used for this transaction. /// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`. pub payment_method_category: Option, /// Preferred language of the Klarna authorization page that the customer is redirected to. - /// Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`. + /// Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`. pub preferred_locale: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsKonbini { + /// If the payment succeeded, this contains the details of the convenience store where the payment was completed. pub store: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsKonbiniStore { + /// The name of the convenience store chain where the payment was completed. pub chain: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsLink { + /// Two-letter ISO code representing the funding source country beneath the Link payment. /// You could use this attribute to get a sense of international fees. pub country: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsMobilepay { + + /// Internal card details. + pub card: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InternalCard { + + /// Brand of the card used in the transaction. + pub brand: Option, + + /// Two-letter ISO code representing the country of the card. + pub country: Option, + + /// Two digit number representing the card's expiration month. + pub exp_month: Option, + + /// Two digit number representing the card's expiration year. + pub exp_year: Option, + + /// The last 4 digits of the card. + pub last4: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsMultibanco { + /// Entity number associated with this Multibanco payment. pub entity: Option, @@ -1303,12 +1260,14 @@ pub struct PaymentMethodDetailsMultibanco { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsOxxo { + /// OXXO reference number. pub number: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsP24 { + /// The customer's bank. /// /// Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. @@ -1326,12 +1285,14 @@ pub struct PaymentMethodDetailsP24 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPaynow { + /// Reference number associated with this PayNow payment. pub reference: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPaypal { + /// Owner's email. /// /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. @@ -1358,6 +1319,7 @@ pub struct PaymentMethodDetailsPaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPix { + /// Unique transaction id generated by BCB. #[serde(skip_serializing_if = "Option::is_none")] pub bank_transaction_id: Option, @@ -1365,15 +1327,18 @@ pub struct PaymentMethodDetailsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPromptpay { + /// Bill reference generated by PromptPay. pub reference: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsRevolutPay {} +pub struct PaymentMethodDetailsRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSepaCreditTransfer { + /// Name of the bank associated with the bank account. pub bank_name: Option, @@ -1386,6 +1351,7 @@ pub struct PaymentMethodDetailsSepaCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSepaDebit { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1411,6 +1377,7 @@ pub struct PaymentMethodDetailsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSofort { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1444,10 +1411,12 @@ pub struct PaymentMethodDetailsSofort { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsStripeAccount {} +pub struct PaymentMethodDetailsStripeAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSwish { + /// Uniquely identifies the payer's Swish account. /// /// You can use this attribute to check whether two Swish transactions were paid for by the same payer. @@ -1460,8 +1429,13 @@ pub struct PaymentMethodDetailsSwish { pub verified_phone_last4: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsTwint { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsUsBankAccount { + /// Account holder type: individual or company. pub account_holder_type: Option, @@ -1481,15 +1455,24 @@ pub struct PaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// Reference number to locate ACH payments with customer's bank. + pub payment_reference: Option, + /// Routing number of the bank account. pub routing_number: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsWechat {} +pub struct PaymentMethodDetailsWechat { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsWechatPay { + /// Uniquely identifies this particular WeChat Pay account. /// /// You can use this attribute to check whether two WeChat accounts are the same. @@ -1500,10 +1483,12 @@ pub struct PaymentMethodDetailsWechatPay { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsZip {} +pub struct PaymentMethodDetailsZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaypalSellerProtection { + /// An array of conditions that are covered for the transaction, if applicable. pub dispute_categories: Option>, @@ -1513,6 +1498,7 @@ pub struct PaypalSellerProtection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Rule { + /// The action taken on the payment. pub action: String, @@ -1525,6 +1511,7 @@ pub struct Rule { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ThreeDSecureDetailsCharge { + /// For authenticated transactions: how the customer was authenticated by /// the issuing bank. pub authentication_flow: Option, @@ -1561,6 +1548,7 @@ pub struct ThreeDSecureDetailsCharge { /// The parameters for `Charge::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCharge<'a> { + /// Amount intended to be collected by this payment. /// /// 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). @@ -1575,7 +1563,7 @@ pub struct CreateCharge<'a> { /// A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. /// /// The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. - /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). + /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). #[serde(skip_serializing_if = "Option::is_none")] pub application_fee_amount: Option, @@ -1623,7 +1611,7 @@ pub struct CreateCharge<'a> { /// The Stripe account ID for which these funds are intended. /// /// Automatically set if you use the `destination` parameter. - /// For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + /// For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). #[serde(skip_serializing_if = "Option::is_none")] pub on_behalf_of: Option<&'a str>, @@ -1654,17 +1642,17 @@ pub struct CreateCharge<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub source: Option, - /// For card charges, use `statement_descriptor_suffix` instead. + /// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). /// - /// Otherwise, you can use this value as the complete description of a charge on your customers’ statements. - /// Must contain at least one letter, maximum 22 characters. + /// This value overrides the account's default statement descriptor. + /// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, - /// Provides information about the charge that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + /// If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option<&'a str>, @@ -1710,6 +1698,8 @@ impl<'a> CreateCharge<'a> { /// The parameters for `Charge::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCharges<'a> { + + /// Only return charges that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1745,7 +1735,7 @@ pub struct ListCharges<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub starting_after: Option, - /// Only return charges for this transfer group. + /// Only return charges for this transfer group, limited to 100. #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: Option<&'a str>, } @@ -1767,12 +1757,12 @@ impl<'a> ListCharges<'a> { impl Paginable for ListCharges<'_> { type O = Charge; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Charge::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateCharge<'a> { + /// The ID of an existing customer that will be associated with this request. /// /// This field may only be updated if there is no existing associated customer with this charge. @@ -1843,6 +1833,7 @@ impl<'a> UpdateCharge<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateChargeRadarOptions { + /// 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, @@ -1850,12 +1841,14 @@ pub struct CreateChargeRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FraudDetailsParams { + /// Either `safe` or `fraudulent`. pub user_report: FraudDetailsParamsUserReport, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferDataParams { + /// The amount transferred to the destination account, if specified. /// /// By default, the entire charge amount is transferred to the destination account. @@ -1939,8 +1932,7 @@ impl std::default::Default for FraudDetailsParamsUserReport { /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { Disabled, Enabled, } @@ -1974,8 +1966,7 @@ impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiRe /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { Available, Unavailable, } @@ -2009,8 +2000,7 @@ impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiRe /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { Available, Unavailable, } @@ -2064,16 +2054,12 @@ impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulti } } -impl std::fmt::Display - for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus -{ +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus -{ +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { fn default() -> Self { Self::Available } @@ -2151,90 +2137,6 @@ impl std::default::Default for PaymentMethodDetailsBancontactPreferredLanguage { } } -/// An enum representing the possible values of an `PaymentMethodDetailsCardPresent`'s `read_method` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodDetailsCardPresentReadMethod { - ContactEmv, - ContactlessEmv, - ContactlessMagstripeMode, - MagneticStripeFallback, - MagneticStripeTrack2, -} - -impl PaymentMethodDetailsCardPresentReadMethod { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodDetailsCardPresentReadMethod::ContactEmv => "contact_emv", - PaymentMethodDetailsCardPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodDetailsCardPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodDetailsCardPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } - PaymentMethodDetailsCardPresentReadMethod::MagneticStripeTrack2 => { - "magnetic_stripe_track2" - } - } - } -} - -impl AsRef for PaymentMethodDetailsCardPresentReadMethod { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodDetailsCardPresentReadMethod { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodDetailsCardPresentReadMethod { - fn default() -> Self { - Self::ContactEmv - } -} - -/// An enum representing the possible values of an `PaymentMethodDetailsCardPresentReceipt`'s `account_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodDetailsCardPresentReceiptAccountType { - Checking, - Credit, - Prepaid, - Unknown, -} - -impl PaymentMethodDetailsCardPresentReceiptAccountType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodDetailsCardPresentReceiptAccountType::Checking => "checking", - PaymentMethodDetailsCardPresentReceiptAccountType::Credit => "credit", - PaymentMethodDetailsCardPresentReceiptAccountType::Prepaid => "prepaid", - PaymentMethodDetailsCardPresentReceiptAccountType::Unknown => "unknown", - } - } -} - -impl AsRef for PaymentMethodDetailsCardPresentReceiptAccountType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodDetailsCardPresentReceiptAccountType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodDetailsCardPresentReceiptAccountType { - fn default() -> Self { - Self::Checking - } -} - /// An enum representing the possible values of an `PaymentMethodDetailsCardWallet`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2320,9 +2222,7 @@ impl PaymentMethodDetailsEpsBank { PaymentMethodDetailsEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", PaymentMethodDetailsEpsBank::BankAustria => "bank_austria", PaymentMethodDetailsEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - PaymentMethodDetailsEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } + PaymentMethodDetailsEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", PaymentMethodDetailsEpsBank::BawagPskAg => "bawag_psk_ag", PaymentMethodDetailsEpsBank::BksBankAg => "bks_bank_ag", PaymentMethodDetailsEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", @@ -2332,25 +2232,15 @@ impl PaymentMethodDetailsEpsBank { PaymentMethodDetailsEpsBank::Dolomitenbank => "dolomitenbank", PaymentMethodDetailsEpsBank::EasybankAg => "easybank_ag", PaymentMethodDetailsEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", - PaymentMethodDetailsEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - PaymentMethodDetailsEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - PaymentMethodDetailsEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - PaymentMethodDetailsEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } + PaymentMethodDetailsEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + PaymentMethodDetailsEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + PaymentMethodDetailsEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + PaymentMethodDetailsEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", PaymentMethodDetailsEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", PaymentMethodDetailsEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", PaymentMethodDetailsEpsBank::MarchfelderBank => "marchfelder_bank", PaymentMethodDetailsEpsBank::OberbankAg => "oberbank_ag", - PaymentMethodDetailsEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + PaymentMethodDetailsEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", PaymentMethodDetailsEpsBank::SchoellerbankAg => "schoellerbank_ag", PaymentMethodDetailsEpsBank::SpardaBankWien => "sparda_bank_wien", PaymentMethodDetailsEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -2644,15 +2534,9 @@ impl PaymentMethodDetailsInteracPresentReadMethod { match self { PaymentMethodDetailsInteracPresentReadMethod::ContactEmv => "contact_emv", PaymentMethodDetailsInteracPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodDetailsInteracPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } - PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeTrack2 => { - "magnetic_stripe_track2" - } + PaymentMethodDetailsInteracPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", } } } diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 30545ffda..bf14697ec 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -2,27 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, - SubscriptionId, -}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Address, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, - InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, - Subscription, TaxId, TaxRate, -}; +use crate::ids::{CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, SubscriptionId}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, Subscription, TaxId, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Session". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSession { /// Unique identifier for the object. @@ -43,6 +31,8 @@ pub struct CheckoutSession { pub automatic_tax: PaymentPagesCheckoutSessionAutomaticTax, /// Describes whether Checkout should collect the customer's billing address. + /// + /// Defaults to `auto`. pub billing_address_collection: Option, /// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. @@ -72,7 +62,7 @@ pub struct CheckoutSession { /// Must be a [supported currency](https://stripe.com/docs/currencies). pub currency: Option, - /// Currency conversion details for automatic currency conversion sessions. + /// Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions. pub currency_conversion: Option, /// Collect additional information from your customer using custom fields. @@ -94,7 +84,7 @@ pub struct CheckoutSession { /// The customer details including the customer's tax exempt status and the customer's tax IDs. /// - /// Only the customer's email is present on Sessions in `setup` mode. + /// Customer's address details are not present on Sessions in `setup` mode. pub customer_details: Option, /// If provided, this value will be used when the Customer object is created. @@ -135,17 +125,21 @@ pub struct CheckoutSession { pub mode: CheckoutSessionMode, /// The ID of the PaymentIntent for Checkout Sessions in `payment` mode. + /// + /// You can't confirm or cancel the PaymentIntent for a Checkout Session. + /// To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. pub payment_intent: Option>, /// The ID of the Payment Link that created this Session. pub payment_link: Option>, /// Configure whether a Checkout Session should collect a payment method. + /// + /// Defaults to `always`. pub payment_method_collection: Option, /// Information about the payment method configuration used for this Checkout session if using dynamic payment methods. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. pub payment_method_options: Option, @@ -165,10 +159,10 @@ pub struct CheckoutSession { /// The ID of the original expired Checkout Session that triggered the recovery flow. pub recovered_from: Option, - /// Applies to Checkout Sessions with `ui_mode: embedded`. + /// This parameter applies to `ui_mode: embedded`. /// - /// By default, Stripe will always redirect to your return_url after a successful confirmation. - /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + /// Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. + /// Defaults to `always`. #[serde(skip_serializing_if = "Option::is_none")] pub redirect_on_completion: Option, @@ -178,7 +172,15 @@ pub struct CheckoutSession { #[serde(skip_serializing_if = "Option::is_none")] pub return_url: Option, + /// Controls saved payment method settings for the session. + /// + /// Only available in `payment` and `subscription` mode. + pub saved_payment_method_options: Option, + /// The ID of the SetupIntent for Checkout Sessions in `setup` mode. + /// + /// You can't confirm or cancel the SetupIntent for a Checkout Session. + /// To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. pub setup_intent: Option>, /// When set, provides configuration for Checkout to collect a shipping address from a customer. @@ -218,7 +220,7 @@ pub struct CheckoutSession { /// The UI mode of the Session. /// - /// Can be `hosted` (default) or `embedded`. + /// Defaults to `hosted`. pub ui_mode: Option, /// The URL to the Checkout Session. @@ -230,19 +232,24 @@ pub struct CheckoutSession { } impl CheckoutSession { + /// Returns a list of Checkout Sessions. - pub fn list( - client: &Client, - params: &ListCheckoutSessions<'_>, - ) -> Response> { - client.get_query("/checkout/sessions", params) - } +pub fn list(client: &Client, params: &ListCheckoutSessions<'_>) -> Response> { + client.get_query("/checkout/sessions", params) +} + /// Creates a Session object. pub fn create(client: &Client, params: CreateCheckoutSession<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/checkout/sessions", ¶ms) } + + /// Updates a Session object. + pub fn update(client: &Client, id: &CheckoutSessionId, params: UpdateCheckoutSession<'_>) -> Response { + #[allow(clippy::needless_borrows_for_generic_args)] + client.post_form(&format!("/checkout/{}", id), ¶ms) + } } impl Object for CheckoutSession { @@ -257,6 +264,7 @@ impl Object for CheckoutSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSessionPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -269,6 +277,9 @@ pub struct CheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -314,6 +325,12 @@ pub struct CheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -347,6 +364,7 @@ pub struct CheckoutSessionPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAcssDebitPaymentMethodOptions { + /// Currency supported by the bank account. /// /// Returned when the Session is in `setup` mode. @@ -358,9 +376,9 @@ pub struct CheckoutAcssDebitPaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -371,6 +389,7 @@ pub struct CheckoutAcssDebitPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAcssDebitMandateOptions { + /// A URL for custom mandate text. #[serde(skip_serializing_if = "Option::is_none")] pub custom_mandate_url: Option, @@ -395,72 +414,91 @@ pub struct CheckoutAcssDebitMandateOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAffirmPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAfterpayClearpayPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAlipayPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutAmazonPayPaymentMethodOptions { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutAuBecsDebitPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutBacsDebitPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutBancontactPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutBoletoPaymentMethodOptions { + /// 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. @@ -468,23 +506,31 @@ pub struct CheckoutBoletoPaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCardPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, + /// 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/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + pub request_three_d_secure: CheckoutCardPaymentMethodOptionsRequestThreeDSecure, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -507,6 +553,7 @@ pub struct CheckoutCardPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCardInstallmentsOptions { + /// Indicates if installments are enabled. #[serde(skip_serializing_if = "Option::is_none")] pub enabled: Option, @@ -514,17 +561,19 @@ pub struct CheckoutCardInstallmentsOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCashappPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalancePaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -535,15 +584,16 @@ pub struct CheckoutCustomerBalancePaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub eu_bank_transfer: Option, @@ -551,8 +601,7 @@ pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptions { /// /// 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>, + pub requested_address_types: Option>, /// 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")] @@ -561,72 +610,79 @@ pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutEpsPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutFpxPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutGiropayPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutGrabPayPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutIdealPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutKlarnaPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutKonbiniPaymentMethodOptions { + /// 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. @@ -634,26 +690,52 @@ pub struct CheckoutKonbiniPaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutLinkPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutMobilepayPaymentMethodOptions { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutMultibancoPaymentMethodOptions { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutOxxoPaymentMethodOptions { + /// 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. @@ -661,37 +743,40 @@ pub struct CheckoutOxxoPaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutP24PaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPaynowPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPaypalPaymentMethodOptions { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -706,46 +791,59 @@ pub struct CheckoutPaypalPaymentMethodOptions { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPixPaymentMethodOptions { + /// The number of seconds after which Pix payment will expire. pub expires_after_seconds: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CheckoutRevolutPayPaymentMethodOptions {} +pub struct CheckoutRevolutPayPaymentMethodOptions { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSepaDebitPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSofortPaymentMethodOptions { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSwishPaymentMethodOptions { + /// The order reference that will be displayed to customers in the Swish application. /// /// Defaults to the `id` of the Payment Intent. @@ -754,14 +852,15 @@ pub struct CheckoutSwishPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -772,12 +871,14 @@ pub struct CheckoutUsBankAccountPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionAfterExpiration { + /// When set, configuration used to recover the Checkout Session on expiry. pub recovery: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionAfterExpirationRecovery { + /// Enables user redeemable promotion codes on the recovered Checkout Sessions. /// /// Defaults to `false`. @@ -798,6 +899,7 @@ pub struct PaymentPagesCheckoutSessionAfterExpirationRecovery { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionAutomaticTax { + /// Indicates whether automatic tax is enabled for the session. pub enabled: bool, @@ -813,6 +915,7 @@ pub struct PaymentPagesCheckoutSessionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionConsent { + /// If `opt_in`, the customer consents to receiving promotional communications /// from the merchant about this Checkout Session. pub promotions: Option, @@ -823,9 +926,9 @@ pub struct PaymentPagesCheckoutSessionConsent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionConsentCollection { + /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -839,6 +942,7 @@ pub struct PaymentPagesCheckoutSessionConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCurrencyConversion { + /// Total of all items in source currency before discounts or taxes are applied. pub amount_subtotal: i64, @@ -854,6 +958,7 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFields { + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -882,6 +987,10 @@ pub struct PaymentPagesCheckoutSessionCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsDropdown { + + /// The value that will pre-fill on the payment page. + pub default_value: Option, + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -895,6 +1004,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsDropdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsLabel { + /// Custom text for the label, displayed to the customer. /// /// Up to 50 characters. @@ -907,6 +1017,10 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsNumeric { + + /// The value that will pre-fill the field on the payment page. + pub default_value: Option, + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -919,6 +1033,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsOption { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -932,6 +1047,10 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsText { + + /// The value that will pre-fill the field on the payment page. + pub default_value: Option, + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -944,6 +1063,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomText { + /// Custom text that should be displayed after the payment confirmation button. pub after_submit: Option, @@ -959,12 +1079,14 @@ pub struct PaymentPagesCheckoutSessionCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomTextPosition { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomerDetails { + /// The customer's address after a completed Checkout Session. /// /// Note: This property is populated only for sessions on or after March 30, 2022. @@ -991,6 +1113,7 @@ pub struct PaymentPagesCheckoutSessionCustomerDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionInvoiceCreation { + /// Indicates whether invoice creation is enabled for the Checkout Session. pub enabled: bool, @@ -999,6 +1122,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceCreation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionInvoiceSettings { + /// The account tax IDs associated with the invoice. pub account_tax_ids: Option>>, @@ -1029,6 +1153,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -1038,6 +1163,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -1046,22 +1172,43 @@ pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionPhoneNumberCollection { + /// Indicates whether phone number collection is enabled for the session. pub enabled: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentPagesCheckoutSessionSavedPaymentMethodOptions { + + /// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. + /// + /// By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + pub allow_redisplay_filters: Option>, + + /// Enable customers to choose if they wish to remove their saved payment methods. + /// + /// Disabled by default. + pub payment_method_remove: Option, + + /// Enable customers to choose if they wish to save their payment method for future use. + /// + /// Disabled by default. + pub payment_method_save: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. - pub allowed_countries: - Vec, + pub allowed_countries: Vec, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionShippingCost { + /// Total shipping cost before any discounts or taxes are applied. pub amount_subtotal: i64, @@ -1083,6 +1230,7 @@ pub struct PaymentPagesCheckoutSessionShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, @@ -1099,6 +1247,7 @@ pub struct LineItemsTaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionShippingOption { + /// A non-negative integer in cents representing how much to charge. pub shipping_amount: i64, @@ -1108,7 +1257,8 @@ pub struct PaymentPagesCheckoutSessionShippingOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`. #[serde(rename = "type")] pub type_: PaymentPagesCheckoutSessionTaxIdType, @@ -1118,12 +1268,14 @@ pub struct PaymentPagesCheckoutSessionTaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTaxIdCollection { + /// Indicates whether tax ID collection is enabled for the session. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetails { + /// This is the sum of all the discounts. pub amount_discount: i64, @@ -1139,6 +1291,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -1148,6 +1301,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -1157,6 +1311,7 @@ pub struct LineItemsDiscountAmount { /// The parameters for `CheckoutSession::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCheckoutSession<'a> { + /// Configure actions after a Checkout Session has expired. #[serde(skip_serializing_if = "Option::is_none")] pub after_expiration: Option, @@ -1170,10 +1325,14 @@ pub struct CreateCheckoutSession<'a> { pub automatic_tax: Option, /// Specify whether Checkout should collect the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, /// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + /// + /// This parameter is not allowed if ui_mode is `embedded`. #[serde(skip_serializing_if = "Option::is_none")] pub cancel_url: Option<&'a str>, @@ -1293,7 +1452,8 @@ pub struct CreateCheckoutSession<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -1301,6 +1461,10 @@ pub struct CreateCheckoutSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_configuration: Option, + /// This parameter allows you to set some attributes on the payment method created during a Checkout session. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_data: Option, + /// Payment-method-specific configuration. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, @@ -1330,8 +1494,8 @@ pub struct CreateCheckoutSession<'a> { /// This parameter applies to `ui_mode: embedded`. /// - /// By default, Stripe will always redirect to your return_url after a successful confirmation. - /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + /// Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. + /// Defaults to `always`. #[serde(skip_serializing_if = "Option::is_none")] pub redirect_on_completion: Option, @@ -1342,6 +1506,12 @@ pub struct CreateCheckoutSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub return_url: Option<&'a str>, + /// Controls saved payment method settings for the session. + /// + /// Only available in `payment` and `subscription` mode. + #[serde(skip_serializing_if = "Option::is_none")] + pub saved_payment_method_options: Option, + /// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. #[serde(skip_serializing_if = "Option::is_none")] pub setup_intent_data: Option, @@ -1376,13 +1546,13 @@ pub struct CreateCheckoutSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub success_url: Option<&'a str>, - /// Controls tax ID collection settings for the session. + /// Controls tax ID collection during checkout. #[serde(skip_serializing_if = "Option::is_none")] pub tax_id_collection: Option, - /// `ui_mode` can be `hosted` or `embedded`. + /// The UI mode of the Session. /// - /// The default is `hosted`. + /// Defaults to `hosted`. #[serde(skip_serializing_if = "Option::is_none")] pub ui_mode: Option, } @@ -1415,11 +1585,13 @@ impl<'a> CreateCheckoutSession<'a> { payment_intent_data: Default::default(), payment_method_collection: Default::default(), payment_method_configuration: Default::default(), + payment_method_data: Default::default(), payment_method_options: Default::default(), payment_method_types: Default::default(), phone_number_collection: Default::default(), redirect_on_completion: Default::default(), return_url: Default::default(), + saved_payment_method_options: Default::default(), setup_intent_data: Default::default(), shipping_address_collection: Default::default(), shipping_options: Default::default(), @@ -1435,7 +1607,8 @@ impl<'a> CreateCheckoutSession<'a> { /// The parameters for `CheckoutSession::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCheckoutSessions<'a> { - /// Only return the Checkout Sessions that were created during the given date interval. + + /// Only return Checkout Sessions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1508,11 +1681,37 @@ impl<'a> ListCheckoutSessions<'a> { impl Paginable for ListCheckoutSessions<'_> { type O = CheckoutSession; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); + self.starting_after = Some(item.id()); + }} +/// The parameters for `CheckoutSession::update`. +#[derive(Clone, Debug, Serialize, Default)] +pub struct UpdateCheckoutSession<'a> { + + /// 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, +} + +impl<'a> UpdateCheckoutSession<'a> { + pub fn new() -> Self { + UpdateCheckoutSession { + expand: Default::default(), + metadata: Default::default(), + } } } + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAfterExpiration { + /// Configure a Checkout Session that can be used to recover an expired session. #[serde(skip_serializing_if = "Option::is_none")] pub recovery: Option, @@ -1520,6 +1719,7 @@ pub struct CreateCheckoutSessionAfterExpiration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAutomaticTax { + /// Set to true to enable automatic taxes. pub enabled: bool, @@ -1533,12 +1733,12 @@ pub struct CreateCheckoutSessionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionConsentCollection { + /// Determines the display of payment method reuse agreement text in the UI. /// /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -1555,6 +1755,7 @@ pub struct CreateCheckoutSessionConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFields { + /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -1588,6 +1789,7 @@ pub struct CreateCheckoutSessionCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -1602,12 +1804,12 @@ pub struct CreateCheckoutSessionCustomText { /// Custom text that should be displayed in place of the default terms of service agreement text. #[serde(skip_serializing_if = "Option::is_none")] - pub terms_of_service_acceptance: - Option, + pub terms_of_service_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomerUpdate { + /// Describes whether Checkout saves the billing address onto `customer.address`. /// To always collect a full billing address, use `billing_address_collection`. /// @@ -1631,6 +1833,7 @@ pub struct CreateCheckoutSessionCustomerUpdate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionDiscounts { + /// The ID of the coupon to apply to this Session. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -1642,6 +1845,7 @@ pub struct CreateCheckoutSessionDiscounts { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreation { + /// Set to `true` to enable invoice creation. pub enabled: bool, @@ -1652,6 +1856,7 @@ pub struct CreateCheckoutSessionInvoiceCreation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItems { + /// When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. #[serde(skip_serializing_if = "Option::is_none")] pub adjustable_quantity: Option, @@ -1687,6 +1892,7 @@ pub struct CreateCheckoutSessionLineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentData { + /// 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. @@ -1748,16 +1954,17 @@ pub struct CreateCheckoutSessionPaymentIntentData { #[serde(skip_serializing_if = "Option::is_none")] pub shipping: Option, - /// Extra information about the payment. + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// This will appear on your customer's statement when this payment succeeds in creating a charge. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option, - /// Provides information about the charge that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option, @@ -1773,8 +1980,19 @@ pub struct CreateCheckoutSessionPaymentIntentData { pub transfer_group: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodData { + + /// Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. + /// + /// Only set this field if you wish to override the allow_redisplay value determined by Checkout. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptions { + /// contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -1791,6 +2009,10 @@ pub struct CreateCheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// contains details about the AmazonPay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// contains details about the AU Becs Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -1851,6 +2073,14 @@ pub struct CreateCheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// contains details about the Mobilepay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// contains details about the Multibanco payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// contains details about the OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -1898,12 +2128,30 @@ pub struct CreateCheckoutSessionPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPhoneNumberCollection { + /// Set to `true` to enable phone number collection. pub enabled: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionSavedPaymentMethodOptions { + + /// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. + /// + /// By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay_filters: Option>, + + /// Enable customers to choose if they wish to save their payment method for future use. + /// + /// Disabled by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_save: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSetupIntentData { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. @@ -1925,6 +2173,7 @@ pub struct CreateCheckoutSessionSetupIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -1934,6 +2183,7 @@ pub struct CreateCheckoutSessionShippingAddressCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptions { + /// The ID of the Shipping Rate to use for this shipping option. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_rate: Option, @@ -1945,6 +2195,7 @@ pub struct CreateCheckoutSessionShippingOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -2017,18 +2268,23 @@ pub struct CreateCheckoutSessionSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionTaxIdCollection { - /// Set to true to enable Tax ID collection. + + /// Enable tax ID collection during checkout. + /// + /// Defaults to `false`. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListCheckoutSessionsCustomerDetails { + /// Customer's email address. pub email: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAfterExpirationRecovery { + /// Enables user redeemable promotion codes on the recovered Checkout Sessions. /// /// Defaults to `false`. @@ -2044,6 +2300,7 @@ pub struct CreateCheckoutSessionAfterExpirationRecovery { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -2055,6 +2312,7 @@ pub struct CreateCheckoutSessionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. @@ -2064,6 +2322,11 @@ pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdown { + + /// The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + #[serde(skip_serializing_if = "Option::is_none")] + pub default_value: Option, + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -2072,6 +2335,7 @@ pub struct CreateCheckoutSessionCustomFieldsDropdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsLabel { + /// Custom text for the label, displayed to the customer. /// /// Up to 50 characters. @@ -2084,6 +2348,11 @@ pub struct CreateCheckoutSessionCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsNumeric { + + /// The value that will pre-fill the field on the payment page. + #[serde(skip_serializing_if = "Option::is_none")] + pub default_value: Option, + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -2095,6 +2364,11 @@ pub struct CreateCheckoutSessionCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsText { + + /// The value that will pre-fill the field on the payment page. + #[serde(skip_serializing_if = "Option::is_none")] + pub default_value: Option, + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -2106,30 +2380,35 @@ pub struct CreateCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -2169,6 +2448,7 @@ pub struct CreateCheckoutSessionInvoiceCreationInvoiceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsAdjustableQuantity { + /// Set to true if the quantity can be adjusted to any non-negative integer. /// /// By default customers will be able to remove the line item by setting the quantity to 0. @@ -2190,6 +2470,7 @@ pub struct CreateCheckoutSessionLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceData { + /// 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). @@ -2234,6 +2515,7 @@ pub struct CreateCheckoutSessionLineItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShipping { + /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress, @@ -2257,6 +2539,7 @@ pub struct CreateCheckoutSessionPaymentIntentDataShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataTransferData { + /// The amount that will be transferred automatically when a charge succeeds. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -2271,6 +2554,7 @@ pub struct CreateCheckoutSessionPaymentIntentDataTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebit { + /// 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). @@ -2284,91 +2568,104 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebit { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAffirm { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpay { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAlipay { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodOptionsAmazonPay { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAuBecsDebit { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsBacsDebit { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsBancontact { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsBoleto { + /// 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. @@ -2377,24 +2674,33 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsBoleto { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCard { + /// Installment options for card payments. #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, + /// 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/authentication-flow#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, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -2417,18 +2723,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCashapp { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalance { + /// 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, @@ -2441,84 +2748,88 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalance { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsEps { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsFpx { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsGiropay { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsGrabpay { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsIdeal { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsKlarna { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsKonbini { + /// 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. @@ -2528,27 +2839,52 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsKonbini { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsLink { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodOptionsMobilepay { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodOptionsMultibanco { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsOxxo { + /// 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. @@ -2557,20 +2893,21 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsOxxo { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsP24 { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -2581,17 +2918,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsP24 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsPaynow { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsPaypal { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -2612,15 +2951,16 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPaypal { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsPix { + /// The number of seconds (between 10 and 1209600) after which Pix payment will expire. /// /// Defaults to 86400 seconds. @@ -2630,41 +2970,43 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsRevolutPay { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSepaDebit { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSwish { + /// The order reference that will be displayed to customers in the Swish application. /// /// Defaults to the `id` of the Payment Intent. @@ -2674,28 +3016,27 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -2707,22 +3048,21 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsWechatPay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateData { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. #[serde(skip_serializing_if = "Option::is_none")] - pub delivery_estimate: - Option, + pub delivery_estimate: Option, /// The name of the shipping rate, meant to be displayable to the customer. /// @@ -2756,8 +3096,6 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData { pub tax_code: Option, /// The type of calculation to use on the shipping rate. - /// - /// Can only be `fixed_amount` for now. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option, @@ -2765,6 +3103,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -2774,6 +3113,7 @@ pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -2787,12 +3127,14 @@ pub struct CreateCheckoutSessionSubscriptionDataTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -2806,19 +3148,21 @@ pub struct CreateCheckoutSessionCustomFieldsDropdownOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataCustomFields { + /// The name of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 40 characters. pub name: String, /// The value of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 140 characters. pub value: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -2830,18 +3174,19 @@ pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataProductData { + /// The product's description, meant to be displayable to the customer. /// /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. @@ -2870,6 +3215,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -2885,6 +3231,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShippingAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -2911,6 +3258,7 @@ pub struct CreateCheckoutSessionPaymentIntentDataShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptions { + /// 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. @@ -2921,8 +3269,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptions { /// /// Only usable in `setup` mode. #[serde(skip_serializing_if = "Option::is_none")] - pub default_for: - Option>, + pub default_for: Option>, /// Description of the mandate interval. /// @@ -2932,17 +3279,16 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptions { /// Payment schedule for the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: - Option, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCardInstallments { + /// Setting to true enables installments for this Checkout Session. /// Setting to false will prevent any installment plan from applying to a payment. #[serde(skip_serializing_if = "Option::is_none")] @@ -2969,41 +3315,38 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnections { + /// 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, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] - pub maximum: - Option, + pub maximum: Option, /// The lower bound of the estimated range. /// /// If empty, represents no lower bound. #[serde(skip_serializing_if = "Option::is_none")] - pub minimum: - Option, + pub minimum: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -3016,13 +3359,12 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount { /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[serde(skip_serializing_if = "Option::is_none")] - pub currency_options: Option< - CurrencyMap, - >, + pub currency_options: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -3034,13 +3376,14 @@ pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -3049,6 +3392,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferE #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -3058,6 +3402,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -3067,6 +3412,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -3074,9 +3420,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurren /// /// One of `inclusive`, `exclusive`, or `unspecified`. #[serde(skip_serializing_if = "Option::is_none")] - pub tax_behavior: Option< - CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior, - >, + pub tax_behavior: Option, } /// An enum representing the possible values of an `CheckoutAcssDebitMandateOptions`'s `default_for` field. @@ -3233,9 +3577,7 @@ impl CheckoutAcssDebitPaymentMethodOptionsVerificationMethod { match self { CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Automatic => "automatic", CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Instant => "instant", - CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => { - "microdeposits" - } + CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3353,6 +3695,40 @@ impl std::default::Default for CheckoutAlipayPaymentMethodOptionsSetupFutureUsag } } +/// An enum representing the possible values of an `CheckoutAmazonPayPaymentMethodOptions`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage { + None, + OffSession, +} + +impl CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage::None => "none", + CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutAmazonPayPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CheckoutAuBecsDebitPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3489,6 +3865,42 @@ impl std::default::Default for CheckoutBoletoPaymentMethodOptionsSetupFutureUsag } } +/// An enum representing the possible values of an `CheckoutCardPaymentMethodOptions`'s `request_three_d_secure` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + Any, + Automatic, + Challenge, +} + +impl CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + pub fn as_str(self) -> &'static str { + match self { + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Any => "any", + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Automatic => "automatic", + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Challenge => "challenge", + } + } +} + +impl AsRef for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn default() -> Self { + Self::Any + } +} + /// An enum representing the possible values of an `CheckoutCardPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3590,16 +4002,12 @@ impl AsRef for CheckoutCustomerBalanceBankTransferPaymentMethodOptionsReque } } -impl std::fmt::Display - for CheckoutCustomerBalanceBankTransferPaymentMethodOptionsRequestedAddressTypes -{ +impl std::fmt::Display for CheckoutCustomerBalanceBankTransferPaymentMethodOptionsRequestedAddressTypes { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CheckoutCustomerBalanceBankTransferPaymentMethodOptionsRequestedAddressTypes -{ +impl std::default::Default for CheckoutCustomerBalanceBankTransferPaymentMethodOptionsRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -3619,21 +4027,11 @@ pub enum CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType { impl CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType { pub fn as_str(self) -> &'static str { match self { - CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::EuBankTransfer => { - "eu_bank_transfer" - } - CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::GbBankTransfer => { - "gb_bank_transfer" - } - CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::JpBankTransfer => { - "jp_bank_transfer" - } - CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::MxBankTransfer => { - "mx_bank_transfer" - } - CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::UsBankTransfer => { - "us_bank_transfer" - } + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::EuBankTransfer => "eu_bank_transfer", + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::GbBankTransfer => "gb_bank_transfer", + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::JpBankTransfer => "jp_bank_transfer", + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::MxBankTransfer => "mx_bank_transfer", + CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType::UsBankTransfer => "us_bank_transfer", } } } @@ -3981,6 +4379,70 @@ impl std::default::Default for CheckoutLinkPaymentMethodOptionsSetupFutureUsage } } +/// An enum representing the possible values of an `CheckoutMobilepayPaymentMethodOptions`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage { + None, +} + +impl CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CheckoutMultibancoPaymentMethodOptions`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage { + None, +} + +impl CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutMultibancoPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CheckoutOxxoPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4109,35 +4571,69 @@ impl std::default::Default for CheckoutPaypalPaymentMethodOptionsCaptureMethod { } } -/// An enum representing the possible values of an `CheckoutPaypalPaymentMethodOptions`'s `setup_future_usage` field. +/// An enum representing the possible values of an `CheckoutPaypalPaymentMethodOptions`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + None, + OffSession, +} + +impl CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::None => "none", + CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CheckoutRevolutPayPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { +pub enum CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { None, OffSession, } -impl CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { +impl CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::None => "none", - CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", + CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage::None => "none", + CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", } } } -impl AsRef for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { +impl AsRef for CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { +impl std::fmt::Display for CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { +impl std::default::Default for CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { fn default() -> Self { Self::None } @@ -4763,12 +5259,8 @@ pub enum CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositi impl CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Auto => { - "auto" - } - CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { - "hidden" - } + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => "hidden", } } } @@ -4779,16 +5271,12 @@ impl AsRef for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgre } } -impl std::fmt::Display - for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::fmt::Display for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::default::Default for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { fn default() -> Self { Self::Auto } @@ -5084,24 +5572,18 @@ impl CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDis } } -impl AsRef - for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl AsRef for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::fmt::Display for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::default::Default for CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn default() -> Self { Self::ExcludeTax } @@ -5194,9 +5676,7 @@ impl CreateCheckoutSessionPaymentIntentDataCaptureMethod { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentIntentDataCaptureMethod::Automatic => "automatic", - CreateCheckoutSessionPaymentIntentDataCaptureMethod::AutomaticAsync => { - "automatic_async" - } + CreateCheckoutSessionPaymentIntentDataCaptureMethod::AutomaticAsync => "automatic_async", CreateCheckoutSessionPaymentIntentDataCaptureMethod::Manual => "manual", } } @@ -5253,6 +5733,42 @@ impl std::default::Default for CreateCheckoutSessionPaymentIntentDataSetupFuture } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodData`'s `allow_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl CreateCheckoutSessionPaymentMethodDataAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodDataAllowRedisplay::Always => "always", + CreateCheckoutSessionPaymentMethodDataAllowRedisplay::Limited => "limited", + CreateCheckoutSessionPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodDataAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodDataAllowRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodDataAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptions`'s `default_for` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5276,16 +5792,12 @@ impl AsRef for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOpt } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor { fn default() -> Self { Self::Invoice } @@ -5310,24 +5822,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSche } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn default() -> Self { Self::Combined } @@ -5350,24 +5856,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransaction } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -5386,12 +5886,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -5425,15 +5921,9 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod { impl CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => { - "automatic" - } - CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Instant => { - "instant" - } - CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", + CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", + CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -5449,9 +5939,7 @@ impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAcssDebitVer self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAcssDebitVerificationMethod { fn default() -> Self { Self::Automatic } @@ -5499,9 +5987,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsa impl CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none", } } } @@ -5512,16 +5998,12 @@ impl AsRef for CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySet } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { fn default() -> Self { Self::None } @@ -5559,6 +6041,40 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAlipaySe } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsAmazonPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage { + None, + OffSession, +} + +impl CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage::None => "none", + CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsAuBecsDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5585,9 +6101,7 @@ impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsAuBecsDebitS self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsAuBecsDebitSetupFutureUsage -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsAuBecsDebitSetupFutureUsage { fn default() -> Self { Self::None } @@ -5606,12 +6120,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -5678,12 +6188,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => "on_session", } } } @@ -5705,6 +6211,42 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsBoletoSe } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsCard`'s `request_three_d_secure` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + Any, + Automatic, + Challenge, +} + +impl CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn default() -> Self { + Self::Any + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsCard`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5716,12 +6258,8 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage { impl CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", } } } @@ -5756,12 +6294,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session", } } } @@ -5810,24 +6344,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequest } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -5862,16 +6390,12 @@ impl AsRef for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBank } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType { fn default() -> Self { Self::EuBankTransfer } @@ -5887,9 +6411,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -5921,9 +6443,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsag impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none", } } } @@ -5934,16 +6454,12 @@ impl AsRef for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetu } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { fn default() -> Self { Self::None } @@ -6185,9 +6701,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -6209,6 +6723,70 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsLinkSetu } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsMultibanco`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage { + None, +} + +impl CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -6442,9 +7020,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -6478,9 +7054,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -6515,12 +7089,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -6595,24 +7165,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsP } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -6623,6 +7187,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -6630,29 +7195,24 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsP pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -6671,12 +7231,8 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => { - "off_session" - } - CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => { - "on_session" - } + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => "off_session", + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => "on_session", } } } @@ -6692,9 +7248,7 @@ impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccoun self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountSetupFutureUsage { fn default() -> Self { Self::None } @@ -6711,12 +7265,8 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMetho impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => { - "automatic" - } - CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => { - "instant" - } + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", } } } @@ -6727,16 +7277,12 @@ impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerifi } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -6818,6 +7364,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -6834,6 +7381,8 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -6844,6 +7393,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -6856,6 +7406,7 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::Affirm => "affirm", CreateCheckoutSessionPaymentMethodTypes::AfterpayClearpay => "afterpay_clearpay", CreateCheckoutSessionPaymentMethodTypes::Alipay => "alipay", + CreateCheckoutSessionPaymentMethodTypes::AmazonPay => "amazon_pay", CreateCheckoutSessionPaymentMethodTypes::AuBecsDebit => "au_becs_debit", CreateCheckoutSessionPaymentMethodTypes::BacsDebit => "bacs_debit", CreateCheckoutSessionPaymentMethodTypes::Bancontact => "bancontact", @@ -6872,6 +7423,8 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::Klarna => "klarna", CreateCheckoutSessionPaymentMethodTypes::Konbini => "konbini", CreateCheckoutSessionPaymentMethodTypes::Link => "link", + CreateCheckoutSessionPaymentMethodTypes::Mobilepay => "mobilepay", + CreateCheckoutSessionPaymentMethodTypes::Multibanco => "multibanco", CreateCheckoutSessionPaymentMethodTypes::Oxxo => "oxxo", CreateCheckoutSessionPaymentMethodTypes::P24 => "p24", CreateCheckoutSessionPaymentMethodTypes::Paynow => "paynow", @@ -6882,6 +7435,7 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::SepaDebit => "sepa_debit", CreateCheckoutSessionPaymentMethodTypes::Sofort => "sofort", CreateCheckoutSessionPaymentMethodTypes::Swish => "swish", + CreateCheckoutSessionPaymentMethodTypes::Twint => "twint", CreateCheckoutSessionPaymentMethodTypes::UsBankAccount => "us_bank_account", CreateCheckoutSessionPaymentMethodTypes::WechatPay => "wechat_pay", CreateCheckoutSessionPaymentMethodTypes::Zip => "zip", @@ -6906,6 +7460,76 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodTypes { } } +/// An enum representing the possible values of an `CreateCheckoutSessionSavedPaymentMethodOptions`'s `allow_redisplay_filters` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + Always, + Limited, + Unspecified, +} + +impl CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Always => "always", + CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Limited => "limited", + CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Unspecified => "unspecified", + } + } +} + +impl AsRef for CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn default() -> Self { + Self::Always + } +} + +/// An enum representing the possible values of an `CreateCheckoutSessionSavedPaymentMethodOptions`'s `payment_method_save` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + Disabled, + Enabled, +} + +impl CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave::Disabled => "disabled", + CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave::Enabled => "enabled", + } + } +} + +impl AsRef for CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn default() -> Self { + Self::Disabled + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionShippingAddressCollection`'s `allowed_countries` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -7670,24 +8294,18 @@ impl CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum } } -impl AsRef - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit -{ +impl AsRef for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit -{ +impl std::fmt::Display for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit -{ +impl std::default::Default for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit { fn default() -> Self { Self::BusinessDay } @@ -7716,24 +8334,18 @@ impl CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum } } -impl AsRef - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit -{ +impl AsRef for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit -{ +impl std::fmt::Display for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit -{ +impl std::default::Default for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit { fn default() -> Self { Self::BusinessDay } @@ -7758,24 +8370,18 @@ impl CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOpti } } -impl AsRef - for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior -{ +impl AsRef for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior -{ +impl std::fmt::Display for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior -{ +impl std::default::Default for CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptionsTaxBehavior { fn default() -> Self { Self::Exclusive } @@ -7793,15 +8399,9 @@ pub enum CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior { impl CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Exclusive => { - "exclusive" - } - CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Inclusive => { - "inclusive" - } - CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Unspecified => { - "unspecified" - } + CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Exclusive => "exclusive", + CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Inclusive => "inclusive", + CreateCheckoutSessionShippingOptionsShippingRateDataTaxBehavior::Unspecified => "unspecified", } } } @@ -7901,9 +8501,7 @@ pub enum CreateCheckoutSessionSubscriptionDataProrationBehavior { impl CreateCheckoutSessionSubscriptionDataProrationBehavior { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionSubscriptionDataProrationBehavior::CreateProrations => { - "create_prorations" - } + CreateCheckoutSessionSubscriptionDataProrationBehavior::CreateProrations => "create_prorations", CreateCheckoutSessionSubscriptionDataProrationBehavior::None => "none", } } @@ -7945,24 +8543,18 @@ impl CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPayment } } -impl AsRef - for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl AsRef for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::fmt::Display for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::default::Default for CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn default() -> Self { Self::Cancel } @@ -8042,9 +8634,7 @@ impl PaymentPagesCheckoutSessionAutomaticTaxStatus { match self { PaymentPagesCheckoutSessionAutomaticTaxStatus::Complete => "complete", PaymentPagesCheckoutSessionAutomaticTaxStatus::Failed => "failed", - PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => { - "requires_location_inputs" - } + PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => "requires_location_inputs", } } } @@ -8338,6 +8928,110 @@ impl std::default::Default for PaymentPagesCheckoutSessionPaymentMethodReuseAgre } } +/// An enum representing the possible values of an `PaymentPagesCheckoutSessionSavedPaymentMethodOptions`'s `allow_redisplay_filters` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + Always, + Limited, + Unspecified, +} + +impl PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + pub fn as_str(self) -> &'static str { + match self { + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Always => "always", + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Limited => "limited", + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters::Unspecified => "unspecified", + } + } +} + +impl AsRef for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilters { + fn default() -> Self { + Self::Always + } +} + +/// An enum representing the possible values of an `PaymentPagesCheckoutSessionSavedPaymentMethodOptions`'s `payment_method_remove` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove { + Disabled, + Enabled, +} + +impl PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove { + pub fn as_str(self) -> &'static str { + match self { + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove::Disabled => "disabled", + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove::Enabled => "enabled", + } + } +} + +impl AsRef for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `PaymentPagesCheckoutSessionSavedPaymentMethodOptions`'s `payment_method_save` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + Disabled, + Enabled, +} + +impl PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + pub fn as_str(self) -> &'static str { + match self { + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave::Disabled => "disabled", + PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave::Enabled => "enabled", + } + } +} + +impl AsRef for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentPagesCheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave { + fn default() -> Self { + Self::Disabled + } +} + /// An enum representing the possible values of an `PaymentPagesCheckoutSessionShippingAddressCollection`'s `allowed_countries` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -9073,9 +9767,7 @@ impl std::fmt::Display for PaymentPagesCheckoutSessionShippingAddressCollectionA self.as_str().fmt(f) } } -impl std::default::Default - for PaymentPagesCheckoutSessionShippingAddressCollectionAllowedCountries -{ +impl std::default::Default for PaymentPagesCheckoutSessionShippingAddressCollectionAllowedCountries { fn default() -> Self { Self::Ac } @@ -9091,6 +9783,7 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -9100,11 +9793,13 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -9124,13 +9819,17 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -9163,6 +9862,7 @@ impl PaymentPagesCheckoutSessionTaxIdType { PaymentPagesCheckoutSessionTaxIdType::AuAbn => "au_abn", PaymentPagesCheckoutSessionTaxIdType::AuArn => "au_arn", PaymentPagesCheckoutSessionTaxIdType::BgUic => "bg_uic", + PaymentPagesCheckoutSessionTaxIdType::BhVat => "bh_vat", PaymentPagesCheckoutSessionTaxIdType::BoTin => "bo_tin", PaymentPagesCheckoutSessionTaxIdType::BrCnpj => "br_cnpj", PaymentPagesCheckoutSessionTaxIdType::BrCpf => "br_cpf", @@ -9172,11 +9872,13 @@ impl PaymentPagesCheckoutSessionTaxIdType { PaymentPagesCheckoutSessionTaxIdType::CaPstMb => "ca_pst_mb", PaymentPagesCheckoutSessionTaxIdType::CaPstSk => "ca_pst_sk", PaymentPagesCheckoutSessionTaxIdType::CaQst => "ca_qst", + PaymentPagesCheckoutSessionTaxIdType::ChUid => "ch_uid", PaymentPagesCheckoutSessionTaxIdType::ChVat => "ch_vat", PaymentPagesCheckoutSessionTaxIdType::ClTin => "cl_tin", PaymentPagesCheckoutSessionTaxIdType::CnTin => "cn_tin", PaymentPagesCheckoutSessionTaxIdType::CoNit => "co_nit", PaymentPagesCheckoutSessionTaxIdType::CrTin => "cr_tin", + PaymentPagesCheckoutSessionTaxIdType::DeStn => "de_stn", PaymentPagesCheckoutSessionTaxIdType::DoRcn => "do_rcn", PaymentPagesCheckoutSessionTaxIdType::EcRuc => "ec_ruc", PaymentPagesCheckoutSessionTaxIdType::EgTin => "eg_tin", @@ -9196,13 +9898,17 @@ impl PaymentPagesCheckoutSessionTaxIdType { PaymentPagesCheckoutSessionTaxIdType::JpTrn => "jp_trn", PaymentPagesCheckoutSessionTaxIdType::KePin => "ke_pin", PaymentPagesCheckoutSessionTaxIdType::KrBrn => "kr_brn", + PaymentPagesCheckoutSessionTaxIdType::KzBin => "kz_bin", PaymentPagesCheckoutSessionTaxIdType::LiUid => "li_uid", PaymentPagesCheckoutSessionTaxIdType::MxRfc => "mx_rfc", PaymentPagesCheckoutSessionTaxIdType::MyFrp => "my_frp", PaymentPagesCheckoutSessionTaxIdType::MyItn => "my_itn", PaymentPagesCheckoutSessionTaxIdType::MySst => "my_sst", + PaymentPagesCheckoutSessionTaxIdType::NgTin => "ng_tin", PaymentPagesCheckoutSessionTaxIdType::NoVat => "no_vat", + PaymentPagesCheckoutSessionTaxIdType::NoVoec => "no_voec", PaymentPagesCheckoutSessionTaxIdType::NzGst => "nz_gst", + PaymentPagesCheckoutSessionTaxIdType::OmVat => "om_vat", PaymentPagesCheckoutSessionTaxIdType::PeRuc => "pe_ruc", PaymentPagesCheckoutSessionTaxIdType::PhTin => "ph_tin", PaymentPagesCheckoutSessionTaxIdType::RoTin => "ro_tin", diff --git a/src/resources/generated/climate_order.rs b/src/resources/generated/climate_order.rs index 39ab394e4..ab9975dac 100644 --- a/src/resources/generated/climate_order.rs +++ b/src/resources/generated/climate_order.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ClimateRemovalsOrders". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ClimateOrder { /// Unique identifier for the object. diff --git a/src/resources/generated/climate_product.rs b/src/resources/generated/climate_product.rs index dbad036af..b83050574 100644 --- a/src/resources/generated/climate_product.rs +++ b/src/resources/generated/climate_product.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ClimateRemovalsProducts". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ClimateProduct { /// Unique identifier for the object. diff --git a/src/resources/generated/climate_supplier.rs b/src/resources/generated/climate_supplier.rs index 77f347a43..21ad12aae 100644 --- a/src/resources/generated/climate_supplier.rs +++ b/src/resources/generated/climate_supplier.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ClimateRemovalsSuppliers". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ClimateSupplier { /// Unique identifier for the object. diff --git a/src/resources/generated/confirmation_token.rs b/src/resources/generated/confirmation_token.rs new file mode 100644 index 000000000..dfdbda2e3 --- /dev/null +++ b/src/resources/generated/confirmation_token.rs @@ -0,0 +1,452 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::client::{Client, Response}; +use crate::ids::{ConfirmationTokenId}; +use crate::params::{Expand, Expandable, Object, Timestamp}; +use crate::resources::{Address, BillingDetails, CardDetails, CardPresent, Customer, PaymentFlowsPrivatePaymentMethodsAlipay, PaymentMethodAcssDebit, PaymentMethodAffirm, PaymentMethodAfterpayClearpay, PaymentMethodAmazonPay, PaymentMethodAuBecsDebit, PaymentMethodBacsDebit, PaymentMethodBancontact, PaymentMethodBlik, PaymentMethodBoleto, PaymentMethodCashapp, PaymentMethodCustomerBalance, PaymentMethodEps, PaymentMethodFpx, PaymentMethodGiropay, PaymentMethodGrabpay, PaymentMethodIdeal, PaymentMethodInteracPresent, PaymentMethodKlarna, PaymentMethodKonbini, PaymentMethodLink, PaymentMethodMobilepay, PaymentMethodMultibanco, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, PaymentMethodTwint, PaymentMethodUsBankAccount, PaymentMethodWechatPay, PaymentMethodZip}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ConfirmationTokensResourceConfirmationToken". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationToken { + /// Unique identifier for the object. + pub id: ConfirmationTokenId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + pub expires_at: Option, + + /// 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, + + /// Data used for generating a Mandate. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_data: Option, + + /// ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + pub payment_intent: Option, + + /// Payment-method-specific configuration for this ConfirmationToken. + pub payment_method_options: Option, + + /// Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + pub payment_method_preview: Option, + + /// Return URL used to confirm the Intent. + pub return_url: Option, + + /// Indicates that you intend to make future payments with this ConfirmationToken's payment method. + /// + /// The presence of this property 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. + pub setup_future_usage: Option, + + /// ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + pub setup_intent: Option, + + /// Shipping information collected on this ConfirmationToken. + pub shipping: Option, + + /// Indicates whether the Stripe SDK is used to handle confirmation flow. + /// + /// Defaults to `true` on ConfirmationToken. + pub use_stripe_sdk: bool, +} + +impl ConfirmationToken { + + /// Retrieves an existing ConfirmationToken object. + pub fn retrieve(client: &Client, id: &ConfirmationTokenId, expand: &[&str]) -> Response { + client.get_query(&format!("/confirmation_tokens/{}", id), Expand { expand }) + } +} + +impl Object for ConfirmationToken { + type Id = ConfirmationTokenId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "confirmation_token" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateData { + + pub customer_acceptance: ConfirmationTokensResourceMandateDataResourceCustomerAcceptance, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptance { + + /// If this is a Mandate accepted online, this hash contains details about the online acceptance. + pub online: Option, + + /// The type of customer acceptance information included with the Mandate. + #[serde(rename = "type")] + pub type_: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline { + + /// The IP address from which the Mandate was accepted by the customer. + pub ip_address: Option, + + /// The user agent of the browser from which the Mandate was accepted by the customer. + pub user_agent: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourcePaymentMethodOptions { + + /// This hash contains the card payment method options. + pub card: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourcePaymentMethodOptionsResourceCard { + + /// The `cvc_update` Token collected from the Payment Element. + pub cvc_token: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourcePaymentMethodPreview { + + #[serde(skip_serializing_if = "Option::is_none")] + pub acss_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub affirm: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub afterpay_clearpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub alipay: Option, + + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to “unspecified”. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub au_becs_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bancontact: Option, + + pub billing_details: BillingDetails, + + #[serde(skip_serializing_if = "Option::is_none")] + pub blik: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub boleto: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub card: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub card_present: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cashapp: Option, + + /// The ID of the Customer to which this PaymentMethod is saved. + /// + /// This will not be set when the PaymentMethod has not been saved to a Customer. + pub customer: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] + pub customer_balance: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub eps: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub fpx: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub giropay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub grabpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ideal: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub interac_present: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub klarna: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub konbini: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub oxxo: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub p24: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub paynow: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub paypal: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub pix: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub promptpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sofort: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + + /// 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_: ConfirmationTokensResourcePaymentMethodPreviewType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_account: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub wechat_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub zip: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceShipping { + + pub address: Address, + + /// Recipient name. + pub name: String, + + /// Recipient phone (including extension). + pub phone: Option, +} + +/// An enum representing the possible values of an `ConfirmationToken`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ConfirmationTokenSetupFutureUsage { + OffSession, + OnSession, +} + +impl ConfirmationTokenSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + ConfirmationTokenSetupFutureUsage::OffSession => "off_session", + ConfirmationTokenSetupFutureUsage::OnSession => "on_session", + } + } +} + +impl AsRef for ConfirmationTokenSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ConfirmationTokenSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ConfirmationTokenSetupFutureUsage { + fn default() -> Self { + Self::OffSession + } +} + +/// An enum representing the possible values of an `ConfirmationTokensResourcePaymentMethodPreview`'s `allow_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay::Always => "always", + ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay::Limited => "limited", + ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ConfirmationTokensResourcePaymentMethodPreviewAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + +/// An enum representing the possible values of an `ConfirmationTokensResourcePaymentMethodPreview`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ConfirmationTokensResourcePaymentMethodPreviewType { + AcssDebit, + Affirm, + AfterpayClearpay, + Alipay, + AmazonPay, + AuBecsDebit, + BacsDebit, + Bancontact, + Blik, + Boleto, + Card, + CardPresent, + Cashapp, + CustomerBalance, + Eps, + Fpx, + Giropay, + Grabpay, + Ideal, + InteracPresent, + Klarna, + Konbini, + Link, + Mobilepay, + Multibanco, + Oxxo, + P24, + Paynow, + Paypal, + Pix, + Promptpay, + RevolutPay, + SepaDebit, + Sofort, + Swish, + Twint, + UsBankAccount, + WechatPay, + Zip, +} + +impl ConfirmationTokensResourcePaymentMethodPreviewType { + pub fn as_str(self) -> &'static str { + match self { + ConfirmationTokensResourcePaymentMethodPreviewType::AcssDebit => "acss_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Affirm => "affirm", + ConfirmationTokensResourcePaymentMethodPreviewType::AfterpayClearpay => "afterpay_clearpay", + ConfirmationTokensResourcePaymentMethodPreviewType::Alipay => "alipay", + ConfirmationTokensResourcePaymentMethodPreviewType::AmazonPay => "amazon_pay", + ConfirmationTokensResourcePaymentMethodPreviewType::AuBecsDebit => "au_becs_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::BacsDebit => "bacs_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Bancontact => "bancontact", + ConfirmationTokensResourcePaymentMethodPreviewType::Blik => "blik", + ConfirmationTokensResourcePaymentMethodPreviewType::Boleto => "boleto", + ConfirmationTokensResourcePaymentMethodPreviewType::Card => "card", + ConfirmationTokensResourcePaymentMethodPreviewType::CardPresent => "card_present", + ConfirmationTokensResourcePaymentMethodPreviewType::Cashapp => "cashapp", + ConfirmationTokensResourcePaymentMethodPreviewType::CustomerBalance => "customer_balance", + ConfirmationTokensResourcePaymentMethodPreviewType::Eps => "eps", + ConfirmationTokensResourcePaymentMethodPreviewType::Fpx => "fpx", + ConfirmationTokensResourcePaymentMethodPreviewType::Giropay => "giropay", + ConfirmationTokensResourcePaymentMethodPreviewType::Grabpay => "grabpay", + ConfirmationTokensResourcePaymentMethodPreviewType::Ideal => "ideal", + ConfirmationTokensResourcePaymentMethodPreviewType::InteracPresent => "interac_present", + ConfirmationTokensResourcePaymentMethodPreviewType::Klarna => "klarna", + ConfirmationTokensResourcePaymentMethodPreviewType::Konbini => "konbini", + ConfirmationTokensResourcePaymentMethodPreviewType::Link => "link", + ConfirmationTokensResourcePaymentMethodPreviewType::Mobilepay => "mobilepay", + ConfirmationTokensResourcePaymentMethodPreviewType::Multibanco => "multibanco", + ConfirmationTokensResourcePaymentMethodPreviewType::Oxxo => "oxxo", + ConfirmationTokensResourcePaymentMethodPreviewType::P24 => "p24", + ConfirmationTokensResourcePaymentMethodPreviewType::Paynow => "paynow", + ConfirmationTokensResourcePaymentMethodPreviewType::Paypal => "paypal", + ConfirmationTokensResourcePaymentMethodPreviewType::Pix => "pix", + ConfirmationTokensResourcePaymentMethodPreviewType::Promptpay => "promptpay", + ConfirmationTokensResourcePaymentMethodPreviewType::RevolutPay => "revolut_pay", + ConfirmationTokensResourcePaymentMethodPreviewType::SepaDebit => "sepa_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Sofort => "sofort", + ConfirmationTokensResourcePaymentMethodPreviewType::Swish => "swish", + ConfirmationTokensResourcePaymentMethodPreviewType::Twint => "twint", + ConfirmationTokensResourcePaymentMethodPreviewType::UsBankAccount => "us_bank_account", + ConfirmationTokensResourcePaymentMethodPreviewType::WechatPay => "wechat_pay", + ConfirmationTokensResourcePaymentMethodPreviewType::Zip => "zip", + } + } +} + +impl AsRef for ConfirmationTokensResourcePaymentMethodPreviewType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ConfirmationTokensResourcePaymentMethodPreviewType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ConfirmationTokensResourcePaymentMethodPreviewType { + fn default() -> Self { + Self::AcssDebit + } +} diff --git a/src/resources/generated/connect_account_reference.rs b/src/resources/generated/connect_account_reference.rs index c54d9d7b8..d2577cd16 100644 --- a/src/resources/generated/connect_account_reference.rs +++ b/src/resources/generated/connect_account_reference.rs @@ -2,14 +2,14 @@ // This file was automatically generated. // ====================================== +use crate::params::{Expandable}; +use crate::resources::{Account}; use serde::{Deserialize, Serialize}; -use crate::params::Expandable; -use crate::resources::Account; - /// The resource representing a Stripe "ConnectAccountReference". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectAccountReference { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option>, diff --git a/src/resources/generated/connect_collection_transfer.rs b/src/resources/generated/connect_collection_transfer.rs index ab8344dac..3a1a21bf3 100644 --- a/src/resources/generated/connect_collection_transfer.rs +++ b/src/resources/generated/connect_collection_transfer.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ConnectCollectionTransferId; +use crate::ids::{ConnectCollectionTransferId}; use crate::params::{Expandable, Object}; use crate::resources::{Account, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ConnectCollectionTransfer". #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/country_spec.rs b/src/resources/generated/country_spec.rs index cad17ec40..d7e00e5a2 100644 --- a/src/resources/generated/country_spec.rs +++ b/src/resources/generated/country_spec.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CountrySpec". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CountrySpec { /// Unique identifier for the object. diff --git a/src/resources/generated/coupon.rs b/src/resources/generated/coupon.rs index 1c1a6c8d6..cbbc634dc 100644 --- a/src/resources/generated/coupon.rs +++ b/src/resources/generated/coupon.rs @@ -2,18 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::CouponId; -use crate::params::{ - CurrencyMap, Deleted, Expand, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::Currency; +use crate::ids::{CouponId}; +use crate::params::{CurrencyMap, Deleted, Expand, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Coupon". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Coupon { /// Unique identifier for the object. @@ -96,10 +93,12 @@ pub struct Coupon { } impl Coupon { + /// Returns a list of your coupons. - pub fn list(client: &Client, params: &ListCoupons<'_>) -> Response> { - client.get_query("/coupons", params) - } +pub fn list(client: &Client, params: &ListCoupons<'_>) -> Response> { + client.get_query("/coupons", params) +} + /// You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. /// @@ -145,12 +144,14 @@ impl Object for Coupon { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CouponAppliesTo { + /// A list of product IDs this coupon applies to. pub products: Vec, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CouponCurrencyOption { + /// Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. pub amount_off: i64, } @@ -158,6 +159,7 @@ pub struct CouponCurrencyOption { /// The parameters for `Coupon::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCoupon<'a> { + /// A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). #[serde(skip_serializing_if = "Option::is_none")] pub amount_off: Option, @@ -250,6 +252,7 @@ impl<'a> CreateCoupon<'a> { /// The parameters for `Coupon::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCoupons<'a> { + /// A filter on the list, based on the object `created` field. /// /// The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. @@ -295,12 +298,12 @@ impl<'a> ListCoupons<'a> { impl Paginable for ListCoupons<'_> { type O = Coupon; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Coupon::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateCoupon<'a> { + /// Coupons defined in each available currency option (only supported if the coupon is amount-based). /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -339,6 +342,7 @@ impl<'a> UpdateCoupon<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCouponAppliesTo { + /// An array of Product IDs that this Coupon will apply to. #[serde(skip_serializing_if = "Option::is_none")] pub products: Option>, @@ -346,12 +350,14 @@ pub struct CreateCouponAppliesTo { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCouponCurrencyOptions { + /// A positive integer representing the amount to subtract from an invoice total. pub amount_off: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCouponCurrencyOptions { + /// A positive integer representing the amount to subtract from an invoice total. pub amount_off: i64, } diff --git a/src/resources/generated/credit_note.rs b/src/resources/generated/credit_note.rs index d59172bbe..c8abd1c2b 100644 --- a/src/resources/generated/credit_note.rs +++ b/src/resources/generated/credit_note.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CreditNoteId, CustomerId, InvoiceId, RefundId}; -use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - CreditNoteLineItem, Currency, Customer, CustomerBalanceTransaction, Discount, Invoice, - InvoicesShippingCost, Refund, TaxRate, -}; +use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{CreditNoteLineItem, Currency, Customer, CustomerBalanceTransaction, Discount, Invoice, InvoicesResourceShippingCost, Refund, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CreditNote". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNote { /// Unique identifier for the object. @@ -87,7 +83,7 @@ pub struct CreditNote { pub refund: Option>, /// The details of the cost of shipping, including the ShippingRate applied to the invoice. - pub shipping_cost: Option, + pub shipping_cost: Option, /// Status of this credit note, one of `issued` or `void`. /// @@ -121,10 +117,12 @@ pub struct CreditNote { } impl CreditNote { + /// Returns a list of credit notes. - pub fn list(client: &Client, params: &ListCreditNotes<'_>) -> Response> { - client.get_query("/credit_notes", params) - } +pub fn list(client: &Client, params: &ListCreditNotes<'_>) -> Response> { + client.get_query("/credit_notes", params) +} + /// Issue a credit note to adjust the amount of a finalized invoice. /// @@ -143,11 +141,7 @@ impl CreditNote { } /// Updates an existing credit note. - pub fn update( - client: &Client, - id: &CreditNoteId, - params: UpdateCreditNote<'_>, - ) -> Response { + pub fn update(client: &Client, id: &CreditNoteId, params: UpdateCreditNote<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/credit_notes/{}", id), ¶ms) } @@ -165,6 +159,7 @@ impl Object for CreditNote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteTaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -185,6 +180,7 @@ pub struct CreditNoteTaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, @@ -195,6 +191,7 @@ pub struct DiscountsResourceDiscountAmount { /// The parameters for `CreditNote::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateCreditNote<'a> { + /// The integer amount in cents (or local equivalent) representing the total amount of the credit note. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -210,6 +207,10 @@ pub struct CreateCreditNote<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub effective_at: Option, + /// Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + #[serde(skip_serializing_if = "Option::is_none")] + pub email_type: Option, + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -262,6 +263,7 @@ impl<'a> CreateCreditNote<'a> { amount: Default::default(), credit_amount: Default::default(), effective_at: Default::default(), + email_type: Default::default(), expand: Default::default(), invoice, lines: Default::default(), @@ -279,6 +281,11 @@ impl<'a> CreateCreditNote<'a> { /// The parameters for `CreditNote::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCreditNotes<'a> { + + /// Only return credit notes that were created during the given date interval. + #[serde(skip_serializing_if = "Option::is_none")] + pub created: Option>, + /// Only return credit notes for the customer specified by this customer ID. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -315,6 +322,7 @@ pub struct ListCreditNotes<'a> { impl<'a> ListCreditNotes<'a> { pub fn new() -> Self { ListCreditNotes { + created: Default::default(), customer: Default::default(), ending_before: Default::default(), expand: Default::default(), @@ -327,12 +335,12 @@ impl<'a> ListCreditNotes<'a> { impl Paginable for ListCreditNotes<'_> { type O = CreditNote; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `CreditNote::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateCreditNote<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -362,6 +370,7 @@ impl<'a> UpdateCreditNote<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCreditNoteLines { + /// The line item amount to credit. /// /// Only valid when `type` is `invoice_line_item`. @@ -416,6 +425,7 @@ pub struct CreateCreditNoteLines { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCreditNoteShippingCost { + /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_rate: Option, @@ -423,6 +433,7 @@ pub struct CreateCreditNoteShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCreditNoteLinesTaxAmounts { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -469,6 +480,40 @@ impl std::default::Default for CreateCreditNoteLinesType { } } +/// An enum representing the possible values of an `CreateCreditNote`'s `email_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreditNoteEmailType { + CreditNote, + None, +} + +impl CreditNoteEmailType { + pub fn as_str(self) -> &'static str { + match self { + CreditNoteEmailType::CreditNote => "credit_note", + CreditNoteEmailType::None => "none", + } + } +} + +impl AsRef for CreditNoteEmailType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreditNoteEmailType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreditNoteEmailType { + fn default() -> Self { + Self::CreditNote + } +} + /// An enum representing the possible values of an `CreditNote`'s `reason` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/credit_note_line_item.rs b/src/resources/generated/credit_note_line_item.rs index 4461be9d3..91481c69d 100644 --- a/src/resources/generated/credit_note_line_item.rs +++ b/src/resources/generated/credit_note_line_item.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CreditNoteLineItemId; +use crate::ids::{CreditNoteLineItemId}; use crate::params::{Expandable, Object}; use crate::resources::{Discount, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CreditNoteLineItem". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteLineItem { /// Unique identifier for the object. @@ -75,6 +74,7 @@ impl Object for CreditNoteLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteTaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -95,6 +95,7 @@ pub struct CreditNoteTaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, diff --git a/src/resources/generated/custom_unit_amount.rs b/src/resources/generated/custom_unit_amount.rs index d5a85c842..9fde8aacf 100644 --- a/src/resources/generated/custom_unit_amount.rs +++ b/src/resources/generated/custom_unit_amount.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomUnitAmount". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomUnitAmount { + /// The maximum unit amount the customer can specify for this item. pub maximum: Option, diff --git a/src/resources/generated/customer.rs b/src/resources/generated/customer.rs index eae9fe5b6..7ca1af8ec 100644 --- a/src/resources/generated/customer.rs +++ b/src/resources/generated/customer.rs @@ -2,21 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CouponId, CustomerId, PaymentMethodId, PaymentSourceId, PromotionCodeId}; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Address, CashBalance, Currency, Discount, InvoiceSettingRenderingOptions, PaymentMethod, - PaymentSource, PaymentSourceParams, Shipping, Subscription, TaxId, TestHelpersTestClock, -}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, CashBalance, Currency, Discount, PaymentMethod, PaymentSource, PaymentSourceParams, Shipping, Subscription, TaxId, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Customer". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Customer { /// Unique identifier for the object. @@ -117,6 +111,8 @@ pub struct Customer { pub name: Option, /// The suffix of the customer's next invoice number (for example, 0001). + /// + /// When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. #[serde(skip_serializing_if = "Option::is_none")] pub next_invoice_sequence: Option, @@ -161,12 +157,14 @@ pub struct Customer { } impl Customer { + /// Returns a list of your customers. /// /// The customers are returned sorted by creation date, with the most recent customers appearing first. - pub fn list(client: &Client, params: &ListCustomers<'_>) -> Response> { - client.get_query("/customers", params) - } +pub fn list(client: &Client, params: &ListCustomers<'_>) -> Response> { + client.get_query("/customers", params) +} + /// Creates a new customer object. pub fn create(client: &Client, params: CreateCustomer<'_>) -> Response { @@ -186,11 +184,7 @@ impl Customer { /// When you update a customer to a new valid card source by passing the **source** parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the `past_due` state, then the latest open invoice for the subscription with automatic collection enabled will be retried. /// This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. /// Changing the **default_source** for a customer will not trigger this behavior. This request accepts mostly the same arguments as the customer creation call. - pub fn update( - client: &Client, - id: &CustomerId, - params: UpdateCustomer<'_>, - ) -> Response { + pub fn update(client: &Client, id: &CustomerId, params: UpdateCustomer<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/customers/{}", id), ¶ms) } @@ -216,6 +210,7 @@ impl Object for Customer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerTax { + /// Surfaces if automatic tax computation is possible given the current customer location information. pub automatic_tax: CustomerTaxAutomaticTax, @@ -228,6 +223,7 @@ pub struct CustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerTaxLocation { + /// The customer's country as identified by Stripe Tax. pub country: String, @@ -240,6 +236,7 @@ pub struct CustomerTaxLocation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomerSetting { + /// Default custom fields to be displayed on invoices for this customer. pub custom_fields: Option>, @@ -250,11 +247,12 @@ pub struct InvoiceSettingCustomerSetting { pub footer: Option, /// Default options for invoice PDF rendering for this customer. - pub rendering_options: Option, + pub rendering_options: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -262,9 +260,17 @@ pub struct InvoiceSettingCustomField { pub value: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceSettingCustomerRenderingOptions { + + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + pub amount_tax_display: Option, +} + /// The parameters for `Customer::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCustomer<'a> { + /// The customer's address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -338,7 +344,7 @@ pub struct CreateCustomer<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub preferred_locales: Option>, - /// The API ID of a promotion code to apply to the customer. + /// The ID of a promotion code to apply to the customer. /// /// The customer will have a discount applied on all recurring payments. /// Charges you create through the API will not have the discount. @@ -409,6 +415,8 @@ impl<'a> CreateCustomer<'a> { /// The parameters for `Customer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCustomers<'a> { + + /// Only return customers that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -465,12 +473,12 @@ impl<'a> ListCustomers<'a> { impl Paginable for ListCustomers<'_> { type O = Customer; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Customer::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateCustomer<'a> { + /// The customer's address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -549,7 +557,7 @@ pub struct UpdateCustomer<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub preferred_locales: Option>, - /// The API ID of a promotion code to apply to the customer. + /// The ID of a promotion code to apply to the customer. /// /// The customer will have a discount applied on all recurring payments. /// Charges you create through the API will not have the discount. @@ -609,6 +617,7 @@ impl<'a> UpdateCustomer<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerCashBalance { + /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. #[serde(skip_serializing_if = "Option::is_none")] @@ -617,6 +626,7 @@ pub struct CreateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShipping { + /// Customer shipping address. pub address: CreateCustomerShippingAddress, @@ -630,6 +640,7 @@ pub struct CreateCustomerShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerTax { + /// A recent IP address of the customer used for tax reporting and tax location inference. /// /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -646,6 +657,7 @@ pub struct CreateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettings { + /// The list of up to 4 default custom fields to be displayed on invoices for this customer. /// /// When updating, pass an empty string to remove previously-defined fields. @@ -667,7 +679,8 @@ pub struct CustomerInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdData { - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -677,6 +690,7 @@ pub struct TaxIdData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerCashBalance { + /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. #[serde(skip_serializing_if = "Option::is_none")] @@ -685,6 +699,7 @@ pub struct UpdateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShipping { + /// Customer shipping address. pub address: UpdateCustomerShippingAddress, @@ -698,6 +713,7 @@ pub struct UpdateCustomerShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerTax { + /// A recent IP address of the customer used for tax reporting and tax location inference. /// /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -714,6 +730,7 @@ pub struct UpdateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerCashBalanceSettings { + /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -724,6 +741,7 @@ pub struct CreateCustomerCashBalanceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShippingAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -751,19 +769,21 @@ pub struct CreateCustomerShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettingsCustomFields { + /// The name of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 40 characters. pub name: String, /// The value of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 140 characters. pub value: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettingsRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. @@ -775,6 +795,7 @@ pub struct CustomerInvoiceSettingsRenderingOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerCashBalanceSettings { + /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -785,6 +806,7 @@ pub struct UpdateCustomerCashBalanceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShippingAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -824,9 +846,7 @@ impl CreateCustomerCashBalanceSettingsReconciliationMode { match self { CreateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", CreateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -894,9 +914,7 @@ impl CustomerInvoiceSettingsRenderingOptionsAmountTaxDisplay { pub fn as_str(self) -> &'static str { match self { CustomerInvoiceSettingsRenderingOptionsAmountTaxDisplay::ExcludeTax => "exclude_tax", - CustomerInvoiceSettingsRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => { - "include_inclusive_tax" - } + CustomerInvoiceSettingsRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => "include_inclusive_tax", } } } @@ -1076,6 +1094,7 @@ pub enum TaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -1085,11 +1104,13 @@ pub enum TaxIdType { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -1109,13 +1130,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -1147,6 +1172,7 @@ impl TaxIdType { TaxIdType::AuAbn => "au_abn", TaxIdType::AuArn => "au_arn", TaxIdType::BgUic => "bg_uic", + TaxIdType::BhVat => "bh_vat", TaxIdType::BoTin => "bo_tin", TaxIdType::BrCnpj => "br_cnpj", TaxIdType::BrCpf => "br_cpf", @@ -1156,11 +1182,13 @@ impl TaxIdType { TaxIdType::CaPstMb => "ca_pst_mb", TaxIdType::CaPstSk => "ca_pst_sk", TaxIdType::CaQst => "ca_qst", + TaxIdType::ChUid => "ch_uid", TaxIdType::ChVat => "ch_vat", TaxIdType::ClTin => "cl_tin", TaxIdType::CnTin => "cn_tin", TaxIdType::CoNit => "co_nit", TaxIdType::CrTin => "cr_tin", + TaxIdType::DeStn => "de_stn", TaxIdType::DoRcn => "do_rcn", TaxIdType::EcRuc => "ec_ruc", TaxIdType::EgTin => "eg_tin", @@ -1180,13 +1208,17 @@ impl TaxIdType { TaxIdType::JpTrn => "jp_trn", TaxIdType::KePin => "ke_pin", TaxIdType::KrBrn => "kr_brn", + TaxIdType::KzBin => "kz_bin", TaxIdType::LiUid => "li_uid", TaxIdType::MxRfc => "mx_rfc", TaxIdType::MyFrp => "my_frp", TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", + TaxIdType::NgTin => "ng_tin", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", + TaxIdType::OmVat => "om_vat", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", TaxIdType::RoTin => "ro_tin", @@ -1242,9 +1274,7 @@ impl UpdateCustomerCashBalanceSettingsReconciliationMode { match self { UpdateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", UpdateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } diff --git a/src/resources/generated/customer_balance_transaction.rs b/src/resources/generated/customer_balance_transaction.rs index 8b102c8a8..9f8b840bf 100644 --- a/src/resources/generated/customer_balance_transaction.rs +++ b/src/resources/generated/customer_balance_transaction.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CustomerBalanceTransactionId; +use crate::ids::{CustomerBalanceTransactionId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{CreditNote, Currency, Customer, Invoice}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerBalanceTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceTransaction { /// Unique identifier for the object. diff --git a/src/resources/generated/customer_cash_balance_transaction.rs b/src/resources/generated/customer_cash_balance_transaction.rs index 6bcf9a755..33ddab147 100644 --- a/src/resources/generated/customer_cash_balance_transaction.rs +++ b/src/resources/generated/customer_cash_balance_transaction.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerCashBalanceTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerCashBalanceTransaction { /// Unique identifier for the object. diff --git a/src/resources/generated/customer_session.rs b/src/resources/generated/customer_session.rs index 5a8981edf..5e494cb2e 100644 --- a/src/resources/generated/customer_session.rs +++ b/src/resources/generated/customer_session.rs @@ -10,11 +10,11 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerSessionResourceCustomerSession". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerSession { - /// The client secret of this customer session. + /// The client secret of this Customer Session. /// /// Used on the client to set up secure access to the given `customer`. The client secret can be used to provide access to `customer` from your frontend. /// It should not be stored, logged, or exposed to anyone other than the relevant customer. @@ -29,10 +29,10 @@ pub struct CustomerSession { /// Measured in seconds since the Unix epoch. pub created: Timestamp, - /// The customer the customer session was created for. + /// The Customer the Customer Session was created for. pub customer: Expandable, - /// The timestamp at which this customer session will expire. + /// The timestamp at which this Customer Session will expire. pub expires_at: Timestamp, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -41,7 +41,7 @@ pub struct CustomerSession { impl CustomerSession { - /// Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + /// Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. pub fn create(client: &Client, params: CreateCustomerSession<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/customer_sessions", ¶ms) @@ -61,6 +61,8 @@ pub struct CustomerSessionResourceComponents { pub buy_button: CustomerSessionResourceComponentsResourceBuyButton, + pub payment_element: CustomerSessionResourceComponentsResourcePaymentElement, + pub pricing_table: CustomerSessionResourceComponentsResourcePricingTable, } @@ -71,6 +73,54 @@ pub struct CustomerSessionResourceComponentsResourceBuyButton { pub enabled: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSessionResourceComponentsResourcePaymentElement { + + /// Whether the Payment Element is enabled. + pub enabled: bool, + + /// This hash defines whether the Payment Element supports certain features. + pub features: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures { + + /// A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + /// + /// If not specified, defaults to ["always"]. + /// + /// In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + pub payment_method_allow_redisplay_filters: Vec, + + /// Controls whether or not the Payment Element shows saved payment methods. + /// + /// This parameter defaults to `disabled`. + pub payment_method_redisplay: CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay, + + /// Determines the max number of saved payment methods for the Payment Element to display. + /// + /// This parameter defaults to `3`. + pub payment_method_redisplay_limit: Option, + + /// Controls whether the Payment Element displays the option to remove a saved payment method. + /// + /// This parameter defaults to `disabled`. Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. + /// Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + pub payment_method_remove: CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove, + + /// Controls whether the Payment Element displays a checkbox offering to save a new payment method. + /// + /// This parameter defaults to `disabled`. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. + /// For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + pub payment_method_save: CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave, + + /// When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + /// + /// When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + pub payment_method_save_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerSessionResourceComponentsResourcePricingTable { @@ -87,7 +137,7 @@ pub struct CreateCustomerSession<'a> { /// Exactly 1 component must be enabled. pub components: CreateCustomerSessionComponents, - /// The ID of an existing customer for which to create the customer session. + /// The ID of an existing customer for which to create the Customer Session. pub customer: CustomerId, /// Specifies which fields in the response should be expanded. @@ -112,6 +162,10 @@ pub struct CreateCustomerSessionComponents { #[serde(skip_serializing_if = "Option::is_none")] pub buy_button: Option, + /// Configuration for the Payment Element. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_element: Option, + /// Configuration for the pricing table. #[serde(skip_serializing_if = "Option::is_none")] pub pricing_table: Option, @@ -124,9 +178,408 @@ pub struct CreateCustomerSessionComponentsBuyButton { pub enabled: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCustomerSessionComponentsPaymentElement { + + /// Whether the Payment Element is enabled. + pub enabled: bool, + + /// This hash defines whether the Payment Element supports certain features. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerSessionComponentsPricingTable { /// Whether the pricing table is enabled. pub enabled: bool, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCustomerSessionComponentsPaymentElementFeatures { + + /// A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + /// + /// If not specified, defaults to ["always"]. + /// + /// In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_allow_redisplay_filters: Option>, + + /// Controls whether or not the Payment Element shows saved payment methods. + /// + /// This parameter defaults to `disabled`. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_redisplay: Option, + + /// Determines the max number of saved payment methods for the Payment Element to display. + /// + /// This parameter defaults to `3`. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_redisplay_limit: Option, + + /// Controls whether the Payment Element displays the option to remove a saved payment method. + /// + /// This parameter defaults to `disabled`. Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. + /// Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_remove: Option, + + /// Controls whether the Payment Element displays a checkbox offering to save a new payment method. + /// + /// This parameter defaults to `disabled`. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. + /// For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_save: Option, + + /// When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + /// + /// When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_save_usage: Option, +} + +/// An enum representing the possible values of an `CreateCustomerSessionComponentsPaymentElementFeatures`'s `payment_method_allow_redisplay_filters` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters { + Always, + Limited, + Unspecified, +} + +impl CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters::Always => "always", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters::Limited => "limited", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters::Unspecified => "unspecified", + } + } +} + +impl AsRef for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilters { + fn default() -> Self { + Self::Always + } +} + +/// An enum representing the possible values of an `CreateCustomerSessionComponentsPaymentElementFeatures`'s `payment_method_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay { + Disabled, + Enabled, +} + +impl CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay::Disabled => "disabled", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay::Enabled => "enabled", + } + } +} + +impl AsRef for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CreateCustomerSessionComponentsPaymentElementFeatures`'s `payment_method_remove` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove { + Disabled, + Enabled, +} + +impl CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove::Disabled => "disabled", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove::Enabled => "enabled", + } + } +} + +impl AsRef for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CreateCustomerSessionComponentsPaymentElementFeatures`'s `payment_method_save` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave { + Disabled, + Enabled, +} + +impl CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave::Disabled => "disabled", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave::Enabled => "enabled", + } + } +} + +impl AsRef for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CreateCustomerSessionComponentsPaymentElementFeatures`'s `payment_method_save_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage { + OffSession, + OnSession, +} + +impl CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage::OffSession => "off_session", + CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage::OnSession => "on_session", + } + } +} + +impl AsRef for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage { + fn default() -> Self { + Self::OffSession + } +} + +/// An enum representing the possible values of an `CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures`'s `payment_method_allow_redisplay_filters` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters { + Always, + Limited, + Unspecified, +} + +impl CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters { + pub fn as_str(self) -> &'static str { + match self { + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters::Always => "always", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters::Limited => "limited", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters::Unspecified => "unspecified", + } + } +} + +impl AsRef for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodAllowRedisplayFilters { + fn default() -> Self { + Self::Always + } +} + +/// An enum representing the possible values of an `CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures`'s `payment_method_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay { + Disabled, + Enabled, +} + +impl CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay { + pub fn as_str(self) -> &'static str { + match self { + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay::Disabled => "disabled", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay::Enabled => "enabled", + } + } +} + +impl AsRef for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRedisplay { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures`'s `payment_method_remove` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove { + Disabled, + Enabled, +} + +impl CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove { + pub fn as_str(self) -> &'static str { + match self { + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove::Disabled => "disabled", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove::Enabled => "enabled", + } + } +} + +impl AsRef for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodRemove { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures`'s `payment_method_save` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave { + Disabled, + Enabled, +} + +impl CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave { + pub fn as_str(self) -> &'static str { + match self { + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave::Disabled => "disabled", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave::Enabled => "enabled", + } + } +} + +impl AsRef for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSave { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `CustomerSessionResourceComponentsResourcePaymentElementResourceFeatures`'s `payment_method_save_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage { + OffSession, + OnSession, +} + +impl CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage { + pub fn as_str(self) -> &'static str { + match self { + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage::OffSession => "off_session", + CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage::OnSession => "on_session", + } + } +} + +impl AsRef for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CustomerSessionResourceComponentsResourcePaymentElementResourceFeaturesPaymentMethodSaveUsage { + fn default() -> Self { + Self::OffSession + } +} diff --git a/src/resources/generated/discount.rs b/src/resources/generated/discount.rs index 4ab82cd45..21ca23835 100644 --- a/src/resources/generated/discount.rs +++ b/src/resources/generated/discount.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::DiscountId; +use crate::ids::{DiscountId}; use crate::params::{Expandable, Object, Timestamp}; use crate::resources::{Coupon, Customer, PromotionCode}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Discount". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Discount { /// The ID of the discount object. @@ -53,6 +52,9 @@ pub struct Discount { /// The subscription that this coupon is applied to, if it is applied to a particular subscription. pub subscription: Option, + + /// The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + pub subscription_item: Option, } impl Object for Discount { diff --git a/src/resources/generated/dispute.rs b/src/resources/generated/dispute.rs index d150d9f06..3c4dec85b 100644 --- a/src/resources/generated/dispute.rs +++ b/src/resources/generated/dispute.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, DisputeId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Charge, Currency, File, PaymentIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Dispute". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Dispute { /// Unique identifier for the object. @@ -78,10 +77,12 @@ pub struct Dispute { } impl Dispute { + /// Returns a list of your disputes. - pub fn list(client: &Client, params: &ListDisputes<'_>) -> Response> { - client.get_query("/disputes", params) - } +pub fn list(client: &Client, params: &ListDisputes<'_>) -> Response> { + client.get_query("/disputes", params) +} + /// Retrieves the dispute with the given ID. pub fn retrieve(client: &Client, id: &DisputeId, expand: &[&str]) -> Response { @@ -101,6 +102,7 @@ impl Object for Dispute { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputeEvidence { + /// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. /// /// This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -202,6 +204,7 @@ pub struct DisputeEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputeEvidenceDetails { + /// Date by which evidence must be submitted in order to successfully challenge dispute. /// /// Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. @@ -224,9 +227,16 @@ pub struct DisputeEvidenceDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputePaymentMethodDetails { - /// Card specific dispute details. + + #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub klarna: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub paypal: Option, + /// Payment method type. #[serde(rename = "type")] pub type_: DisputePaymentMethodDetailsType, @@ -234,24 +244,49 @@ pub struct DisputePaymentMethodDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputePaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. pub brand: String, + /// The type of dispute opened. + /// + /// Different case types may have varying fees and financial impact. + pub case_type: DisputePaymentMethodDetailsCardCaseType, + /// The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. /// /// The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. pub network_reason_code: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetailsKlarna { + + /// The reason for the dispute as defined by Klarna. + pub reason_code: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetailsPaypal { + + /// The ID of the dispute in PayPal. + pub case_id: Option, + + /// The reason for the dispute as defined by PayPal. + pub reason_code: Option, +} + /// The parameters for `Dispute::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListDisputes<'a> { + /// Only return disputes associated to the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, + /// Only return disputes that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -300,20 +335,57 @@ impl<'a> ListDisputes<'a> { impl Paginable for ListDisputes<'_> { type O = Dispute; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); + self.starting_after = Some(item.id()); + }} +/// An enum representing the possible values of an `DisputePaymentMethodDetailsCard`'s `case_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum DisputePaymentMethodDetailsCardCaseType { + Chargeback, + Inquiry, +} + +impl DisputePaymentMethodDetailsCardCaseType { + pub fn as_str(self) -> &'static str { + match self { + DisputePaymentMethodDetailsCardCaseType::Chargeback => "chargeback", + DisputePaymentMethodDetailsCardCaseType::Inquiry => "inquiry", + } + } +} + +impl AsRef for DisputePaymentMethodDetailsCardCaseType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for DisputePaymentMethodDetailsCardCaseType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for DisputePaymentMethodDetailsCardCaseType { + fn default() -> Self { + Self::Chargeback } } + /// An enum representing the possible values of an `DisputePaymentMethodDetails`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum DisputePaymentMethodDetailsType { Card, + Klarna, + Paypal, } impl DisputePaymentMethodDetailsType { pub fn as_str(self) -> &'static str { match self { DisputePaymentMethodDetailsType::Card => "card", + DisputePaymentMethodDetailsType::Klarna => "klarna", + DisputePaymentMethodDetailsType::Paypal => "paypal", } } } diff --git a/src/resources/generated/entitlements_active_entitlement.rs b/src/resources/generated/entitlements_active_entitlement.rs new file mode 100644 index 000000000..c6f2d185c --- /dev/null +++ b/src/resources/generated/entitlements_active_entitlement.rs @@ -0,0 +1,38 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{EntitlementsActiveEntitlementId}; +use crate::params::{Expandable, Object}; +use crate::resources::{EntitlementsFeature}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ActiveEntitlement". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct EntitlementsActiveEntitlement { + /// Unique identifier for the object. + pub id: EntitlementsActiveEntitlementId, + + /// The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + pub feature: Expandable, + + /// 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, + + /// A unique key you provide as your own system identifier. + /// + /// This may be up to 80 characters. + pub lookup_key: String, +} + +impl Object for EntitlementsActiveEntitlement { + type Id = EntitlementsActiveEntitlementId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "entitlements.active_entitlement" + } +} diff --git a/src/resources/generated/entitlements_active_entitlement_summary.rs b/src/resources/generated/entitlements_active_entitlement_summary.rs new file mode 100644 index 000000000..b7c92bea1 --- /dev/null +++ b/src/resources/generated/entitlements_active_entitlement_summary.rs @@ -0,0 +1,29 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{List, Object}; +use crate::resources::{EntitlementsActiveEntitlement}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ActiveEntitlementSummary". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct EntitlementsActiveEntitlementSummary { + + /// The customer that is entitled to this feature. + pub customer: String, + + /// The list of entitlements this customer has. + pub entitlements: List, + + /// 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, +} + +impl Object for EntitlementsActiveEntitlementSummary { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "entitlements.active_entitlement_summary" + } +} diff --git a/src/resources/generated/entitlements_active_entitlement_summary_updated.rs b/src/resources/generated/entitlements_active_entitlement_summary_updated.rs new file mode 100644 index 000000000..f1326bc13 --- /dev/null +++ b/src/resources/generated/entitlements_active_entitlement_summary_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "entitlements.active_entitlement_summary.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct EntitlementsActiveEntitlementSummaryUpdated { +} diff --git a/src/resources/generated/entitlements_feature.rs b/src/resources/generated/entitlements_feature.rs new file mode 100644 index 000000000..dcb01973a --- /dev/null +++ b/src/resources/generated/entitlements_feature.rs @@ -0,0 +1,45 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{EntitlementsFeatureId}; +use crate::params::{Metadata, Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "Feature". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct EntitlementsFeature { + /// Unique identifier for the object. + pub id: EntitlementsFeatureId, + + /// Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + pub active: bool, + + /// 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, + + /// A unique key you provide as your own system identifier. + /// + /// This may be up to 80 characters. + pub lookup_key: String, + + /// Set of key-value pairs that you can attach to an object. + /// + /// This can be useful for storing additional information about the object in a structured format. + pub metadata: Metadata, + + /// The feature's name, for your own purpose, not meant to be displayable to the customer. + pub name: String, +} + +impl Object for EntitlementsFeature { + type Id = EntitlementsFeatureId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "entitlements.feature" + } +} diff --git a/src/resources/generated/ephemeral_key.rs b/src/resources/generated/ephemeral_key.rs index d87fd7eff..3576acf7e 100644 --- a/src/resources/generated/ephemeral_key.rs +++ b/src/resources/generated/ephemeral_key.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, EphemeralKeyId, IssuingCardId}; use crate::params::{Deleted, Expand, Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "EphemeralKey". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -35,6 +34,7 @@ pub struct EphemeralKey { } impl EphemeralKey { + /// Creates a short-lived API key for a given resource. pub fn create(client: &Client, params: CreateEphemeralKey<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] @@ -60,6 +60,7 @@ impl Object for EphemeralKey { /// The parameters for `EphemeralKey::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateEphemeralKey<'a> { + /// The ID of the Customer you'd like to modify using the resulting ephemeral key. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, diff --git a/src/resources/generated/event.rs b/src/resources/generated/event.rs index 8bfb0c8a1..45c4a6d56 100644 --- a/src/resources/generated/event.rs +++ b/src/resources/generated/event.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::EventId; +use crate::ids::{EventId}; use crate::params::{Expand, List, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{EventType, NotificationEventData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "NotificationEvent". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Event { /// Unique identifier for the object. @@ -48,14 +47,16 @@ pub struct Event { } impl Event { + /// List events, going back up to 30 days. /// - /// Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). - pub fn list(client: &Client, params: &ListEvents<'_>) -> Response> { - client.get_query("/events", params) - } + /// Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). +pub fn list(client: &Client, params: &ListEvents<'_>) -> Response> { + client.get_query("/events", params) +} - /// Retrieves the details of an event. + + /// Retrieves the details of an event if it was created in the last 30 days. /// /// Supply the unique identifier of the event, which you might have received in a webhook. pub fn retrieve(client: &Client, id: &EventId, expand: &[&str]) -> Response { @@ -75,6 +76,7 @@ impl Object for Event { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct NotificationEventRequest { + /// ID of the API request that caused the event. /// /// If null, the event was automatic (e.g., Stripe's automatic subscription handling). @@ -90,6 +92,8 @@ pub struct NotificationEventRequest { /// The parameters for `Event::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListEvents<'a> { + + /// Only return events that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -155,6 +159,5 @@ impl<'a> ListEvents<'a> { impl Paginable for ListEvents<'_> { type O = Event; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} \ No newline at end of file diff --git a/src/resources/generated/fee_refund.rs b/src/resources/generated/fee_refund.rs index e2b84faee..b84c5470e 100644 --- a/src/resources/generated/fee_refund.rs +++ b/src/resources/generated/fee_refund.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ApplicationFeeRefundId; +use crate::ids::{ApplicationFeeRefundId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{ApplicationFee, BalanceTransaction, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "FeeRefund". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFeeRefund { /// Unique identifier for the object. diff --git a/src/resources/generated/file.rs b/src/resources/generated/file.rs index 24bfa30a6..8ead7f732 100644 --- a/src/resources/generated/file.rs +++ b/src/resources/generated/file.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::FileId; +use crate::ids::{FileId}; use crate::params::{Expand, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::FileLink; +use crate::resources::{FileLink}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "File". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct File { /// Unique identifier for the object. @@ -50,12 +49,14 @@ pub struct File { } impl File { + /// Returns a list of the files that your account has access to. /// /// Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. - pub fn list(client: &Client, params: &ListFiles<'_>) -> Response> { - client.get_query("/files", params) - } +pub fn list(client: &Client, params: &ListFiles<'_>) -> Response> { + client.get_query("/files", params) +} + /// Retrieves the details of an existing file object. /// @@ -79,6 +80,8 @@ impl Object for File { /// The parameters for `File::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFiles<'a> { + + /// Only return files that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -128,9 +131,8 @@ impl<'a> ListFiles<'a> { impl Paginable for ListFiles<'_> { type O = File; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `ListFiles`'s `purpose` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/file_link.rs b/src/resources/generated/file_link.rs index fad3a59a7..566fd3f66 100644 --- a/src/resources/generated/file_link.rs +++ b/src/resources/generated/file_link.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{FileId, FileLinkId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{File, Scheduled}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "FileLink". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FileLink { /// Unique identifier for the object. @@ -44,10 +43,12 @@ pub struct FileLink { } impl FileLink { + /// Returns a list of file links. - pub fn list(client: &Client, params: &ListFileLinks<'_>) -> Response> { - client.get_query("/file_links", params) - } +pub fn list(client: &Client, params: &ListFileLinks<'_>) -> Response> { + client.get_query("/file_links", params) +} + /// Creates a new file link object. pub fn create(client: &Client, params: CreateFileLink<'_>) -> Response { @@ -63,11 +64,7 @@ impl FileLink { /// Updates an existing file link object. /// /// Expired links can no longer be updated. - pub fn update( - client: &Client, - id: &FileLinkId, - params: UpdateFileLink<'_>, - ) -> Response { + pub fn update(client: &Client, id: &FileLinkId, params: UpdateFileLink<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/file_links/{}", id), ¶ms) } @@ -86,6 +83,7 @@ impl Object for FileLink { /// The parameters for `FileLink::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateFileLink<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -122,6 +120,8 @@ impl<'a> CreateFileLink<'a> { /// The parameters for `FileLink::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFileLinks<'a> { + + /// Only return links that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -176,12 +176,12 @@ impl<'a> ListFileLinks<'a> { impl Paginable for ListFileLinks<'_> { type O = FileLink; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `FileLink::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateFileLink<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], diff --git a/src/resources/generated/financial_connections_account.rs b/src/resources/generated/financial_connections_account.rs index a7a2f7ed7..e14b159af 100644 --- a/src/resources/generated/financial_connections_account.rs +++ b/src/resources/generated/financial_connections_account.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BankConnectionsResourceLinkedAccount". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FinancialConnectionsAccount { /// Unique identifier for the object. @@ -110,7 +110,7 @@ pub struct BankConnectionsResourceBalance { #[serde(skip_serializing_if = "Option::is_none")] pub credit: Option, - /// The balances owed to (or by) the account holder. + /// The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. /// /// Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// @@ -132,7 +132,7 @@ pub struct BankConnectionsResourceBalanceApiResourceCashBalance { /// The funds available to the account holder. /// - /// Typically this is the current balance less any holds. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. + /// Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. /// A positive amount indicates money owed to the account holder. /// A negative amount indicates money owed by the account holder. pub available: Option, @@ -178,6 +178,12 @@ pub struct BankConnectionsResourceOwnershipRefresh { /// Measured in seconds since the Unix epoch. pub last_attempted_at: Timestamp, + /// Time at which the next ownership refresh can be initiated. + /// + /// This value will be `null` when `status` is `pending`. + /// Measured in seconds since the Unix epoch. + pub next_refresh_available_at: Option, + /// The status of the last refresh attempt. pub status: BankConnectionsResourceOwnershipRefreshStatus, } diff --git a/src/resources/generated/financial_connections_account_refreshed_ownership.rs b/src/resources/generated/financial_connections_account_refreshed_ownership.rs new file mode 100644 index 000000000..890f2548c --- /dev/null +++ b/src/resources/generated/financial_connections_account_refreshed_ownership.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.refreshed_ownership". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountRefreshedOwnership { +} diff --git a/src/resources/generated/financial_connections_session.rs b/src/resources/generated/financial_connections_session.rs index 17e2358d8..876beb3b8 100644 --- a/src/resources/generated/financial_connections_session.rs +++ b/src/resources/generated/financial_connections_session.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BankConnectionsResourceLinkAccountSession". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FinancialConnectionsSession { /// Unique identifier for the object. @@ -68,6 +68,11 @@ impl Object for FinancialConnectionsSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BankConnectionsResourceLinkAccountSessionFilters { + /// Restricts the Session to subcategories of accounts that can be linked. + /// + /// Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + pub account_subcategories: Option>, + /// List of countries from which to filter accounts. pub countries: Option>, } @@ -139,8 +144,55 @@ pub struct CreateFinancialConnectionsSessionAccountHolder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateFinancialConnectionsSessionFilters { + /// Restricts the Session to subcategories of accounts that can be linked. + /// + /// Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, + /// List of countries from which to collect accounts. - pub countries: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub countries: Option>, +} + +/// An enum representing the possible values of an `BankConnectionsResourceLinkAccountSessionFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories { + Checking, + CreditCard, + LineOfCredit, + Mortgage, + Savings, +} + +impl BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories::Checking => "checking", + BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories::CreditCard => "credit_card", + BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories::LineOfCredit => "line_of_credit", + BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories::Mortgage => "mortgage", + BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BankConnectionsResourceLinkAccountSessionFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } } /// An enum representing the possible values of an `CreateFinancialConnectionsSessionAccountHolder`'s `type` field. @@ -177,6 +229,46 @@ impl std::default::Default for CreateFinancialConnectionsSessionAccountHolderTyp } } +/// An enum representing the possible values of an `CreateFinancialConnectionsSessionFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateFinancialConnectionsSessionFiltersAccountSubcategories { + Checking, + CreditCard, + LineOfCredit, + Mortgage, + Savings, +} + +impl CreateFinancialConnectionsSessionFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + CreateFinancialConnectionsSessionFiltersAccountSubcategories::Checking => "checking", + CreateFinancialConnectionsSessionFiltersAccountSubcategories::CreditCard => "credit_card", + CreateFinancialConnectionsSessionFiltersAccountSubcategories::LineOfCredit => "line_of_credit", + CreateFinancialConnectionsSessionFiltersAccountSubcategories::Mortgage => "mortgage", + CreateFinancialConnectionsSessionFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for CreateFinancialConnectionsSessionFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateFinancialConnectionsSessionFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateFinancialConnectionsSessionFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `CreateFinancialConnectionsSession`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/financial_connections_transaction.rs b/src/resources/generated/financial_connections_transaction.rs index ec33ab2e0..57cd3fbe7 100644 --- a/src/resources/generated/financial_connections_transaction.rs +++ b/src/resources/generated/financial_connections_transaction.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BankConnectionsResourceTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FinancialConnectionsTransaction { /// Unique identifier for the object. diff --git a/src/resources/generated/forwarding_request.rs b/src/resources/generated/forwarding_request.rs new file mode 100644 index 000000000..2d969432d --- /dev/null +++ b/src/resources/generated/forwarding_request.rs @@ -0,0 +1,179 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ForwardingRequestId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ForwardingRequest". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardingRequest { + /// Unique identifier for the object. + pub id: ForwardingRequestId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// 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, + + /// The PaymentMethod to insert into the forwarded request. + /// + /// Forwarding previously consumed PaymentMethods is allowed. + pub payment_method: String, + + /// The field kinds to be replaced in the forwarded request. + pub replacements: Vec, + + /// Context about the request from Stripe's servers to the destination endpoint. + pub request_context: Option, + + /// The request that was sent to the destination endpoint. + /// + /// We redact any sensitive fields. + pub request_details: Option, + + /// The response that the destination endpoint returned to us. + /// + /// We redact any sensitive fields. + pub response_details: Option, + + /// The destination URL for the forwarded request. + /// + /// Must be supported by the config. + pub url: Option, +} + +impl Object for ForwardingRequest { + type Id = ForwardingRequestId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "forwarding.request" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestContext { + + /// The time it took in milliseconds for the destination endpoint to respond. + pub destination_duration: i64, + + /// The IP address of the destination. + pub destination_ip_address: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestDetails { + + /// The body payload to send to the destination endpoint. + pub body: String, + + /// The headers to include in the forwarded request. + /// + /// Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + pub headers: Vec, + + /// The HTTP method used to call the destination endpoint. + pub http_method: ForwardedRequestDetailsHttpMethod, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestHeader { + + /// The header name. + pub name: String, + + /// The header value. + pub value: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedResponseDetails { + + /// The response body from the destination endpoint to Stripe. + pub body: String, + + /// HTTP headers that the destination endpoint returned. + pub headers: Vec, + + /// The HTTP status code that the destination endpoint returned. + pub status: i64, +} + +/// An enum representing the possible values of an `ForwardedRequestDetails`'s `http_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ForwardedRequestDetailsHttpMethod { + #[serde(rename = "POST")] + Post, +} + +impl ForwardedRequestDetailsHttpMethod { + pub fn as_str(self) -> &'static str { + match self { + ForwardedRequestDetailsHttpMethod::Post => "POST", + } + } +} + +impl AsRef for ForwardedRequestDetailsHttpMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ForwardedRequestDetailsHttpMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ForwardedRequestDetailsHttpMethod { + fn default() -> Self { + Self::Post + } +} + +/// An enum representing the possible values of an `ForwardingRequest`'s `replacements` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ForwardingRequestReplacements { + CardCvc, + CardExpiry, + CardNumber, + CardholderName, +} + +impl ForwardingRequestReplacements { + pub fn as_str(self) -> &'static str { + match self { + ForwardingRequestReplacements::CardCvc => "card_cvc", + ForwardingRequestReplacements::CardExpiry => "card_expiry", + ForwardingRequestReplacements::CardNumber => "card_number", + ForwardingRequestReplacements::CardholderName => "cardholder_name", + } + } +} + +impl AsRef for ForwardingRequestReplacements { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ForwardingRequestReplacements { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ForwardingRequestReplacements { + fn default() -> Self { + Self::CardCvc + } +} diff --git a/src/resources/generated/identity_verification_report.rs b/src/resources/generated/identity_verification_report.rs index d5c99bf97..7bd5d4dfb 100644 --- a/src/resources/generated/identity_verification_report.rs +++ b/src/resources/generated/identity_verification_report.rs @@ -9,12 +9,17 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "GelatoVerificationReport". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IdentityVerificationReport { /// Unique identifier for the object. pub id: IdentityVerificationReportId, + /// A string to reference this user. + /// + /// This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + pub client_reference_id: Option, + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. @@ -23,6 +28,9 @@ pub struct IdentityVerificationReport { #[serde(skip_serializing_if = "Option::is_none")] pub document: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, @@ -32,13 +40,19 @@ pub struct IdentityVerificationReport { #[serde(skip_serializing_if = "Option::is_none")] pub options: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub phone: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub selfie: Option, /// Type of report. #[serde(rename = "type")] + pub type_: IdentityVerificationReportType, + + /// The configuration token of a Verification Flow from the dashboard. #[serde(skip_serializing_if = "Option::is_none")] - pub type_: Option, + pub verification_flow: Option, /// ID of the VerificationSession that created this report. pub verification_session: Option, @@ -61,6 +75,7 @@ pub struct GelatoDocumentReport { pub address: Option
, /// Date of birth as it appears in the document. + #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, /// Details on the verification error. @@ -69,6 +84,7 @@ pub struct GelatoDocumentReport { pub error: Option, /// Expiration date of the document. + #[serde(skip_serializing_if = "Option::is_none")] pub expiration_date: Option, /// Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. @@ -87,6 +103,7 @@ pub struct GelatoDocumentReport { pub last_name: Option, /// Document ID number. + #[serde(skip_serializing_if = "Option::is_none")] pub number: Option, /// Status of this `document` check. @@ -148,10 +165,38 @@ pub struct GelatoDocumentReportError { pub reason: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoEmailReport { + + /// Email to be verified. + pub email: Option, + + /// Details on the verification error. + /// + /// Present when status is `unverified`. + pub error: Option, + + /// Status of this `email` check. + pub status: GelatoEmailReportStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoEmailReportError { + + /// A short machine-readable string giving the reason for the verification failure. + pub code: Option, + + /// A human-readable message giving the reason for the failure. + /// + /// These messages can be shown to your users. + pub reason: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct GelatoIdNumberReport { /// Date of birth. + #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, /// Details on the verification error. @@ -165,6 +210,7 @@ pub struct GelatoIdNumberReport { /// ID number. /// /// When `id_number_type` is `us_ssn`, only the last 4 digits are present. + #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, /// Type of ID number. @@ -202,6 +248,33 @@ pub struct GelatoIdNumberReportError { pub reason: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoPhoneReport { + + /// Details on the verification error. + /// + /// Present when status is `unverified`. + pub error: Option, + + /// Phone to be verified. + pub phone: Option, + + /// Status of this `phone` check. + pub status: GelatoPhoneReportStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoPhoneReportError { + + /// A short machine-readable string giving the reason for the verification failure. + pub code: Option, + + /// A human-readable message giving the reason for the failure. + /// + /// These messages can be shown to your users. + pub reason: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct GelatoSelfieReport { @@ -376,6 +449,74 @@ impl std::default::Default for GelatoDocumentReportType { } } +/// An enum representing the possible values of an `GelatoEmailReportError`'s `code` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum GelatoEmailReportErrorCode { + EmailUnverifiedOther, + EmailVerificationDeclined, +} + +impl GelatoEmailReportErrorCode { + pub fn as_str(self) -> &'static str { + match self { + GelatoEmailReportErrorCode::EmailUnverifiedOther => "email_unverified_other", + GelatoEmailReportErrorCode::EmailVerificationDeclined => "email_verification_declined", + } + } +} + +impl AsRef for GelatoEmailReportErrorCode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for GelatoEmailReportErrorCode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for GelatoEmailReportErrorCode { + fn default() -> Self { + Self::EmailUnverifiedOther + } +} + +/// An enum representing the possible values of an `GelatoEmailReport`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum GelatoEmailReportStatus { + Unverified, + Verified, +} + +impl GelatoEmailReportStatus { + pub fn as_str(self) -> &'static str { + match self { + GelatoEmailReportStatus::Unverified => "unverified", + GelatoEmailReportStatus::Verified => "verified", + } + } +} + +impl AsRef for GelatoEmailReportStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for GelatoEmailReportStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for GelatoEmailReportStatus { + fn default() -> Self { + Self::Unverified + } +} + /// An enum representing the possible values of an `GelatoIdNumberReportError`'s `code` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -482,6 +623,74 @@ impl std::default::Default for GelatoIdNumberReportStatus { } } +/// An enum representing the possible values of an `GelatoPhoneReportError`'s `code` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum GelatoPhoneReportErrorCode { + PhoneUnverifiedOther, + PhoneVerificationDeclined, +} + +impl GelatoPhoneReportErrorCode { + pub fn as_str(self) -> &'static str { + match self { + GelatoPhoneReportErrorCode::PhoneUnverifiedOther => "phone_unverified_other", + GelatoPhoneReportErrorCode::PhoneVerificationDeclined => "phone_verification_declined", + } + } +} + +impl AsRef for GelatoPhoneReportErrorCode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for GelatoPhoneReportErrorCode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for GelatoPhoneReportErrorCode { + fn default() -> Self { + Self::PhoneUnverifiedOther + } +} + +/// An enum representing the possible values of an `GelatoPhoneReport`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum GelatoPhoneReportStatus { + Unverified, + Verified, +} + +impl GelatoPhoneReportStatus { + pub fn as_str(self) -> &'static str { + match self { + GelatoPhoneReportStatus::Unverified => "unverified", + GelatoPhoneReportStatus::Verified => "verified", + } + } +} + +impl AsRef for GelatoPhoneReportStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for GelatoPhoneReportStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for GelatoPhoneReportStatus { + fn default() -> Self { + Self::Unverified + } +} + /// An enum representing the possible values of an `GelatoReportDocumentOptions`'s `allowed_types` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -596,6 +805,7 @@ impl std::default::Default for GelatoSelfieReportStatus { pub enum IdentityVerificationReportType { Document, IdNumber, + VerificationFlow, } impl IdentityVerificationReportType { @@ -603,6 +813,7 @@ impl IdentityVerificationReportType { match self { IdentityVerificationReportType::Document => "document", IdentityVerificationReportType::IdNumber => "id_number", + IdentityVerificationReportType::VerificationFlow => "verification_flow", } } } diff --git a/src/resources/generated/identity_verification_session.rs b/src/resources/generated/identity_verification_session.rs index 187d047c2..ca9f3ef66 100644 --- a/src/resources/generated/identity_verification_session.rs +++ b/src/resources/generated/identity_verification_session.rs @@ -9,12 +9,17 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "GelatoVerificationSession". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IdentityVerificationSession { /// Unique identifier for the object. pub id: IdentityVerificationSessionId, + /// A string to reference this user. + /// + /// This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + pub client_reference_id: Option, + /// The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. /// /// This client secret expires after 24 hours and can only be used once. @@ -47,11 +52,20 @@ pub struct IdentityVerificationSession { /// A set of options for the session’s verification checks. pub options: Option, + /// Details provided about the user being verified. + /// + /// These details may be shown to the user. + #[serde(skip_serializing_if = "Option::is_none")] + pub provided_details: Option, + /// Redaction status of this VerificationSession. /// /// If the VerificationSession is not redacted, this field will be null. pub redaction: Option, + /// Token referencing a Customer resource. + pub related_customer: Option, + /// Status of this VerificationSession. /// /// [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). @@ -59,7 +73,7 @@ pub struct IdentityVerificationSession { /// The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. #[serde(rename = "type")] - pub type_: Option, + pub type_: IdentityVerificationSessionType, /// The short-lived URL that you use to redirect a user to Stripe to submit their identity information. /// @@ -68,7 +82,12 @@ pub struct IdentityVerificationSession { /// Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. pub url: Option, + /// The configuration token of a Verification Flow from the dashboard. + #[serde(skip_serializing_if = "Option::is_none")] + pub verification_flow: Option, + /// The user’s verified data. + #[serde(skip_serializing_if = "Option::is_none")] pub verified_outputs: Option, } @@ -82,6 +101,18 @@ impl Object for IdentityVerificationSession { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoProvidedDetails { + + /// Email of user being verified. + #[serde(skip_serializing_if = "Option::is_none")] + pub email: Option, + + /// Phone number of user being verified. + #[serde(skip_serializing_if = "Option::is_none")] + pub phone: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct GelatoSessionLastError { @@ -98,8 +129,14 @@ pub struct GelatoVerificationSessionOptions { #[serde(skip_serializing_if = "Option::is_none")] pub document: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub phone: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -126,10 +163,26 @@ pub struct GelatoSessionDocumentOptions { pub require_matching_selfie: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoSessionEmailOptions { + + /// Request one time password verification of `provided_details.email`. + #[serde(skip_serializing_if = "Option::is_none")] + pub require_verification: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct GelatoSessionIdNumberOptions { } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct GelatoSessionPhoneOptions { + + /// Request one time password verification of `provided_details.phone`. + #[serde(skip_serializing_if = "Option::is_none")] + pub require_verification: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct GelatoVerifiedOutputs { @@ -137,12 +190,17 @@ pub struct GelatoVerifiedOutputs { pub address: Option
, /// The user’s verified date of birth. + #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, + /// The user's verified email address. + pub email: Option, + /// The user's verified first name. pub first_name: Option, /// The user's verified id number. + #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, /// The user's verified id number type. @@ -150,6 +208,9 @@ pub struct GelatoVerifiedOutputs { /// The user's verified last name. pub last_name: Option, + + /// The user's verified phone number. + pub phone: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -219,9 +280,13 @@ pub enum GelatoSessionLastErrorCode { DocumentExpired, DocumentTypeNotSupported, DocumentUnverifiedOther, + EmailUnverifiedOther, + EmailVerificationDeclined, IdNumberInsufficientDocumentData, IdNumberMismatch, IdNumberUnverifiedOther, + PhoneUnverifiedOther, + PhoneVerificationDeclined, SelfieDocumentMissingPhoto, SelfieFaceMismatch, SelfieManipulated, @@ -239,9 +304,13 @@ impl GelatoSessionLastErrorCode { GelatoSessionLastErrorCode::DocumentExpired => "document_expired", GelatoSessionLastErrorCode::DocumentTypeNotSupported => "document_type_not_supported", GelatoSessionLastErrorCode::DocumentUnverifiedOther => "document_unverified_other", + GelatoSessionLastErrorCode::EmailUnverifiedOther => "email_unverified_other", + GelatoSessionLastErrorCode::EmailVerificationDeclined => "email_verification_declined", GelatoSessionLastErrorCode::IdNumberInsufficientDocumentData => "id_number_insufficient_document_data", GelatoSessionLastErrorCode::IdNumberMismatch => "id_number_mismatch", GelatoSessionLastErrorCode::IdNumberUnverifiedOther => "id_number_unverified_other", + GelatoSessionLastErrorCode::PhoneUnverifiedOther => "phone_unverified_other", + GelatoSessionLastErrorCode::PhoneVerificationDeclined => "phone_verification_declined", GelatoSessionLastErrorCode::SelfieDocumentMissingPhoto => "selfie_document_missing_photo", GelatoSessionLastErrorCode::SelfieFaceMismatch => "selfie_face_mismatch", GelatoSessionLastErrorCode::SelfieManipulated => "selfie_manipulated", @@ -348,6 +417,7 @@ impl std::default::Default for IdentityVerificationSessionStatus { pub enum IdentityVerificationSessionType { Document, IdNumber, + VerificationFlow, } impl IdentityVerificationSessionType { @@ -355,6 +425,7 @@ impl IdentityVerificationSessionType { match self { IdentityVerificationSessionType::Document => "document", IdentityVerificationSessionType::IdNumber => "id_number", + IdentityVerificationSessionType::VerificationFlow => "verification_flow", } } } diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index 5128f0c91..4cd461f8d 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -2,34 +2,22 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, InvoiceId, SubscriptionId}; -use crate::params::{ - CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; -use crate::resources::{ - Account, Address, ApiErrors, Application, Charge, ConnectAccountReference, Currency, Customer, - Discount, InvoiceLineItem, InvoicePaymentMethodOptionsAcssDebit, - InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, - InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsUsBankAccount, - InvoiceSettingRenderingOptions, InvoicesShippingCost, PaymentIntent, PaymentMethod, - PaymentSource, Quote, Shipping, Subscription, TaxId, TaxRate, TestHelpersTestClock, -}; +use crate::params::{CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Account, Address, ApiErrors, Application, Charge, ConnectAccountReference, Currency, Customer, Discount, InvoiceLineItem, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsSepaDebit, InvoicePaymentMethodOptionsUsBankAccount, InvoicesResourceShippingCost, PaymentIntent, PaymentMethod, PaymentSource, Quote, Shipping, Subscription, TaxId, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Invoice". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Invoice { /// Unique identifier for the object. /// /// This property is always present unless the invoice is an upcoming invoice. /// See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. - #[serde(default = "InvoiceId::none")] - pub id: InvoiceId, + #[serde(default = "InvoiceId::none")] pub id: InvoiceId, /// The country of the business associated with this invoice, most often the business creating the invoice. #[serde(skip_serializing_if = "Option::is_none")] @@ -77,6 +65,8 @@ pub struct Invoice { /// /// Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. /// In other words, manual payment attempts after the first attempt do not affect the retry schedule. + /// If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. + /// Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. #[serde(skip_serializing_if = "Option::is_none")] pub attempt_count: Option, @@ -254,7 +244,7 @@ pub struct Invoice { /// /// See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. #[serde(skip_serializing_if = "Option::is_none")] - pub from_invoice: Option, + pub from_invoice: Option, /// The URL for the hosted invoice page, which allows customers to view and pay an invoice. /// @@ -337,10 +327,16 @@ pub struct Invoice { pub payment_settings: Option, /// End of the usage period during which invoice items were added to this invoice. + /// + /// This looks back one period for a subscription invoice. + /// Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. #[serde(skip_serializing_if = "Option::is_none")] pub period_end: Option, /// Start of the usage period during which invoice items were added to this invoice. + /// + /// This looks back one period for a subscription invoice. + /// Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. #[serde(skip_serializing_if = "Option::is_none")] pub period_start: Option, @@ -362,18 +358,11 @@ pub struct Invoice { /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. #[serde(skip_serializing_if = "Option::is_none")] - pub rendering: Option, - - /// This is a legacy field that will be removed soon. - /// - /// For details about `rendering_options`, refer to `rendering` instead. - /// Options for invoice PDF rendering. - #[serde(skip_serializing_if = "Option::is_none")] - pub rendering_options: Option, + pub rendering: Option, /// The details of the cost of shipping, including the ShippingRate applied on the invoice. #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_cost: Option, + pub shipping_cost: Option, /// Shipping details for the invoice. /// @@ -399,7 +388,7 @@ pub struct Invoice { pub status: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub status_transitions: Option, + pub status_transitions: Option, /// The subscription that this invoice was prepared for, if any. #[serde(skip_serializing_if = "Option::is_none")] @@ -469,12 +458,14 @@ pub struct Invoice { } impl Invoice { + /// You can list all invoices, or list the invoices for a specific customer. /// /// The invoices are returned sorted by creation date, with the most recently created invoices appearing first. - pub fn list(client: &Client, params: &ListInvoices<'_>) -> Response> { - client.get_query("/invoices", params) - } +pub fn list(client: &Client, params: &ListInvoices<'_>) -> Response> { + client.get_query("/invoices", params) +} + /// This endpoint creates a draft invoice for a given customer. /// @@ -489,6 +480,14 @@ impl Invoice { client.get_query(&format!("/invoices/{}", id), Expand { expand }) } + /// Updates multiple line items on an invoice. + /// + /// This is only possible when an invoice is still a draft. + pub fn update(client: &Client, id: &InvoiceId, params: UpdateInvoice<'_>) -> Response { + #[allow(clippy::needless_borrows_for_generic_args)] + client.post_form(&format!("/invoices/{}", id), ¶ms) + } + /// Permanently deletes a one-off invoice draft. /// /// This cannot be undone. @@ -510,6 +509,7 @@ impl Object for Invoice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AutomaticTax { + /// Whether Stripe automatically computes tax on this invoice. /// /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -527,6 +527,7 @@ pub struct AutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, @@ -536,6 +537,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -545,6 +547,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -565,6 +568,7 @@ pub struct TaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceThresholdReason { + /// The total invoice amount threshold boundary if it triggered the threshold invoice. pub amount_gte: Option, @@ -574,6 +578,7 @@ pub struct InvoiceThresholdReason { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItemThresholdReason { + /// The IDs of the line items that triggered the threshold invoice. pub line_item_ids: Vec, @@ -583,6 +588,7 @@ pub struct InvoiceItemThresholdReason { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. @@ -592,35 +598,9 @@ pub struct InvoiceTransferData { pub destination: Expandable, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesFromInvoice { - /// The relation between this invoice and the cloned invoice. - pub action: String, - - /// The invoice that was cloned. - pub invoice: Expandable, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesInvoiceRendering { - /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - pub amount_tax_display: Option, - - /// Invoice pdf rendering options. - pub pdf: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoiceRenderingPdf { - /// Page size of invoice pdf. - /// - /// Options include a4, letter, and auto. - /// If set to auto, page size will be switched to a4 or letter based on customer locale. - pub page_size: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesPaymentSettings { + /// ID of the mandate to be used for this invoice. /// /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -638,6 +618,7 @@ pub struct InvoicesPaymentSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesPaymentMethodOptions { + /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. pub acss_debit: Option, @@ -653,31 +634,67 @@ pub struct InvoicesPaymentMethodOptions { /// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. pub konbini: Option, + /// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + pub sepa_debit: Option, + /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. pub us_bank_account: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, /// 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. - /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceInstallmentsCard { + /// Whether Installments are enabled for this Invoice. pub enabled: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicesResourceFromInvoice { + + /// The relation between this invoice and the cloned invoice. + pub action: String, + + /// The invoice that was cloned. + pub invoice: Expandable, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicesResourceInvoiceRendering { + + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + pub amount_tax_display: Option, + + /// Invoice pdf rendering options. + pub pdf: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceRenderingPdf { + + /// Page size of invoice pdf. + /// + /// Options include a4, letter, and auto. + /// If set to auto, page size will be switched to a4 or letter based on customer locale. + pub page_size: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceInvoiceTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -686,7 +703,8 @@ pub struct InvoicesResourceInvoiceTaxId { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesStatusTransitions { +pub struct InvoicesResourceStatusTransitions { + /// The time that the invoice draft was finalized. pub finalized_at: Option, @@ -702,15 +720,17 @@ pub struct InvoicesStatusTransitions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionDetailsData { - /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. /// - /// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. + /// Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. pub metadata: Option, } /// The parameters for `Invoice::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateInvoice<'a> { + /// The account tax IDs associated with the invoice. /// /// Only editable when the invoice is a draft. @@ -787,7 +807,7 @@ pub struct CreateInvoice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<&'a str>, - /// The coupons to redeem into discounts for the invoice. + /// The coupons and promotion codes to redeem into discounts for the invoice. /// /// If not specified, inherits the discount from the invoice's customer. /// Pass an empty string to avoid inheriting any discounts. @@ -836,6 +856,15 @@ pub struct CreateInvoice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// Set the number for this invoice. + /// + /// If no number is present then a number will be assigned automatically when the invoice is finalized. + /// In many markets, regulations require invoices to be unique, sequential and / or gapless. + /// You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. + /// If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + #[serde(skip_serializing_if = "Option::is_none")] + pub number: Option<&'a str>, + /// The account (if any) for which the funds of the invoice payment are intended. /// /// If set, the invoice will be presented with the branding and support information of the specified account. @@ -849,9 +878,6 @@ pub struct CreateInvoice<'a> { /// How to handle pending invoice items on invoice creation. /// - /// One of `include` or `exclude`. - /// `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. - /// `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. /// Defaults to `exclude` if the parameter is omitted. #[serde(skip_serializing_if = "Option::is_none")] pub pending_invoice_items_behavior: Option, @@ -860,13 +886,6 @@ pub struct CreateInvoice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub rendering: Option, - /// This is a legacy field that will be removed soon. - /// - /// For details about `rendering_options`, refer to `rendering` instead. - /// Options for invoice PDF rendering. - #[serde(skip_serializing_if = "Option::is_none")] - pub rendering_options: Option, - /// Settings for the cost of shipping for this invoice. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_cost: Option, @@ -920,11 +939,11 @@ impl<'a> CreateInvoice<'a> { from_invoice: Default::default(), issuer: Default::default(), metadata: Default::default(), + number: Default::default(), on_behalf_of: Default::default(), payment_settings: Default::default(), pending_invoice_items_behavior: Default::default(), rendering: Default::default(), - rendering_options: Default::default(), shipping_cost: Default::default(), shipping_details: Default::default(), statement_descriptor: Default::default(), @@ -937,12 +956,14 @@ impl<'a> CreateInvoice<'a> { /// The parameters for `Invoice::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListInvoices<'a> { + /// The collection method of the invoice to retrieve. /// /// Either `charge_automatically` or `send_invoice`. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, + /// Only return invoices that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1007,11 +1028,42 @@ impl<'a> ListInvoices<'a> { impl Paginable for ListInvoices<'_> { type O = Invoice; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); + self.starting_after = Some(item.id()); + }} +/// The parameters for `Invoice::update`. +#[derive(Clone, Debug, Serialize)] +pub struct UpdateInvoice<'a> { + + /// 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`. + /// For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + #[serde(skip_serializing_if = "Option::is_none")] + pub invoice_metadata: Option, + + /// The line items to update. + pub lines: Vec, +} + +impl<'a> UpdateInvoice<'a> { + pub fn new(lines: Vec) -> Self { + UpdateInvoice { + expand: Default::default(), + invoice_metadata: Default::default(), + lines, + } } } + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceAutomaticTax { + /// Whether Stripe automatically computes tax on this invoice. /// /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -1027,19 +1079,21 @@ pub struct CreateInvoiceAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceCustomFields { + /// The name of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 40 characters. pub name: String, /// The value of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 140 characters. pub value: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceDiscounts { + /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -1047,10 +1101,15 @@ pub struct CreateInvoiceDiscounts { /// ID of an existing discount on the object (or one of its ancestors) to reuse. #[serde(skip_serializing_if = "Option::is_none")] pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceFromInvoice { + /// The relation between the new invoice and the original invoice. /// /// Currently, only 'revision' is permitted. @@ -1062,6 +1121,7 @@ pub struct CreateInvoiceFromInvoice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1073,6 +1133,7 @@ pub struct CreateInvoiceIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettings { + /// ID of the mandate to be used for this invoice. /// /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -1093,6 +1154,7 @@ pub struct CreateInvoicePaymentSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceRendering { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1106,19 +1168,9 @@ pub struct CreateInvoiceRendering { pub pdf: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateInvoiceRenderingOptions { - /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - /// - /// One of `exclude_tax` or `include_inclusive_tax`. - /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. - /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCost { + /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_rate: Option, @@ -1130,6 +1182,7 @@ pub struct CreateInvoiceShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetails { + /// Shipping address. pub address: CreateInvoiceShippingDetailsAddress, @@ -1143,6 +1196,7 @@ pub struct CreateInvoiceShippingDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceTransferData { + /// The amount that will be transferred automatically when the invoice is paid. /// /// If no amount is set, the full amount is transferred. @@ -1153,8 +1207,92 @@ pub struct CreateInvoiceTransferData { pub destination: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLines { + + /// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. + /// + /// If you want to apply a credit to the customer's account, pass a negative amount. + #[serde(skip_serializing_if = "Option::is_none")] + pub amount: Option, + + /// An arbitrary string which you can attach to the invoice item. + /// + /// The description is displayed in the invoice for easy tracking. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Controls whether discounts apply to this line item. + /// + /// Defaults to false for prorations or negative line items, and true for all other line items. + /// Cannot be set to true for prorations. + #[serde(skip_serializing_if = "Option::is_none")] + pub discountable: Option, + + /// The coupons, promotion codes & existing discounts which apply to the line item. + /// + /// Item discounts are applied before invoice discounts. + /// Pass an empty string to remove previously-defined discounts. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + + /// ID of an existing line item on the invoice. + pub id: String, + + /// 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`. + /// For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, + + /// The period associated with this invoice item. + /// + /// When set to different values, the period will be rendered on the invoice. + /// If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. + /// See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + #[serde(skip_serializing_if = "Option::is_none")] + pub period: Option, + + /// The ID of the price object. + /// + /// One of `price` or `price_data` is required. + #[serde(skip_serializing_if = "Option::is_none")] + pub price: Option, + + /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. + #[serde(skip_serializing_if = "Option::is_none")] + pub price_data: Option, + + /// Non-negative integer. + /// + /// The quantity of units for the line item. + #[serde(skip_serializing_if = "Option::is_none")] + pub quantity: Option, + + /// A list of up to 10 tax amounts for this line item. + /// + /// This can be useful if you calculate taxes on your own or use a third-party to calculate them. + /// You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). + /// Pass an empty string to remove previously defined tax amounts. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_amounts: Option>, + + /// The tax rates which apply to the line item. + /// + /// When set, the `default_tax_rates` on the invoice do not apply to this line item. + /// Pass an empty string to remove previously-defined tax rates. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_rates: Option>, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1166,6 +1304,7 @@ pub struct CreateInvoiceAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { + /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -1186,6 +1325,10 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1193,6 +1336,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceRenderingPdf { + /// Page size for invoice PDF. /// /// Can be set to `a4`, `letter`, or `auto`. If set to `auto`, invoice PDF page size defaults to `a4` for customers with Japanese locale and `letter` for customers with other locales. @@ -1202,6 +1346,7 @@ pub struct CreateInvoiceRenderingPdf { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateData { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. @@ -1240,8 +1385,6 @@ pub struct CreateInvoiceShippingCostShippingRateData { pub tax_code: Option, /// The type of calculation to use on the shipping rate. - /// - /// Can only be `fixed_amount` for now. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option, @@ -1249,6 +1392,7 @@ pub struct CreateInvoiceShippingCostShippingRateData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetailsAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -1274,29 +1418,118 @@ pub struct CreateInvoiceShippingDetailsAddress { pub state: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesPeriod { + + /// The end of the period, which must be greater than or equal to the start. + /// + /// This value is inclusive. + pub end: Timestamp, + + /// The start of the period. + /// + /// This value is inclusive. + pub start: Timestamp, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesPriceData { + + /// 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, + + /// The ID of the product that this price will belong to. + /// + /// One of `product` or `product_data` is required. + #[serde(skip_serializing_if = "Option::is_none")] + pub product: Option, + + /// Data used to generate a new product object inline. + /// + /// One of `product` or `product_data` is required. + #[serde(skip_serializing_if = "Option::is_none")] + pub product_data: Option, + + /// Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. + /// + /// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. + /// One of `inclusive`, `exclusive`, or `unspecified`. + /// Once specified as either `inclusive` or `exclusive`, it cannot be changed. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_behavior: Option, + + /// A non-negative integer in cents (or local equivalent) representing how much to charge. + /// + /// One of `unit_amount` or `unit_amount_decimal` is required. + #[serde(skip_serializing_if = "Option::is_none")] + pub unit_amount: Option, + + /// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. + /// + /// Only one of `unit_amount` and `unit_amount_decimal` can be set. + #[serde(skip_serializing_if = "Option::is_none")] + pub unit_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesTaxAmounts { + + /// The amount, in cents (or local equivalent), of the tax. + pub amount: i64, + + /// Data to find or create a TaxRate object. + /// + /// Stripe automatically creates or reuses a TaxRate object for each tax amount. + /// + /// If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. + /// TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + pub tax_rate_data: UpdateInvoiceLinesTaxAmountsTaxRateData, + + /// The amount on which tax is calculated, in cents (or local equivalent). + pub taxable_amount: i64, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: - Option, + pub mandate_options: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsBancontact { + /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_language: - Option, + pub preferred_language: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCard { + /// Installment configuration for payments attempted on this invoice (Mexico Only). /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). @@ -1306,18 +1539,17 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCard { /// 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. - /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance { + /// 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, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1327,23 +1559,28 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -1359,6 +1596,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -1371,21 +1609,93 @@ pub struct CreateInvoiceShippingCostShippingRateDataFixedAmount { /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[serde(skip_serializing_if = "Option::is_none")] - pub currency_options: - Option>, + pub currency_options: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesPriceDataProductData { + + /// The product's description, meant to be displayable to the customer. + /// + /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + #[serde(skip_serializing_if = "Option::is_none")] + pub images: Option>, + + /// 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, + + /// The product's name, meant to be displayable to the customer. + pub name: String, + + /// A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_code: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateInvoiceLinesTaxAmountsTaxRateData { + + /// 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, + + /// An arbitrary string attached to the tax rate for your internal use only. + /// + /// It will not be visible to your customers. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// The display name of the tax rate, which will be shown to users. + pub display_name: String, + + /// This specifies if the tax rate is inclusive or exclusive. + pub inclusive: bool, + + /// The jurisdiction for the tax rate. + /// + /// You can use this label field for tax reporting purposes. + /// It also appears on your customer’s invoice. + #[serde(skip_serializing_if = "Option::is_none")] + pub jurisdiction: Option, + + /// The statutory tax rate percent. + /// + /// This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. + /// To accommodate fixed-amount taxes, set the percentage to zero. + /// Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + pub percentage: f64, + + /// [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. + /// + /// For example, "NY" for New York, United States. + #[serde(skip_serializing_if = "Option::is_none")] + pub state: Option, + + /// The high-level tax type, such as `vat` or `sales_tax`. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: Option< - CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType, - >, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallments { + /// Setting to true enables installments for this invoice. /// Setting to false will prevent any selected plan from applying to a payment. #[serde(skip_serializing_if = "Option::is_none")] @@ -1398,11 +1708,10 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer { + /// Configuration for eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: Option< - CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, - >, + pub eu_bank_transfer: Option, /// The bank transfer type that can be used for funding. /// @@ -1415,6 +1724,10 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTr #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections { + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. @@ -1429,6 +1742,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -1438,6 +1752,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -1447,6 +1762,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -1454,18 +1770,23 @@ pub struct CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptions { /// /// One of `inclusive`, `exclusive`, or `unspecified`. #[serde(skip_serializing_if = "Option::is_none")] - pub tax_behavior: - Option, + pub tax_behavior: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlan { - /// 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: CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval, + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the number of installment payments your customer will make to their credit card. + #[serde(skip_serializing_if = "Option::is_none")] + pub count: Option, + + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the interval between installment payments your customer will make to their credit card. One of `month`. + #[serde(skip_serializing_if = "Option::is_none")] + pub interval: Option, /// Type of installment plan, one of `fixed_count`. #[serde(rename = "type")] @@ -1473,14 +1794,24 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlan } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer -{ +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// 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 CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + /// An enum representing the possible values of an `AutomaticTax`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -1670,24 +2001,18 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTran } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -1718,16 +2043,12 @@ impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitVer } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn default() -> Self { Self::Automatic } @@ -1760,16 +2081,12 @@ impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsBancontactPr } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn default() -> Self { Self::De } @@ -1785,9 +2102,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInt impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => { - "month" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month", } } } @@ -1798,16 +2113,12 @@ impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallm } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { fn default() -> Self { Self::Month } @@ -1834,16 +2145,12 @@ impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallm } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanType -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanType -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanType { fn default() -> Self { Self::FixedCount } @@ -1862,12 +2169,8 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -1883,19 +2186,50 @@ impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsCardR self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { fn default() -> Self { Self::Any } } +/// An enum representing the possible values of an `CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { Balances, Ownership, PaymentMethod, @@ -1913,24 +2247,18 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -1941,6 +2269,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -1948,29 +2277,24 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -1995,24 +2319,18 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMe } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -2025,6 +2343,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2039,13 +2358,16 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { Ideal, Konbini, Link, + Multibanco, P24, Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -2053,11 +2375,10 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { impl CreateInvoicePaymentSettingsPaymentMethodTypes { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodTypes::AchCreditTransfer => { - "ach_credit_transfer" - } + CreateInvoicePaymentSettingsPaymentMethodTypes::AchCreditTransfer => "ach_credit_transfer", CreateInvoicePaymentSettingsPaymentMethodTypes::AchDebit => "ach_debit", CreateInvoicePaymentSettingsPaymentMethodTypes::AcssDebit => "acss_debit", + CreateInvoicePaymentSettingsPaymentMethodTypes::AmazonPay => "amazon_pay", CreateInvoicePaymentSettingsPaymentMethodTypes::AuBecsDebit => "au_becs_debit", CreateInvoicePaymentSettingsPaymentMethodTypes::BacsDebit => "bacs_debit", CreateInvoicePaymentSettingsPaymentMethodTypes::Bancontact => "bancontact", @@ -2072,15 +2393,16 @@ impl CreateInvoicePaymentSettingsPaymentMethodTypes { CreateInvoicePaymentSettingsPaymentMethodTypes::Ideal => "ideal", CreateInvoicePaymentSettingsPaymentMethodTypes::Konbini => "konbini", CreateInvoicePaymentSettingsPaymentMethodTypes::Link => "link", + CreateInvoicePaymentSettingsPaymentMethodTypes::Multibanco => "multibanco", CreateInvoicePaymentSettingsPaymentMethodTypes::P24 => "p24", CreateInvoicePaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateInvoicePaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateInvoicePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - CreateInvoicePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + CreateInvoicePaymentSettingsPaymentMethodTypes::RevolutPay => "revolut_pay", + CreateInvoicePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", CreateInvoicePaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", CreateInvoicePaymentSettingsPaymentMethodTypes::Sofort => "sofort", + CreateInvoicePaymentSettingsPaymentMethodTypes::Swish => "swish", CreateInvoicePaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", CreateInvoicePaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -2138,42 +2460,6 @@ impl std::default::Default for CreateInvoiceRenderingAmountTaxDisplay { } } -/// An enum representing the possible values of an `CreateInvoiceRenderingOptions`'s `amount_tax_display` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreateInvoiceRenderingOptionsAmountTaxDisplay { - ExcludeTax, - IncludeInclusiveTax, -} - -impl CreateInvoiceRenderingOptionsAmountTaxDisplay { - pub fn as_str(self) -> &'static str { - match self { - CreateInvoiceRenderingOptionsAmountTaxDisplay::ExcludeTax => "exclude_tax", - CreateInvoiceRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => { - "include_inclusive_tax" - } - } - } -} - -impl AsRef for CreateInvoiceRenderingOptionsAmountTaxDisplay { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreateInvoiceRenderingOptionsAmountTaxDisplay { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreateInvoiceRenderingOptionsAmountTaxDisplay { - fn default() -> Self { - Self::ExcludeTax - } -} - /// An enum representing the possible values of an `CreateInvoiceRenderingPdf`'s `page_size` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2224,9 +2510,7 @@ pub enum CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit { impl CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit { pub fn as_str(self) -> &'static str { match self { - CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit::BusinessDay => { - "business_day" - } + CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit::BusinessDay => "business_day", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit::Day => "day", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit::Hour => "hour", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit::Month => "month", @@ -2246,9 +2530,7 @@ impl std::fmt::Display for CreateInvoiceShippingCostShippingRateDataDeliveryEsti self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit -{ +impl std::default::Default for CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit { fn default() -> Self { Self::BusinessDay } @@ -2268,9 +2550,7 @@ pub enum CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit { impl CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit { pub fn as_str(self) -> &'static str { match self { - CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit::BusinessDay => { - "business_day" - } + CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit::BusinessDay => "business_day", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit::Day => "day", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit::Hour => "hour", CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit::Month => "month", @@ -2290,9 +2570,7 @@ impl std::fmt::Display for CreateInvoiceShippingCostShippingRateDataDeliveryEsti self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit -{ +impl std::default::Default for CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit { fn default() -> Self { Self::BusinessDay } @@ -2323,16 +2601,12 @@ impl AsRef for CreateInvoiceShippingCostShippingRateDataFixedAmountCurrency } } -impl std::fmt::Display - for CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsTaxBehavior -{ +impl std::fmt::Display for CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsTaxBehavior { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsTaxBehavior -{ +impl std::default::Default for CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsTaxBehavior { fn default() -> Self { Self::Exclusive } @@ -2424,9 +2698,7 @@ pub enum InvoiceBillingReason { impl InvoiceBillingReason { pub fn as_str(self) -> &'static str { match self { - InvoiceBillingReason::AutomaticPendingInvoiceItemInvoice => { - "automatic_pending_invoice_item_invoice" - } + InvoiceBillingReason::AutomaticPendingInvoiceItemInvoice => "automatic_pending_invoice_item_invoice", InvoiceBillingReason::Manual => "manual", InvoiceBillingReason::QuoteAccept => "quote_accept", InvoiceBillingReason::Subscription => "subscription", @@ -2534,7 +2806,6 @@ impl std::default::Default for InvoicePaymentMethodOptionsCardRequestThreeDSecur pub enum InvoicePendingInvoiceItemsBehavior { Exclude, Include, - IncludeAndRequire, } impl InvoicePendingInvoiceItemsBehavior { @@ -2542,7 +2813,6 @@ impl InvoicePendingInvoiceItemsBehavior { match self { InvoicePendingInvoiceItemsBehavior::Exclude => "exclude", InvoicePendingInvoiceItemsBehavior::Include => "include", - InvoicePendingInvoiceItemsBehavior::IncludeAndRequire => "include_and_require", } } } @@ -2647,6 +2917,7 @@ pub enum InvoicesPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2661,13 +2932,16 @@ pub enum InvoicesPaymentSettingsPaymentMethodTypes { Ideal, Konbini, Link, + Multibanco, P24, Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -2678,6 +2952,7 @@ impl InvoicesPaymentSettingsPaymentMethodTypes { InvoicesPaymentSettingsPaymentMethodTypes::AchCreditTransfer => "ach_credit_transfer", InvoicesPaymentSettingsPaymentMethodTypes::AchDebit => "ach_debit", InvoicesPaymentSettingsPaymentMethodTypes::AcssDebit => "acss_debit", + InvoicesPaymentSettingsPaymentMethodTypes::AmazonPay => "amazon_pay", InvoicesPaymentSettingsPaymentMethodTypes::AuBecsDebit => "au_becs_debit", InvoicesPaymentSettingsPaymentMethodTypes::BacsDebit => "bacs_debit", InvoicesPaymentSettingsPaymentMethodTypes::Bancontact => "bancontact", @@ -2692,13 +2967,16 @@ impl InvoicesPaymentSettingsPaymentMethodTypes { InvoicesPaymentSettingsPaymentMethodTypes::Ideal => "ideal", InvoicesPaymentSettingsPaymentMethodTypes::Konbini => "konbini", InvoicesPaymentSettingsPaymentMethodTypes::Link => "link", + InvoicesPaymentSettingsPaymentMethodTypes::Multibanco => "multibanco", InvoicesPaymentSettingsPaymentMethodTypes::P24 => "p24", InvoicesPaymentSettingsPaymentMethodTypes::Paynow => "paynow", InvoicesPaymentSettingsPaymentMethodTypes::Paypal => "paypal", InvoicesPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", + InvoicesPaymentSettingsPaymentMethodTypes::RevolutPay => "revolut_pay", InvoicesPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", InvoicesPaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", InvoicesPaymentSettingsPaymentMethodTypes::Sofort => "sofort", + InvoicesPaymentSettingsPaymentMethodTypes::Swish => "swish", InvoicesPaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", InvoicesPaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -2792,6 +3070,7 @@ pub enum TaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -2801,11 +3080,13 @@ pub enum TaxIdType { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -2825,13 +3106,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -2864,6 +3149,7 @@ impl TaxIdType { TaxIdType::AuAbn => "au_abn", TaxIdType::AuArn => "au_arn", TaxIdType::BgUic => "bg_uic", + TaxIdType::BhVat => "bh_vat", TaxIdType::BoTin => "bo_tin", TaxIdType::BrCnpj => "br_cnpj", TaxIdType::BrCpf => "br_cpf", @@ -2873,11 +3159,13 @@ impl TaxIdType { TaxIdType::CaPstMb => "ca_pst_mb", TaxIdType::CaPstSk => "ca_pst_sk", TaxIdType::CaQst => "ca_qst", + TaxIdType::ChUid => "ch_uid", TaxIdType::ChVat => "ch_vat", TaxIdType::ClTin => "cl_tin", TaxIdType::CnTin => "cn_tin", TaxIdType::CoNit => "co_nit", TaxIdType::CrTin => "cr_tin", + TaxIdType::DeStn => "de_stn", TaxIdType::DoRcn => "do_rcn", TaxIdType::EcRuc => "ec_ruc", TaxIdType::EgTin => "eg_tin", @@ -2897,13 +3185,17 @@ impl TaxIdType { TaxIdType::JpTrn => "jp_trn", TaxIdType::KePin => "ke_pin", TaxIdType::KrBrn => "kr_brn", + TaxIdType::KzBin => "kz_bin", TaxIdType::LiUid => "li_uid", TaxIdType::MxRfc => "mx_rfc", TaxIdType::MyFrp => "my_frp", TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", + TaxIdType::NgTin => "ng_tin", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", + TaxIdType::OmVat => "om_vat", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", TaxIdType::RoTin => "ro_tin", @@ -2945,3 +3237,93 @@ impl std::default::Default for TaxIdType { Self::AdNrt } } + +/// An enum representing the possible values of an `UpdateInvoiceLinesPriceData`'s `tax_behavior` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateInvoiceLinesPriceDataTaxBehavior { + Exclusive, + Inclusive, + Unspecified, +} + +impl UpdateInvoiceLinesPriceDataTaxBehavior { + pub fn as_str(self) -> &'static str { + match self { + UpdateInvoiceLinesPriceDataTaxBehavior::Exclusive => "exclusive", + UpdateInvoiceLinesPriceDataTaxBehavior::Inclusive => "inclusive", + UpdateInvoiceLinesPriceDataTaxBehavior::Unspecified => "unspecified", + } + } +} + +impl AsRef for UpdateInvoiceLinesPriceDataTaxBehavior { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateInvoiceLinesPriceDataTaxBehavior { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateInvoiceLinesPriceDataTaxBehavior { + fn default() -> Self { + Self::Exclusive + } +} + +/// An enum representing the possible values of an `UpdateInvoiceLinesTaxAmountsTaxRateData`'s `tax_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType { + AmusementTax, + CommunicationsTax, + Gst, + Hst, + Igst, + Jct, + LeaseTax, + Pst, + Qst, + Rst, + SalesTax, + Vat, +} + +impl UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType { + pub fn as_str(self) -> &'static str { + match self { + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::AmusementTax => "amusement_tax", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::CommunicationsTax => "communications_tax", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Gst => "gst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Hst => "hst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Igst => "igst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Jct => "jct", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::LeaseTax => "lease_tax", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Pst => "pst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Qst => "qst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Rst => "rst", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::SalesTax => "sales_tax", + UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType::Vat => "vat", + } + } +} + +impl AsRef for UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateInvoiceLinesTaxAmountsTaxRateDataTaxType { + fn default() -> Self { + Self::AmusementTax + } +} diff --git a/src/resources/generated/invoice_overdue.rs b/src/resources/generated/invoice_overdue.rs new file mode 100644 index 000000000..f4a322579 --- /dev/null +++ b/src/resources/generated/invoice_overdue.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.overdue". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceOverdue { +} diff --git a/src/resources/generated/invoice_payment_method_options_acss_debit.rs b/src/resources/generated/invoice_payment_method_options_acss_debit.rs index b94d1fe29..221ff3858 100644 --- a/src/resources/generated/invoice_payment_method_options_acss_debit.rs +++ b/src/resources/generated/invoice_payment_method_options_acss_debit.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_acss_debit". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -17,6 +18,7 @@ pub struct InvoicePaymentMethodOptionsAcssDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. pub transaction_type: Option, } @@ -32,12 +34,8 @@ pub enum InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType { impl InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType { pub fn as_str(self) -> &'static str { match self { - InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => { - "business" - } - InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => { - "personal" - } + InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business", + InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal", } } } @@ -73,9 +71,7 @@ impl InvoicePaymentMethodOptionsAcssDebitVerificationMethod { match self { InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } diff --git a/src/resources/generated/invoice_payment_method_options_bancontact.rs b/src/resources/generated/invoice_payment_method_options_bancontact.rs index 0790a6dd8..ba6b8996c 100644 --- a/src/resources/generated/invoice_payment_method_options_bancontact.rs +++ b/src/resources/generated/invoice_payment_method_options_bancontact.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_bancontact". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsBancontact { + /// Preferred language of the Bancontact authorization page that the customer is redirected to. pub preferred_language: InvoicePaymentMethodOptionsBancontactPreferredLanguage, } diff --git a/src/resources/generated/invoice_payment_method_options_customer_balance.rs b/src/resources/generated/invoice_payment_method_options_customer_balance.rs index f170a5e7a..ea5d98422 100644 --- a/src/resources/generated/invoice_payment_method_options_customer_balance.rs +++ b/src/resources/generated/invoice_payment_method_options_customer_balance.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_customer_balance". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -18,9 +19,9 @@ pub struct InvoicePaymentMethodOptionsCustomerBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransfer { + #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + pub eu_bank_transfer: Option, /// The bank transfer type that can be used for funding. /// @@ -31,6 +32,7 @@ pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -74,16 +76,12 @@ impl AsRef for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBank } } -impl std::fmt::Display - for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry -{ +impl std::fmt::Display for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry -{ +impl std::default::Default for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry { fn default() -> Self { Self::Be } diff --git a/src/resources/generated/invoice_payment_method_options_konbini.rs b/src/resources/generated/invoice_payment_method_options_konbini.rs index 87f7350d0..12630a094 100644 --- a/src/resources/generated/invoice_payment_method_options_konbini.rs +++ b/src/resources/generated/invoice_payment_method_options_konbini.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_konbini". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicePaymentMethodOptionsKonbini {} +pub struct InvoicePaymentMethodOptionsKonbini { +} diff --git a/src/resources/generated/invoice_payment_method_options_sepa_debit.rs b/src/resources/generated/invoice_payment_method_options_sepa_debit.rs new file mode 100644 index 000000000..c7d2dead7 --- /dev/null +++ b/src/resources/generated/invoice_payment_method_options_sepa_debit.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice_payment_method_options_sepa_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentMethodOptionsSepaDebit { +} diff --git a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs index 5f47067a2..da9bfa5b4 100644 --- a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs +++ b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_us_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -17,22 +18,70 @@ pub struct InvoicePaymentMethodOptionsUsBankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { + + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// The list of permissions to request. /// /// The `payment_method` permission must be included. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: - Option>, + pub permissions: Option>, /// Data features requested to be retrieved upon account creation. pub prefetch: Option>, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFilters { + + /// The account subcategories to use to filter for possible accounts to link. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + +/// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories::Checking => "checking", + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions { Balances, + Ownership, PaymentMethod, Transactions, } @@ -41,6 +90,7 @@ impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions { pub fn as_str(self) -> &'static str { match self { InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::Balances => "balances", + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::Ownership => "ownership", InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::PaymentMethod => "payment_method", InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions::Transactions => "transactions", } @@ -58,9 +108,7 @@ impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccount self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions -{ +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions { fn default() -> Self { Self::Balances } @@ -71,18 +119,16 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { Balances, + Ownership, Transactions, } impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { pub fn as_str(self) -> &'static str { match self { - InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => { - "balances" - } - InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => { - "transactions" - } + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => "balances", + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Ownership => "ownership", + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => "transactions", } } } @@ -98,9 +144,7 @@ impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccount self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch -{ +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { fn default() -> Self { Self::Balances } @@ -120,9 +164,7 @@ impl InvoicePaymentMethodOptionsUsBankAccountVerificationMethod { match self { InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", - InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } diff --git a/src/resources/generated/invoice_setting_rendering_options.rs b/src/resources/generated/invoice_setting_rendering_options.rs index 282332dfc..31aba1211 100644 --- a/src/resources/generated/invoice_setting_rendering_options.rs +++ b/src/resources/generated/invoice_setting_rendering_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "InvoiceSettingRenderingOptions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. pub amount_tax_display: Option, } diff --git a/src/resources/generated/invoice_will_be_due.rs b/src/resources/generated/invoice_will_be_due.rs new file mode 100644 index 000000000..9c72b79a1 --- /dev/null +++ b/src/resources/generated/invoice_will_be_due.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.will_be_due". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceWillBeDue { +} diff --git a/src/resources/generated/invoiceitem.rs b/src/resources/generated/invoiceitem.rs index c48a5705d..e077d023f 100644 --- a/src/resources/generated/invoiceitem.rs +++ b/src/resources/generated/invoiceitem.rs @@ -2,21 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, InvoiceId, InvoiceItemId, PriceId, SubscriptionId}; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Currency, Customer, Discount, Invoice, Period, Plan, Price, Subscription, TaxRate, - TestHelpersTestClock, -}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Currency, Customer, Discount, Invoice, Period, Plan, Price, Subscription, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "InvoiceItem". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItem { /// Unique identifier for the object. @@ -130,12 +124,14 @@ pub struct InvoiceItem { } impl InvoiceItem { + /// Returns a list of your invoice items. /// /// Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. - pub fn list(client: &Client, params: &ListInvoiceItems<'_>) -> Response> { - client.get_query("/invoiceitems", params) - } +pub fn list(client: &Client, params: &ListInvoiceItems<'_>) -> Response> { + client.get_query("/invoiceitems", params) +} + /// Creates an item to be added to a draft invoice (up to 250 items per invoice). /// @@ -153,11 +149,7 @@ impl InvoiceItem { /// Updates the amount or description of an invoice item on an upcoming invoice. /// /// Updating an invoice item is only possible before the invoice it’s attached to is closed. - pub fn update( - client: &Client, - id: &InvoiceItemId, - params: UpdateInvoiceItem<'_>, - ) -> Response { + pub fn update(client: &Client, id: &InvoiceItemId, params: UpdateInvoiceItem<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/invoiceitems/{}", id), ¶ms) } @@ -183,6 +175,7 @@ impl Object for InvoiceItem { /// The parameters for `InvoiceItem::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateInvoiceItem<'a> { + /// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. /// /// Passing in a negative `amount` will reduce the `amount_due` on the invoice. @@ -210,7 +203,7 @@ pub struct CreateInvoiceItem<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub discountable: Option, - /// The coupons to redeem into discounts for the invoice item or invoice line item. + /// The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. #[serde(skip_serializing_if = "Option::is_none")] pub discounts: Option>, @@ -243,10 +236,14 @@ pub struct CreateInvoiceItem<'a> { pub period: Option, /// The ID of the price object. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, @@ -258,7 +255,7 @@ pub struct CreateInvoiceItem<'a> { /// The ID of a subscription to add this invoice item to. /// - /// When left blank, the invoice item will be be added to the next upcoming scheduled invoice. + /// When left blank, the invoice item is added to the next upcoming scheduled invoice. /// When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. /// Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. #[serde(skip_serializing_if = "Option::is_none")] @@ -325,6 +322,8 @@ impl<'a> CreateInvoiceItem<'a> { /// The parameters for `InvoiceItem::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListInvoiceItems<'a> { + + /// Only return invoice items that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -390,12 +389,12 @@ impl<'a> ListInvoiceItems<'a> { impl Paginable for ListInvoiceItems<'_> { type O = InvoiceItem; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `InvoiceItem::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateInvoiceItem<'a> { + /// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. /// /// If you want to apply a credit to the customer's account, pass a negative amount. @@ -415,7 +414,7 @@ pub struct UpdateInvoiceItem<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub discountable: Option, - /// The coupons & existing discounts which apply to the invoice item or invoice line item. + /// The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. /// /// Item discounts are applied before invoice discounts. /// Pass an empty string to remove previously-defined discounts. @@ -443,10 +442,14 @@ pub struct UpdateInvoiceItem<'a> { pub period: Option, /// The ID of the price object. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, @@ -513,6 +516,7 @@ impl<'a> UpdateInvoiceItem<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceItemDiscounts { + /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -520,10 +524,15 @@ pub struct CreateInvoiceItemDiscounts { /// ID of an existing discount on the object (or one of its ancestors) to reuse. #[serde(skip_serializing_if = "Option::is_none")] pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItemPriceData { + /// 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). @@ -553,6 +562,7 @@ pub struct InvoiceItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateInvoiceItemDiscounts { + /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -560,6 +570,10 @@ pub struct UpdateInvoiceItemDiscounts { /// ID of an existing discount on the object (or one of its ancestors) to reuse. #[serde(skip_serializing_if = "Option::is_none")] pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, } /// An enum representing the possible values of an `InvoiceItemPriceData`'s `tax_behavior` field. diff --git a/src/resources/generated/invoices_shipping_cost.rs b/src/resources/generated/invoices_resource_shipping_cost.rs similarity index 96% rename from src/resources/generated/invoices_shipping_cost.rs rename to src/resources/generated/invoices_resource_shipping_cost.rs index c2ab9c430..256bf07ed 100644 --- a/src/resources/generated/invoices_shipping_cost.rs +++ b/src/resources/generated/invoices_resource_shipping_cost.rs @@ -2,14 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::params::Expandable; +use crate::params::{Expandable}; use crate::resources::{ShippingRate, TaxRate}; +use serde::{Deserialize, Serialize}; -/// The resource representing a Stripe "InvoicesShippingCost". +/// The resource representing a Stripe "InvoicesResourceShippingCost". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesShippingCost { +pub struct InvoicesResourceShippingCost { + /// Total shipping cost before any taxes are applied. pub amount_subtotal: i64, @@ -31,6 +31,7 @@ pub struct InvoicesShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, diff --git a/src/resources/generated/issuing_authorization.rs b/src/resources/generated/issuing_authorization.rs index 38250fa0a..5e99223c0 100644 --- a/src/resources/generated/issuing_authorization.rs +++ b/src/resources/generated/issuing_authorization.rs @@ -2,19 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingAuthorizationId; +use crate::ids::{IssuingAuthorizationId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - BalanceTransaction, Currency, IssuingAuthorizationAmountDetails, IssuingAuthorizationCheck, - IssuingAuthorizationMethod, IssuingAuthorizationReason, IssuingCard, IssuingCardholder, - IssuingToken, IssuingTransaction, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorizationAmountDetails, IssuingAuthorizationCheck, IssuingAuthorizationMethod, IssuingAuthorizationReason, IssuingCard, IssuingCardholder, IssuingToken, IssuingTransaction, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingAuthorization". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorization { /// Unique identifier for the object. @@ -57,6 +52,14 @@ pub struct IssuingAuthorization { /// Must be a [supported currency](https://stripe.com/docs/currencies). pub currency: Currency, + /// Fleet-specific information for authorizations using Fleet cards. + pub fleet: Option, + + /// Information about fuel that was purchased with this transaction. + /// + /// Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + pub fuel: Option, + /// 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, @@ -130,8 +133,118 @@ impl Object for IssuingAuthorization { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetData { + + /// Answers to prompts presented to the cardholder at the point of sale. + /// + /// Prompted fields vary depending on the configuration of your physical fleet cards. + /// Typical points of sale support only numeric entry. + pub cardholder_prompt_data: Option, + + /// The type of purchase. + pub purchase_type: Option, + + /// More information about the total amount. + /// + /// Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + /// This information is not guaranteed to be accurate as some merchants may provide unreliable data. + pub reported_breakdown: Option, + + /// The type of fuel service. + pub service_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetCardholderPromptData { + + /// [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. + /// + /// The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + pub alphanumeric_id: Option, + + /// Driver ID. + pub driver_id: Option, + + /// Odometer reading. + pub odometer: Option, + + /// An alphanumeric ID. + /// + /// This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + pub unspecified_id: Option, + + /// User ID. + pub user_id: Option, + + /// Vehicle number. + pub vehicle_number: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetReportedBreakdown { + + /// Breakdown of fuel portion of the purchase. + pub fuel: Option, + + /// Breakdown of non-fuel portion of the purchase. + pub non_fuel: Option, + + /// Information about tax included in this transaction. + pub tax: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetFuelPriceData { + + /// Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. + pub gross_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetNonFuelPriceData { + + /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + pub gross_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFleetTaxData { + + /// Amount of state or provincial Sales Tax included in the transaction amount. + /// + /// `null` if not reported by merchant or not subject to tax. + pub local_amount_decimal: Option, + + /// Amount of national Sales Tax or VAT included in the transaction amount. + /// + /// `null` if not reported by merchant or not subject to tax. + pub national_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationFuelData { + + /// [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + pub industry_product_code: Option, + + /// The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + pub quantity_decimal: Option, + + /// The type of fuel that was purchased. + #[serde(rename = "type")] + pub type_: Option, + + /// The units for `quantity_decimal`. + pub unit: Option, + + /// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + pub unit_cost_decimal: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationNetworkData { + /// Identifier assigned to the acquirer by the card network. /// /// Sometimes this value is not provided by the network; in this case, the value will be `null`. @@ -148,6 +261,7 @@ pub struct IssuingAuthorizationNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationPendingRequest { + /// The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -180,6 +294,7 @@ pub struct IssuingAuthorizationPendingRequest { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationRequest { + /// The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// Stripe held this amount from your account to fund the authorization if the request was approved. @@ -239,6 +354,7 @@ pub struct IssuingAuthorizationRequest { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationTreasury { + /// The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization. pub received_credits: Vec, @@ -251,6 +367,7 @@ pub struct IssuingAuthorizationTreasury { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationVerificationData { + /// Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. pub address_line1_check: IssuingAuthorizationCheck, @@ -275,6 +392,7 @@ pub struct IssuingAuthorizationVerificationData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationAuthenticationExemption { + /// The entity that requested the exemption, either the acquiring merchant or the Issuing user. pub claimed_by: IssuingAuthorizationAuthenticationExemptionClaimedBy, @@ -285,6 +403,7 @@ pub struct IssuingAuthorizationAuthenticationExemption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationThreeDSecure { + /// The outcome of the 3D Secure authentication request. pub result: IssuingAuthorizationThreeDSecureResult, } @@ -335,12 +454,8 @@ pub enum IssuingAuthorizationAuthenticationExemptionType { impl IssuingAuthorizationAuthenticationExemptionType { pub fn as_str(self) -> &'static str { match self { - IssuingAuthorizationAuthenticationExemptionType::LowValueTransaction => { - "low_value_transaction" - } - IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => { - "transaction_risk_analysis" - } + IssuingAuthorizationAuthenticationExemptionType::LowValueTransaction => "low_value_transaction", + IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => "transaction_risk_analysis", IssuingAuthorizationAuthenticationExemptionType::Unknown => "unknown", } } @@ -363,6 +478,164 @@ impl std::default::Default for IssuingAuthorizationAuthenticationExemptionType { } } +/// An enum representing the possible values of an `IssuingAuthorizationFleetData`'s `purchase_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationFleetDataPurchaseType { + FuelAndNonFuelPurchase, + FuelPurchase, + NonFuelPurchase, +} + +impl IssuingAuthorizationFleetDataPurchaseType { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationFleetDataPurchaseType::FuelAndNonFuelPurchase => "fuel_and_non_fuel_purchase", + IssuingAuthorizationFleetDataPurchaseType::FuelPurchase => "fuel_purchase", + IssuingAuthorizationFleetDataPurchaseType::NonFuelPurchase => "non_fuel_purchase", + } + } +} + +impl AsRef for IssuingAuthorizationFleetDataPurchaseType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationFleetDataPurchaseType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationFleetDataPurchaseType { + fn default() -> Self { + Self::FuelAndNonFuelPurchase + } +} + +/// An enum representing the possible values of an `IssuingAuthorizationFleetData`'s `service_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationFleetDataServiceType { + FullService, + NonFuelTransaction, + SelfService, +} + +impl IssuingAuthorizationFleetDataServiceType { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationFleetDataServiceType::FullService => "full_service", + IssuingAuthorizationFleetDataServiceType::NonFuelTransaction => "non_fuel_transaction", + IssuingAuthorizationFleetDataServiceType::SelfService => "self_service", + } + } +} + +impl AsRef for IssuingAuthorizationFleetDataServiceType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationFleetDataServiceType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationFleetDataServiceType { + fn default() -> Self { + Self::FullService + } +} + +/// An enum representing the possible values of an `IssuingAuthorizationFuelData`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationFuelDataType { + Diesel, + Other, + UnleadedPlus, + UnleadedRegular, + UnleadedSuper, +} + +impl IssuingAuthorizationFuelDataType { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationFuelDataType::Diesel => "diesel", + IssuingAuthorizationFuelDataType::Other => "other", + IssuingAuthorizationFuelDataType::UnleadedPlus => "unleaded_plus", + IssuingAuthorizationFuelDataType::UnleadedRegular => "unleaded_regular", + IssuingAuthorizationFuelDataType::UnleadedSuper => "unleaded_super", + } + } +} + +impl AsRef for IssuingAuthorizationFuelDataType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationFuelDataType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationFuelDataType { + fn default() -> Self { + Self::Diesel + } +} + +/// An enum representing the possible values of an `IssuingAuthorizationFuelData`'s `unit` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationFuelDataUnit { + ChargingMinute, + ImperialGallon, + Kilogram, + KilowattHour, + Liter, + Other, + Pound, + UsGallon, +} + +impl IssuingAuthorizationFuelDataUnit { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationFuelDataUnit::ChargingMinute => "charging_minute", + IssuingAuthorizationFuelDataUnit::ImperialGallon => "imperial_gallon", + IssuingAuthorizationFuelDataUnit::Kilogram => "kilogram", + IssuingAuthorizationFuelDataUnit::KilowattHour => "kilowatt_hour", + IssuingAuthorizationFuelDataUnit::Liter => "liter", + IssuingAuthorizationFuelDataUnit::Other => "other", + IssuingAuthorizationFuelDataUnit::Pound => "pound", + IssuingAuthorizationFuelDataUnit::UsGallon => "us_gallon", + } + } +} + +impl AsRef for IssuingAuthorizationFuelDataUnit { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationFuelDataUnit { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationFuelDataUnit { + fn default() -> Self { + Self::ChargingMinute + } +} + /// An enum representing the possible values of an `IssuingAuthorization`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/issuing_card.rs b/src/resources/generated/issuing_card.rs index d05ad9820..bcf75cd78 100644 --- a/src/resources/generated/issuing_card.rs +++ b/src/resources/generated/issuing_card.rs @@ -2,18 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingCardId; +use crate::ids::{IssuingCardId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - Address, CardBrand, Currency, IssuingCardShippingStatus, IssuingCardShippingType, - IssuingCardType, IssuingCardholder, MerchantCategory, -}; +use crate::resources::{Address, CardBrand, Currency, IssuingCardShippingStatus, IssuingCardShippingType, IssuingCardType, IssuingCardholder, IssuingPersonalizationDesign, MerchantCategory}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingCard". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCard { /// Unique identifier for the object. @@ -72,6 +68,9 @@ pub struct IssuingCard { #[serde(skip_serializing_if = "Option::is_none")] pub number: Option, + /// The personalization design object belonging to this card. + pub personalization_design: Option>, + /// The latest card that replaces this card, if any. pub replaced_by: Option>, @@ -112,18 +111,36 @@ impl Object for IssuingCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardAuthorizationControls { + /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// /// All other categories will be blocked. /// Cannot be set with `blocked_categories`. pub allowed_categories: Option>, + /// Array of strings containing representing countries from which authorizations will be allowed. + /// + /// Authorizations from merchants in all other countries will be declined. + /// Country codes should be ISO 3166 alpha-2 country codes (e.g. + /// `US`). + /// Cannot be set with `blocked_merchant_countries`. + /// Provide an empty value to unset this control. + pub allowed_merchant_countries: Option>, + /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. /// /// All other categories will be allowed. /// Cannot be set with `allowed_categories`. pub blocked_categories: Option>, + /// Array of strings containing representing countries from which authorizations will be declined. + /// + /// Country codes should be ISO 3166 alpha-2 country codes (e.g. + /// `US`). + /// Cannot be set with `allowed_merchant_countries`. + /// Provide an empty value to unset this control. + pub blocked_merchant_countries: Option>, + /// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). pub spending_limits: Option>, @@ -135,8 +152,13 @@ pub struct IssuingCardAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardShipping { + pub address: Address, + /// Address validation details for the shipment. + #[serde(skip_serializing_if = "Option::is_none")] + pub address_validation: Option, + /// The delivery company that shipped a card. pub carrier: Option, @@ -179,8 +201,22 @@ pub struct IssuingCardShipping { pub type_: IssuingCardShippingType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingCardShippingAddressValidation { + + /// The address validation capabilities to use. + pub mode: IssuingCardShippingAddressValidationMode, + + /// The normalized shipping address. + pub normalized_address: Option
, + + /// The validation result for the shipping address. + pub result: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardShippingCustoms { + /// A registration number used for customs in Europe. /// /// See [](https://www.gov.uk/eori) for the UK and [](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. @@ -189,6 +225,7 @@ pub struct IssuingCardShippingCustoms { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardSpendingLimit { + /// Maximum amount allowed to spend per interval. /// /// This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -205,6 +242,7 @@ pub struct IssuingCardSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardWallets { + pub apple_pay: IssuingCardApplePay, pub google_pay: IssuingCardGooglePay, @@ -215,6 +253,7 @@ pub struct IssuingCardWallets { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardApplePay { + /// Apple Pay Eligibility. pub eligible: bool, @@ -224,6 +263,7 @@ pub struct IssuingCardApplePay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardGooglePay { + /// Google Pay Eligibility. pub eligible: bool, @@ -244,9 +284,7 @@ impl IssuingCardApplePayIneligibleReason { pub fn as_str(self) -> &'static str { match self { IssuingCardApplePayIneligibleReason::MissingAgreement => "missing_agreement", - IssuingCardApplePayIneligibleReason::MissingCardholderContact => { - "missing_cardholder_contact" - } + IssuingCardApplePayIneligibleReason::MissingCardholderContact => "missing_cardholder_contact", IssuingCardApplePayIneligibleReason::UnsupportedRegion => "unsupported_region", } } @@ -318,9 +356,7 @@ impl IssuingCardGooglePayIneligibleReason { pub fn as_str(self) -> &'static str { match self { IssuingCardGooglePayIneligibleReason::MissingAgreement => "missing_agreement", - IssuingCardGooglePayIneligibleReason::MissingCardholderContact => { - "missing_cardholder_contact" - } + IssuingCardGooglePayIneligibleReason::MissingCardholderContact => "missing_cardholder_contact", IssuingCardGooglePayIneligibleReason::UnsupportedRegion => "unsupported_region", } } @@ -381,6 +417,78 @@ impl std::default::Default for IssuingCardReplacementReason { } } +/// An enum representing the possible values of an `IssuingCardShippingAddressValidation`'s `mode` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingCardShippingAddressValidationMode { + Disabled, + NormalizationOnly, + ValidationAndNormalization, +} + +impl IssuingCardShippingAddressValidationMode { + pub fn as_str(self) -> &'static str { + match self { + IssuingCardShippingAddressValidationMode::Disabled => "disabled", + IssuingCardShippingAddressValidationMode::NormalizationOnly => "normalization_only", + IssuingCardShippingAddressValidationMode::ValidationAndNormalization => "validation_and_normalization", + } + } +} + +impl AsRef for IssuingCardShippingAddressValidationMode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingCardShippingAddressValidationMode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingCardShippingAddressValidationMode { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `IssuingCardShippingAddressValidation`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingCardShippingAddressValidationResult { + Indeterminate, + LikelyDeliverable, + LikelyUndeliverable, +} + +impl IssuingCardShippingAddressValidationResult { + pub fn as_str(self) -> &'static str { + match self { + IssuingCardShippingAddressValidationResult::Indeterminate => "indeterminate", + IssuingCardShippingAddressValidationResult::LikelyDeliverable => "likely_deliverable", + IssuingCardShippingAddressValidationResult::LikelyUndeliverable => "likely_undeliverable", + } + } +} + +impl AsRef for IssuingCardShippingAddressValidationResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingCardShippingAddressValidationResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingCardShippingAddressValidationResult { + fn default() -> Self { + Self::Indeterminate + } +} + /// An enum representing the possible values of an `IssuingCardShipping`'s `carrier` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/issuing_cardholder.rs b/src/resources/generated/issuing_cardholder.rs index a992b662c..0063d2590 100644 --- a/src/resources/generated/issuing_cardholder.rs +++ b/src/resources/generated/issuing_cardholder.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingCardholderId; +use crate::ids::{IssuingCardholderId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{Address, Currency, File, MerchantCategory}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingCardholder". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholder { /// Unique identifier for the object. @@ -85,23 +84,42 @@ impl Object for IssuingCardholder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderAddress { + pub address: Address, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderAuthorizationControls { + /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// /// All other categories will be blocked. /// Cannot be set with `blocked_categories`. pub allowed_categories: Option>, + /// Array of strings containing representing countries from which authorizations will be allowed. + /// + /// Authorizations from merchants in all other countries will be declined. + /// Country codes should be ISO 3166 alpha-2 country codes (e.g. + /// `US`). + /// Cannot be set with `blocked_merchant_countries`. + /// Provide an empty value to unset this control. + pub allowed_merchant_countries: Option>, + /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. /// /// All other categories will be allowed. /// Cannot be set with `allowed_categories`. pub blocked_categories: Option>, + /// Array of strings containing representing countries from which authorizations will be declined. + /// + /// Country codes should be ISO 3166 alpha-2 country codes (e.g. + /// `US`). + /// Cannot be set with `allowed_merchant_countries`. + /// Provide an empty value to unset this control. + pub blocked_merchant_countries: Option>, + /// Limit spending with amount-based rules that apply across this cardholder's cards. pub spending_limits: Option>, @@ -111,12 +129,14 @@ pub struct IssuingCardholderAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCompany { + /// Whether the company's business ID number was provided. pub tax_id_provided: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividual { + /// Information related to the card_issuing program for this cardholder. #[serde(skip_serializing_if = "Option::is_none")] pub card_issuing: Option, @@ -142,6 +162,7 @@ pub struct IssuingCardholderIndividual { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCardIssuing { + /// Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). /// /// Required for cards backed by a Celtic program. @@ -150,6 +171,7 @@ pub struct IssuingCardholderCardIssuing { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividualDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -162,6 +184,7 @@ pub struct IssuingCardholderIndividualDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderRequirements { + /// If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. pub disabled_reason: Option, @@ -171,6 +194,7 @@ pub struct IssuingCardholderRequirements { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderSpendingLimit { + /// Maximum amount allowed to spend per interval. /// /// This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -187,6 +211,7 @@ pub struct IssuingCardholderSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderUserTermsAcceptance { + /// The Unix timestamp marking when the cardholder accepted the Authorized User Terms. pub date: Option, @@ -199,12 +224,14 @@ pub struct IssuingCardholderUserTermsAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderVerification { + /// An identifying document, either a passport or local ID card. pub document: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIdDocument { + /// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. pub back: Option>, @@ -269,9 +296,7 @@ impl IssuingCardholderRequirementsDisabledReason { match self { IssuingCardholderRequirementsDisabledReason::Listed => "listed", IssuingCardholderRequirementsDisabledReason::RejectedListed => "rejected.listed", - IssuingCardholderRequirementsDisabledReason::RequirementsPastDue => { - "requirements.past_due" - } + IssuingCardholderRequirementsDisabledReason::RequirementsPastDue => "requirements.past_due", IssuingCardholderRequirementsDisabledReason::UnderReview => "under_review", } } @@ -322,20 +347,14 @@ impl IssuingCardholderRequirementsPastDue { pub fn as_str(self) -> &'static str { match self { IssuingCardholderRequirementsPastDue::CompanyTaxId => "company.tax_id", - IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceDate => { - "individual.card_issuing.user_terms_acceptance.date" - } - IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceIp => { - "individual.card_issuing.user_terms_acceptance.ip" - } + IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceDate => "individual.card_issuing.user_terms_acceptance.date", + IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceIp => "individual.card_issuing.user_terms_acceptance.ip", IssuingCardholderRequirementsPastDue::IndividualDobDay => "individual.dob.day", IssuingCardholderRequirementsPastDue::IndividualDobMonth => "individual.dob.month", IssuingCardholderRequirementsPastDue::IndividualDobYear => "individual.dob.year", IssuingCardholderRequirementsPastDue::IndividualFirstName => "individual.first_name", IssuingCardholderRequirementsPastDue::IndividualLastName => "individual.last_name", - IssuingCardholderRequirementsPastDue::IndividualVerificationDocument => { - "individual.verification.document" - } + IssuingCardholderRequirementsPastDue::IndividualVerificationDocument => "individual.verification.document", } } } diff --git a/src/resources/generated/issuing_dispute.rs b/src/resources/generated/issuing_dispute.rs index 55b88e081..f65b3286f 100644 --- a/src/resources/generated/issuing_dispute.rs +++ b/src/resources/generated/issuing_dispute.rs @@ -2,17 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingDisputeId; +use crate::ids::{IssuingDisputeId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - BalanceTransaction, Currency, File, IssuingDisputeStatus, IssuingTransaction, -}; +use crate::resources::{BalanceTransaction, Currency, File, IssuingDisputeStatus, IssuingTransaction}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingDispute". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDispute { /// Unique identifier for the object. @@ -24,6 +21,7 @@ pub struct IssuingDispute { pub amount: i64, /// List of balance transactions associated with the dispute. + #[serde(skip_serializing_if = "Option::is_none")] pub balance_transactions: Option>, /// Time at which the object was created. @@ -39,6 +37,13 @@ pub struct IssuingDispute { /// 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, + /// The enum that describes the dispute loss outcome. + /// + /// If the dispute is not lost, this field will be absent. + /// New enum values may be added in the future, so be sure to handle unknown values. + #[serde(skip_serializing_if = "Option::is_none")] + pub loss_reason: Option, + /// 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. @@ -67,6 +72,7 @@ impl Object for IssuingDispute { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeEvidence { + #[serde(skip_serializing_if = "Option::is_none")] pub canceled: Option, @@ -79,6 +85,9 @@ pub struct IssuingDisputeEvidence { #[serde(skip_serializing_if = "Option::is_none")] pub merchandise_not_as_described: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub no_valid_authorization: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub not_received: Option, @@ -96,6 +105,7 @@ pub struct IssuingDisputeEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeCanceledEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -129,6 +139,7 @@ pub struct IssuingDisputeCanceledEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeDuplicateEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -152,6 +163,7 @@ pub struct IssuingDisputeDuplicateEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeFraudulentEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -161,6 +173,7 @@ pub struct IssuingDisputeFraudulentEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeMerchandiseNotAsDescribedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -180,8 +193,19 @@ pub struct IssuingDisputeMerchandiseNotAsDescribedEvidence { pub returned_at: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeNoValidAuthorizationEvidence { + + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + pub additional_documentation: Option>, + + /// Explanation of why the cardholder is disputing this transaction. + pub explanation: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeNotReceivedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -200,6 +224,7 @@ pub struct IssuingDisputeNotReceivedEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeOtherEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -215,6 +240,7 @@ pub struct IssuingDisputeOtherEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeServiceNotAsDescribedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -233,6 +259,7 @@ pub struct IssuingDisputeServiceNotAsDescribedEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeTreasury { + /// The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute. pub debit_reversal: Option, @@ -316,6 +343,7 @@ pub enum IssuingDisputeEvidenceReason { Duplicate, Fraudulent, MerchandiseNotAsDescribed, + NoValidAuthorization, NotReceived, Other, ServiceNotAsDescribed, @@ -327,9 +355,8 @@ impl IssuingDisputeEvidenceReason { IssuingDisputeEvidenceReason::Canceled => "canceled", IssuingDisputeEvidenceReason::Duplicate => "duplicate", IssuingDisputeEvidenceReason::Fraudulent => "fraudulent", - IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => { - "merchandise_not_as_described" - } + IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => "merchandise_not_as_described", + IssuingDisputeEvidenceReason::NoValidAuthorization => "no_valid_authorization", IssuingDisputeEvidenceReason::NotReceived => "not_received", IssuingDisputeEvidenceReason::Other => "other", IssuingDisputeEvidenceReason::ServiceNotAsDescribed => "service_not_as_described", @@ -354,6 +381,77 @@ impl std::default::Default for IssuingDisputeEvidenceReason { } } +/// An enum representing the possible values of an `IssuingDispute`'s `loss_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingDisputeLossReason { + CardholderAuthenticationIssuerLiability, + Eci5TokenTransactionWithTavv, + ExcessDisputesInTimeframe, + HasNotMetTheMinimumDisputeAmountRequirements, + InvalidDuplicateDispute, + InvalidIncorrectAmountDispute, + InvalidNoAuthorization, + InvalidUseOfDisputes, + MerchandiseDeliveredOrShipped, + MerchandiseOrServiceAsDescribed, + NotCancelled, + Other, + RefundIssued, + SubmittedBeyondAllowableTimeLimit, + #[serde(rename = "transaction_3ds_required")] + Transaction3dsRequired, + TransactionApprovedAfterPriorFraudDispute, + TransactionAuthorized, + TransactionElectronicallyRead, + TransactionQualifiesForVisaEasyPaymentService, + TransactionUnattended, +} + +impl IssuingDisputeLossReason { + pub fn as_str(self) -> &'static str { + match self { + IssuingDisputeLossReason::CardholderAuthenticationIssuerLiability => "cardholder_authentication_issuer_liability", + IssuingDisputeLossReason::Eci5TokenTransactionWithTavv => "eci5_token_transaction_with_tavv", + IssuingDisputeLossReason::ExcessDisputesInTimeframe => "excess_disputes_in_timeframe", + IssuingDisputeLossReason::HasNotMetTheMinimumDisputeAmountRequirements => "has_not_met_the_minimum_dispute_amount_requirements", + IssuingDisputeLossReason::InvalidDuplicateDispute => "invalid_duplicate_dispute", + IssuingDisputeLossReason::InvalidIncorrectAmountDispute => "invalid_incorrect_amount_dispute", + IssuingDisputeLossReason::InvalidNoAuthorization => "invalid_no_authorization", + IssuingDisputeLossReason::InvalidUseOfDisputes => "invalid_use_of_disputes", + IssuingDisputeLossReason::MerchandiseDeliveredOrShipped => "merchandise_delivered_or_shipped", + IssuingDisputeLossReason::MerchandiseOrServiceAsDescribed => "merchandise_or_service_as_described", + IssuingDisputeLossReason::NotCancelled => "not_cancelled", + IssuingDisputeLossReason::Other => "other", + IssuingDisputeLossReason::RefundIssued => "refund_issued", + IssuingDisputeLossReason::SubmittedBeyondAllowableTimeLimit => "submitted_beyond_allowable_time_limit", + IssuingDisputeLossReason::Transaction3dsRequired => "transaction_3ds_required", + IssuingDisputeLossReason::TransactionApprovedAfterPriorFraudDispute => "transaction_approved_after_prior_fraud_dispute", + IssuingDisputeLossReason::TransactionAuthorized => "transaction_authorized", + IssuingDisputeLossReason::TransactionElectronicallyRead => "transaction_electronically_read", + IssuingDisputeLossReason::TransactionQualifiesForVisaEasyPaymentService => "transaction_qualifies_for_visa_easy_payment_service", + IssuingDisputeLossReason::TransactionUnattended => "transaction_unattended", + } + } +} + +impl AsRef for IssuingDisputeLossReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingDisputeLossReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingDisputeLossReason { + fn default() -> Self { + Self::CardholderAuthenticationIssuerLiability + } +} + /// An enum representing the possible values of an `IssuingDisputeMerchandiseNotAsDescribedEvidence`'s `return_status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -365,9 +463,7 @@ pub enum IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus { impl IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus { pub fn as_str(self) -> &'static str { match self { - IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::MerchantRejected => { - "merchant_rejected" - } + IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::MerchantRejected => "merchant_rejected", IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::Successful => "successful", } } diff --git a/src/resources/generated/issuing_dispute_funds_rescinded.rs b/src/resources/generated/issuing_dispute_funds_rescinded.rs new file mode 100644 index 000000000..0a63c202e --- /dev/null +++ b/src/resources/generated/issuing_dispute_funds_rescinded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.funds_rescinded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeFundsRescinded { +} diff --git a/src/resources/generated/issuing_dispute_settlement_detail.rs b/src/resources/generated/issuing_dispute_settlement_detail.rs new file mode 100644 index 000000000..14e2d9416 --- /dev/null +++ b/src/resources/generated/issuing_dispute_settlement_detail.rs @@ -0,0 +1,135 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingDisputeSettlementDetailId}; +use crate::params::{Object, Timestamp}; +use crate::resources::{Currency}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingDisputeSettlementDetail". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeSettlementDetail { + /// Unique identifier for the object. + pub id: IssuingDisputeSettlementDetailId, + + /// Disputed amount in the card’s currency and in the smallest currency unit. + /// + /// Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + pub amount: i64, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// The currency the original transaction was made in. + /// + /// 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, + + /// The ID of the linked dispute. + pub dispute: String, + + /// The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. + pub event_type: IssuingDisputeSettlementDetailEventType, + + /// The card used to make the original transaction. + pub issued_card: String, + + /// 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, + + /// The card network for this dispute settlement detail. + /// + /// One of ["visa", "mastercard", "maestro"]. + pub network: IssuingDisputeSettlementDetailNetwork, + + /// The ID of the linked card network settlement. + pub settlement: Option, +} + +impl Object for IssuingDisputeSettlementDetail { + type Id = IssuingDisputeSettlementDetailId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.dispute_settlement_detail" + } +} + +/// An enum representing the possible values of an `IssuingDisputeSettlementDetail`'s `event_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingDisputeSettlementDetailEventType { + Filing, + Loss, + Representment, + Win, +} + +impl IssuingDisputeSettlementDetailEventType { + pub fn as_str(self) -> &'static str { + match self { + IssuingDisputeSettlementDetailEventType::Filing => "filing", + IssuingDisputeSettlementDetailEventType::Loss => "loss", + IssuingDisputeSettlementDetailEventType::Representment => "representment", + IssuingDisputeSettlementDetailEventType::Win => "win", + } + } +} + +impl AsRef for IssuingDisputeSettlementDetailEventType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingDisputeSettlementDetailEventType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingDisputeSettlementDetailEventType { + fn default() -> Self { + Self::Filing + } +} + +/// An enum representing the possible values of an `IssuingDisputeSettlementDetail`'s `network` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingDisputeSettlementDetailNetwork { + Maestro, + Mastercard, + Visa, +} + +impl IssuingDisputeSettlementDetailNetwork { + pub fn as_str(self) -> &'static str { + match self { + IssuingDisputeSettlementDetailNetwork::Maestro => "maestro", + IssuingDisputeSettlementDetailNetwork::Mastercard => "mastercard", + IssuingDisputeSettlementDetailNetwork::Visa => "visa", + } + } +} + +impl AsRef for IssuingDisputeSettlementDetailNetwork { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingDisputeSettlementDetailNetwork { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingDisputeSettlementDetailNetwork { + fn default() -> Self { + Self::Maestro + } +} diff --git a/src/resources/generated/issuing_personalization_design.rs b/src/resources/generated/issuing_personalization_design.rs new file mode 100644 index 000000000..7446a89d2 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design.rs @@ -0,0 +1,232 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingPersonalizationDesignId}; +use crate::params::{Expandable, Metadata, Object, Timestamp}; +use crate::resources::{File, IssuingPhysicalBundle}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingPersonalizationDesign". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesign { + /// Unique identifier for the object. + pub id: IssuingPersonalizationDesignId, + + /// The file for the card logo to use with physical bundles that support card logos. + /// + /// Must have a `purpose` value of `issuing_logo`. + pub card_logo: Option>, + + /// Hash containing carrier text, for use with physical bundles that support carrier text. + pub carrier_text: Option, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// 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, + + /// A lookup key used to retrieve personalization designs dynamically from a static string. + /// + /// This may be up to 200 characters. + pub lookup_key: Option, + + /// 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. + pub metadata: Metadata, + + /// Friendly display name. + pub name: Option, + + /// The physical bundle object belonging to this personalization design. + pub physical_bundle: Expandable, + + pub preferences: IssuingPersonalizationDesignPreferences, + + pub rejection_reasons: IssuingPersonalizationDesignRejectionReasons, + + /// Whether this personalization design can be used to create cards. + pub status: IssuingPersonalizationDesignStatus, +} + +impl Object for IssuingPersonalizationDesign { + type Id = IssuingPersonalizationDesignId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.personalization_design" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignCarrierText { + + /// The footer body text of the carrier letter. + pub footer_body: Option, + + /// The footer title text of the carrier letter. + pub footer_title: Option, + + /// The header body text of the carrier letter. + pub header_body: Option, + + /// The header title text of the carrier letter. + pub header_title: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignPreferences { + + /// Whether we use this personalization design to create cards when one isn't specified. + /// + /// A connected account uses the Connect platform's default design if no personalization design is set as the default design. + pub is_default: bool, + + /// Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + pub is_platform_default: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignRejectionReasons { + + /// The reason(s) the card logo was rejected. + pub card_logo: Option>, + + /// The reason(s) the carrier text was rejected. + pub carrier_text: Option>, +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesignRejectionReasons`'s `card_logo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignRejectionReasonsCardLogo { + GeographicLocation, + Inappropriate, + NetworkName, + NonBinaryImage, + NonFiatCurrency, + Other, + OtherEntity, + PromotionalMaterial, +} + +impl IssuingPersonalizationDesignRejectionReasonsCardLogo { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignRejectionReasonsCardLogo::GeographicLocation => "geographic_location", + IssuingPersonalizationDesignRejectionReasonsCardLogo::Inappropriate => "inappropriate", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NetworkName => "network_name", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NonBinaryImage => "non_binary_image", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NonFiatCurrency => "non_fiat_currency", + IssuingPersonalizationDesignRejectionReasonsCardLogo::Other => "other", + IssuingPersonalizationDesignRejectionReasonsCardLogo::OtherEntity => "other_entity", + IssuingPersonalizationDesignRejectionReasonsCardLogo::PromotionalMaterial => "promotional_material", + } + } +} + +impl AsRef for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn default() -> Self { + Self::GeographicLocation + } +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesignRejectionReasons`'s `carrier_text` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignRejectionReasonsCarrierText { + GeographicLocation, + Inappropriate, + NetworkName, + NonFiatCurrency, + Other, + OtherEntity, + PromotionalMaterial, +} + +impl IssuingPersonalizationDesignRejectionReasonsCarrierText { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignRejectionReasonsCarrierText::GeographicLocation => "geographic_location", + IssuingPersonalizationDesignRejectionReasonsCarrierText::Inappropriate => "inappropriate", + IssuingPersonalizationDesignRejectionReasonsCarrierText::NetworkName => "network_name", + IssuingPersonalizationDesignRejectionReasonsCarrierText::NonFiatCurrency => "non_fiat_currency", + IssuingPersonalizationDesignRejectionReasonsCarrierText::Other => "other", + IssuingPersonalizationDesignRejectionReasonsCarrierText::OtherEntity => "other_entity", + IssuingPersonalizationDesignRejectionReasonsCarrierText::PromotionalMaterial => "promotional_material", + } + } +} + +impl AsRef for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn default() -> Self { + Self::GeographicLocation + } +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesign`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignStatus { + Active, + Inactive, + Rejected, + Review, +} + +impl IssuingPersonalizationDesignStatus { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignStatus::Active => "active", + IssuingPersonalizationDesignStatus::Inactive => "inactive", + IssuingPersonalizationDesignStatus::Rejected => "rejected", + IssuingPersonalizationDesignStatus::Review => "review", + } + } +} + +impl AsRef for IssuingPersonalizationDesignStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignStatus { + fn default() -> Self { + Self::Active + } +} diff --git a/src/resources/generated/issuing_personalization_design_activated.rs b/src/resources/generated/issuing_personalization_design_activated.rs new file mode 100644 index 000000000..b2c3017d1 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design_activated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_personalization_design.activated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignActivated { +} diff --git a/src/resources/generated/issuing_personalization_design_deactivated.rs b/src/resources/generated/issuing_personalization_design_deactivated.rs new file mode 100644 index 000000000..8f06a4652 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design_deactivated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_personalization_design.deactivated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignDeactivated { +} diff --git a/src/resources/generated/issuing_personalization_design_rejected.rs b/src/resources/generated/issuing_personalization_design_rejected.rs new file mode 100644 index 000000000..8fd1589f7 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design_rejected.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_personalization_design.rejected". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignRejected { +} diff --git a/src/resources/generated/issuing_personalization_design_updated.rs b/src/resources/generated/issuing_personalization_design_updated.rs new file mode 100644 index 000000000..0210d3166 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_personalization_design.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignUpdated { +} diff --git a/src/resources/generated/issuing_physical_bundle.rs b/src/resources/generated/issuing_physical_bundle.rs new file mode 100644 index 000000000..4949827b1 --- /dev/null +++ b/src/resources/generated/issuing_physical_bundle.rs @@ -0,0 +1,232 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingPhysicalBundleId}; +use crate::params::{Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingPhysicalBundle". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPhysicalBundle { + /// Unique identifier for the object. + pub id: IssuingPhysicalBundleId, + + pub features: IssuingPhysicalBundleFeatures, + + /// 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, + + /// Friendly display name. + pub name: String, + + /// Whether this physical bundle can be used to create cards. + pub status: IssuingPhysicalBundleStatus, + + /// Whether this physical bundle is a standard Stripe offering or custom-made for you. + #[serde(rename = "type")] + pub type_: IssuingPhysicalBundleType, +} + +impl Object for IssuingPhysicalBundle { + type Id = IssuingPhysicalBundleId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.physical_bundle" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPhysicalBundleFeatures { + + /// The policy for how to use card logo images in a card design with this physical bundle. + pub card_logo: IssuingPhysicalBundleFeaturesCardLogo, + + /// The policy for how to use carrier letter text in a card design with this physical bundle. + pub carrier_text: IssuingPhysicalBundleFeaturesCarrierText, + + /// The policy for how to use a second line on a card with this physical bundle. + pub second_line: IssuingPhysicalBundleFeaturesSecondLine, +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `card_logo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesCardLogo { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesCardLogo { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesCardLogo::Optional => "optional", + IssuingPhysicalBundleFeaturesCardLogo::Required => "required", + IssuingPhysicalBundleFeaturesCardLogo::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesCardLogo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesCardLogo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesCardLogo { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `carrier_text` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesCarrierText { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesCarrierText { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesCarrierText::Optional => "optional", + IssuingPhysicalBundleFeaturesCarrierText::Required => "required", + IssuingPhysicalBundleFeaturesCarrierText::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesCarrierText { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesCarrierText { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesCarrierText { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `second_line` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesSecondLine { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesSecondLine { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesSecondLine::Optional => "optional", + IssuingPhysicalBundleFeaturesSecondLine::Required => "required", + IssuingPhysicalBundleFeaturesSecondLine::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesSecondLine { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesSecondLine { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesSecondLine { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundle`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleStatus { + Active, + Inactive, + Review, +} + +impl IssuingPhysicalBundleStatus { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleStatus::Active => "active", + IssuingPhysicalBundleStatus::Inactive => "inactive", + IssuingPhysicalBundleStatus::Review => "review", + } + } +} + +impl AsRef for IssuingPhysicalBundleStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleStatus { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundle`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleType { + Custom, + Standard, +} + +impl IssuingPhysicalBundleType { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleType::Custom => "custom", + IssuingPhysicalBundleType::Standard => "standard", + } + } +} + +impl AsRef for IssuingPhysicalBundleType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleType { + fn default() -> Self { + Self::Custom + } +} diff --git a/src/resources/generated/issuing_token.rs b/src/resources/generated/issuing_token.rs index a39a51b1f..7d08e3387 100644 --- a/src/resources/generated/issuing_token.rs +++ b/src/resources/generated/issuing_token.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingTokenId; +use crate::ids::{IssuingTokenId}; use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::IssuingCard; +use crate::resources::{IssuingCard}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingNetworkToken". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingToken { /// Unique identifier for the object. @@ -65,6 +64,7 @@ impl Object for IssuingToken { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenNetworkData { + #[serde(skip_serializing_if = "Option::is_none")] pub device: Option, @@ -86,6 +86,7 @@ pub struct IssuingNetworkTokenNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenDevice { + /// An obfuscated ID derived from the device ID. #[serde(skip_serializing_if = "Option::is_none")] pub device_fingerprint: Option, @@ -116,6 +117,7 @@ pub struct IssuingNetworkTokenDevice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenMastercard { + /// A unique reference ID from MasterCard to represent the card account number. #[serde(skip_serializing_if = "Option::is_none")] pub card_reference_id: Option, @@ -135,6 +137,7 @@ pub struct IssuingNetworkTokenMastercard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenVisa { + /// A unique reference ID from Visa to represent the card account number. pub card_reference_id: String, @@ -153,6 +156,7 @@ pub struct IssuingNetworkTokenVisa { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenWalletProvider { + /// The wallet provider-given account ID of the digital wallet the token belongs to. #[serde(skip_serializing_if = "Option::is_none")] pub account_id: Option, @@ -199,6 +203,7 @@ pub struct IssuingNetworkTokenWalletProvider { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenAddress { + /// The street address of the cardholder tokenizing the card. pub line1: String, diff --git a/src/resources/generated/issuing_transaction.rs b/src/resources/generated/issuing_transaction.rs index d22d88284..92ed11af0 100644 --- a/src/resources/generated/issuing_transaction.rs +++ b/src/resources/generated/issuing_transaction.rs @@ -2,18 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingTransactionId; +use crate::ids::{IssuingTransactionId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - BalanceTransaction, Currency, IssuingAuthorization, IssuingCard, IssuingCardholder, - IssuingDispute, IssuingToken, IssuingTransactionType, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorization, IssuingCard, IssuingCardholder, IssuingDispute, IssuingToken, IssuingTransactionType, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransaction { /// Unique identifier for the object. @@ -76,6 +72,7 @@ pub struct IssuingTransaction { pub network_data: Option, /// Additional purchase information that is optionally provided by the merchant. + #[serde(skip_serializing_if = "Option::is_none")] pub purchase_details: Option, /// [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. @@ -110,6 +107,7 @@ impl Object for IssuingTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionAmountDetails { + /// The fee charged by the ATM for the cash withdrawal. pub atm_fee: Option, @@ -119,6 +117,7 @@ pub struct IssuingTransactionAmountDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionNetworkData { + /// A code created by Stripe which is shared with the merchant to validate the authorization. /// /// This field will be populated if the authorization message was approved. @@ -138,6 +137,10 @@ pub struct IssuingTransactionNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionPurchaseDetails { + + /// Fleet-specific information for transactions using Fleet cards. + pub fleet: Option, + /// Information about the flight that was purchased with this transaction. pub flight: Option, @@ -154,8 +157,93 @@ pub struct IssuingTransactionPurchaseDetails { pub reference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetData { + + /// Answers to prompts presented to cardholder at point of sale. + pub cardholder_prompt_data: Option, + + /// The type of purchase. + /// + /// One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + pub purchase_type: Option, + + /// More information about the total amount. + /// + /// This information is not guaranteed to be accurate as some merchants may provide unreliable data. + pub reported_breakdown: Option, + + /// The type of fuel service. + /// + /// One of `non_fuel_transaction`, `full_service`, or `self_service`. + pub service_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetCardholderPromptData { + + /// Driver ID. + pub driver_id: Option, + + /// Odometer reading. + pub odometer: Option, + + /// An alphanumeric ID. + /// + /// This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + pub unspecified_id: Option, + + /// User ID. + pub user_id: Option, + + /// Vehicle number. + pub vehicle_number: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetReportedBreakdown { + + /// Breakdown of fuel portion of the purchase. + pub fuel: Option, + + /// Breakdown of non-fuel portion of the purchase. + pub non_fuel: Option, + + /// Information about tax included in this transaction. + pub tax: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetFuelPriceData { + + /// Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + pub gross_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetNonFuelPriceData { + + /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + pub gross_amount_decimal: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionFleetTaxData { + + /// Amount of state or provincial Sales Tax included in the transaction amount. + /// + /// Null if not reported by merchant or not subject to tax. + pub local_amount_decimal: Option, + + /// Amount of national Sales Tax or VAT included in the transaction amount. + /// + /// Null if not reported by merchant or not subject to tax. + pub national_amount_decimal: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightData { + /// The time that the flight departed. pub departure_at: Option, @@ -174,6 +262,7 @@ pub struct IssuingTransactionFlightData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightDataLeg { + /// The three-letter IATA airport code of the flight's destination. pub arrival_airport_code: Option, @@ -195,26 +284,31 @@ pub struct IssuingTransactionFlightDataLeg { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFuelData { + + /// [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + pub industry_product_code: Option, + + /// The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + pub quantity_decimal: Option, + /// The type of fuel that was purchased. /// /// One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. #[serde(rename = "type")] pub type_: String, - /// The units for `volume_decimal`. + /// The units for `quantity_decimal`. /// - /// One of `us_gallon` or `liter`. + /// One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. pub unit: String, /// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. pub unit_cost_decimal: String, - - /// The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - pub volume_decimal: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionLodgingData { + /// The time of checking into the lodging. pub check_in_at: Option, @@ -224,6 +318,7 @@ pub struct IssuingTransactionLodgingData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionReceiptData { + /// The description of the item. /// /// The maximum length of this field is 26 characters. @@ -241,6 +336,7 @@ pub struct IssuingTransactionReceiptData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionTreasury { + /// The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund. pub received_credit: Option, diff --git a/src/resources/generated/item.rs b/src/resources/generated/item.rs index 5f012c684..08f0af1a0 100644 --- a/src/resources/generated/item.rs +++ b/src/resources/generated/item.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CheckoutSessionItemId; -use crate::params::Object; +use crate::ids::{CheckoutSessionItemId}; +use crate::params::{Object}; use crate::resources::{Currency, Discount, Price, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "LineItem". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -68,6 +67,7 @@ impl Object for CheckoutSessionItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -76,6 +76,7 @@ pub struct LineItemsDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, diff --git a/src/resources/generated/line_item.rs b/src/resources/generated/line_item.rs index 3c54dab60..553b30d66 100644 --- a/src/resources/generated/line_item.rs +++ b/src/resources/generated/line_item.rs @@ -2,13 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::InvoiceLineItemId; +use crate::ids::{InvoiceLineItemId}; use crate::params::{Expandable, Metadata, Object}; -use crate::resources::{ - Currency, Discount, InvoiceItem, Period, Plan, Price, Subscription, SubscriptionItem, TaxRate, -}; +use crate::resources::{Currency, Discount, InvoiceItem, Period, Plan, Price, Subscription, SubscriptionItem, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "InvoiceLineItem". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -44,7 +41,10 @@ pub struct InvoiceLineItem { /// /// Line item discounts are applied before invoice discounts. /// Use `expand[]=discounts` to expand each discount. - pub discounts: Option>>, + pub discounts: Vec>, + + /// The ID of the invoice that contains this line item. + pub invoice: Option, /// The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. #[serde(skip_serializing_if = "Option::is_none")] @@ -56,7 +56,7 @@ pub struct InvoiceLineItem { /// 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. - /// Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. + /// Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. pub metadata: Metadata, pub period: Option, @@ -113,6 +113,7 @@ impl Object for InvoiceLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, @@ -122,6 +123,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -142,12 +144,14 @@ pub struct TaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceLineItemsProrationDetails { + /// For a credit proration `line_item`, the original debit line_items to which the credit proration applies. pub credited_items: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceLineItemsCreditedItems { + /// Invoice containing the credited invoice line items. pub invoice: String, diff --git a/src/resources/generated/linked_account_options_us_bank_account.rs b/src/resources/generated/linked_account_options_us_bank_account.rs index 890bc2468..f3b02f732 100644 --- a/src/resources/generated/linked_account_options_us_bank_account.rs +++ b/src/resources/generated/linked_account_options_us_bank_account.rs @@ -7,6 +7,10 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "linked_account_options_us_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LinkedAccountOptionsUsBankAccount { + + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// The list of permissions to request. /// /// The `payment_method` permission must be included. @@ -23,6 +27,16 @@ pub struct LinkedAccountOptionsUsBankAccount { pub return_url: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFilters { + + /// The account subcategories to use to filter for possible accounts to link. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + /// An enum representing the possible values of an `LinkedAccountOptionsUsBankAccount`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -66,6 +80,7 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPermissions { #[serde(rename_all = "snake_case")] pub enum LinkedAccountOptionsUsBankAccountPrefetch { Balances, + Ownership, Transactions, } @@ -73,6 +88,7 @@ impl LinkedAccountOptionsUsBankAccountPrefetch { pub fn as_str(self) -> &'static str { match self { LinkedAccountOptionsUsBankAccountPrefetch::Balances => "balances", + LinkedAccountOptionsUsBankAccountPrefetch::Ownership => "ownership", LinkedAccountOptionsUsBankAccountPrefetch::Transactions => "transactions", } } @@ -94,3 +110,37 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPrefetch { Self::Balances } } + +/// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories::Checking => "checking", + PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsUsBankAccountLinkedAccountOptionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} diff --git a/src/resources/generated/login_link.rs b/src/resources/generated/login_link.rs index 07edb8ec0..c62beea47 100644 --- a/src/resources/generated/login_link.rs +++ b/src/resources/generated/login_link.rs @@ -2,15 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "LoginLink". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LoginLink { + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. diff --git a/src/resources/generated/mandate.rs b/src/resources/generated/mandate.rs index 845268a65..9f947c94b 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::MandateId; +use crate::ids::{MandateId}; use crate::params::{Expand, Expandable, Object, Timestamp}; use crate::resources::{Currency, PaymentMethod}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Mandate". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Mandate { /// Unique identifier for the object. @@ -46,6 +45,7 @@ pub struct Mandate { } impl Mandate { + /// Retrieves a Mandate object. pub fn retrieve(client: &Client, id: &MandateId, expand: &[&str]) -> Response { client.get_query(&format!("/mandates/{}", id), Expand { expand }) @@ -64,6 +64,7 @@ impl Object for Mandate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerAcceptance { + /// The time that the customer accepts the mandate. pub accepted_at: Option, @@ -79,13 +80,18 @@ pub struct CustomerAcceptance { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateMultiUse {} +pub struct MandateMultiUse { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandatePaymentMethodDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -104,6 +110,9 @@ pub struct MandatePaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub paypal: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -118,10 +127,12 @@ pub struct MandatePaymentMethodDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CardMandatePaymentMethodDetails {} +pub struct CardMandatePaymentMethodDetails { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateAcssDebit { + /// List of Stripe products where this mandate can be selected automatically. #[serde(skip_serializing_if = "Option::is_none")] pub default_for: Option>, @@ -138,8 +149,13 @@ pub struct MandateAcssDebit { pub transaction_type: MandateAcssDebitTransactionType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct MandateAmazonPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateAuBecsDebit { + /// The URL of the mandate. /// /// This URL generally contains sensitive information about the customer and should be shared with them exclusively. @@ -148,6 +164,7 @@ pub struct MandateAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateBacsDebit { + /// The status of the mandate on the Bacs network. /// /// Can be one of `pending`, `revoked`, `refused`, or `accepted`. @@ -164,13 +181,16 @@ pub struct MandateBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateCashapp {} +pub struct MandateCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateLink {} +pub struct MandateLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandatePaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -182,8 +202,13 @@ pub struct MandatePaypal { pub payer_id: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct MandateRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSepaDebit { + /// The unique reference of the mandate. pub reference: String, @@ -195,6 +220,7 @@ pub struct MandateSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSingleUse { + /// The amount of the payment on a single use mandate. pub amount: i64, @@ -204,16 +230,19 @@ pub struct MandateSingleUse { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateUsBankAccount { + /// Mandate collection method. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct OfflineAcceptance {} +pub struct OfflineAcceptance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OnlineAcceptance { + /// The customer accepts the mandate from this IP address. pub ip_address: Option, diff --git a/src/resources/generated/payment_flows_private_payment_methods_alipay.rs b/src/resources/generated/payment_flows_private_payment_methods_alipay.rs new file mode 100644 index 000000000..f7c235a1f --- /dev/null +++ b/src/resources/generated/payment_flows_private_payment_methods_alipay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "PaymentFlowsPrivatePaymentMethodsAlipay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsAlipay { +} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index 1a7baa496..3462db8bb 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -2,25 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId, -}; +use crate::ids::{ConfirmationTokenId, 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 crate::resources::{Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentIntentOffSession, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCardPresentRouting, PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentIntent". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntent { /// Unique identifier for the object. @@ -90,7 +80,9 @@ pub struct PaymentIntent { /// /// 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. + /// If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + /// + /// If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. pub customer: Option>, /// An arbitrary string attached to the object. @@ -106,7 +98,9 @@ pub struct PaymentIntent { /// It will be cleared if the PaymentIntent is later updated for any reason. pub last_payment_error: Option>, - /// The latest charge created by this PaymentIntent. + /// ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. + /// + /// This property is `null` until PaymentIntent confirmation is attempted. pub latest_charge: Option>, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -130,8 +124,7 @@ pub struct PaymentIntent { pub payment_method: Option>, /// Information about the payment method configuration used for this PaymentIntent. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for this PaymentIntent. pub payment_method_options: Option, @@ -154,9 +147,9 @@ pub struct PaymentIntent { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). pub setup_future_usage: Option, /// Shipping information for this PaymentIntent. @@ -167,16 +160,16 @@ pub struct PaymentIntent { /// It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. pub source: Option>, - /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// 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. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. pub statement_descriptor: Option, - /// Provides information about a card payment that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. pub statement_descriptor_suffix: Option, /// Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. @@ -196,10 +189,12 @@ pub struct PaymentIntent { } impl PaymentIntent { + /// Returns a list of PaymentIntents. - pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { - client.get_query("/payment_intents", params) - } +pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { + client.get_query("/payment_intents", params) +} + /// Creates a PaymentIntent object. /// @@ -218,11 +213,7 @@ impl PaymentIntent { /// 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 { + pub fn retrieve(client: &Client, id: &PaymentIntentId, expand: &[&str]) -> Response { client.get_query(&format!("/payment_intents/{}", id), Expand { expand }) } @@ -233,11 +224,7 @@ impl PaymentIntent { /// /// 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 { + pub fn update(client: &Client, id: &PaymentIntentId, params: UpdatePaymentIntent<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/payment_intents/{}", id), ¶ms) } @@ -255,12 +242,14 @@ impl Object for PaymentIntent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentFlowsAmountDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub tip: Option, } #[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, @@ -268,6 +257,7 @@ pub struct PaymentFlowsAmountDetailsResourceTip { #[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. @@ -282,6 +272,7 @@ pub struct PaymentFlowsAutomaticPaymentMethodsPaymentIntent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextAction { + #[serde(skip_serializing_if = "Option::is_none")] pub alipay_handle_redirect: Option, @@ -292,16 +283,17 @@ pub struct PaymentIntentNextAction { pub card_await_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub cashapp_handle_redirect_or_display_qr_code: - Option, + pub cashapp_handle_redirect_or_display_qr_code: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub display_bank_transfer_instructions: - Option, + pub display_bank_transfer_instructions: Option, #[serde(skip_serializing_if = "Option::is_none")] pub konbini_display_details: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco_display_details: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_display_details: Option, @@ -318,8 +310,7 @@ pub struct PaymentIntentNextAction { pub redirect_to_url: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub swish_handle_redirect_or_display_qr_code: - Option, + pub swish_handle_redirect_or_display_qr_code: Option, /// 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")] @@ -338,8 +329,7 @@ pub struct PaymentIntentNextAction { pub wechat_pay_display_qr_code: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub wechat_pay_redirect_to_android_app: - Option, + pub wechat_pay_redirect_to_android_app: Option, #[serde(skip_serializing_if = "Option::is_none")] pub wechat_pay_redirect_to_ios_app: Option, @@ -347,6 +337,7 @@ pub struct PaymentIntentNextAction { #[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, @@ -362,6 +353,7 @@ pub struct PaymentIntentNextActionAlipayHandleRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionBoleto { + /// The timestamp after which the boleto expires. pub expires_at: Option, @@ -377,6 +369,7 @@ pub struct PaymentIntentNextActionBoleto { #[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. @@ -390,6 +383,7 @@ pub struct PaymentIntentNextActionCardAwaitNotification { #[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, @@ -417,6 +411,7 @@ pub struct PaymentIntentNextActionDisplayBankTransferInstructions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferFinancialAddress { + #[serde(skip_serializing_if = "Option::is_none")] pub aba: Option, @@ -431,8 +426,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { /// The payment networks supported by this FinancialAddress. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_networks: - Option>, + pub supported_networks: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub swift: Option, @@ -447,6 +441,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferAbaRecord { + /// The ABA account number. pub account_number: String, @@ -459,6 +454,7 @@ pub struct FundingInstructionsBankTransferAbaRecord { #[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, @@ -474,6 +470,7 @@ pub struct FundingInstructionsBankTransferIbanRecord { #[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, @@ -486,6 +483,7 @@ pub struct FundingInstructionsBankTransferSortCodeRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSpeiRecord { + /// The three-digit bank code. pub bank_code: String, @@ -498,6 +496,7 @@ pub struct FundingInstructionsBankTransferSpeiRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSwiftRecord { + /// The account number. pub account_number: String, @@ -510,6 +509,7 @@ pub struct FundingInstructionsBankTransferSwiftRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { + /// The account holder name. pub account_holder_name: Option, @@ -534,8 +534,25 @@ pub struct FundingInstructionsBankTransferZenginRecord { pub branch_name: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentNextActionDisplayMultibancoDetails { + + /// Entity number associated with this Multibanco payment. + pub entity: Option, + + /// The timestamp at which the Multibanco voucher expires. + pub expires_at: Option, + + /// The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + pub hosted_voucher_url: Option, + + /// Reference number associated with this Multibanco payment. + pub reference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionDisplayOxxoDetails { + /// The timestamp after which the OXXO voucher expires. pub expires_after: Option, @@ -548,6 +565,7 @@ pub struct PaymentIntentNextActionDisplayOxxoDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbini { + /// The timestamp at which the pending Konbini payment expires. pub expires_at: Timestamp, @@ -559,6 +577,7 @@ pub struct PaymentIntentNextActionKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniStores { + /// FamilyMart instruction details. pub familymart: Option, @@ -574,6 +593,7 @@ pub struct PaymentIntentNextActionKonbiniStores { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniFamilymart { + /// The confirmation number. #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_number: Option, @@ -584,6 +604,7 @@ pub struct PaymentIntentNextActionKonbiniFamilymart { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniLawson { + /// The confirmation number. #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_number: Option, @@ -594,6 +615,7 @@ pub struct PaymentIntentNextActionKonbiniLawson { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniMinistop { + /// The confirmation number. #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_number: Option, @@ -604,6 +626,7 @@ pub struct PaymentIntentNextActionKonbiniMinistop { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniSeicomart { + /// The confirmation number. #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_number: Option, @@ -614,6 +637,7 @@ pub struct PaymentIntentNextActionKonbiniSeicomart { #[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, @@ -629,6 +653,7 @@ pub struct PaymentIntentNextActionPaynowDisplayQrCode { #[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, @@ -652,6 +677,7 @@ pub struct PaymentIntentNextActionPixDisplayQrCode { #[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, @@ -667,6 +693,7 @@ pub struct PaymentIntentNextActionPromptpayDisplayQrCode { #[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, @@ -676,35 +703,32 @@ pub struct PaymentIntentNextActionRedirectToUrl { #[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, + pub hosted_instructions_url: String, - /// The url for mobile redirect based auth. - #[serde(skip_serializing_if = "Option::is_none")] - pub mobile_auth_url: Option, + /// The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). + pub mobile_auth_url: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub qr_code: Option, + pub qr_code: 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, + pub data: String, /// The image_url_png string used to render QR code. - #[serde(skip_serializing_if = "Option::is_none")] - pub image_url_png: Option, + pub image_url_png: String, /// The image_url_svg string used to render QR code. - #[serde(skip_serializing_if = "Option::is_none")] - pub image_url_svg: Option, + pub image_url_svg: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionVerifyWithMicrodeposits { + /// The timestamp when the microdeposits are expected to land. pub arrival_date: Timestamp, @@ -719,6 +743,7 @@ pub struct PaymentIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionWechatPayDisplayQrCode { + /// The data being used to generate QR code. pub data: String, @@ -737,6 +762,7 @@ pub struct PaymentIntentNextActionWechatPayDisplayQrCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionWechatPayRedirectToAndroidApp { + /// app_id is the APP ID registered on WeChat open platform. pub app_id: String, @@ -761,12 +787,14 @@ pub struct PaymentIntentNextActionWechatPayRedirectToAndroidApp { #[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, @@ -779,11 +807,14 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub bacs_debit: Option, + pub bacs_debit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub bancontact: Option, @@ -833,6 +864,12 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -863,6 +900,9 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -875,14 +915,15 @@ pub struct PaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -893,28 +934,46 @@ pub struct PaymentIntentPaymentMethodOptionsAcssDebit { #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentMethodOptionsBacsDebit { + + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -935,13 +994,11 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// 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, + pub request_extended_authorization: Option, /// 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, + pub request_incremental_authorization: Option, /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -955,7 +1012,7 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. @@ -966,9 +1023,9 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -991,17 +1048,19 @@ pub struct PaymentIntentPaymentMethodOptionsCard { #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1011,15 +1070,16 @@ pub struct PaymentIntentPaymentMethodOptionsLink { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1030,48 +1090,69 @@ pub struct PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit { pub interval_description: Option, /// Payment schedule for the mandate. - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentMethodOptionsMandateOptionsBacsDebit { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {} +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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -1080,25 +1161,24 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { /// Preferred transaction settlement speed. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_settlement_speed: - Option, + pub preferred_settlement_speed: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentProcessing { + #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -1109,12 +1189,14 @@ pub struct PaymentIntentProcessing { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentCardProcessing { + #[serde(skip_serializing_if = "Option::is_none")] pub customer_notification: Option, } #[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. @@ -1126,6 +1208,7 @@ pub struct PaymentIntentProcessingCustomerNotification { #[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, @@ -1136,15 +1219,16 @@ pub struct PaymentMethodOptionsAffirm { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1156,51 +1240,59 @@ pub struct PaymentMethodOptionsAfterpayClearpay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOptionsBacsDebit { +pub struct PaymentMethodOptionsAmazonPay { + + /// Controls when the funds will be captured from the customer's account. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -1208,15 +1300,16 @@ pub struct PaymentMethodOptionsBoleto { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardInstallments { + /// Installment plans that may be selected for this PaymentIntent. pub available_plans: Option>, @@ -1229,6 +1322,7 @@ pub struct PaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1275,6 +1369,7 @@ pub struct PaymentMethodOptionsCardMandateOptions { #[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, @@ -1282,25 +1377,30 @@ pub struct PaymentMethodOptionsCardPresent { /// /// 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, + + #[serde(skip_serializing_if = "Option::is_none")] + pub routing: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -1311,15 +1411,16 @@ pub struct PaymentMethodOptionsCustomerBalance { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalanceBankTransfer { + #[serde(skip_serializing_if = "Option::is_none")] pub eu_bank_transfer: Option, @@ -1327,8 +1428,7 @@ pub struct PaymentMethodOptionsCustomerBalanceBankTransfer { /// /// 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>, + pub requested_address_types: Option>, /// 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")] @@ -1337,53 +1437,59 @@ pub struct PaymentMethodOptionsCustomerBalanceBankTransfer { #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOptionsInteracPresent {} +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, @@ -1393,15 +1499,16 @@ pub struct PaymentMethodOptionsKlarna { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1420,15 +1527,28 @@ pub struct PaymentMethodOptionsKonbini { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOptionsMultibanco { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -1436,37 +1556,40 @@ pub struct PaymentMethodOptionsOxxo { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1481,15 +1604,16 @@ pub struct PaymentMethodOptionsPaypal { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -1498,43 +1622,71 @@ pub struct PaymentMethodOptionsPix { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOptionsRevolutPay {} +pub struct PaymentMethodOptionsRevolutPay { + + /// Controls when the funds will be captured from the customer's account. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOptionsTwint { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -1545,26 +1697,28 @@ pub struct PaymentMethodOptionsWechatPay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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). @@ -1582,6 +1736,7 @@ pub struct TransferData { /// 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). @@ -1604,7 +1759,7 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, - /// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. + /// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) 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). @@ -1615,6 +1770,12 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_method: Option, + /// ID of the ConfirmationToken used to confirm this PaymentIntent. + /// + /// If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + #[serde(skip_serializing_if = "Option::is_none")] + pub confirmation_token: Option, + /// 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). @@ -1624,7 +1785,9 @@ pub struct CreatePaymentIntent<'a> { /// /// 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. + /// If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + /// + /// If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1728,9 +1891,9 @@ pub struct CreatePaymentIntent<'a> { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -1738,17 +1901,17 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub shipping: Option, - /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// 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. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. #[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. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option<&'a str>, @@ -1777,6 +1940,7 @@ impl<'a> CreatePaymentIntent<'a> { capture_method: Default::default(), confirm: Default::default(), confirmation_method: Default::default(), + confirmation_token: Default::default(), currency, customer: Default::default(), description: Default::default(), @@ -1809,6 +1973,7 @@ impl<'a> CreatePaymentIntent<'a> { /// 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. @@ -1859,12 +2024,12 @@ impl<'a> ListPaymentIntents<'a> { impl Paginable for ListPaymentIntents<'_> { type O = PaymentIntent; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + 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). @@ -1894,7 +2059,9 @@ pub struct UpdatePaymentIntent<'a> { /// /// 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. + /// If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + /// + /// If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1917,6 +2084,8 @@ pub struct UpdatePaymentIntent<'a> { pub metadata: Option, /// 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. + /// + /// To unset this field to null, pass in an empty string. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, @@ -1948,9 +2117,9 @@ pub struct UpdatePaymentIntent<'a> { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -1958,17 +2127,17 @@ pub struct UpdatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub shipping: Option, - /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// 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. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. #[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. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option<&'a str>, @@ -2015,6 +2184,7 @@ impl<'a> UpdatePaymentIntent<'a> { #[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. @@ -2029,12 +2199,14 @@ pub struct CreatePaymentIntentAutomaticPaymentMethods { #[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, @@ -2051,6 +2223,17 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + /// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -2127,6 +2310,14 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -2173,6 +2364,10 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -2195,6 +2390,7 @@ pub struct CreatePaymentIntentPaymentMethodData { #[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, @@ -2211,6 +2407,10 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -2283,6 +2483,14 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -2323,6 +2531,10 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// 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, @@ -2338,6 +2550,7 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[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, @@ -2345,6 +2558,7 @@ pub struct CreatePaymentIntentRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentShipping { + /// Shipping address. pub address: CreatePaymentIntentShippingAddress, @@ -2368,6 +2582,7 @@ pub struct CreatePaymentIntentShipping { #[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. @@ -2388,6 +2603,7 @@ pub struct CreatePaymentIntentTransferData { #[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, @@ -2404,6 +2620,17 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + /// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -2480,6 +2707,14 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -2526,6 +2761,10 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -2548,6 +2787,7 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[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, @@ -2564,6 +2804,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -2636,6 +2880,14 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -2676,6 +2928,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// 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, @@ -2691,6 +2947,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentShipping { + /// Shipping address. pub address: UpdatePaymentIntentShippingAddress, @@ -2714,6 +2971,7 @@ pub struct UpdatePaymentIntentShipping { #[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, @@ -2721,6 +2979,7 @@ pub struct UpdatePaymentIntentTransferData { #[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, @@ -2742,6 +3001,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -2753,16 +3013,24 @@ pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAffirm {} +pub struct CreatePaymentIntentPaymentMethodDataAffirm { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAfterpayClearpay {} +pub struct CreatePaymentIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAlipay {} +pub struct CreatePaymentIntentPaymentMethodDataAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -2772,6 +3040,7 @@ pub struct CreatePaymentIntentPaymentMethodDataAuBecsDebit { #[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, @@ -2784,10 +3053,12 @@ pub struct CreatePaymentIntentPaymentMethodDataBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataBancontact {} +pub struct CreatePaymentIntentPaymentMethodDataBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataBillingDetails { + /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option, @@ -2806,22 +3077,27 @@ pub struct CreatePaymentIntentPaymentMethodDataBillingDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataBlik {} +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 {} +pub struct CreatePaymentIntentPaymentMethodDataCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataCustomerBalance {} +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, @@ -2829,6 +3105,7 @@ pub struct CreatePaymentIntentPaymentMethodDataEps { #[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, @@ -2838,87 +3115,117 @@ pub struct CreatePaymentIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataGiropay {} +pub struct CreatePaymentIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataGrabpay {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataInteracPresent {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataKonbini {} +pub struct CreatePaymentIntentPaymentMethodDataKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataLink {} +pub struct CreatePaymentIntentPaymentMethodDataMobilepay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataOxxo {} +pub struct CreatePaymentIntentPaymentMethodDataMultibanco { +} + +#[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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPaynow {} +pub struct CreatePaymentIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPaypal {} +pub struct CreatePaymentIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPix {} +pub struct CreatePaymentIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPromptpay {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataRevolutPay {} +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 {} +pub struct CreatePaymentIntentPaymentMethodDataSwish { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataTwint { +} #[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, + pub account_holder_type: Option, /// Account number of the bank account. #[serde(skip_serializing_if = "Option::is_none")] @@ -2940,39 +3247,41 @@ pub struct CreatePaymentIntentPaymentMethodDataUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataWechatPay {} +pub struct CreatePaymentIntentPaymentMethodDataWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataZip {} +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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAffirm { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -2982,23 +3291,23 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAffirm { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3008,68 +3317,92 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsAmazonPay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsBacsDebit { + + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, + pub preferred_language: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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. @@ -3078,15 +3411,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBlik { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -3095,20 +3429,21 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBoleto { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCard { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -3145,18 +3480,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// 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, + pub request_extended_authorization: Option, /// 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, + pub request_incremental_authorization: Option, /// 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, + pub request_multicapture: Option, /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -3166,10 +3498,9 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. /// @@ -3179,9 +3510,9 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -3209,6 +3540,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { #[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, @@ -3218,29 +3550,35 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardPresent { /// 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, + + /// Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + #[serde(skip_serializing_if = "Option::is_none")] + pub routing: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCashapp { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -3253,79 +3591,85 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalance { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodOptionsInteracPresent {} +pub struct CreatePaymentIntentPaymentMethodOptionsInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsKlarna { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -3335,15 +3679,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsKlarna { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -3370,20 +3715,21 @@ pub struct CreatePaymentIntentPaymentMethodOptionsKonbini { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsLink { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -3393,15 +3739,48 @@ pub struct CreatePaymentIntentPaymentMethodOptionsLink { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsMultibanco { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -3410,20 +3789,21 @@ pub struct CreatePaymentIntentPaymentMethodOptionsOxxo { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -3434,17 +3814,19 @@ pub struct CreatePaymentIntentPaymentMethodOptionsP24 { #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -3465,15 +3847,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPaypal { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -3488,89 +3871,111 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPix { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsTwint { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -3582,26 +3987,24 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { /// Preferred transaction settlement speed. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_settlement_speed: - Option, + pub preferred_settlement_speed: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -3613,27 +4016,28 @@ pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -3661,6 +4065,7 @@ pub struct CreatePaymentIntentShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -3672,16 +4077,24 @@ pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataAffirm {} +pub struct UpdatePaymentIntentPaymentMethodDataAffirm { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataAfterpayClearpay {} +pub struct UpdatePaymentIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataAlipay {} +pub struct UpdatePaymentIntentPaymentMethodDataAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -3691,6 +4104,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataAuBecsDebit { #[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, @@ -3703,10 +4117,12 @@ pub struct UpdatePaymentIntentPaymentMethodDataBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataBancontact {} +pub struct UpdatePaymentIntentPaymentMethodDataBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataBillingDetails { + /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option, @@ -3725,22 +4141,27 @@ pub struct UpdatePaymentIntentPaymentMethodDataBillingDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataBlik {} +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 {} +pub struct UpdatePaymentIntentPaymentMethodDataCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataCustomerBalance {} +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, @@ -3748,6 +4169,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataEps { #[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, @@ -3757,87 +4179,117 @@ pub struct UpdatePaymentIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataGiropay {} +pub struct UpdatePaymentIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataGrabpay {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataInteracPresent {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataKonbini {} +pub struct UpdatePaymentIntentPaymentMethodDataKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataLink {} +pub struct UpdatePaymentIntentPaymentMethodDataMobilepay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataOxxo {} +pub struct UpdatePaymentIntentPaymentMethodDataMultibanco { +} + +#[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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPaynow {} +pub struct UpdatePaymentIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPaypal {} +pub struct UpdatePaymentIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPix {} +pub struct UpdatePaymentIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPromptpay {} +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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataRevolutPay {} +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 {} +pub struct UpdatePaymentIntentPaymentMethodDataSwish { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataTwint { +} #[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, + pub account_holder_type: Option, /// Account number of the bank account. #[serde(skip_serializing_if = "Option::is_none")] @@ -3859,39 +4311,41 @@ pub struct UpdatePaymentIntentPaymentMethodDataUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataWechatPay {} +pub struct UpdatePaymentIntentPaymentMethodDataWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataZip {} +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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -3901,23 +4355,23 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3927,68 +4381,92 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsAmazonPay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsBacsDebit { + + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, + pub preferred_language: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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. @@ -3997,15 +4475,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBlik { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -4014,20 +4493,21 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBoleto { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCard { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -4064,18 +4544,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// 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, + pub request_extended_authorization: Option, /// 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, + pub request_incremental_authorization: Option, /// 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, + pub request_multicapture: Option, /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -4085,10 +4562,9 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. /// @@ -4098,9 +4574,9 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -4128,6 +4604,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { #[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, @@ -4137,29 +4614,35 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresent { /// 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, + + /// Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + #[serde(skip_serializing_if = "Option::is_none")] + pub routing: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -4172,79 +4655,85 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalance { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodOptionsInteracPresent {} +pub struct UpdatePaymentIntentPaymentMethodOptionsInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -4254,15 +4743,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -4289,20 +4779,21 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsKonbini { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsLink { - /// Controls when the funds will be captured from the customer's account. + + /// Controls when the funds are 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 provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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. + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -4312,15 +4803,48 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsLink { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsMultibanco { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -4329,20 +4853,21 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsOxxo { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, @@ -4353,17 +4878,19 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsP24 { #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -4384,15 +4911,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPaypal { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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. @@ -4407,89 +4935,111 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPix { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type 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 unsets the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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 you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsTwint { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. + /// + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -4501,26 +5051,24 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { /// Preferred transaction settlement speed. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_settlement_speed: - Option, + pub preferred_settlement_speed: Option, /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -4532,27 +5080,28 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay { /// 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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[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 you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. /// - /// 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`. + /// If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, } #[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, @@ -4579,10 +5128,12 @@ pub struct UpdatePaymentIntentShippingAddress { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentMandateDataCustomerAcceptanceOffline {} +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, @@ -4592,6 +5143,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptanceOnline { #[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, @@ -4619,6 +5171,7 @@ pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4631,6 +5184,7 @@ pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob { #[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. @@ -4645,17 +5199,20 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions { /// Payment schedule for the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsBacsDebitMandateOptions { } #[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. @@ -4670,6 +5227,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4715,16 +5273,23 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsCardPresentRouting { + + /// Routing requested priority. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested_priority: Option, } #[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, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -4735,21 +5300,18 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { /// 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, + pub electronic_commerce_indicator: Option, /// The exemption requested via 3DS and accepted by the issuer at authentication time. #[serde(skip_serializing_if = "Option::is_none")] - pub exemption_indicator: - Option, + pub exemption_indicator: Option, /// 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, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -4769,20 +5331,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { #[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, + pub eu_bank_transfer: Option, /// 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, - >, - >, + pub requested_address_types: Option>, /// 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")] @@ -4790,24 +5348,26 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// 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, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, /// For webview integrations only. /// @@ -4818,22 +5378,23 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[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, + pub collection_method: Option, } #[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>, + pub requested: Option>, } #[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, @@ -4861,6 +5422,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4873,6 +5435,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob { #[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. @@ -4887,17 +5450,20 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions { /// Payment schedule for the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsBacsDebitMandateOptions { } #[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. @@ -4912,6 +5478,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4957,16 +5524,23 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresentRouting { + + /// Routing requested priority. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested_priority: Option, } #[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, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -4977,21 +5551,18 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { /// 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, + pub electronic_commerce_indicator: Option, /// The exemption requested via 3DS and accepted by the issuer at authentication time. #[serde(skip_serializing_if = "Option::is_none")] - pub exemption_indicator: - Option, + pub exemption_indicator: Option, /// 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, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -5011,20 +5582,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { #[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, + pub eu_bank_transfer: Option, /// 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, - >, - >, + pub requested_address_types: Option>, /// 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")] @@ -5032,24 +5599,26 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// 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, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, /// For webview integrations only. /// @@ -5060,28 +5629,34 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[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, + pub collection_method: Option, } #[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>, + pub requested: Option>, } #[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, + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the number of installment payments your customer will make to their credit card. + #[serde(skip_serializing_if = "Option::is_none")] + pub count: Option, + + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the interval between installment payments your customer will make to their credit card. One of `month`. + #[serde(skip_serializing_if = "Option::is_none")] + pub interval: Option, /// Type of installment plan, one of `fixed_count`. #[serde(rename = "type")] @@ -5090,29 +5665,45 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[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, - >, + pub cartes_bancaires: Option, } #[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 CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + #[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, + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the number of installment payments your customer will make to their credit card. + #[serde(skip_serializing_if = "Option::is_none")] + pub count: Option, + + /// For `fixed_count` installment plans, this is required. + /// + /// It represents the interval between installment payments your customer will make to their credit card. One of `month`. + #[serde(skip_serializing_if = "Option::is_none")] + pub interval: Option, /// Type of installment plan, one of `fixed_count`. #[serde(rename = "type")] @@ -5121,21 +5712,31 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[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, - >, + pub cartes_bancaires: Option, } #[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 UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { @@ -5203,48 +5804,84 @@ impl AsRef for CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects { } } -impl std::fmt::Display for CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects { +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 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 CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects { +impl std::default::Default for CreatePaymentIntentMandateDataCustomerAcceptanceType { fn default() -> Self { - Self::Always + Self::Offline } } -/// An enum representing the possible values of an `CreatePaymentIntentMandateDataCustomerAcceptance`'s `type` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodData`'s `allow_redisplay` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentMandateDataCustomerAcceptanceType { - Offline, - Online, +pub enum CreatePaymentIntentPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, } -impl CreatePaymentIntentMandateDataCustomerAcceptanceType { +impl CreatePaymentIntentPaymentMethodDataAllowRedisplay { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentMandateDataCustomerAcceptanceType::Offline => "offline", - CreatePaymentIntentMandateDataCustomerAcceptanceType::Online => "online", + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Always => "always", + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Limited => "limited", + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", } } } -impl AsRef for CreatePaymentIntentMandateDataCustomerAcceptanceType { +impl AsRef for CreatePaymentIntentPaymentMethodDataAllowRedisplay { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentMandateDataCustomerAcceptanceType { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodDataAllowRedisplay { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentMandateDataCustomerAcceptanceType { +impl std::default::Default for CreatePaymentIntentPaymentMethodDataAllowRedisplay { fn default() -> Self { - Self::Offline + Self::Always } } @@ -5285,57 +5922,29 @@ pub enum CreatePaymentIntentPaymentMethodDataEpsBank { impl CreatePaymentIntentPaymentMethodDataEpsBank { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => { - "arzte_und_apotheker_bank" - } - CreatePaymentIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => { - "austrian_anadi_bank_ag" - } + 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::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::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::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::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", CreatePaymentIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank", CreatePaymentIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag", - CreatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + CreatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", CreatePaymentIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag", CreatePaymentIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien", CreatePaymentIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -5578,9 +6187,7 @@ impl CreatePaymentIntentPaymentMethodDataP24Bank { CreatePaymentIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy", CreatePaymentIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole", CreatePaymentIntentPaymentMethodDataP24Bank::Envelobank => "envelobank", - CreatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => { - "etransfer_pocztowy24" - } + CreatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", CreatePaymentIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank", CreatePaymentIntentPaymentMethodDataP24Bank::Ideabank => "ideabank", CreatePaymentIntentPaymentMethodDataP24Bank::Ing => "ing", @@ -5590,12 +6197,8 @@ impl CreatePaymentIntentPaymentMethodDataP24Bank { CreatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay", CreatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", CreatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", - CreatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => { - "santander_przelew24" - } - CreatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + CreatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", + CreatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", CreatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", CreatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank", CreatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -5676,6 +6279,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -5691,6 +6295,8 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -5701,6 +6307,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -5713,6 +6320,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::Affirm => "affirm", CreatePaymentIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay", CreatePaymentIntentPaymentMethodDataType::Alipay => "alipay", + CreatePaymentIntentPaymentMethodDataType::AmazonPay => "amazon_pay", CreatePaymentIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit", CreatePaymentIntentPaymentMethodDataType::BacsDebit => "bacs_debit", CreatePaymentIntentPaymentMethodDataType::Bancontact => "bancontact", @@ -5728,6 +6336,8 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::Klarna => "klarna", CreatePaymentIntentPaymentMethodDataType::Konbini => "konbini", CreatePaymentIntentPaymentMethodDataType::Link => "link", + CreatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", + CreatePaymentIntentPaymentMethodDataType::Multibanco => "multibanco", CreatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", CreatePaymentIntentPaymentMethodDataType::P24 => "p24", CreatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -5738,6 +6348,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreatePaymentIntentPaymentMethodDataType::Sofort => "sofort", CreatePaymentIntentPaymentMethodDataType::Swish => "swish", + CreatePaymentIntentPaymentMethodDataType::Twint => "twint", CreatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", CreatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay", CreatePaymentIntentPaymentMethodDataType::Zip => "zip", @@ -5773,12 +6384,8 @@ pub enum CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType { impl CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => { - "company" - } - CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", + CreatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -5859,16 +6466,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptio } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn default() -> Self { Self::Combined } @@ -5897,16 +6500,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptio } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -5925,12 +6524,8 @@ impl CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -5964,15 +6559,9 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { impl CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => { - "automatic" - } - CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => { - "instant" - } - CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", + CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", + CreatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -6068,9 +6657,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -6086,9 +6673,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAfterpayClearp self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { fn default() -> Self { Self::Manual } @@ -6120,9 +6705,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAfterpayClearp self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { fn default() -> Self { Self::None } @@ -6140,9 +6723,7 @@ impl CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -6164,6 +6745,72 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAlipaySetu } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAmazonPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + Manual, +} + +impl CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsAmazonPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + None, + OffSession, +} + +impl CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage::None => "none", + CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + 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")] @@ -6177,12 +6824,8 @@ impl CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -6217,12 +6860,8 @@ impl CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -6294,9 +6933,7 @@ impl CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -6363,12 +7000,8 @@ impl CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => "on_session", } } } @@ -6464,9 +7097,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -6500,9 +7131,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -6540,9 +7169,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -6576,9 +7203,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -6594,9 +7219,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardMandateOpt self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { fn default() -> Self { Self::India } @@ -6611,6 +7234,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -6623,12 +7247,11 @@ impl CreatePaymentIntentPaymentMethodOptionsCardNetwork { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex", - CreatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => { - "cartes_bancaires" - } + CreatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", CreatePaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners", CreatePaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover", CreatePaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + CreatePaymentIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", CreatePaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac", CreatePaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", CreatePaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -6656,6 +7279,40 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardNetwor } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardPresentRouting`'s `requested_priority` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + Domestic, + International, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority::Domestic => "domestic", + CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority::International => "international", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn default() -> Self { + Self::Domestic + } +} + /// 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")] @@ -6684,9 +7341,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestExt self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn default() -> Self { Self::IfAvailable } @@ -6715,16 +7370,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementa } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -6741,9 +7392,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { impl CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => { - "if_available" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", } } @@ -6777,9 +7426,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { impl CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => { - "if_available" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } @@ -6815,12 +7462,8 @@ impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -6855,9 +7498,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session", CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", } } @@ -6925,9 +7566,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecu self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -6961,24 +7600,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIn } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -6995,12 +7628,8 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicat impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => { - "low_risk" - } - CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => { - "none" - } + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", } } } @@ -7011,16 +7640,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemp } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn default() -> Self { Self::LowRisk } @@ -7029,8 +7654,7 @@ impl std::default::Default /// 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 -{ +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -7058,24 +7682,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -7165,12 +7783,8 @@ impl CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session", } } } @@ -7219,24 +7833,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequested } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -7276,9 +7884,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanc self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { fn default() -> Self { Self::EuBankTransfer } @@ -7294,9 +7900,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -7344,9 +7948,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanc self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage { fn default() -> Self { Self::None } @@ -7492,9 +8094,7 @@ impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -7604,6 +8204,8 @@ pub enum CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { EnPl, #[serde(rename = "en-PT")] EnPt, + #[serde(rename = "en-RO")] + EnRo, #[serde(rename = "en-SE")] EnSe, #[serde(rename = "en-US")] @@ -7636,6 +8238,8 @@ pub enum CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { PlPl, #[serde(rename = "pt-PT")] PtPt, + #[serde(rename = "ro-RO")] + RoRo, #[serde(rename = "sv-FI")] SvFi, #[serde(rename = "sv-SE")] @@ -7671,6 +8275,7 @@ impl CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNz => "en-NZ", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPl => "en-PL", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPt => "en-PT", + CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnRo => "en-RO", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnSe => "en-SE", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnUs => "en-US", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsEs => "es-ES", @@ -7687,6 +8292,7 @@ impl CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlNl => "nl-NL", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PlPl => "pl-PL", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PtPt => "pt-PT", + CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::RoRo => "ro-RO", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvFi => "sv-FI", CreatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvSe => "sv-SE", } @@ -7818,9 +8424,7 @@ impl CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -7842,6 +8446,102 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsLinkSetupF } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsMultibanco`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + None, +} + +impl CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + 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")] @@ -8075,9 +8775,7 @@ impl CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -8163,6 +8861,38 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPromptpayS } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsRevolutPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + Manual, +} + +impl CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + /// 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")] @@ -8175,9 +8905,7 @@ impl CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -8212,12 +8940,8 @@ impl CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -8252,102 +8976,166 @@ pub enum CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage { Pl, } -impl CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage { +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 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 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 { - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::De => "de", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::En => "en", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Es => "es", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Fr => "fr", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::It => "it", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Nl => "nl", - CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage::Pl => "pl", + CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage { +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 CreatePaymentIntentPaymentMethodOptionsSofortPreferredLanguage { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { fn default() -> Self { - Self::De + Self::None } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSofort`'s `setup_future_usage` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsTwint`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { +pub enum CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { None, - OffSession, } -impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { +impl CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage::None => "none", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { fn default() -> Self { Self::None } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { - None, +pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, } -impl CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { +impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { fn default() -> Self { - Self::None + Self::Checking } } @@ -8372,24 +9160,18 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPer } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -8400,6 +9182,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -8407,29 +9190,24 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPre pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -8450,24 +9228,18 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectio } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -8501,9 +9273,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountN self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested { fn default() -> Self { Self::Ach } @@ -8532,16 +9302,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferre } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed -{ +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 -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { fn default() -> Self { Self::Fastest } @@ -8560,12 +9326,8 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => "on_session", } } } @@ -8581,9 +9343,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountS self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage { fn default() -> Self { Self::None } @@ -8619,9 +9379,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountV self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -8746,9 +9504,7 @@ impl FundingInstructionsBankTransferFinancialAddressSupportedNetworks { match self { FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Ach => "ach", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Bacs => "bacs", - FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => { - "domestic_wire_us" - } + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => "domestic_wire_us", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Fps => "fps", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Sepa => "sepa", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Spei => "spei", @@ -8979,21 +9735,11 @@ pub enum PaymentIntentNextActionDisplayBankTransferInstructionsType { 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" - } + 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", } } } @@ -9027,9 +9773,7 @@ impl PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -9101,9 +9845,7 @@ impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -9138,9 +9880,7 @@ impl PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none", - PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => { - "off_session" - } + PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => "off_session", PaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => "on_session", } } @@ -9163,6 +9903,42 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsAuBecsDebitSetup } } +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsBacsDebit`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { + None, + OffSession, + OnSession, +} + +impl PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none", + PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session", + PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { + 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")] @@ -9236,6 +10012,7 @@ pub enum PaymentIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -9252,6 +10029,7 @@ impl PaymentIntentPaymentMethodOptionsCardNetwork { PaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners", PaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover", PaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + PaymentIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", PaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac", PaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", PaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -9290,9 +10068,7 @@ pub enum PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { impl PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => { - "if_available" - } + PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available", PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never", } } @@ -9326,9 +10102,7 @@ pub enum PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { impl PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => { - "if_available" - } + PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available", PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never", } } @@ -9345,9 +10119,7 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestIncrement self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -9603,15 +10375,9 @@ pub enum PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule impl PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => { - "combined" - } - PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => { - "interval" - } - PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => { - "sporadic" - } + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => "combined", + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => "interval", + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => "sporadic", } } } @@ -9627,9 +10393,7 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDe self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule { fn default() -> Self { Self::Combined } @@ -9646,12 +10410,8 @@ pub enum PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType impl PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => { - "business" - } - PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => { - "personal" - } + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => "business", + PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => "personal", } } } @@ -9667,14 +10427,76 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDe self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { fn default() -> Self { Self::Business } } +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// 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")] @@ -9754,12 +10576,8 @@ pub enum PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed impl PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => { - "fastest" - } - PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => { - "standard" - } + PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => "fastest", + PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => "standard", } } } @@ -9775,9 +10593,7 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsUsBankAccountPreferr self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { fn default() -> Self { Self::Fastest } @@ -9796,12 +10612,8 @@ impl PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none", - PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => { - "off_session" - } - PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => { - "on_session" - } + PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => "off_session", + PaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => "on_session", } } } @@ -9835,13 +10647,9 @@ pub enum PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod { impl PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => { - "automatic" - } + PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } @@ -10169,37 +10977,67 @@ impl std::default::Default for PaymentMethodOptionsAlipaySetupFutureUsage { } } -/// An enum representing the possible values of an `PaymentMethodOptionsBacsDebit`'s `setup_future_usage` field. +/// An enum representing the possible values of an `PaymentMethodOptionsAmazonPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsAmazonPayCaptureMethod { + Manual, +} + +impl PaymentMethodOptionsAmazonPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsAmazonPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for PaymentMethodOptionsAmazonPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsAmazonPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsAmazonPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `PaymentMethodOptionsAmazonPay`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodOptionsBacsDebitSetupFutureUsage { +pub enum PaymentMethodOptionsAmazonPaySetupFutureUsage { None, OffSession, - OnSession, } -impl PaymentMethodOptionsBacsDebitSetupFutureUsage { +impl PaymentMethodOptionsAmazonPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - PaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none", - PaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session", - PaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session", + PaymentMethodOptionsAmazonPaySetupFutureUsage::None => "none", + PaymentMethodOptionsAmazonPaySetupFutureUsage::OffSession => "off_session", } } } -impl AsRef for PaymentMethodOptionsBacsDebitSetupFutureUsage { +impl AsRef for PaymentMethodOptionsAmazonPaySetupFutureUsage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodOptionsBacsDebitSetupFutureUsage { +impl std::fmt::Display for PaymentMethodOptionsAmazonPaySetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodOptionsBacsDebitSetupFutureUsage { +impl std::default::Default for PaymentMethodOptionsAmazonPaySetupFutureUsage { fn default() -> Self { Self::None } @@ -10506,14 +11344,10 @@ impl PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba", PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban", PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa", - PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => { - "sort_code" - } + PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => "sort_code", PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei", PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift", - PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => { - "zengin" - } + PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => "zengin", } } } @@ -10529,9 +11363,7 @@ impl std::fmt::Display for PaymentMethodOptionsCustomerBalanceBankTransferReques self.as_str().fmt(f) } } -impl std::default::Default - for PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::default::Default for PaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -10551,21 +11383,11 @@ pub enum PaymentMethodOptionsCustomerBalanceBankTransferType { 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" - } + 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", } } } @@ -10877,6 +11699,38 @@ impl std::default::Default for PaymentMethodOptionsKonbiniSetupFutureUsage { } } +/// An enum representing the possible values of an `PaymentMethodOptionsMultibanco`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsMultibancoSetupFutureUsage { + None, +} + +impl PaymentMethodOptionsMultibancoSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsMultibancoSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for PaymentMethodOptionsMultibancoSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsMultibancoSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsMultibancoSetupFutureUsage { + 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")] @@ -11103,6 +11957,72 @@ impl std::default::Default for PaymentMethodOptionsPromptpaySetupFutureUsage { } } +/// An enum representing the possible values of an `PaymentMethodOptionsRevolutPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsRevolutPayCaptureMethod { + Manual, +} + +impl PaymentMethodOptionsRevolutPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsRevolutPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for PaymentMethodOptionsRevolutPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsRevolutPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsRevolutPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `PaymentMethodOptionsRevolutPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsRevolutPaySetupFutureUsage { + None, + OffSession, +} + +impl PaymentMethodOptionsRevolutPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", + PaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for PaymentMethodOptionsRevolutPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsRevolutPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsRevolutPaySetupFutureUsage { + 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")] @@ -11158,24 +12078,56 @@ pub enum PaymentMethodOptionsSofortSetupFutureUsage { impl PaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - PaymentMethodOptionsSofortSetupFutureUsage::None => "none", - PaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", + PaymentMethodOptionsSofortSetupFutureUsage::None => "none", + PaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef 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 `PaymentMethodOptionsTwint`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsTwintSetupFutureUsage { + None, +} + +impl PaymentMethodOptionsTwintSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsTwintSetupFutureUsage::None => "none", } } } -impl AsRef for PaymentMethodOptionsSofortSetupFutureUsage { +impl AsRef for PaymentMethodOptionsTwintSetupFutureUsage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodOptionsSofortSetupFutureUsage { +impl std::fmt::Display for PaymentMethodOptionsTwintSetupFutureUsage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodOptionsSofortSetupFutureUsage { +impl std::default::Default for PaymentMethodOptionsTwintSetupFutureUsage { fn default() -> Self { Self::None } @@ -11281,6 +12233,42 @@ impl std::default::Default for PaymentMethodOptionsZipSetupFutureUsage { } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodData`'s `allow_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl UpdatePaymentIntentPaymentMethodDataAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodDataAllowRedisplay::Always => "always", + UpdatePaymentIntentPaymentMethodDataAllowRedisplay::Limited => "limited", + UpdatePaymentIntentPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodDataAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodDataAllowRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodDataAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + /// 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")] @@ -11318,57 +12306,29 @@ pub enum UpdatePaymentIntentPaymentMethodDataEpsBank { impl UpdatePaymentIntentPaymentMethodDataEpsBank { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => { - "arzte_und_apotheker_bank" - } - UpdatePaymentIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => { - "austrian_anadi_bank_ag" - } + 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::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::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::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::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", UpdatePaymentIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank", UpdatePaymentIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag", - UpdatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + UpdatePaymentIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", UpdatePaymentIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag", UpdatePaymentIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien", UpdatePaymentIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -11611,9 +12571,7 @@ impl UpdatePaymentIntentPaymentMethodDataP24Bank { UpdatePaymentIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy", UpdatePaymentIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole", UpdatePaymentIntentPaymentMethodDataP24Bank::Envelobank => "envelobank", - UpdatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => { - "etransfer_pocztowy24" - } + UpdatePaymentIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", UpdatePaymentIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank", UpdatePaymentIntentPaymentMethodDataP24Bank::Ideabank => "ideabank", UpdatePaymentIntentPaymentMethodDataP24Bank::Ing => "ing", @@ -11623,12 +12581,8 @@ impl UpdatePaymentIntentPaymentMethodDataP24Bank { UpdatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay", UpdatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", UpdatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", - UpdatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => { - "santander_przelew24" - } - UpdatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + UpdatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", + UpdatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", UpdatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", UpdatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank", UpdatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -11709,6 +12663,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -11724,6 +12679,8 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -11734,6 +12691,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -11746,6 +12704,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::Affirm => "affirm", UpdatePaymentIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay", UpdatePaymentIntentPaymentMethodDataType::Alipay => "alipay", + UpdatePaymentIntentPaymentMethodDataType::AmazonPay => "amazon_pay", UpdatePaymentIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit", UpdatePaymentIntentPaymentMethodDataType::BacsDebit => "bacs_debit", UpdatePaymentIntentPaymentMethodDataType::Bancontact => "bancontact", @@ -11761,6 +12720,8 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::Klarna => "klarna", UpdatePaymentIntentPaymentMethodDataType::Konbini => "konbini", UpdatePaymentIntentPaymentMethodDataType::Link => "link", + UpdatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", + UpdatePaymentIntentPaymentMethodDataType::Multibanco => "multibanco", UpdatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", UpdatePaymentIntentPaymentMethodDataType::P24 => "p24", UpdatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -11771,6 +12732,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdatePaymentIntentPaymentMethodDataType::Sofort => "sofort", UpdatePaymentIntentPaymentMethodDataType::Swish => "swish", + UpdatePaymentIntentPaymentMethodDataType::Twint => "twint", UpdatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", UpdatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay", UpdatePaymentIntentPaymentMethodDataType::Zip => "zip", @@ -11806,12 +12768,8 @@ pub enum UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType { impl UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => { - "company" - } - UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", + UpdatePaymentIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -11892,16 +12850,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptio } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn default() -> Self { Self::Combined } @@ -11930,16 +12884,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptio } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -11958,12 +12908,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsAcssDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -11997,15 +12943,9 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { impl UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => { - "automatic" - } - UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => { - "instant" - } - UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", + UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", + UpdatePaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -12101,9 +13041,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -12119,9 +13057,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearp self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { fn default() -> Self { Self::Manual } @@ -12153,9 +13089,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearp self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { fn default() -> Self { Self::None } @@ -12173,9 +13107,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -12197,6 +13129,72 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAlipaySetu } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAmazonPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + Manual, +} + +impl UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsAmazonPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + None, + OffSession, +} + +impl UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage::None => "none", + UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsAmazonPaySetupFutureUsage { + 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")] @@ -12210,12 +13208,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsAuBecsDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -12250,12 +13244,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsBacsDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -12327,9 +13317,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -12396,12 +13384,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage::OnSession => "on_session", } } } @@ -12497,9 +13481,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -12533,9 +13515,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -12573,9 +13553,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -12609,9 +13587,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -12627,9 +13603,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardMandateOpt self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { fn default() -> Self { Self::India } @@ -12644,6 +13618,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -12656,12 +13631,11 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardNetwork { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex", - UpdatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => { - "cartes_bancaires" - } + UpdatePaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", UpdatePaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -12689,6 +13663,40 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardNetwor } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardPresentRouting`'s `requested_priority` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + Domestic, + International, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority::Domestic => "domestic", + UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority::International => "international", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn default() -> Self { + Self::Domestic + } +} + /// 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")] @@ -12717,9 +13725,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestExt self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn default() -> Self { Self::IfAvailable } @@ -12748,16 +13754,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementa } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -12774,9 +13776,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { impl UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => { - "if_available" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", } } @@ -12810,9 +13810,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { impl UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => { - "if_available" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } @@ -12848,12 +13846,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -12888,9 +13882,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session", UpdatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", } } @@ -12958,9 +13950,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecu self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -12994,24 +13984,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIn } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -13028,12 +14012,8 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicat impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => { - "low_risk" - } - UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => { - "none" - } + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", } } } @@ -13044,16 +14024,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemp } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn default() -> Self { Self::LowRisk } @@ -13062,8 +14038,7 @@ impl std::default::Default /// 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 -{ +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -13091,24 +14066,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -13198,12 +14167,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session", } } } @@ -13252,24 +14217,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequested } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -13309,9 +14268,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanc self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { fn default() -> Self { Self::EuBankTransfer } @@ -13327,9 +14284,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -13377,9 +14332,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanc self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage { fn default() -> Self { Self::None } @@ -13525,9 +14478,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -13637,6 +14588,8 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { EnPl, #[serde(rename = "en-PT")] EnPt, + #[serde(rename = "en-RO")] + EnRo, #[serde(rename = "en-SE")] EnSe, #[serde(rename = "en-US")] @@ -13669,6 +14622,8 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { PlPl, #[serde(rename = "pt-PT")] PtPt, + #[serde(rename = "ro-RO")] + RoRo, #[serde(rename = "sv-FI")] SvFi, #[serde(rename = "sv-SE")] @@ -13704,6 +14659,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnNz => "en-NZ", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPl => "en-PL", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnPt => "en-PT", + UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnRo => "en-RO", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnSe => "en-SE", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EnUs => "en-US", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::EsEs => "es-ES", @@ -13720,6 +14676,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale { UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::NlNl => "nl-NL", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PlPl => "pl-PL", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::PtPt => "pt-PT", + UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::RoRo => "ro-RO", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvFi => "sv-FI", UpdatePaymentIntentPaymentMethodOptionsKlarnaPreferredLocale::SvSe => "sv-SE", } @@ -13851,9 +14808,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -13875,6 +14830,102 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsLinkSetupF } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsMultibanco`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage { + 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")] @@ -14108,9 +15159,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -14196,6 +15245,38 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPromptpayS } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsRevolutPay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + Manual, +} + +impl UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsRevolutPayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + /// 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")] @@ -14208,9 +15289,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -14245,12 +15324,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsSepaDebitSetupFutureUsage::OnSession => "on_session", } } } @@ -14328,9 +15403,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -14384,6 +15457,72 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSwishSetup } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsTwint`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsTwintSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// 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")] @@ -14405,24 +15544,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPer } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -14433,6 +15566,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -14440,29 +15574,24 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPre pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -14483,24 +15612,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectio } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -14534,9 +15657,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountN self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworksRequested { fn default() -> Self { Self::Ach } @@ -14565,16 +15686,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferre } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed -{ +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 -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { fn default() -> Self { Self::Fastest } @@ -14593,12 +15710,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => { - "off_session" - } - UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => { - "on_session" - } + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OffSession => "off_session", + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage::OnSession => "on_session", } } } @@ -14614,9 +15727,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountS self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountSetupFutureUsage { fn default() -> Self { Self::None } @@ -14652,9 +15763,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountV self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } diff --git a/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs b/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs index 029b162ee..dcb4dc9cd 100644 --- a/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs +++ b/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::params::{Timestamp}; use serde::{Deserialize, Serialize}; -use crate::params::Timestamp; - /// The resource representing a Stripe "PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode { + /// The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. pub hosted_instructions_url: String, @@ -20,6 +20,7 @@ pub struct PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionCashappQrCode { + /// The date (unix timestamp) when the QR code expires. pub expires_at: Timestamp, diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index 01a778d58..6743cf524 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PaymentLinkId; +use crate::ids::{PaymentLinkId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable}; -use crate::resources::{ - Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, - InvoiceSettingRenderingOptions, ShippingRate, SubscriptionsTrialsResourceTrialSettings, TaxId, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, InvoiceSettingRenderingOptions, ShippingRate, SubscriptionsTrialsResourceTrialSettings, TaxId}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentLink". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLink { /// Unique identifier for the object. @@ -42,6 +38,8 @@ pub struct PaymentLink { pub automatic_tax: PaymentLinksResourceAutomaticTax, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. pub billing_address_collection: PaymentLinkBillingAddressCollection, /// When set, provides configuration to gather active consent from customers. @@ -89,6 +87,8 @@ pub struct PaymentLink { pub payment_intent_data: Option, /// Configuration for collecting a payment method during checkout. + /// + /// Defaults to `always`. pub payment_method_collection: PaymentLinkPaymentMethodCollection, /// The list of payment method types that customers can use. @@ -125,10 +125,12 @@ pub struct PaymentLink { } impl PaymentLink { + /// Returns a list of your payment links. - pub fn list(client: &Client, params: &ListPaymentLinks<'_>) -> Response> { - client.get_query("/payment_links", params) - } +pub fn list(client: &Client, params: &ListPaymentLinks<'_>) -> Response> { + client.get_query("/payment_links", params) +} + /// Creates a payment link. pub fn create(client: &Client, params: CreatePaymentLink<'_>) -> Response { @@ -142,11 +144,7 @@ impl PaymentLink { } /// Updates a payment link. - pub fn update( - client: &Client, - id: &PaymentLinkId, - params: UpdatePaymentLink<'_>, - ) -> Response { + pub fn update(client: &Client, id: &PaymentLinkId, params: UpdatePaymentLink<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/payment_links/{}", id), ¶ms) } @@ -164,6 +162,7 @@ impl Object for PaymentLink { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceAfterCompletion { + #[serde(skip_serializing_if = "Option::is_none")] pub hosted_confirmation: Option, @@ -177,6 +176,7 @@ pub struct PaymentLinksResourceAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -189,18 +189,21 @@ pub struct PaymentLinksResourceAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletionBehaviorConfirmationPage { + /// The custom message that is displayed to the customer after the purchase is complete. pub custom_message: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletionBehaviorRedirect { + /// The URL the customer will be redirected to after the purchase is complete. pub url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceConsentCollection { + /// Settings related to the payment method reuse text shown in the Checkout UI. pub payment_method_reuse_agreement: Option, @@ -215,6 +218,7 @@ pub struct PaymentLinksResourceConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFields { + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -243,6 +247,7 @@ pub struct PaymentLinksResourceCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -251,6 +256,7 @@ pub struct PaymentLinksResourceCustomFieldsDropdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFieldsDropdownOption { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -264,6 +270,7 @@ pub struct PaymentLinksResourceCustomFieldsDropdownOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFieldsLabel { + /// Custom text for the label, displayed to the customer. /// /// Up to 50 characters. @@ -276,6 +283,7 @@ pub struct PaymentLinksResourceCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFieldsNumeric { + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -285,6 +293,7 @@ pub struct PaymentLinksResourceCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFieldsText { + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -294,6 +303,7 @@ pub struct PaymentLinksResourceCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomText { + /// Custom text that should be displayed after the payment confirmation button. pub after_submit: Option, @@ -309,12 +319,14 @@ pub struct PaymentLinksResourceCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomTextPosition { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceInvoiceCreation { + /// Enable creating an invoice on successful payment. pub enabled: bool, @@ -326,6 +338,7 @@ pub struct PaymentLinksResourceInvoiceCreation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceInvoiceSettings { + /// The account tax IDs associated with the invoice. pub account_tax_ids: Option>>, @@ -356,6 +369,7 @@ pub struct PaymentLinksResourceInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -365,6 +379,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePaymentIntentData { + /// Indicates when the funds will be captured from the customer's account. pub capture_method: Option, @@ -379,15 +394,12 @@ pub struct PaymentLinksResourcePaymentIntentData { /// Indicates that you intend to make future payments with the payment method collected during checkout. pub setup_future_usage: Option, - /// Extra information about the payment. - /// - /// This will appear on your customer's statement when this payment succeeds in creating a charge. + /// For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. pub statement_descriptor: Option, - /// Provides information about the charge that customers see on their statements. + /// For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. /// - /// 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. + /// Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. pub statement_descriptor_suffix: Option, /// A string that identifies the resulting payment as part of a group. @@ -398,6 +410,7 @@ pub struct PaymentLinksResourcePaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -406,17 +419,20 @@ pub struct PaymentLinksResourcePaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePhoneNumberCollection { + /// If `true`, a phone number will be collected during checkout. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceRestrictions { + pub completed_sessions: PaymentLinksResourceCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletedSessions { + /// The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. pub count: u64, @@ -426,6 +442,7 @@ pub struct PaymentLinksResourceCompletedSessions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. /// /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. @@ -434,6 +451,7 @@ pub struct PaymentLinksResourceShippingAddressCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceShippingOption { + /// A non-negative integer in cents representing how much to charge. pub shipping_amount: i64, @@ -443,6 +461,7 @@ pub struct PaymentLinksResourceShippingOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -462,17 +481,20 @@ pub struct PaymentLinksResourceSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceSubscriptionDataInvoiceSettings { + pub issuer: ConnectAccountReference, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceTaxIdCollection { + /// Indicates whether tax ID collection is enabled for the session. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account. /// /// By default, the entire amount is transferred to the destination. @@ -485,6 +507,7 @@ pub struct PaymentLinksResourceTransferData { /// The parameters for `PaymentLink::create`. #[derive(Clone, Debug, Serialize)] pub struct CreatePaymentLink<'a> { + /// Behavior after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] pub after_completion: Option, @@ -511,6 +534,8 @@ pub struct CreatePaymentLink<'a> { pub automatic_tax: Option, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, @@ -575,7 +600,8 @@ pub struct CreatePaymentLink<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -662,6 +688,7 @@ impl<'a> CreatePaymentLink<'a> { /// The parameters for `PaymentLink::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPaymentLinks<'a> { + /// Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -705,12 +732,12 @@ impl<'a> ListPaymentLinks<'a> { impl Paginable for ListPaymentLinks<'_> { type O = PaymentLink; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `PaymentLink::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePaymentLink<'a> { + /// Whether the payment link's `url` is active. /// /// If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. @@ -730,6 +757,8 @@ pub struct UpdatePaymentLink<'a> { pub automatic_tax: Option, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, @@ -781,7 +810,8 @@ pub struct UpdatePaymentLink<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -804,6 +834,10 @@ pub struct UpdatePaymentLink<'a> { /// There must be at least one line item with a recurring price to use `subscription_data`. #[serde(skip_serializing_if = "Option::is_none")] pub subscription_data: Option, + + /// Controls tax ID collection during checkout. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_id_collection: Option, } impl<'a> UpdatePaymentLink<'a> { @@ -828,12 +862,14 @@ impl<'a> UpdatePaymentLink<'a> { restrictions: Default::default(), shipping_address_collection: Default::default(), subscription_data: Default::default(), + tax_id_collection: Default::default(), } } } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletion { + /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] pub hosted_confirmation: Option, @@ -851,6 +887,7 @@ pub struct CreatePaymentLinkAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -864,12 +901,12 @@ pub struct CreatePaymentLinkAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkConsentCollection { + /// Determines the display of payment method reuse agreement text in the UI. /// /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -886,6 +923,7 @@ pub struct CreatePaymentLinkConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFields { + /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -919,6 +957,7 @@ pub struct CreatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -938,6 +977,7 @@ pub struct CreatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -948,6 +988,7 @@ pub struct CreatePaymentLinkInvoiceCreation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkLineItems { + /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. #[serde(skip_serializing_if = "Option::is_none")] pub adjustable_quantity: Option, @@ -961,6 +1002,7 @@ pub struct CreatePaymentLinkLineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkPaymentIntentData { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -992,16 +1034,17 @@ pub struct CreatePaymentLinkPaymentIntentData { #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, - /// Extra information about the payment. + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// This will appear on your customer's statement when this payment succeeds in creating a charge. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option, - /// Provides information about the charge that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option, @@ -1014,18 +1057,21 @@ pub struct CreatePaymentLinkPaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkPhoneNumberCollection { + /// Set to `true` to enable phone number collection. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkRestrictions { + /// Configuration for the `completed_sessions` restriction type. pub completed_sessions: CreatePaymentLinkRestrictionsCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -1035,6 +1081,7 @@ pub struct CreatePaymentLinkShippingAddressCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkShippingOptions { + /// The ID of the Shipping Rate to use for this shipping option. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_rate: Option, @@ -1042,6 +1089,7 @@ pub struct CreatePaymentLinkShippingOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -1072,12 +1120,16 @@ pub struct CreatePaymentLinkSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkTaxIdCollection { - /// Set to `true` to enable tax ID collection. + + /// Enable tax ID collection during checkout. + /// + /// Defaults to `false`. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkTransferData { + /// The amount that will be transferred automatically when a charge succeeds. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1092,6 +1144,7 @@ pub struct CreatePaymentLinkTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAfterCompletion { + /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] pub hosted_confirmation: Option, @@ -1109,6 +1162,7 @@ pub struct UpdatePaymentLinkAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -1122,6 +1176,7 @@ pub struct UpdatePaymentLinkAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFields { + /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -1155,6 +1210,7 @@ pub struct UpdatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -1174,6 +1230,7 @@ pub struct UpdatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -1184,6 +1241,7 @@ pub struct UpdatePaymentLinkInvoiceCreation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkLineItems { + /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. #[serde(skip_serializing_if = "Option::is_none")] pub adjustable_quantity: Option, @@ -1198,6 +1256,7 @@ pub struct UpdatePaymentLinkLineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkPaymentIntentData { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. @@ -1211,16 +1270,17 @@ pub struct UpdatePaymentLinkPaymentIntentData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// Extra information about the payment. + /// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. /// - /// This will appear on your customer's statement when this payment succeeds in creating a charge. + /// This value overrides the account's default statement descriptor. + /// Setting this value for a card charge returns an error. + /// For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option, - /// Provides information about the charge that customers see on their statements. + /// Provides information about a card charge. /// - /// 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. + /// Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option, @@ -1233,12 +1293,14 @@ pub struct UpdatePaymentLinkPaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkRestrictions { + /// Configuration for the `completed_sessions` restriction type. pub completed_sessions: UpdatePaymentLinkRestrictionsCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -1248,6 +1310,7 @@ pub struct UpdatePaymentLinkShippingAddressCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionData { + /// All invoices will be billed using the specified settings. #[serde(skip_serializing_if = "Option::is_none")] pub invoice_settings: Option, @@ -1264,8 +1327,18 @@ pub struct UpdatePaymentLinkSubscriptionData { pub trial_settings: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentLinkTaxIdCollection { + + /// Enable tax ID collection during checkout. + /// + /// Defaults to `false`. + pub enabled: bool, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] pub custom_message: Option, @@ -1273,6 +1346,7 @@ pub struct CreatePaymentLinkAfterCompletionHostedConfirmation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletionRedirect { + /// The URL the customer will be redirected to after the purchase is complete. /// /// You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. @@ -1281,6 +1355,7 @@ pub struct CreatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1292,6 +1367,7 @@ pub struct CreatePaymentLinkAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. @@ -1301,6 +1377,7 @@ pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1309,6 +1386,7 @@ pub struct CreatePaymentLinkCustomFieldsDropdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsLabel { + /// Custom text for the label, displayed to the customer. /// /// Up to 50 characters. @@ -1321,6 +1399,7 @@ pub struct CreatePaymentLinkCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsNumeric { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -1332,6 +1411,7 @@ pub struct CreatePaymentLinkCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsText { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -1343,30 +1423,35 @@ pub struct CreatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1406,6 +1491,7 @@ pub struct CreatePaymentLinkInvoiceCreationInvoiceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkLineItemsAdjustableQuantity { + /// Set to true if the quantity can be adjusted to any non-negative Integer. pub enabled: bool, @@ -1426,12 +1512,14 @@ pub struct CreatePaymentLinkLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkRestrictionsCompletedSessions { + /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. pub limit: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -1441,12 +1529,14 @@ pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] pub custom_message: Option, @@ -1454,6 +1544,7 @@ pub struct UpdatePaymentLinkAfterCompletionHostedConfirmation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAfterCompletionRedirect { + /// The URL the customer will be redirected to after the purchase is complete. /// /// You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. @@ -1462,6 +1553,7 @@ pub struct UpdatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1473,6 +1565,7 @@ pub struct UpdatePaymentLinkAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1481,6 +1574,7 @@ pub struct UpdatePaymentLinkCustomFieldsDropdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsLabel { + /// Custom text for the label, displayed to the customer. /// /// Up to 50 characters. @@ -1493,6 +1587,7 @@ pub struct UpdatePaymentLinkCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsNumeric { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -1504,6 +1599,7 @@ pub struct UpdatePaymentLinkCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsText { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -1515,30 +1611,35 @@ pub struct UpdatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1578,6 +1679,7 @@ pub struct UpdatePaymentLinkInvoiceCreationInvoiceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkLineItemsAdjustableQuantity { + /// Set to true if the quantity can be adjusted to any non-negative Integer. pub enabled: bool, @@ -1598,12 +1700,14 @@ pub struct UpdatePaymentLinkLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkRestrictionsCompletedSessions { + /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. pub limit: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -1613,12 +1717,14 @@ pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1632,19 +1738,21 @@ pub struct CreatePaymentLinkCustomFieldsDropdownOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataCustomFields { + /// The name of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 40 characters. pub name: String, /// The value of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 140 characters. pub value: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1656,18 +1764,19 @@ pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1679,13 +1788,14 @@ pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1699,19 +1809,21 @@ pub struct UpdatePaymentLinkCustomFieldsDropdownOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataCustomFields { + /// The name of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 40 characters. pub name: String, /// The value of the custom field. /// - /// This may be up to 30 characters. + /// This may be up to 140 characters. pub value: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1723,18 +1835,19 @@ pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1746,9 +1859,9 @@ pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } /// An enum representing the possible values of an `CreatePaymentLinkAfterCompletion`'s `type` field. @@ -1832,9 +1945,7 @@ impl CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { pub fn as_str(self) -> &'static str { match self { CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", - CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { - "hidden" - } + CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => "hidden", } } } @@ -1850,9 +1961,7 @@ impl std::fmt::Display for CreatePaymentLinkConsentCollectionPaymentMethodReuseA self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::default::Default for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { fn default() -> Self { Self::Auto } @@ -2052,16 +2161,12 @@ impl AsRef for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsA } } -impl std::fmt::Display - for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::fmt::Display for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::default::Default for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn default() -> Self { Self::ExcludeTax } @@ -2159,6 +2264,8 @@ pub enum CreatePaymentLinkPaymentMethodTypes { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -2168,8 +2275,10 @@ pub enum CreatePaymentLinkPaymentMethodTypes { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, + Zip, } impl CreatePaymentLinkPaymentMethodTypes { @@ -2193,6 +2302,8 @@ impl CreatePaymentLinkPaymentMethodTypes { CreatePaymentLinkPaymentMethodTypes::Klarna => "klarna", CreatePaymentLinkPaymentMethodTypes::Konbini => "konbini", CreatePaymentLinkPaymentMethodTypes::Link => "link", + CreatePaymentLinkPaymentMethodTypes::Mobilepay => "mobilepay", + CreatePaymentLinkPaymentMethodTypes::Multibanco => "multibanco", CreatePaymentLinkPaymentMethodTypes::Oxxo => "oxxo", CreatePaymentLinkPaymentMethodTypes::P24 => "p24", CreatePaymentLinkPaymentMethodTypes::Paynow => "paynow", @@ -2202,8 +2313,10 @@ impl CreatePaymentLinkPaymentMethodTypes { CreatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", CreatePaymentLinkPaymentMethodTypes::Sofort => "sofort", CreatePaymentLinkPaymentMethodTypes::Swish => "swish", + CreatePaymentLinkPaymentMethodTypes::Twint => "twint", CreatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", CreatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", + CreatePaymentLinkPaymentMethodTypes::Zip => "zip", } } } @@ -3026,16 +3139,12 @@ impl AsRef for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMis } } -impl std::fmt::Display - for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::fmt::Display for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::default::Default for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn default() -> Self { Self::Cancel } @@ -3165,6 +3274,8 @@ pub enum PaymentLinkPaymentMethodTypes { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -3174,8 +3285,10 @@ pub enum PaymentLinkPaymentMethodTypes { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, + Zip, } impl PaymentLinkPaymentMethodTypes { @@ -3199,6 +3312,8 @@ impl PaymentLinkPaymentMethodTypes { PaymentLinkPaymentMethodTypes::Klarna => "klarna", PaymentLinkPaymentMethodTypes::Konbini => "konbini", PaymentLinkPaymentMethodTypes::Link => "link", + PaymentLinkPaymentMethodTypes::Mobilepay => "mobilepay", + PaymentLinkPaymentMethodTypes::Multibanco => "multibanco", PaymentLinkPaymentMethodTypes::Oxxo => "oxxo", PaymentLinkPaymentMethodTypes::P24 => "p24", PaymentLinkPaymentMethodTypes::Paynow => "paynow", @@ -3208,8 +3323,10 @@ impl PaymentLinkPaymentMethodTypes { PaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", PaymentLinkPaymentMethodTypes::Sofort => "sofort", PaymentLinkPaymentMethodTypes::Swish => "swish", + PaymentLinkPaymentMethodTypes::Twint => "twint", PaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", PaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", + PaymentLinkPaymentMethodTypes::Zip => "zip", } } } @@ -4479,16 +4596,12 @@ impl AsRef for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsA } } -impl std::fmt::Display - for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::fmt::Display for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay -{ +impl std::default::Default for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay { fn default() -> Self { Self::ExcludeTax } @@ -4516,6 +4629,8 @@ pub enum UpdatePaymentLinkPaymentMethodTypes { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -4525,8 +4640,10 @@ pub enum UpdatePaymentLinkPaymentMethodTypes { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, + Zip, } impl UpdatePaymentLinkPaymentMethodTypes { @@ -4550,6 +4667,8 @@ impl UpdatePaymentLinkPaymentMethodTypes { UpdatePaymentLinkPaymentMethodTypes::Klarna => "klarna", UpdatePaymentLinkPaymentMethodTypes::Konbini => "konbini", UpdatePaymentLinkPaymentMethodTypes::Link => "link", + UpdatePaymentLinkPaymentMethodTypes::Mobilepay => "mobilepay", + UpdatePaymentLinkPaymentMethodTypes::Multibanco => "multibanco", UpdatePaymentLinkPaymentMethodTypes::Oxxo => "oxxo", UpdatePaymentLinkPaymentMethodTypes::P24 => "p24", UpdatePaymentLinkPaymentMethodTypes::Paynow => "paynow", @@ -4559,8 +4678,10 @@ impl UpdatePaymentLinkPaymentMethodTypes { UpdatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", UpdatePaymentLinkPaymentMethodTypes::Sofort => "sofort", UpdatePaymentLinkPaymentMethodTypes::Swish => "swish", + UpdatePaymentLinkPaymentMethodTypes::Twint => "twint", UpdatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", UpdatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", + UpdatePaymentLinkPaymentMethodTypes::Zip => "zip", } } } @@ -5383,16 +5504,12 @@ impl AsRef for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMis } } -impl std::fmt::Display - for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::fmt::Display for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::default::Default for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn default() -> Self { Self::Cancel } diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 88e7c5060..1a66cdf3c 100644 --- a/src/resources/generated/payment_method.rs +++ b/src/resources/generated/payment_method.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, PaymentMethodId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - Address, BillingDetails, Charge, Customer, PaymentMethodCardPresentNetworks, RadarRadarOptions, - SetupAttempt, -}; +use crate::resources::{BillingDetails, CardDetails, CardPresent, Customer, PaymentFlowsPrivatePaymentMethodsAlipay, PaymentMethodAcssDebit, PaymentMethodAffirm, PaymentMethodAfterpayClearpay, PaymentMethodAmazonPay, PaymentMethodAuBecsDebit, PaymentMethodBacsDebit, PaymentMethodBancontact, PaymentMethodBlik, PaymentMethodBoleto, PaymentMethodCashapp, PaymentMethodCustomerBalance, PaymentMethodEps, PaymentMethodFpx, PaymentMethodGiropay, PaymentMethodGrabpay, PaymentMethodIdeal, PaymentMethodInteracPresent, PaymentMethodKlarna, PaymentMethodKonbini, PaymentMethodLink, PaymentMethodMobilepay, PaymentMethodMultibanco, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, PaymentMethodTwint, PaymentMethodUsBankAccount, PaymentMethodWechatPay, PaymentMethodZip, RadarRadarOptions}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethod". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethod { /// Unique identifier for the object. @@ -32,6 +28,16 @@ pub struct PaymentMethod { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to “unspecified”. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -106,6 +112,12 @@ pub struct PaymentMethod { /// This can be useful for storing additional information about the object in a structured format. pub metadata: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -139,6 +151,9 @@ pub struct PaymentMethod { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -157,12 +172,14 @@ pub struct PaymentMethod { } impl PaymentMethod { + /// Returns a list of PaymentMethods for Treasury flows. /// /// If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer’s PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. - pub fn list(client: &Client, params: &ListPaymentMethods<'_>) -> Response> { - client.get_query("/payment_methods", params) - } +pub fn list(client: &Client, params: &ListPaymentMethods<'_>) -> Response> { + client.get_query("/payment_methods", params) +} + /// Creates a PaymentMethod object. /// @@ -175,22 +192,14 @@ impl PaymentMethod { /// Retrieves a PaymentMethod object attached to the StripeAccount. /// /// To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer’s PaymentMethods](https://stripe.com/docs/api/payment_methods/customer). - pub fn retrieve( - client: &Client, - id: &PaymentMethodId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &PaymentMethodId, expand: &[&str]) -> Response { client.get_query(&format!("/payment_methods/{}", id), Expand { expand }) } /// Updates a PaymentMethod object. /// /// A PaymentMethod must be attached a customer to be updated. - pub fn update( - client: &Client, - id: &PaymentMethodId, - params: UpdatePaymentMethod<'_>, - ) -> Response { + pub fn update(client: &Client, id: &PaymentMethodId, params: UpdatePaymentMethod<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/payment_methods/{}", id), ¶ms) } @@ -206,630 +215,10 @@ impl Object for PaymentMethod { } } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentFlowsPrivatePaymentMethodsAlipay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAcssDebit { - /// Name of the bank associated with the bank account. - pub bank_name: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Institution number of the bank account. - pub institution_number: Option, - - /// Last four digits of the bank account number. - pub last4: Option, - - /// Transit number of the bank account. - pub transit_number: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAffirm {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAfterpayClearpay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAuBecsDebit { - /// Six-digit number identifying bank and branch associated with this bank account. - pub bsb_number: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Last four digits of the bank account number. - pub last4: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBacsDebit { - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Last four digits of the bank account number. - pub last4: Option, - - /// Sort code of the bank account. - /// - /// (e.g., `10-20-30`). - pub sort_code: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBancontact {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBlik {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBoleto { - /// Uniquely identifies the customer tax id (CNPJ or CPF). - pub tax_id: String, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CardDetails { - /// Card brand. - /// - /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub brand: String, - - /// Checks on Card address and CVC if provided. - pub checks: Option, - - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, - - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, - - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, - - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - #[serde(skip_serializing_if = "Option::is_none")] - pub fingerprint: Option, - - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: String, - - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, - - /// The name of the card's issuing bank. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: String, - - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, - - /// Contains details on how this Card may be used for 3D Secure authentication. - pub three_d_secure_usage: Option, - - /// If this Card is part of a card wallet, this contains the details of the card wallet. - pub wallet: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct Networks { - /// All available networks for the card. - pub available: Vec, - - /// The preferred network for co-branded cards. - /// - /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. - pub preferred: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardChecks { - /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub address_line1_check: Option, - - /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub address_postal_code_check: Option, - - /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub cvc_check: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CardPresent { - /// Card brand. - /// - /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub brand: Option, - - /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. - /// - /// May include alphanumeric characters, special characters and first/last name separator (`/`). - /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. - /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - pub cardholder_name: Option, - - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, - - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, - - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, - - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - pub fingerprint: Option, - - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: Option, - - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, - - /// The name of the card's issuing bank. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: Option, - - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, - - /// How card details were read in this transaction. - pub read_method: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletDetails { - #[serde(skip_serializing_if = "Option::is_none")] - pub amex_express_checkout: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub apple_pay: Option, - - /// (For tokenized numbers only.) The last four digits of the device account number. - pub dynamic_last4: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub google_pay: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub link: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub masterpass: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub samsung_pay: Option, - - /// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. - /// - /// An additional hash is included on the Wallet subhash with a name matching this value. - /// It contains additional information specific to the card wallet type. - #[serde(rename = "type")] - pub type_: WalletDetailsType, - - #[serde(skip_serializing_if = "Option::is_none")] - pub visa_checkout: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletAmexExpressCheckout {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletApplePay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletGooglePay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardWalletLink {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletMasterpass { - /// Owner's verified billing address. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub billing_address: Option
, - - /// Owner's verified email. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub email: Option, - - /// Owner's verified full name. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub name: Option, - - /// Owner's verified shipping address. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub shipping_address: Option
, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletSamsungPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletVisaCheckout { - /// Owner's verified billing address. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub billing_address: Option
, - - /// Owner's verified email. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub email: Option, - - /// Owner's verified full name. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub name: Option, - - /// Owner's verified shipping address. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub shipping_address: Option
, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCashapp { - /// A unique and immutable identifier assigned by Cash App to every buyer. - pub buyer_id: Option, - - /// A public identifier for buyers using Cash App. - pub cashtag: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCustomerBalance {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodEps { - /// The customer's bank. - /// - /// Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - pub bank: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodFpx { - /// Account holder type, if provided. - /// - /// Can be one of `individual` or `company`. - pub account_holder_type: Option, - - /// The customer's bank, if provided. - /// - /// Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. - pub bank: PaymentMethodFpxBank, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGiropay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGrabpay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodIdeal { - /// The customer's bank, if provided. - /// - /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - pub bank: Option, - - /// The Bank Identifier Code of the customer's bank, if the bank was provided. - pub bic: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodInteracPresent { - /// Card brand. - /// - /// Can be `interac`, `mastercard` or `visa`. - pub brand: Option, - - /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. - /// - /// May include alphanumeric characters, special characters and first/last name separator (`/`). - /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. - /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - pub cardholder_name: Option, - - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, - - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, - - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, - - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - pub fingerprint: Option, - - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: Option, - - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, - - /// The name of the card's issuing bank. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: Option, - - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, - - /// EMV tag 5F2D. - /// - /// Preferred languages specified by the integrated circuit chip. - pub preferred_locales: Option>, - - /// How card details were read in this transaction. - pub read_method: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKlarna { - /// The customer's date of birth, if provided. - pub dob: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { - /// The day of birth, between 1 and 31. - pub day: Option, - - /// The month of birth, between 1 and 12. - pub month: Option, - - /// The four-digit year of birth. - pub year: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKonbini {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodLink { - /// Account owner's email address. - pub email: Option, - - /// [Deprecated] This is a legacy parameter that no longer has any function. - #[serde(skip_serializing_if = "Option::is_none")] - pub persistent_token: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOxxo {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodP24 { - /// The customer's bank, if provided. - pub bank: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPaynow {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPaypal { - /// Owner's email. - /// - /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub payer_email: Option, - - /// PayPal account PayerID. - /// - /// This identifier uniquely identifies the PayPal customer. - pub payer_id: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPix {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPromptpay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodRevolutPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSepaDebit { - /// Bank code of bank associated with the bank account. - pub bank_code: Option, - - /// Branch code of bank associated with the bank account. - pub branch_code: Option, - - /// Two-letter ISO code representing the country the bank account is located in. - pub country: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Information about the object that generated this PaymentMethod. - pub generated_from: Option, - - /// Last four characters of the IBAN. - pub last4: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSofort { - /// Two-letter ISO code representing the country the bank account is located in. - pub country: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSwish {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccount { - /// Account holder type: individual or company. - pub account_holder_type: Option, - - /// Account type: checkings or savings. - /// - /// Defaults to checking if omitted. - pub account_type: Option, - - /// The name of the bank. - pub bank_name: Option, - - /// The ID of the Financial Connections Account used to create the payment method. - pub financial_connections_account: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Last four digits of the bank account number. - pub last4: Option, - - /// Contains information about US bank account networks that can be used. - pub networks: Option, - - /// Routing number of the bank account. - pub routing_number: Option, - - /// Contains information about the future reusability of this PaymentMethod. - pub status_details: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccountStatusDetails { - #[serde(skip_serializing_if = "Option::is_none")] - pub blocked: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccountBlocked { - /// The ACH network code that resulted in this block. - pub network_code: Option, - - /// The reason why this PaymentMethod's fingerprint has been blocked. - pub reason: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodWechatPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodZip {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SepaDebitGeneratedFrom { - /// The ID of the Charge that generated this PaymentMethod, if any. - pub charge: Option>, - - /// The ID of the SetupAttempt that generated this PaymentMethod, if any. - pub setup_attempt: Option>, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ThreeDSecureUsage { - /// Whether 3D Secure is supported on this card. - pub supported: bool, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UsBankAccountNetworks { - /// The preferred network. - pub preferred: Option, - - /// All supported networks. - pub supported: Vec, -} - /// The parameters for `PaymentMethod::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreatePaymentMethod<'a> { + /// 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, @@ -846,6 +235,17 @@ pub struct CreatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + /// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -938,6 +338,14 @@ pub struct CreatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -988,6 +396,10 @@ pub struct CreatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -1016,6 +428,8 @@ impl<'a> CreatePaymentMethod<'a> { affirm: Default::default(), afterpay_clearpay: Default::default(), alipay: Default::default(), + allow_redisplay: Default::default(), + amazon_pay: Default::default(), au_becs_debit: Default::default(), bacs_debit: Default::default(), bancontact: Default::default(), @@ -1037,6 +451,8 @@ impl<'a> CreatePaymentMethod<'a> { konbini: Default::default(), link: Default::default(), metadata: Default::default(), + mobilepay: Default::default(), + multibanco: Default::default(), oxxo: Default::default(), p24: Default::default(), payment_method: Default::default(), @@ -1049,6 +465,7 @@ impl<'a> CreatePaymentMethod<'a> { sepa_debit: Default::default(), sofort: Default::default(), swish: Default::default(), + twint: Default::default(), type_: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), @@ -1060,6 +477,7 @@ impl<'a> CreatePaymentMethod<'a> { /// The parameters for `PaymentMethod::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPaymentMethods<'a> { + /// The ID of the customer whose PaymentMethods will be retrieved. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1112,12 +530,19 @@ impl<'a> ListPaymentMethods<'a> { impl Paginable for ListPaymentMethods<'_> { type O = PaymentMethod; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `PaymentMethod::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePaymentMethod<'a> { + + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + /// 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, @@ -1150,6 +575,7 @@ pub struct UpdatePaymentMethod<'a> { impl<'a> UpdatePaymentMethod<'a> { pub fn new() -> Self { UpdatePaymentMethod { + allow_redisplay: Default::default(), billing_details: Default::default(), card: Default::default(), expand: Default::default(), @@ -1162,6 +588,7 @@ impl<'a> UpdatePaymentMethod<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1173,16 +600,24 @@ pub struct CreatePaymentMethodAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAffirm {} +pub struct CreatePaymentMethodAffirm { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAfterpayClearpay {} +pub struct CreatePaymentMethodAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAlipay {} +pub struct CreatePaymentMethodAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1192,6 +627,7 @@ pub struct CreatePaymentMethodAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodBacsDebit { + /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, @@ -1204,25 +640,31 @@ pub struct CreatePaymentMethodBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodBancontact {} +pub struct CreatePaymentMethodBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodBlik {} +pub struct CreatePaymentMethodBlik { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodBoleto { + /// 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 CreatePaymentMethodCashapp {} +pub struct CreatePaymentMethodCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodCustomerBalance {} +pub struct CreatePaymentMethodCustomerBalance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodEps { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, @@ -1230,6 +672,7 @@ pub struct CreatePaymentMethodEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodFpx { + /// Account holder type for FPX transaction. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1239,83 +682,114 @@ pub struct CreatePaymentMethodFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodGiropay {} +pub struct CreatePaymentMethodGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodGrabpay {} +pub struct CreatePaymentMethodGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodInteracPresent {} +pub struct CreatePaymentMethodInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodKonbini {} +pub struct CreatePaymentMethodKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodLink { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodMobilepay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodLink {} +pub struct CreatePaymentMethodMultibanco { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodOxxo {} +pub struct CreatePaymentMethodOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPaynow {} +pub struct CreatePaymentMethodPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPaypal {} +pub struct CreatePaymentMethodPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPix {} +pub struct CreatePaymentMethodPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPromptpay {} +pub struct CreatePaymentMethodPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodRadarOptions { + /// 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodRevolutPay {} +pub struct CreatePaymentMethodRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentMethodSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodSwish {} +pub struct CreatePaymentMethodSwish { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodTwint { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1340,16 +814,20 @@ pub struct CreatePaymentMethodUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodWechatPay {} +pub struct CreatePaymentMethodWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodZip {} +pub struct CreatePaymentMethodZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodLink {} +pub struct UpdatePaymentMethodLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodUsBankAccount { + /// Bank account holder type. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1361,54 +839,15 @@ pub struct UpdatePaymentMethodUsBankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodKlarnaDob { - /// 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, -} - -/// An enum representing the possible values of an `CardPresent`'s `read_method` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CardPresentReadMethod { - ContactEmv, - ContactlessEmv, - ContactlessMagstripeMode, - MagneticStripeFallback, - MagneticStripeTrack2, -} - -impl CardPresentReadMethod { - pub fn as_str(self) -> &'static str { - match self { - CardPresentReadMethod::ContactEmv => "contact_emv", - CardPresentReadMethod::ContactlessEmv => "contactless_emv", - CardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", - CardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", - CardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", - } - } -} + /// The day of birth, between 1 and 31. + pub day: i64, -impl AsRef for CardPresentReadMethod { - fn as_ref(&self) -> &str { - self.as_str() - } -} + /// The month of birth, between 1 and 12. + pub month: i64, -impl std::fmt::Display for CardPresentReadMethod { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CardPresentReadMethod { - fn default() -> Self { - Self::ContactEmv - } + /// The four-digit year of birth. + pub year: i64, } /// An enum representing the possible values of an `CreatePaymentMethodEps`'s `bank` field. @@ -1452,9 +891,7 @@ impl CreatePaymentMethodEpsBank { CreatePaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", CreatePaymentMethodEpsBank::BankAustria => "bank_austria", CreatePaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - CreatePaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } + CreatePaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", CreatePaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", CreatePaymentMethodEpsBank::BksBankAg => "bks_bank_ag", CreatePaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", @@ -1464,25 +901,15 @@ impl CreatePaymentMethodEpsBank { CreatePaymentMethodEpsBank::Dolomitenbank => "dolomitenbank", CreatePaymentMethodEpsBank::EasybankAg => "easybank_ag", CreatePaymentMethodEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", - CreatePaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - CreatePaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - CreatePaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - CreatePaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } + CreatePaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + CreatePaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + CreatePaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + CreatePaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", CreatePaymentMethodEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", CreatePaymentMethodEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", CreatePaymentMethodEpsBank::MarchfelderBank => "marchfelder_bank", CreatePaymentMethodEpsBank::OberbankAg => "oberbank_ag", - CreatePaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + CreatePaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", CreatePaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", CreatePaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", CreatePaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -1757,598 +1184,159 @@ impl std::fmt::Display for CreatePaymentMethodP24Bank { } impl std::default::Default for CreatePaymentMethodP24Bank { fn default() -> Self { - Self::AliorBank - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodSofort`'s `country` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodSofortCountry { - #[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 CreatePaymentMethodSofortCountry { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodSofortCountry::At => "AT", - CreatePaymentMethodSofortCountry::Be => "BE", - CreatePaymentMethodSofortCountry::De => "DE", - CreatePaymentMethodSofortCountry::Es => "ES", - CreatePaymentMethodSofortCountry::It => "IT", - CreatePaymentMethodSofortCountry::Nl => "NL", - } - } -} - -impl AsRef for CreatePaymentMethodSofortCountry { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodSofortCountry { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodSofortCountry { - fn default() -> Self { - Self::At - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodUsBankAccountAccountHolderType { - Company, - Individual, -} - -impl CreatePaymentMethodUsBankAccountAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodUsBankAccountAccountHolderType::Company => "company", - CreatePaymentMethodUsBankAccountAccountHolderType::Individual => "individual", - } - } -} - -impl AsRef for CreatePaymentMethodUsBankAccountAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodUsBankAccountAccountHolderType { - fn default() -> Self { - Self::Company - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodUsBankAccountAccountType { - Checking, - Savings, -} - -impl CreatePaymentMethodUsBankAccountAccountType { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodUsBankAccountAccountType::Checking => "checking", - CreatePaymentMethodUsBankAccountAccountType::Savings => "savings", - } - } -} - -impl AsRef for CreatePaymentMethodUsBankAccountAccountType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodUsBankAccountAccountType { - fn default() -> Self { - Self::Checking - } -} - -/// An enum representing the possible values of an `PaymentMethodEps`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodEpsBank { - 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 PaymentMethodEpsBank { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", - PaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", - PaymentMethodEpsBank::BankAustria => "bank_austria", - PaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } - PaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", - PaymentMethodEpsBank::BksBankAg => "bks_bank_ag", - PaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", - PaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", - PaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", - PaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", - PaymentMethodEpsBank::Dolomitenbank => "dolomitenbank", - PaymentMethodEpsBank::EasybankAg => "easybank_ag", - PaymentMethodEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", - PaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - PaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - PaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - PaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } - PaymentMethodEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", - PaymentMethodEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", - PaymentMethodEpsBank::MarchfelderBank => "marchfelder_bank", - PaymentMethodEpsBank::OberbankAg => "oberbank_ag", - PaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } - PaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", - PaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", - PaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", - PaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", - PaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", - } - } -} - -impl AsRef for PaymentMethodEpsBank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodEpsBank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodEpsBank { - fn default() -> Self { - Self::ArzteUndApothekerBank - } -} - -/// An enum representing the possible values of an `PaymentMethodFpx`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodFpxAccountHolderType { - Company, - Individual, -} - -impl PaymentMethodFpxAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodFpxAccountHolderType::Company => "company", - PaymentMethodFpxAccountHolderType::Individual => "individual", - } - } -} - -impl AsRef for PaymentMethodFpxAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodFpxAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodFpxAccountHolderType { - fn default() -> Self { - Self::Company - } -} - -/// An enum representing the possible values of an `PaymentMethodFpx`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodFpxBank { - AffinBank, - Agrobank, - AllianceBank, - Ambank, - BankIslam, - BankMuamalat, - BankOfChina, - BankRakyat, - Bsn, - Cimb, - DeutscheBank, - HongLeongBank, - Hsbc, - Kfh, - Maybank2e, - Maybank2u, - Ocbc, - PbEnterprise, - PublicBank, - Rhb, - StandardChartered, - Uob, -} - -impl PaymentMethodFpxBank { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodFpxBank::AffinBank => "affin_bank", - PaymentMethodFpxBank::Agrobank => "agrobank", - PaymentMethodFpxBank::AllianceBank => "alliance_bank", - PaymentMethodFpxBank::Ambank => "ambank", - PaymentMethodFpxBank::BankIslam => "bank_islam", - PaymentMethodFpxBank::BankMuamalat => "bank_muamalat", - PaymentMethodFpxBank::BankOfChina => "bank_of_china", - PaymentMethodFpxBank::BankRakyat => "bank_rakyat", - PaymentMethodFpxBank::Bsn => "bsn", - PaymentMethodFpxBank::Cimb => "cimb", - PaymentMethodFpxBank::DeutscheBank => "deutsche_bank", - PaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", - PaymentMethodFpxBank::Hsbc => "hsbc", - PaymentMethodFpxBank::Kfh => "kfh", - PaymentMethodFpxBank::Maybank2e => "maybank2e", - PaymentMethodFpxBank::Maybank2u => "maybank2u", - PaymentMethodFpxBank::Ocbc => "ocbc", - PaymentMethodFpxBank::PbEnterprise => "pb_enterprise", - PaymentMethodFpxBank::PublicBank => "public_bank", - PaymentMethodFpxBank::Rhb => "rhb", - PaymentMethodFpxBank::StandardChartered => "standard_chartered", - PaymentMethodFpxBank::Uob => "uob", - } - } -} - -impl AsRef for PaymentMethodFpxBank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodFpxBank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodFpxBank { - fn default() -> Self { - Self::AffinBank + Self::AliorBank } } -/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bank` field. +/// An enum representing the possible values of an `CreatePaymentMethodSofort`'s `country` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodIdealBank { - AbnAmro, - AsnBank, - Bunq, - Handelsbanken, - Ing, - Knab, - Moneyou, - N26, - Nn, - Rabobank, - Regiobank, - Revolut, - SnsBank, - TriodosBank, - VanLanschot, - Yoursafe, +pub enum CreatePaymentMethodSofortCountry { + #[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 PaymentMethodIdealBank { +impl CreatePaymentMethodSofortCountry { pub fn as_str(self) -> &'static str { match self { - PaymentMethodIdealBank::AbnAmro => "abn_amro", - PaymentMethodIdealBank::AsnBank => "asn_bank", - PaymentMethodIdealBank::Bunq => "bunq", - PaymentMethodIdealBank::Handelsbanken => "handelsbanken", - PaymentMethodIdealBank::Ing => "ing", - PaymentMethodIdealBank::Knab => "knab", - PaymentMethodIdealBank::Moneyou => "moneyou", - PaymentMethodIdealBank::N26 => "n26", - PaymentMethodIdealBank::Nn => "nn", - PaymentMethodIdealBank::Rabobank => "rabobank", - PaymentMethodIdealBank::Regiobank => "regiobank", - PaymentMethodIdealBank::Revolut => "revolut", - PaymentMethodIdealBank::SnsBank => "sns_bank", - PaymentMethodIdealBank::TriodosBank => "triodos_bank", - PaymentMethodIdealBank::VanLanschot => "van_lanschot", - PaymentMethodIdealBank::Yoursafe => "yoursafe", + CreatePaymentMethodSofortCountry::At => "AT", + CreatePaymentMethodSofortCountry::Be => "BE", + CreatePaymentMethodSofortCountry::De => "DE", + CreatePaymentMethodSofortCountry::Es => "ES", + CreatePaymentMethodSofortCountry::It => "IT", + CreatePaymentMethodSofortCountry::Nl => "NL", } } } -impl AsRef for PaymentMethodIdealBank { +impl AsRef for CreatePaymentMethodSofortCountry { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodIdealBank { +impl std::fmt::Display for CreatePaymentMethodSofortCountry { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodIdealBank { +impl std::default::Default for CreatePaymentMethodSofortCountry { fn default() -> Self { - Self::AbnAmro + Self::At } } -/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bic` field. +/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodIdealBic { - #[serde(rename = "ABNANL2A")] - Abnanl2a, - #[serde(rename = "ASNBNL21")] - Asnbnl21, - #[serde(rename = "BITSNL2A")] - Bitsnl2a, - #[serde(rename = "BUNQNL2A")] - Bunqnl2a, - #[serde(rename = "FVLBNL22")] - Fvlbnl22, - #[serde(rename = "HANDNL2A")] - Handnl2a, - #[serde(rename = "INGBNL2A")] - Ingbnl2a, - #[serde(rename = "KNABNL2H")] - Knabnl2h, - #[serde(rename = "MOYONL21")] - Moyonl21, - #[serde(rename = "NNBANL2G")] - Nnbanl2g, - #[serde(rename = "NTSBDEB1")] - Ntsbdeb1, - #[serde(rename = "RABONL2U")] - Rabonl2u, - #[serde(rename = "RBRBNL21")] - Rbrbnl21, - #[serde(rename = "REVOIE23")] - Revoie23, - #[serde(rename = "REVOLT21")] - Revolt21, - #[serde(rename = "SNSBNL2A")] - Snsbnl2a, - #[serde(rename = "TRIONL2U")] - Trionl2u, -} - -impl PaymentMethodIdealBic { +pub enum CreatePaymentMethodUsBankAccountAccountHolderType { + Company, + Individual, +} + +impl CreatePaymentMethodUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { - PaymentMethodIdealBic::Abnanl2a => "ABNANL2A", - PaymentMethodIdealBic::Asnbnl21 => "ASNBNL21", - PaymentMethodIdealBic::Bitsnl2a => "BITSNL2A", - PaymentMethodIdealBic::Bunqnl2a => "BUNQNL2A", - PaymentMethodIdealBic::Fvlbnl22 => "FVLBNL22", - PaymentMethodIdealBic::Handnl2a => "HANDNL2A", - PaymentMethodIdealBic::Ingbnl2a => "INGBNL2A", - PaymentMethodIdealBic::Knabnl2h => "KNABNL2H", - PaymentMethodIdealBic::Moyonl21 => "MOYONL21", - PaymentMethodIdealBic::Nnbanl2g => "NNBANL2G", - PaymentMethodIdealBic::Ntsbdeb1 => "NTSBDEB1", - PaymentMethodIdealBic::Rabonl2u => "RABONL2U", - PaymentMethodIdealBic::Rbrbnl21 => "RBRBNL21", - PaymentMethodIdealBic::Revoie23 => "REVOIE23", - PaymentMethodIdealBic::Revolt21 => "REVOLT21", - PaymentMethodIdealBic::Snsbnl2a => "SNSBNL2A", - PaymentMethodIdealBic::Trionl2u => "TRIONL2U", + CreatePaymentMethodUsBankAccountAccountHolderType::Company => "company", + CreatePaymentMethodUsBankAccountAccountHolderType::Individual => "individual", } } } -impl AsRef for PaymentMethodIdealBic { +impl AsRef for CreatePaymentMethodUsBankAccountAccountHolderType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodIdealBic { +impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountHolderType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodIdealBic { +impl std::default::Default for CreatePaymentMethodUsBankAccountAccountHolderType { fn default() -> Self { - Self::Abnanl2a + Self::Company } } -/// An enum representing the possible values of an `PaymentMethodInteracPresent`'s `read_method` field. +/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodInteracPresentReadMethod { - ContactEmv, - ContactlessEmv, - ContactlessMagstripeMode, - MagneticStripeFallback, - MagneticStripeTrack2, +pub enum CreatePaymentMethodUsBankAccountAccountType { + Checking, + Savings, } -impl PaymentMethodInteracPresentReadMethod { +impl CreatePaymentMethodUsBankAccountAccountType { pub fn as_str(self) -> &'static str { match self { - PaymentMethodInteracPresentReadMethod::ContactEmv => "contact_emv", - PaymentMethodInteracPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } - PaymentMethodInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + CreatePaymentMethodUsBankAccountAccountType::Checking => "checking", + CreatePaymentMethodUsBankAccountAccountType::Savings => "savings", } } } -impl AsRef for PaymentMethodInteracPresentReadMethod { +impl AsRef for CreatePaymentMethodUsBankAccountAccountType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodInteracPresentReadMethod { +impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodInteracPresentReadMethod { +impl std::default::Default for CreatePaymentMethodUsBankAccountAccountType { fn default() -> Self { - Self::ContactEmv + Self::Checking } } -/// An enum representing the possible values of an `PaymentMethodP24`'s `bank` field. +/// An enum representing the possible values of an `PaymentMethod`'s `allow_redisplay` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodP24Bank { - 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, +pub enum PaymentMethodAllowRedisplay { + Always, + Limited, + Unspecified, } -impl PaymentMethodP24Bank { +impl PaymentMethodAllowRedisplay { pub fn as_str(self) -> &'static str { match self { - PaymentMethodP24Bank::AliorBank => "alior_bank", - PaymentMethodP24Bank::BankMillennium => "bank_millennium", - PaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", - PaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", - PaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", - PaymentMethodP24Bank::Blik => "blik", - PaymentMethodP24Bank::BnpParibas => "bnp_paribas", - PaymentMethodP24Bank::Boz => "boz", - PaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", - PaymentMethodP24Bank::CreditAgricole => "credit_agricole", - PaymentMethodP24Bank::Envelobank => "envelobank", - PaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", - PaymentMethodP24Bank::GetinBank => "getin_bank", - PaymentMethodP24Bank::Ideabank => "ideabank", - PaymentMethodP24Bank::Ing => "ing", - PaymentMethodP24Bank::Inteligo => "inteligo", - PaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", - PaymentMethodP24Bank::NestPrzelew => "nest_przelew", - PaymentMethodP24Bank::NoblePay => "noble_pay", - PaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", - PaymentMethodP24Bank::PlusBank => "plus_bank", - PaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", - PaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", - PaymentMethodP24Bank::ToyotaBank => "toyota_bank", - PaymentMethodP24Bank::Velobank => "velobank", - PaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", + PaymentMethodAllowRedisplay::Always => "always", + PaymentMethodAllowRedisplay::Limited => "limited", + PaymentMethodAllowRedisplay::Unspecified => "unspecified", } } } -impl AsRef for PaymentMethodP24Bank { +impl AsRef for PaymentMethodAllowRedisplay { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodP24Bank { +impl std::fmt::Display for PaymentMethodAllowRedisplay { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodP24Bank { +impl std::default::Default for PaymentMethodAllowRedisplay { fn default() -> Self { - Self::AliorBank + Self::Always } } @@ -2360,6 +1348,7 @@ pub enum PaymentMethodType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2378,6 +1367,8 @@ pub enum PaymentMethodType { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -2388,6 +1379,7 @@ pub enum PaymentMethodType { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -2400,6 +1392,7 @@ impl PaymentMethodType { PaymentMethodType::Affirm => "affirm", PaymentMethodType::AfterpayClearpay => "afterpay_clearpay", PaymentMethodType::Alipay => "alipay", + PaymentMethodType::AmazonPay => "amazon_pay", PaymentMethodType::AuBecsDebit => "au_becs_debit", PaymentMethodType::BacsDebit => "bacs_debit", PaymentMethodType::Bancontact => "bancontact", @@ -2418,6 +1411,8 @@ impl PaymentMethodType { PaymentMethodType::Klarna => "klarna", PaymentMethodType::Konbini => "konbini", PaymentMethodType::Link => "link", + PaymentMethodType::Mobilepay => "mobilepay", + PaymentMethodType::Multibanco => "multibanco", PaymentMethodType::Oxxo => "oxxo", PaymentMethodType::P24 => "p24", PaymentMethodType::Paynow => "paynow", @@ -2428,6 +1423,7 @@ impl PaymentMethodType { PaymentMethodType::SepaDebit => "sepa_debit", PaymentMethodType::Sofort => "sofort", PaymentMethodType::Swish => "swish", + PaymentMethodType::Twint => "twint", PaymentMethodType::UsBankAccount => "us_bank_account", PaymentMethodType::WechatPay => "wechat_pay", PaymentMethodType::Zip => "zip", @@ -2460,6 +1456,7 @@ pub enum PaymentMethodTypeFilter { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2476,6 +1473,8 @@ pub enum PaymentMethodTypeFilter { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -2486,6 +1485,7 @@ pub enum PaymentMethodTypeFilter { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -2498,6 +1498,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Affirm => "affirm", PaymentMethodTypeFilter::AfterpayClearpay => "afterpay_clearpay", PaymentMethodTypeFilter::Alipay => "alipay", + PaymentMethodTypeFilter::AmazonPay => "amazon_pay", PaymentMethodTypeFilter::AuBecsDebit => "au_becs_debit", PaymentMethodTypeFilter::BacsDebit => "bacs_debit", PaymentMethodTypeFilter::Bancontact => "bancontact", @@ -2514,6 +1515,8 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Klarna => "klarna", PaymentMethodTypeFilter::Konbini => "konbini", PaymentMethodTypeFilter::Link => "link", + PaymentMethodTypeFilter::Mobilepay => "mobilepay", + PaymentMethodTypeFilter::Multibanco => "multibanco", PaymentMethodTypeFilter::Oxxo => "oxxo", PaymentMethodTypeFilter::P24 => "p24", PaymentMethodTypeFilter::Paynow => "paynow", @@ -2524,6 +1527,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::SepaDebit => "sepa_debit", PaymentMethodTypeFilter::Sofort => "sofort", PaymentMethodTypeFilter::Swish => "swish", + PaymentMethodTypeFilter::Twint => "twint", PaymentMethodTypeFilter::UsBankAccount => "us_bank_account", PaymentMethodTypeFilter::WechatPay => "wechat_pay", PaymentMethodTypeFilter::Zip => "zip", @@ -2548,186 +1552,6 @@ impl std::default::Default for PaymentMethodTypeFilter { } } -/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountAccountHolderType { - Company, - Individual, -} - -impl PaymentMethodUsBankAccountAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountAccountHolderType::Company => "company", - PaymentMethodUsBankAccountAccountHolderType::Individual => "individual", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountAccountHolderType { - fn default() -> Self { - Self::Company - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountAccountType { - Checking, - Savings, -} - -impl PaymentMethodUsBankAccountAccountType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountAccountType::Checking => "checking", - PaymentMethodUsBankAccountAccountType::Savings => "savings", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountAccountType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountAccountType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountAccountType { - fn default() -> Self { - Self::Checking - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `network_code` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountBlockedNetworkCode { - #[serde(rename = "R02")] - R02, - #[serde(rename = "R03")] - R03, - #[serde(rename = "R04")] - R04, - #[serde(rename = "R05")] - R05, - #[serde(rename = "R07")] - R07, - #[serde(rename = "R08")] - R08, - #[serde(rename = "R10")] - R10, - #[serde(rename = "R11")] - R11, - #[serde(rename = "R16")] - R16, - #[serde(rename = "R20")] - R20, - #[serde(rename = "R29")] - R29, - #[serde(rename = "R31")] - R31, -} - -impl PaymentMethodUsBankAccountBlockedNetworkCode { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountBlockedNetworkCode::R02 => "R02", - PaymentMethodUsBankAccountBlockedNetworkCode::R03 => "R03", - PaymentMethodUsBankAccountBlockedNetworkCode::R04 => "R04", - PaymentMethodUsBankAccountBlockedNetworkCode::R05 => "R05", - PaymentMethodUsBankAccountBlockedNetworkCode::R07 => "R07", - PaymentMethodUsBankAccountBlockedNetworkCode::R08 => "R08", - PaymentMethodUsBankAccountBlockedNetworkCode::R10 => "R10", - PaymentMethodUsBankAccountBlockedNetworkCode::R11 => "R11", - PaymentMethodUsBankAccountBlockedNetworkCode::R16 => "R16", - PaymentMethodUsBankAccountBlockedNetworkCode::R20 => "R20", - PaymentMethodUsBankAccountBlockedNetworkCode::R29 => "R29", - PaymentMethodUsBankAccountBlockedNetworkCode::R31 => "R31", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountBlockedNetworkCode { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountBlockedNetworkCode { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountBlockedNetworkCode { - fn default() -> Self { - Self::R02 - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `reason` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountBlockedReason { - BankAccountClosed, - BankAccountFrozen, - BankAccountInvalidDetails, - BankAccountRestricted, - BankAccountUnusable, - DebitNotAuthorized, -} - -impl PaymentMethodUsBankAccountBlockedReason { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountBlockedReason::BankAccountClosed => "bank_account_closed", - PaymentMethodUsBankAccountBlockedReason::BankAccountFrozen => "bank_account_frozen", - PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => { - "bank_account_invalid_details" - } - PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => { - "bank_account_restricted" - } - PaymentMethodUsBankAccountBlockedReason::BankAccountUnusable => "bank_account_unusable", - PaymentMethodUsBankAccountBlockedReason::DebitNotAuthorized => "debit_not_authorized", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountBlockedReason { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountBlockedReason { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountBlockedReason { - fn default() -> Self { - Self::BankAccountClosed - } -} - /// An enum representing the possible values of an `UpdatePaymentMethodUsBankAccount`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2796,84 +1620,6 @@ impl std::default::Default for UpdatePaymentMethodUsBankAccountAccountType { } } -/// An enum representing the possible values of an `UsBankAccountNetworks`'s `supported` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum UsBankAccountNetworksSupported { - Ach, - UsDomesticWire, -} - -impl UsBankAccountNetworksSupported { - pub fn as_str(self) -> &'static str { - match self { - UsBankAccountNetworksSupported::Ach => "ach", - UsBankAccountNetworksSupported::UsDomesticWire => "us_domestic_wire", - } - } -} - -impl AsRef for UsBankAccountNetworksSupported { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for UsBankAccountNetworksSupported { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for UsBankAccountNetworksSupported { - fn default() -> Self { - Self::Ach - } -} - -/// An enum representing the possible values of an `WalletDetails`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum WalletDetailsType { - AmexExpressCheckout, - ApplePay, - GooglePay, - Link, - Masterpass, - SamsungPay, - VisaCheckout, -} - -impl WalletDetailsType { - pub fn as_str(self) -> &'static str { - match self { - WalletDetailsType::AmexExpressCheckout => "amex_express_checkout", - WalletDetailsType::ApplePay => "apple_pay", - WalletDetailsType::GooglePay => "google_pay", - WalletDetailsType::Link => "link", - WalletDetailsType::Masterpass => "masterpass", - WalletDetailsType::SamsungPay => "samsung_pay", - WalletDetailsType::VisaCheckout => "visa_checkout", - } - } -} - -impl AsRef for WalletDetailsType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for WalletDetailsType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for WalletDetailsType { - fn default() -> Self { - Self::AmexExpressCheckout - } -} - /// If this is a `card` PaymentMethod, this hash contains the user's card details. /// /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. @@ -2882,8 +1628,8 @@ impl std::default::Default for WalletDetailsType { #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged, rename_all = "snake_case")] pub enum CreatePaymentMethodCardUnion { - CardDetailsParams(CardDetailsParams), - TokenParams(TokenParams), + pub CardDetailsParams(CardDetailsParams), + pub TokenParams(TokenParams), } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -2897,10 +1643,24 @@ pub struct CardDetailsParams { pub exp_month: i32, /// Four-digit number representing the card's expiration year. pub exp_year: i32, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, /// The card number, as a string without any separators. pub number: String, } +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TokenParams { /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. @@ -2916,4 +1676,18 @@ pub struct UpdateApiParam { /// Four-digit number representing the card's expiration year. #[serde(skip_serializing_if = "Option::is_none")] pub exp_year: Option, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, +} + +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, } diff --git a/src/resources/generated/payment_method_acss_debit.rs b/src/resources/generated/payment_method_acss_debit.rs new file mode 100644 index 000000000..5a2078b00 --- /dev/null +++ b/src/resources/generated/payment_method_acss_debit.rs @@ -0,0 +1,27 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_acss_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAcssDebit { + + /// Name of the bank associated with the bank account. + pub bank_name: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Institution number of the bank account. + pub institution_number: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Transit number of the bank account. + pub transit_number: Option, +} diff --git a/src/resources/generated/payment_method_affirm.rs b/src/resources/generated/payment_method_affirm.rs new file mode 100644 index 000000000..fae00953d --- /dev/null +++ b/src/resources/generated/payment_method_affirm.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_affirm". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAffirm { +} diff --git a/src/resources/generated/payment_method_afterpay_clearpay.rs b/src/resources/generated/payment_method_afterpay_clearpay.rs new file mode 100644 index 000000000..57d63c2a9 --- /dev/null +++ b/src/resources/generated/payment_method_afterpay_clearpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_afterpay_clearpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAfterpayClearpay { +} diff --git a/src/resources/generated/payment_method_amazon_pay.rs b/src/resources/generated/payment_method_amazon_pay.rs new file mode 100644 index 000000000..dde030680 --- /dev/null +++ b/src/resources/generated/payment_method_amazon_pay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_amazon_pay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAmazonPay { +} diff --git a/src/resources/generated/payment_method_au_becs_debit.rs b/src/resources/generated/payment_method_au_becs_debit.rs new file mode 100644 index 000000000..02634dc36 --- /dev/null +++ b/src/resources/generated/payment_method_au_becs_debit.rs @@ -0,0 +1,21 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_au_becs_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAuBecsDebit { + + /// Six-digit number identifying bank and branch associated with this bank account. + pub bsb_number: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, +} diff --git a/src/resources/generated/payment_method_bacs_debit.rs b/src/resources/generated/payment_method_bacs_debit.rs new file mode 100644 index 000000000..ad95a73b5 --- /dev/null +++ b/src/resources/generated/payment_method_bacs_debit.rs @@ -0,0 +1,23 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_bacs_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBacsDebit { + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Sort code of the bank account. + /// + /// (e.g., `10-20-30`). + pub sort_code: Option, +} diff --git a/src/resources/generated/payment_method_bancontact.rs b/src/resources/generated/payment_method_bancontact.rs new file mode 100644 index 000000000..dfb2b31b2 --- /dev/null +++ b/src/resources/generated/payment_method_bancontact.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_bancontact". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBancontact { +} diff --git a/src/resources/generated/payment_method_blik.rs b/src/resources/generated/payment_method_blik.rs new file mode 100644 index 000000000..9b9486a3e --- /dev/null +++ b/src/resources/generated/payment_method_blik.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_blik". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBlik { +} diff --git a/src/resources/generated/payment_method_boleto.rs b/src/resources/generated/payment_method_boleto.rs new file mode 100644 index 000000000..1db6d9e2b --- /dev/null +++ b/src/resources/generated/payment_method_boleto.rs @@ -0,0 +1,13 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_boleto". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBoleto { + + /// Uniquely identifies the customer tax id (CNPJ or CPF). + pub tax_id: String, +} diff --git a/src/resources/generated/payment_method_card.rs b/src/resources/generated/payment_method_card.rs new file mode 100644 index 000000000..489f7a157 --- /dev/null +++ b/src/resources/generated/payment_method_card.rs @@ -0,0 +1,294 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Expandable}; +use crate::resources::{Address, PaymentMethodDetailsCardPresent, SetupAttempt}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_card". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CardDetails { + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: String, + + /// Checks on Card address and CVC if provided. + pub checks: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. + /// + /// Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + pub display_brand: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + #[serde(skip_serializing_if = "Option::is_none")] + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: String, + + /// Details of the original PaymentMethod that created this object. + pub generated_from: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: String, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// Contains details on how this Card may be used for 3D Secure authentication. + pub three_d_secure_usage: Option, + + /// If this Card is part of a card wallet, this contains the details of the card wallet. + pub wallet: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + + /// All available networks for the card. + pub available: Vec, + + /// The preferred network for co-branded cards. + /// + /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + pub preferred: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCardChecks { + + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_line1_check: Option, + + /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_postal_code_check: Option, + + /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub cvc_check: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCardGeneratedCard { + + /// The charge that created this object. + pub charge: Option, + + /// Transaction-specific details of the payment method used in the payment. + pub payment_method_details: Option, + + /// The ID of the SetupAttempt that generated this PaymentMethod, if any. + pub setup_attempt: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CardGeneratedFromPaymentMethodDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub card_present: Option, + + /// The type of payment method transaction-specific details from the transaction that generated this `card` payment method. + /// + /// Always `card_present`. + #[serde(rename = "type")] + pub type_: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub amex_express_checkout: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub apple_pay: Option, + + /// (For tokenized numbers only.) The last four digits of the device account number. + pub dynamic_last4: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub google_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub masterpass: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub samsung_pay: Option, + + /// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. + /// + /// An additional hash is included on the Wallet subhash with a name matching this value. + /// It contains additional information specific to the card wallet type. + #[serde(rename = "type")] + pub type_: WalletDetailsType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub visa_checkout: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletAmexExpressCheckout { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletApplePay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletGooglePay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCardWalletLink { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletMasterpass { + + /// Owner's verified billing address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub billing_address: Option
, + + /// Owner's verified email. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub email: Option, + + /// Owner's verified full name. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub name: Option, + + /// Owner's verified shipping address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub shipping_address: Option
, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletSamsungPay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletVisaCheckout { + + /// Owner's verified billing address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub billing_address: Option
, + + /// Owner's verified email. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub email: Option, + + /// Owner's verified full name. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub name: Option, + + /// Owner's verified shipping address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub shipping_address: Option
, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThreeDSecureUsage { + + /// Whether 3D Secure is supported on this card. + pub supported: bool, +} + +/// An enum representing the possible values of an `WalletDetails`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum WalletDetailsType { + AmexExpressCheckout, + ApplePay, + GooglePay, + Link, + Masterpass, + SamsungPay, + VisaCheckout, +} + +impl WalletDetailsType { + pub fn as_str(self) -> &'static str { + match self { + WalletDetailsType::AmexExpressCheckout => "amex_express_checkout", + WalletDetailsType::ApplePay => "apple_pay", + WalletDetailsType::GooglePay => "google_pay", + WalletDetailsType::Link => "link", + WalletDetailsType::Masterpass => "masterpass", + WalletDetailsType::SamsungPay => "samsung_pay", + WalletDetailsType::VisaCheckout => "visa_checkout", + } + } +} + +impl AsRef for WalletDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for WalletDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for WalletDetailsType { + fn default() -> Self { + Self::AmexExpressCheckout + } +} diff --git a/src/resources/generated/payment_method_card_present.rs b/src/resources/generated/payment_method_card_present.rs new file mode 100644 index 000000000..48b1fc331 --- /dev/null +++ b/src/resources/generated/payment_method_card_present.rs @@ -0,0 +1,126 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{PaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet, PaymentMethodCardPresentNetworks, PaymentMethodDetailsCardPresentOffline}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_card_present". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CardPresent { + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: Option, + + /// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + pub brand_product: Option, + + /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. + /// + /// May include alphanumeric characters, special characters and first/last name separator (`/`). + /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. + /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + pub cardholder_name: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: Option, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// Details about payment methods collected offline. + pub offline: Option, + + /// EMV tag 5F2D. + /// + /// Preferred languages specified by the integrated circuit chip. + pub preferred_locales: Option>, + + /// How card details were read in this transaction. + pub read_method: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub wallet: Option, +} + +/// An enum representing the possible values of an `CardPresent`'s `read_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CardPresentReadMethod { + ContactEmv, + ContactlessEmv, + ContactlessMagstripeMode, + MagneticStripeFallback, + MagneticStripeTrack2, +} + +impl CardPresentReadMethod { + pub fn as_str(self) -> &'static str { + match self { + CardPresentReadMethod::ContactEmv => "contact_emv", + CardPresentReadMethod::ContactlessEmv => "contactless_emv", + CardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + CardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + CardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + } + } +} + +impl AsRef for CardPresentReadMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CardPresentReadMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CardPresentReadMethod { + fn default() -> Self { + Self::ContactEmv + } +} diff --git a/src/resources/generated/payment_method_card_present_networks.rs b/src/resources/generated/payment_method_card_present_networks.rs deleted file mode 100644 index edc632cd5..000000000 --- a/src/resources/generated/payment_method_card_present_networks.rs +++ /dev/null @@ -1,15 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -/// The resource representing a Stripe "payment_method_card_present_networks". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardPresentNetworks { - /// All available networks for the card. - pub available: Vec, - - /// The preferred network for the card. - pub preferred: Option, -} diff --git a/src/resources/generated/payment_method_cashapp.rs b/src/resources/generated/payment_method_cashapp.rs new file mode 100644 index 000000000..9d45d2d1c --- /dev/null +++ b/src/resources/generated/payment_method_cashapp.rs @@ -0,0 +1,16 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_cashapp". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCashapp { + + /// A unique and immutable identifier assigned by Cash App to every buyer. + pub buyer_id: Option, + + /// A public identifier for buyers using Cash App. + pub cashtag: Option, +} diff --git a/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs index 0a18c7e4e..e6a7c52e1 100644 --- a/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs +++ b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodConfigBizPaymentMethodConfigurationDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfigBizPaymentMethodConfigurationDetails { + /// ID of the parent payment method configuration used. pub parent: Option, } diff --git a/src/resources/generated/payment_method_configuration.rs b/src/resources/generated/payment_method_configuration.rs index edf42eed0..883e4bb89 100644 --- a/src/resources/generated/payment_method_configuration.rs +++ b/src/resources/generated/payment_method_configuration.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodConfigResourcePaymentMethodConfiguration". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfiguration { /// Unique identifier for the object. @@ -30,6 +30,9 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub apple_pay: Option, @@ -99,6 +102,12 @@ pub struct PaymentMethodConfiguration { /// 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, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// The configuration's name. pub name: String, @@ -129,11 +138,20 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, #[serde(skip_serializing_if = "Option::is_none")] pub wechat_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub zip: Option, } impl PaymentMethodConfiguration { @@ -227,6 +245,10 @@ pub struct CreatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. /// /// There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. @@ -370,6 +392,17 @@ pub struct CreatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. + /// + /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. + /// Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// Configuration name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<&'a str>, @@ -430,6 +463,20 @@ pub struct CreatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. + /// + /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. + /// Check this [page](https://stripe.com/docs/payments/swish) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + + /// Twint is a payment method popular in Switzerland. + /// + /// It allows customers to pay using their mobile phone. + /// Check this [page](https://docs.stripe.com/payments/twint) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. /// /// Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. @@ -443,6 +490,12 @@ pub struct CreatePaymentMethodConfiguration<'a> { /// Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. #[serde(skip_serializing_if = "Option::is_none")] pub wechat_pay: Option, + + /// Zip gives your customers a way to split purchases over a series of payments. + /// + /// Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + #[serde(skip_serializing_if = "Option::is_none")] + pub zip: Option, } impl<'a> CreatePaymentMethodConfiguration<'a> { @@ -452,6 +505,7 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { affirm: Default::default(), afterpay_clearpay: Default::default(), alipay: Default::default(), + amazon_pay: Default::default(), apple_pay: Default::default(), apple_pay_later: Default::default(), au_becs_debit: Default::default(), @@ -474,6 +528,8 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { klarna: Default::default(), konbini: Default::default(), link: Default::default(), + mobilepay: Default::default(), + multibanco: Default::default(), name: Default::default(), oxxo: Default::default(), p24: Default::default(), @@ -484,8 +540,11 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), + swish: Default::default(), + twint: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), + zip: Default::default(), } } } @@ -498,16 +557,39 @@ pub struct ListPaymentMethodConfigurations<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub application: Option, + /// 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, + /// 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, + + /// 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, } impl<'a> ListPaymentMethodConfigurations<'a> { pub fn new() -> Self { ListPaymentMethodConfigurations { application: Default::default(), + ending_before: Default::default(), expand: Default::default(), + limit: Default::default(), + starting_after: Default::default(), } } } @@ -549,6 +631,10 @@ pub struct UpdatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. /// /// There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. @@ -692,6 +778,17 @@ pub struct UpdatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. + /// + /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. + /// Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// Configuration name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<&'a str>, @@ -746,6 +843,20 @@ pub struct UpdatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. + /// + /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. + /// Check this [page](https://stripe.com/docs/payments/swish) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + + /// Twint is a payment method popular in Switzerland. + /// + /// It allows customers to pay using their mobile phone. + /// Check this [page](https://docs.stripe.com/payments/twint) for more details. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. /// /// Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. @@ -759,6 +870,12 @@ pub struct UpdatePaymentMethodConfiguration<'a> { /// Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. #[serde(skip_serializing_if = "Option::is_none")] pub wechat_pay: Option, + + /// Zip gives your customers a way to split purchases over a series of payments. + /// + /// Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + #[serde(skip_serializing_if = "Option::is_none")] + pub zip: Option, } impl<'a> UpdatePaymentMethodConfiguration<'a> { @@ -769,6 +886,7 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { affirm: Default::default(), afterpay_clearpay: Default::default(), alipay: Default::default(), + amazon_pay: Default::default(), apple_pay: Default::default(), apple_pay_later: Default::default(), au_becs_debit: Default::default(), @@ -791,6 +909,8 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { klarna: Default::default(), konbini: Default::default(), link: Default::default(), + mobilepay: Default::default(), + multibanco: Default::default(), name: Default::default(), oxxo: Default::default(), p24: Default::default(), @@ -800,8 +920,11 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), + swish: Default::default(), + twint: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), + zip: Default::default(), } } } @@ -838,6 +961,14 @@ pub struct CreatePaymentMethodConfigurationAlipay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationAmazonPay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationApplePay { @@ -998,6 +1129,22 @@ pub struct CreatePaymentMethodConfigurationLink { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationMobilepay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationMultibanco { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationOxxo { @@ -1062,6 +1209,22 @@ pub struct CreatePaymentMethodConfigurationSofort { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationSwish { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationTwint { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationUsBankAccount { @@ -1078,6 +1241,14 @@ pub struct CreatePaymentMethodConfigurationWechatPay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationZip { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationAcssDebit { @@ -1110,6 +1281,14 @@ pub struct UpdatePaymentMethodConfigurationAlipay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationAmazonPay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationApplePay { @@ -1270,6 +1449,22 @@ pub struct UpdatePaymentMethodConfigurationLink { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationMobilepay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationMultibanco { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationOxxo { @@ -1334,6 +1529,22 @@ pub struct UpdatePaymentMethodConfigurationSofort { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationSwish { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationTwint { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationUsBankAccount { @@ -1350,6 +1561,14 @@ pub struct UpdatePaymentMethodConfigurationWechatPay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationZip { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationAcssDebitDisplayPreference { @@ -1382,6 +1601,14 @@ pub struct CreatePaymentMethodConfigurationAlipayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationAmazonPayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationApplePayDisplayPreference { @@ -1542,6 +1769,22 @@ pub struct CreatePaymentMethodConfigurationLinkDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationMobilepayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationMultibancoDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationOxxoDisplayPreference { @@ -1606,6 +1849,22 @@ pub struct CreatePaymentMethodConfigurationSofortDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationSwishDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationTwintDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationUsBankAccountDisplayPreference { @@ -1622,6 +1881,14 @@ pub struct CreatePaymentMethodConfigurationWechatPayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationZipDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationAcssDebitDisplayPreference { @@ -1654,6 +1921,14 @@ pub struct UpdatePaymentMethodConfigurationAlipayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationAmazonPayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationApplePayDisplayPreference { @@ -1814,6 +2089,22 @@ pub struct UpdatePaymentMethodConfigurationLinkDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationMobilepayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationMultibancoDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationOxxoDisplayPreference { @@ -1878,6 +2169,22 @@ pub struct UpdatePaymentMethodConfigurationSofortDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationSwishDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationTwintDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationUsBankAccountDisplayPreference { @@ -1894,6 +2201,14 @@ pub struct UpdatePaymentMethodConfigurationWechatPayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationZipDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + /// An enum representing the possible values of an `CreatePaymentMethodConfigurationAcssDebitDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2038,6 +2353,42 @@ impl std::default::Default for CreatePaymentMethodConfigurationAlipayDisplayPref } } +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationAmazonPayDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentMethodConfigurationApplePayDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2758,98 +3109,170 @@ impl std::default::Default for CreatePaymentMethodConfigurationLinkDisplayPrefer } } -/// An enum representing the possible values of an `CreatePaymentMethodConfigurationOxxoDisplayPreference`'s `preference` field. +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationMobilepayDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { +pub enum CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { None, Off, On, } -impl CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { +impl CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { pub fn as_str(self) -> &'static str { match self { - CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::None => "none", - CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::Off => "off", - CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::On => "on", + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::On => "on", } } } -impl AsRef for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { +impl AsRef for CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { +impl std::fmt::Display for CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { +impl std::default::Default for CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { fn default() -> Self { Self::None } } -/// An enum representing the possible values of an `CreatePaymentMethodConfigurationP24DisplayPreference`'s `preference` field. +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationMultibancoDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodConfigurationP24DisplayPreferencePreference { +pub enum CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { None, Off, On, } -impl CreatePaymentMethodConfigurationP24DisplayPreferencePreference { +impl CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { pub fn as_str(self) -> &'static str { match self { - CreatePaymentMethodConfigurationP24DisplayPreferencePreference::None => "none", - CreatePaymentMethodConfigurationP24DisplayPreferencePreference::Off => "off", - CreatePaymentMethodConfigurationP24DisplayPreferencePreference::On => "on", + CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::On => "on", } } } -impl AsRef for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { +impl AsRef for CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { +impl std::fmt::Display for CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { +impl std::default::Default for CreatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { fn default() -> Self { Self::None } } -/// An enum representing the possible values of an `CreatePaymentMethodConfigurationPaynowDisplayPreference`'s `preference` field. +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationOxxoDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { +pub enum CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { None, Off, On, } -impl CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { +impl CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { pub fn as_str(self) -> &'static str { match self { - CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::None => "none", - CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::Off => "off", - CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::On => "on", + CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference::On => "on", } } } -impl AsRef for CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { +impl AsRef for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationOxxoDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationP24DisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationP24DisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationP24DisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationP24DisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationP24DisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationP24DisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationP24DisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationPaynowDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationPaynowDisplayPreferencePreference { fn as_ref(&self) -> &str { self.as_str() } @@ -3046,6 +3469,78 @@ impl std::default::Default for CreatePaymentMethodConfigurationSofortDisplayPref } } +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationSwishDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationSwishDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationSwishDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationSwishDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationSwishDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationSwishDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationTwintDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationTwintDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationTwintDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationTwintDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationTwintDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationTwintDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentMethodConfigurationUsBankAccountDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3118,6 +3613,42 @@ impl std::default::Default for CreatePaymentMethodConfigurationWechatPayDisplayP } } +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationZipDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationZipDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationZipDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationZipDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationZipDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationZipDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `PaymentMethodConfigResourceDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3332,6 +3863,42 @@ impl std::default::Default for UpdatePaymentMethodConfigurationAlipayDisplayPref } } +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationAmazonPayDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationAmazonPayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentMethodConfigurationApplePayDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4052,6 +4619,78 @@ impl std::default::Default for UpdatePaymentMethodConfigurationLinkDisplayPrefer } } +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationMobilepayDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationMultibancoDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationMultibancoDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentMethodConfigurationOxxoDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4340,6 +4979,78 @@ impl std::default::Default for UpdatePaymentMethodConfigurationSofortDisplayPref } } +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationSwishDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationSwishDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationTwintDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationTwintDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentMethodConfigurationUsBankAccountDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4412,6 +5123,42 @@ impl std::default::Default for UpdatePaymentMethodConfigurationWechatPayDisplayP } } +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationZipDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationZipDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationZipDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationZipDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationZipDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationZipDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationZipDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// Cards are a popular way for consumers and businesses to pay online or in person. /// /// Stripe supports global and local card networks. diff --git a/src/resources/generated/payment_method_customer_balance.rs b/src/resources/generated/payment_method_customer_balance.rs new file mode 100644 index 000000000..66f744e3a --- /dev/null +++ b/src/resources/generated/payment_method_customer_balance.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_customer_balance". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCustomerBalance { +} diff --git a/src/resources/generated/payment_method_details_card_present.rs b/src/resources/generated/payment_method_details_card_present.rs new file mode 100644 index 000000000..f6c76f473 --- /dev/null +++ b/src/resources/generated/payment_method_details_card_present.rs @@ -0,0 +1,240 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Timestamp}; +use crate::resources::{PaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet, PaymentMethodDetailsCardPresentOffline}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_details_card_present". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsCardPresent { + + /// The authorized amount. + pub amount_authorized: Option, + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: Option, + + /// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + pub brand_product: Option, + + /// When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_before: Option, + + /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. + /// + /// May include alphanumeric characters, special characters and first/last name separator (`/`). + /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. + /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + pub cardholder_name: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Authorization response cryptogram. + pub emv_auth_data: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: Option, + + /// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. + /// + /// Only present if it was possible to generate a card PaymentMethod. + pub generated_card: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. + /// + /// Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + pub incremental_authorization_supported: bool, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: Option, + + /// Identifies which network this charge was processed on. + /// + /// Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub network: Option, + + /// This is used by the financial networks to identify a transaction. + /// + /// Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + /// The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). + /// This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + pub network_transaction_id: Option, + + /// Details about payments collected offline. + pub offline: Option, + + /// Defines whether the authorized amount can be over-captured or not. + pub overcapture_supported: bool, + + /// EMV tag 5F2D. + /// + /// Preferred languages specified by the integrated circuit chip. + pub preferred_locales: Option>, + + /// How card details were read in this transaction. + pub read_method: Option, + + /// A collection of fields required to be displayed on receipts. + /// + /// Only required for EMV transactions. + pub receipt: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub wallet: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsCardPresentReceipt { + + /// The type of account being debited or credited. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_type: Option, + + /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. + pub application_cryptogram: Option, + + /// Mnenomic of the Application Identifier. + pub application_preferred_name: Option, + + /// Identifier for this transaction. + pub authorization_code: Option, + + /// EMV tag 8A. + /// + /// A code returned by the card issuer. + pub authorization_response_code: Option, + + /// Describes the method used by the cardholder to verify ownership of the card. + /// + /// One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + pub cardholder_verification_method: Option, + + /// EMV tag 84. + /// + /// Similar to the application identifier stored on the integrated circuit chip. + pub dedicated_file_name: Option, + + /// The outcome of a series of EMV functions performed by the card reader. + pub terminal_verification_results: Option, + + /// An indication of various EMV functions performed during the transaction. + pub transaction_status_information: Option, +} + +/// An enum representing the possible values of an `PaymentMethodDetailsCardPresent`'s `read_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodDetailsCardPresentReadMethod { + ContactEmv, + ContactlessEmv, + ContactlessMagstripeMode, + MagneticStripeFallback, + MagneticStripeTrack2, +} + +impl PaymentMethodDetailsCardPresentReadMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodDetailsCardPresentReadMethod::ContactEmv => "contact_emv", + PaymentMethodDetailsCardPresentReadMethod::ContactlessEmv => "contactless_emv", + PaymentMethodDetailsCardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodDetailsCardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodDetailsCardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + } + } +} + +impl AsRef for PaymentMethodDetailsCardPresentReadMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodDetailsCardPresentReadMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodDetailsCardPresentReadMethod { + fn default() -> Self { + Self::ContactEmv + } +} + +/// An enum representing the possible values of an `PaymentMethodDetailsCardPresentReceipt`'s `account_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodDetailsCardPresentReceiptAccountType { + Checking, + Credit, + Prepaid, + Unknown, +} + +impl PaymentMethodDetailsCardPresentReceiptAccountType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodDetailsCardPresentReceiptAccountType::Checking => "checking", + PaymentMethodDetailsCardPresentReceiptAccountType::Credit => "credit", + PaymentMethodDetailsCardPresentReceiptAccountType::Prepaid => "prepaid", + PaymentMethodDetailsCardPresentReceiptAccountType::Unknown => "unknown", + } + } +} + +impl AsRef for PaymentMethodDetailsCardPresentReceiptAccountType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodDetailsCardPresentReceiptAccountType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodDetailsCardPresentReceiptAccountType { + fn default() -> Self { + Self::Checking + } +} diff --git a/src/resources/generated/payment_method_details_card_present_offline.rs b/src/resources/generated/payment_method_details_card_present_offline.rs new file mode 100644 index 000000000..32e2cde6d --- /dev/null +++ b/src/resources/generated/payment_method_details_card_present_offline.rs @@ -0,0 +1,52 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_details_card_present_offline". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsCardPresentOffline { + + /// Time at which the payment was collected while offline. + pub stored_at: Option, + + /// The method used to process this payment method offline. + /// + /// Only deferred is allowed. + #[serde(rename = "type")] + pub type_: Option, +} + +/// An enum representing the possible values of an `PaymentMethodDetailsCardPresentOffline`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodDetailsCardPresentOfflineType { + Deferred, +} + +impl PaymentMethodDetailsCardPresentOfflineType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodDetailsCardPresentOfflineType::Deferred => "deferred", + } + } +} + +impl AsRef for PaymentMethodDetailsCardPresentOfflineType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodDetailsCardPresentOfflineType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodDetailsCardPresentOfflineType { + fn default() -> Self { + Self::Deferred + } +} diff --git a/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs b/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs index 4785e2e29..4bdb0bff8 100644 --- a/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs +++ b/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_details_card_wallet_apple_pay". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletApplePay {} +pub struct PaymentMethodDetailsCardWalletApplePay { +} diff --git a/src/resources/generated/payment_method_details_card_wallet_google_pay.rs b/src/resources/generated/payment_method_details_card_wallet_google_pay.rs index 36af4281c..7d24e3224 100644 --- a/src/resources/generated/payment_method_details_card_wallet_google_pay.rs +++ b/src/resources/generated/payment_method_details_card_wallet_google_pay.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_details_card_wallet_google_pay". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletGooglePay {} +pub struct PaymentMethodDetailsCardWalletGooglePay { +} diff --git a/src/resources/generated/payment_method_domain.rs b/src/resources/generated/payment_method_domain.rs index 9aa5b19d8..8a460032d 100644 --- a/src/resources/generated/payment_method_domain.rs +++ b/src/resources/generated/payment_method_domain.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodDomainResourcePaymentMethodDomain". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDomain { /// Unique identifier for the object. diff --git a/src/resources/generated/payment_method_eps.rs b/src/resources/generated/payment_method_eps.rs new file mode 100644 index 000000000..ee27f6074 --- /dev/null +++ b/src/resources/generated/payment_method_eps.rs @@ -0,0 +1,101 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_eps". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodEps { + + /// The customer's bank. + /// + /// Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + pub bank: Option, +} + +/// An enum representing the possible values of an `PaymentMethodEps`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodEpsBank { + 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 PaymentMethodEpsBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", + PaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", + PaymentMethodEpsBank::BankAustria => "bank_austria", + PaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", + PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", + PaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", + PaymentMethodEpsBank::BksBankAg => "bks_bank_ag", + PaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", + PaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", + PaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", + PaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", + PaymentMethodEpsBank::Dolomitenbank => "dolomitenbank", + PaymentMethodEpsBank::EasybankAg => "easybank_ag", + PaymentMethodEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", + PaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + PaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + PaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + PaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", + PaymentMethodEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", + PaymentMethodEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", + PaymentMethodEpsBank::MarchfelderBank => "marchfelder_bank", + PaymentMethodEpsBank::OberbankAg => "oberbank_ag", + PaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", + PaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", + PaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", + PaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", + PaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", + PaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", + } + } +} + +impl AsRef for PaymentMethodEpsBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodEpsBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodEpsBank { + fn default() -> Self { + Self::ArzteUndApothekerBank + } +} diff --git a/src/resources/generated/payment_method_fpx.rs b/src/resources/generated/payment_method_fpx.rs new file mode 100644 index 000000000..e668a97d1 --- /dev/null +++ b/src/resources/generated/payment_method_fpx.rs @@ -0,0 +1,128 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_fpx". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodFpx { + + /// Account holder type, if provided. + /// + /// Can be one of `individual` or `company`. + pub account_holder_type: Option, + + /// The customer's bank, if provided. + /// + /// Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + pub bank: PaymentMethodFpxBank, +} + +/// An enum representing the possible values of an `PaymentMethodFpx`'s `account_holder_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodFpxAccountHolderType { + Company, + Individual, +} + +impl PaymentMethodFpxAccountHolderType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodFpxAccountHolderType::Company => "company", + PaymentMethodFpxAccountHolderType::Individual => "individual", + } + } +} + +impl AsRef for PaymentMethodFpxAccountHolderType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodFpxAccountHolderType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodFpxAccountHolderType { + fn default() -> Self { + Self::Company + } +} + +/// An enum representing the possible values of an `PaymentMethodFpx`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodFpxBank { + AffinBank, + Agrobank, + AllianceBank, + Ambank, + BankIslam, + BankMuamalat, + BankOfChina, + BankRakyat, + Bsn, + Cimb, + DeutscheBank, + HongLeongBank, + Hsbc, + Kfh, + Maybank2e, + Maybank2u, + Ocbc, + PbEnterprise, + PublicBank, + Rhb, + StandardChartered, + Uob, +} + +impl PaymentMethodFpxBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodFpxBank::AffinBank => "affin_bank", + PaymentMethodFpxBank::Agrobank => "agrobank", + PaymentMethodFpxBank::AllianceBank => "alliance_bank", + PaymentMethodFpxBank::Ambank => "ambank", + PaymentMethodFpxBank::BankIslam => "bank_islam", + PaymentMethodFpxBank::BankMuamalat => "bank_muamalat", + PaymentMethodFpxBank::BankOfChina => "bank_of_china", + PaymentMethodFpxBank::BankRakyat => "bank_rakyat", + PaymentMethodFpxBank::Bsn => "bsn", + PaymentMethodFpxBank::Cimb => "cimb", + PaymentMethodFpxBank::DeutscheBank => "deutsche_bank", + PaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", + PaymentMethodFpxBank::Hsbc => "hsbc", + PaymentMethodFpxBank::Kfh => "kfh", + PaymentMethodFpxBank::Maybank2e => "maybank2e", + PaymentMethodFpxBank::Maybank2u => "maybank2u", + PaymentMethodFpxBank::Ocbc => "ocbc", + PaymentMethodFpxBank::PbEnterprise => "pb_enterprise", + PaymentMethodFpxBank::PublicBank => "public_bank", + PaymentMethodFpxBank::Rhb => "rhb", + PaymentMethodFpxBank::StandardChartered => "standard_chartered", + PaymentMethodFpxBank::Uob => "uob", + } + } +} + +impl AsRef for PaymentMethodFpxBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodFpxBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodFpxBank { + fn default() -> Self { + Self::AffinBank + } +} diff --git a/src/resources/generated/payment_method_giropay.rs b/src/resources/generated/payment_method_giropay.rs new file mode 100644 index 000000000..0eb04b6b2 --- /dev/null +++ b/src/resources/generated/payment_method_giropay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_giropay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodGiropay { +} diff --git a/src/resources/generated/payment_method_grabpay.rs b/src/resources/generated/payment_method_grabpay.rs new file mode 100644 index 000000000..4bbe1dde3 --- /dev/null +++ b/src/resources/generated/payment_method_grabpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_grabpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodGrabpay { +} diff --git a/src/resources/generated/payment_method_ideal.rs b/src/resources/generated/payment_method_ideal.rs new file mode 100644 index 000000000..fb4d0b2fe --- /dev/null +++ b/src/resources/generated/payment_method_ideal.rs @@ -0,0 +1,161 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_ideal". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodIdeal { + + /// The customer's bank, if provided. + /// + /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + pub bank: Option, + + /// The Bank Identifier Code of the customer's bank, if the bank was provided. + pub bic: Option, +} + +/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodIdealBank { + AbnAmro, + AsnBank, + Bunq, + Handelsbanken, + Ing, + Knab, + Moneyou, + N26, + Nn, + Rabobank, + Regiobank, + Revolut, + SnsBank, + TriodosBank, + VanLanschot, + Yoursafe, +} + +impl PaymentMethodIdealBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodIdealBank::AbnAmro => "abn_amro", + PaymentMethodIdealBank::AsnBank => "asn_bank", + PaymentMethodIdealBank::Bunq => "bunq", + PaymentMethodIdealBank::Handelsbanken => "handelsbanken", + PaymentMethodIdealBank::Ing => "ing", + PaymentMethodIdealBank::Knab => "knab", + PaymentMethodIdealBank::Moneyou => "moneyou", + PaymentMethodIdealBank::N26 => "n26", + PaymentMethodIdealBank::Nn => "nn", + PaymentMethodIdealBank::Rabobank => "rabobank", + PaymentMethodIdealBank::Regiobank => "regiobank", + PaymentMethodIdealBank::Revolut => "revolut", + PaymentMethodIdealBank::SnsBank => "sns_bank", + PaymentMethodIdealBank::TriodosBank => "triodos_bank", + PaymentMethodIdealBank::VanLanschot => "van_lanschot", + PaymentMethodIdealBank::Yoursafe => "yoursafe", + } + } +} + +impl AsRef for PaymentMethodIdealBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodIdealBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodIdealBank { + fn default() -> Self { + Self::AbnAmro + } +} + +/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bic` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodIdealBic { + #[serde(rename = "ABNANL2A")] + Abnanl2a, + #[serde(rename = "ASNBNL21")] + Asnbnl21, + #[serde(rename = "BITSNL2A")] + Bitsnl2a, + #[serde(rename = "BUNQNL2A")] + Bunqnl2a, + #[serde(rename = "FVLBNL22")] + Fvlbnl22, + #[serde(rename = "HANDNL2A")] + Handnl2a, + #[serde(rename = "INGBNL2A")] + Ingbnl2a, + #[serde(rename = "KNABNL2H")] + Knabnl2h, + #[serde(rename = "MOYONL21")] + Moyonl21, + #[serde(rename = "NNBANL2G")] + Nnbanl2g, + #[serde(rename = "NTSBDEB1")] + Ntsbdeb1, + #[serde(rename = "RABONL2U")] + Rabonl2u, + #[serde(rename = "RBRBNL21")] + Rbrbnl21, + #[serde(rename = "REVOIE23")] + Revoie23, + #[serde(rename = "REVOLT21")] + Revolt21, + #[serde(rename = "SNSBNL2A")] + Snsbnl2a, + #[serde(rename = "TRIONL2U")] + Trionl2u, +} + +impl PaymentMethodIdealBic { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodIdealBic::Abnanl2a => "ABNANL2A", + PaymentMethodIdealBic::Asnbnl21 => "ASNBNL21", + PaymentMethodIdealBic::Bitsnl2a => "BITSNL2A", + PaymentMethodIdealBic::Bunqnl2a => "BUNQNL2A", + PaymentMethodIdealBic::Fvlbnl22 => "FVLBNL22", + PaymentMethodIdealBic::Handnl2a => "HANDNL2A", + PaymentMethodIdealBic::Ingbnl2a => "INGBNL2A", + PaymentMethodIdealBic::Knabnl2h => "KNABNL2H", + PaymentMethodIdealBic::Moyonl21 => "MOYONL21", + PaymentMethodIdealBic::Nnbanl2g => "NNBANL2G", + PaymentMethodIdealBic::Ntsbdeb1 => "NTSBDEB1", + PaymentMethodIdealBic::Rabonl2u => "RABONL2U", + PaymentMethodIdealBic::Rbrbnl21 => "RBRBNL21", + PaymentMethodIdealBic::Revoie23 => "REVOIE23", + PaymentMethodIdealBic::Revolt21 => "REVOLT21", + PaymentMethodIdealBic::Snsbnl2a => "SNSBNL2A", + PaymentMethodIdealBic::Trionl2u => "TRIONL2U", + } + } +} + +impl AsRef for PaymentMethodIdealBic { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodIdealBic { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodIdealBic { + fn default() -> Self { + Self::Abnanl2a + } +} diff --git a/src/resources/generated/payment_method_interac_present.rs b/src/resources/generated/payment_method_interac_present.rs new file mode 100644 index 000000000..848b47cc5 --- /dev/null +++ b/src/resources/generated/payment_method_interac_present.rs @@ -0,0 +1,117 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{PaymentMethodCardPresentNetworks}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_interac_present". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodInteracPresent { + + /// Card brand. + /// + /// Can be `interac`, `mastercard` or `visa`. + pub brand: Option, + + /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. + /// + /// May include alphanumeric characters, special characters and first/last name separator (`/`). + /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. + /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + pub cardholder_name: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: Option, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// EMV tag 5F2D. + /// + /// Preferred languages specified by the integrated circuit chip. + pub preferred_locales: Option>, + + /// How card details were read in this transaction. + pub read_method: Option, +} + +/// An enum representing the possible values of an `PaymentMethodInteracPresent`'s `read_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodInteracPresentReadMethod { + ContactEmv, + ContactlessEmv, + ContactlessMagstripeMode, + MagneticStripeFallback, + MagneticStripeTrack2, +} + +impl PaymentMethodInteracPresentReadMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodInteracPresentReadMethod::ContactEmv => "contact_emv", + PaymentMethodInteracPresentReadMethod::ContactlessEmv => "contactless_emv", + PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + } + } +} + +impl AsRef for PaymentMethodInteracPresentReadMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodInteracPresentReadMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodInteracPresentReadMethod { + fn default() -> Self { + Self::ContactEmv + } +} diff --git a/src/resources/generated/payment_method_klarna.rs b/src/resources/generated/payment_method_klarna.rs new file mode 100644 index 000000000..3936504a5 --- /dev/null +++ b/src/resources/generated/payment_method_klarna.rs @@ -0,0 +1,27 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_klarna". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodKlarna { + + /// The customer's date of birth, if provided. + #[serde(skip_serializing_if = "Option::is_none")] + pub dob: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { + + /// The day of birth, between 1 and 31. + pub day: Option, + + /// The month of birth, between 1 and 12. + pub month: Option, + + /// The four-digit year of birth. + pub year: Option, +} diff --git a/src/resources/generated/payment_method_konbini.rs b/src/resources/generated/payment_method_konbini.rs new file mode 100644 index 000000000..f92aec4bb --- /dev/null +++ b/src/resources/generated/payment_method_konbini.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_konbini". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodKonbini { +} diff --git a/src/resources/generated/payment_method_link.rs b/src/resources/generated/payment_method_link.rs new file mode 100644 index 000000000..944a701ed --- /dev/null +++ b/src/resources/generated/payment_method_link.rs @@ -0,0 +1,17 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_link". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodLink { + + /// Account owner's email address. + pub email: Option, + + /// [Deprecated] This is a legacy parameter that no longer has any function. + #[serde(skip_serializing_if = "Option::is_none")] + pub persistent_token: Option, +} diff --git a/src/resources/generated/payment_method_mobilepay.rs b/src/resources/generated/payment_method_mobilepay.rs new file mode 100644 index 000000000..fb23914d6 --- /dev/null +++ b/src/resources/generated/payment_method_mobilepay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_mobilepay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodMobilepay { +} diff --git a/src/resources/generated/payment_method_multibanco.rs b/src/resources/generated/payment_method_multibanco.rs new file mode 100644 index 000000000..16c7f6d0d --- /dev/null +++ b/src/resources/generated/payment_method_multibanco.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_multibanco". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodMultibanco { +} diff --git a/src/resources/generated/payment_method_options_card_present_routing.rs b/src/resources/generated/payment_method_options_card_present_routing.rs new file mode 100644 index 000000000..59e7d3181 --- /dev/null +++ b/src/resources/generated/payment_method_options_card_present_routing.rs @@ -0,0 +1,47 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_options_card_present_routing". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOptionsCardPresentRouting { + + /// Requested routing priority. + pub requested_priority: Option, +} + +/// An enum representing the possible values of an `PaymentMethodOptionsCardPresentRouting`'s `requested_priority` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsCardPresentRoutingRequestedPriority { + Domestic, + International, +} + +impl PaymentMethodOptionsCardPresentRoutingRequestedPriority { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsCardPresentRoutingRequestedPriority::Domestic => "domestic", + PaymentMethodOptionsCardPresentRoutingRequestedPriority::International => "international", + } + } +} + +impl AsRef for PaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsCardPresentRoutingRequestedPriority { + fn default() -> Self { + Self::Domestic + } +} diff --git a/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs b/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs index 1505af091..49eadcc15 100644 --- a/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs +++ b/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_options_customer_balance_eu_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalanceEuBankAccount { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. diff --git a/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs b/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs index f255d7400..6e559ecc5 100644 --- a/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs +++ b/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_options_us_bank_account_mandate_options". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsUsBankAccountMandateOptions { + /// Mandate collection method. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, diff --git a/src/resources/generated/payment_method_oxxo.rs b/src/resources/generated/payment_method_oxxo.rs new file mode 100644 index 000000000..be002edde --- /dev/null +++ b/src/resources/generated/payment_method_oxxo.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_oxxo". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOxxo { +} diff --git a/src/resources/generated/payment_method_p24.rs b/src/resources/generated/payment_method_p24.rs new file mode 100644 index 000000000..20e916ae7 --- /dev/null +++ b/src/resources/generated/payment_method_p24.rs @@ -0,0 +1,95 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_p24". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodP24 { + + /// The customer's bank, if provided. + pub bank: Option, +} + +/// An enum representing the possible values of an `PaymentMethodP24`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodP24Bank { + 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 PaymentMethodP24Bank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodP24Bank::AliorBank => "alior_bank", + PaymentMethodP24Bank::BankMillennium => "bank_millennium", + PaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", + PaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", + PaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", + PaymentMethodP24Bank::Blik => "blik", + PaymentMethodP24Bank::BnpParibas => "bnp_paribas", + PaymentMethodP24Bank::Boz => "boz", + PaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", + PaymentMethodP24Bank::CreditAgricole => "credit_agricole", + PaymentMethodP24Bank::Envelobank => "envelobank", + PaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", + PaymentMethodP24Bank::GetinBank => "getin_bank", + PaymentMethodP24Bank::Ideabank => "ideabank", + PaymentMethodP24Bank::Ing => "ing", + PaymentMethodP24Bank::Inteligo => "inteligo", + PaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", + PaymentMethodP24Bank::NestPrzelew => "nest_przelew", + PaymentMethodP24Bank::NoblePay => "noble_pay", + PaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", + PaymentMethodP24Bank::PlusBank => "plus_bank", + PaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", + PaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", + PaymentMethodP24Bank::ToyotaBank => "toyota_bank", + PaymentMethodP24Bank::Velobank => "velobank", + PaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", + } + } +} + +impl AsRef for PaymentMethodP24Bank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodP24Bank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodP24Bank { + fn default() -> Self { + Self::AliorBank + } +} diff --git a/src/resources/generated/payment_method_paynow.rs b/src/resources/generated/payment_method_paynow.rs new file mode 100644 index 000000000..9ee5210bf --- /dev/null +++ b/src/resources/generated/payment_method_paynow.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_paynow". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPaynow { +} diff --git a/src/resources/generated/payment_method_paypal.rs b/src/resources/generated/payment_method_paypal.rs new file mode 100644 index 000000000..2b9346394 --- /dev/null +++ b/src/resources/generated/payment_method_paypal.rs @@ -0,0 +1,21 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_paypal". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPaypal { + + /// Owner's email. + /// + /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub payer_email: Option, + + /// PayPal account PayerID. + /// + /// This identifier uniquely identifies the PayPal customer. + pub payer_id: Option, +} diff --git a/src/resources/generated/payment_method_pix.rs b/src/resources/generated/payment_method_pix.rs new file mode 100644 index 000000000..3205208b8 --- /dev/null +++ b/src/resources/generated/payment_method_pix.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_pix". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPix { +} diff --git a/src/resources/generated/payment_method_promptpay.rs b/src/resources/generated/payment_method_promptpay.rs new file mode 100644 index 000000000..4171ca54d --- /dev/null +++ b/src/resources/generated/payment_method_promptpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_promptpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPromptpay { +} diff --git a/src/resources/generated/payment_method_revolut_pay.rs b/src/resources/generated/payment_method_revolut_pay.rs new file mode 100644 index 000000000..cbdebb288 --- /dev/null +++ b/src/resources/generated/payment_method_revolut_pay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_revolut_pay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodRevolutPay { +} diff --git a/src/resources/generated/payment_method_sepa_debit.rs b/src/resources/generated/payment_method_sepa_debit.rs new file mode 100644 index 000000000..be1debfeb --- /dev/null +++ b/src/resources/generated/payment_method_sepa_debit.rs @@ -0,0 +1,42 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Expandable}; +use crate::resources::{Charge, SetupAttempt}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_sepa_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSepaDebit { + + /// Bank code of bank associated with the bank account. + pub bank_code: Option, + + /// Branch code of bank associated with the bank account. + pub branch_code: Option, + + /// Two-letter ISO code representing the country the bank account is located in. + pub country: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Information about the object that generated this PaymentMethod. + pub generated_from: Option, + + /// Last four characters of the IBAN. + pub last4: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SepaDebitGeneratedFrom { + + /// The ID of the Charge that generated this PaymentMethod, if any. + pub charge: Option>, + + /// The ID of the SetupAttempt that generated this PaymentMethod, if any. + pub setup_attempt: Option>, +} diff --git a/src/resources/generated/payment_method_sofort.rs b/src/resources/generated/payment_method_sofort.rs new file mode 100644 index 000000000..7c5587cac --- /dev/null +++ b/src/resources/generated/payment_method_sofort.rs @@ -0,0 +1,13 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_sofort". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSofort { + + /// Two-letter ISO code representing the country the bank account is located in. + pub country: Option, +} diff --git a/src/resources/generated/payment_method_swish.rs b/src/resources/generated/payment_method_swish.rs new file mode 100644 index 000000000..2b2b24fc0 --- /dev/null +++ b/src/resources/generated/payment_method_swish.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_swish". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSwish { +} diff --git a/src/resources/generated/payment_method_twint.rs b/src/resources/generated/payment_method_twint.rs new file mode 100644 index 000000000..89b275080 --- /dev/null +++ b/src/resources/generated/payment_method_twint.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_twint". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodTwint { +} diff --git a/src/resources/generated/payment_method_us_bank_account.rs b/src/resources/generated/payment_method_us_bank_account.rs new file mode 100644 index 000000000..7153b1ca4 --- /dev/null +++ b/src/resources/generated/payment_method_us_bank_account.rs @@ -0,0 +1,278 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_us_bank_account". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccount { + + /// Account holder type: individual or company. + pub account_holder_type: Option, + + /// Account type: checkings or savings. + /// + /// Defaults to checking if omitted. + pub account_type: Option, + + /// The name of the bank. + pub bank_name: Option, + + /// The ID of the Financial Connections Account used to create the payment method. + pub financial_connections_account: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Contains information about US bank account networks that can be used. + pub networks: Option, + + /// Routing number of the bank account. + pub routing_number: Option, + + /// Contains information about the future reusability of this PaymentMethod. + pub status_details: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccountStatusDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub blocked: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccountBlocked { + + /// The ACH network code that resulted in this block. + pub network_code: Option, + + /// The reason why this PaymentMethod's fingerprint has been blocked. + pub reason: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UsBankAccountNetworks { + + /// The preferred network. + pub preferred: Option, + + /// All supported networks. + pub supported: Vec, +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_holder_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountAccountHolderType { + Company, + Individual, +} + +impl PaymentMethodUsBankAccountAccountHolderType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountAccountHolderType::Company => "company", + PaymentMethodUsBankAccountAccountHolderType::Individual => "individual", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountAccountHolderType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountAccountHolderType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountAccountHolderType { + fn default() -> Self { + Self::Company + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountAccountType { + Checking, + Savings, +} + +impl PaymentMethodUsBankAccountAccountType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountAccountType::Checking => "checking", + PaymentMethodUsBankAccountAccountType::Savings => "savings", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountAccountType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountAccountType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountAccountType { + fn default() -> Self { + Self::Checking + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `network_code` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountBlockedNetworkCode { + #[serde(rename = "R02")] + R02, + #[serde(rename = "R03")] + R03, + #[serde(rename = "R04")] + R04, + #[serde(rename = "R05")] + R05, + #[serde(rename = "R07")] + R07, + #[serde(rename = "R08")] + R08, + #[serde(rename = "R10")] + R10, + #[serde(rename = "R11")] + R11, + #[serde(rename = "R16")] + R16, + #[serde(rename = "R20")] + R20, + #[serde(rename = "R29")] + R29, + #[serde(rename = "R31")] + R31, +} + +impl PaymentMethodUsBankAccountBlockedNetworkCode { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountBlockedNetworkCode::R02 => "R02", + PaymentMethodUsBankAccountBlockedNetworkCode::R03 => "R03", + PaymentMethodUsBankAccountBlockedNetworkCode::R04 => "R04", + PaymentMethodUsBankAccountBlockedNetworkCode::R05 => "R05", + PaymentMethodUsBankAccountBlockedNetworkCode::R07 => "R07", + PaymentMethodUsBankAccountBlockedNetworkCode::R08 => "R08", + PaymentMethodUsBankAccountBlockedNetworkCode::R10 => "R10", + PaymentMethodUsBankAccountBlockedNetworkCode::R11 => "R11", + PaymentMethodUsBankAccountBlockedNetworkCode::R16 => "R16", + PaymentMethodUsBankAccountBlockedNetworkCode::R20 => "R20", + PaymentMethodUsBankAccountBlockedNetworkCode::R29 => "R29", + PaymentMethodUsBankAccountBlockedNetworkCode::R31 => "R31", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountBlockedNetworkCode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountBlockedNetworkCode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountBlockedNetworkCode { + fn default() -> Self { + Self::R02 + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountBlockedReason { + BankAccountClosed, + BankAccountFrozen, + BankAccountInvalidDetails, + BankAccountRestricted, + BankAccountUnusable, + DebitNotAuthorized, +} + +impl PaymentMethodUsBankAccountBlockedReason { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountBlockedReason::BankAccountClosed => "bank_account_closed", + PaymentMethodUsBankAccountBlockedReason::BankAccountFrozen => "bank_account_frozen", + PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => "bank_account_invalid_details", + PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => "bank_account_restricted", + PaymentMethodUsBankAccountBlockedReason::BankAccountUnusable => "bank_account_unusable", + PaymentMethodUsBankAccountBlockedReason::DebitNotAuthorized => "debit_not_authorized", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountBlockedReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountBlockedReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountBlockedReason { + fn default() -> Self { + Self::BankAccountClosed + } +} + +/// An enum representing the possible values of an `UsBankAccountNetworks`'s `supported` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UsBankAccountNetworksSupported { + Ach, + UsDomesticWire, +} + +impl UsBankAccountNetworksSupported { + pub fn as_str(self) -> &'static str { + match self { + UsBankAccountNetworksSupported::Ach => "ach", + UsBankAccountNetworksSupported::UsDomesticWire => "us_domestic_wire", + } + } +} + +impl AsRef for UsBankAccountNetworksSupported { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UsBankAccountNetworksSupported { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UsBankAccountNetworksSupported { + fn default() -> Self { + Self::Ach + } +} diff --git a/src/resources/generated/payment_method_wechat_pay.rs b/src/resources/generated/payment_method_wechat_pay.rs new file mode 100644 index 000000000..0de873239 --- /dev/null +++ b/src/resources/generated/payment_method_wechat_pay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_wechat_pay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodWechatPay { +} diff --git a/src/resources/generated/payment_method_zip.rs b/src/resources/generated/payment_method_zip.rs new file mode 100644 index 000000000..c37a2961b --- /dev/null +++ b/src/resources/generated/payment_method_zip.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_zip". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodZip { +} diff --git a/src/resources/generated/payout.rs b/src/resources/generated/payout.rs index a1da275c9..241ac4b99 100644 --- a/src/resources/generated/payout.rs +++ b/src/resources/generated/payout.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PayoutId; +use crate::ids::{PayoutId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{BalanceTransaction, Currency, PayoutDestinationUnion}; +use crate::resources::{ApplicationFee, BalanceTransaction, Currency, PayoutDestinationUnion}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Payout". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Payout { /// Unique identifier for the object. @@ -20,6 +19,16 @@ pub struct Payout { /// The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. pub amount: i64, + /// The application fee (if any) for the payout. + /// + /// [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + pub application_fee: Option>, + + /// The amount of the application fee (if any) requested for the payout. + /// + /// [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + pub application_fee_amount: Option, + /// Date that you can expect the payout to arrive in the bank. /// /// This factors in delays to account for weekends or bank holidays. @@ -102,12 +111,14 @@ pub struct Payout { } impl Payout { + /// Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. /// /// The payouts return in sorted order, with the most recently created payouts appearing first. - pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { - client.get_query("/payouts", params) - } +pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { + client.get_query("/payouts", params) +} + /// To send funds to your own bank account, create a new payout object. /// @@ -150,6 +161,7 @@ impl Object for Payout { /// The parameters for `Payout::create`. #[derive(Clone, Debug, Serialize)] pub struct CreatePayout<'a> { + /// A positive integer in cents representing how much to payout. pub amount: i64, @@ -225,9 +237,12 @@ impl<'a> CreatePayout<'a> { /// The parameters for `Payout::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPayouts<'a> { + + /// Only return payouts that are expected to arrive during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub arrival_date: Option>, + /// Only return payouts that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -281,12 +296,12 @@ impl<'a> ListPayouts<'a> { impl Paginable for ListPayouts<'_> { type O = Payout; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Payout::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePayout<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -302,7 +317,10 @@ pub struct UpdatePayout<'a> { impl<'a> UpdatePayout<'a> { pub fn new() -> Self { - UpdatePayout { expand: Default::default(), metadata: Default::default() } + UpdatePayout { + expand: Default::default(), + metadata: Default::default(), + } } } diff --git a/src/resources/generated/person.rs b/src/resources/generated/person.rs index 7ff2c6507..876cd8680 100644 --- a/src/resources/generated/person.rs +++ b/src/resources/generated/person.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::PersonId; +use crate::ids::{PersonId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{Address, File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Person". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Person { /// Unique identifier for the object. @@ -152,6 +151,7 @@ impl Object for Person { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LegalEntityDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -164,6 +164,7 @@ pub struct LegalEntityDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerification { + /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] pub additional_document: Option, @@ -191,6 +192,7 @@ pub struct PersonVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerificationDocument { + /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. pub back: Option>, @@ -210,11 +212,14 @@ pub struct PersonVerificationDocument { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonAdditionalTosAcceptances { - pub account: PersonAdditionalTosAcceptance, + + /// Details on the legal guardian's acceptance of the main Stripe service agreement. + pub account: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonAdditionalTosAcceptance { + /// The Unix timestamp marking when the legal guardian accepted the service agreement. pub date: Option, @@ -227,6 +232,7 @@ pub struct PersonAdditionalTosAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonFutureRequirements { + /// Fields that are due and can be satisfied by providing the corresponding alternative fields instead. pub alternatives: Option>, @@ -249,15 +255,17 @@ pub struct PersonFutureRequirements { /// New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. pub past_due: Vec, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due` or `currently_due`. + /// Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Vec, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsAlternative { + /// Fields that can be provided to satisfy all fields in `original_fields_due`. pub alternative_fields_due: Vec, @@ -267,6 +275,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -279,6 +288,7 @@ pub struct AccountRequirementsError { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonRelationship { + /// Whether the person is a director of the account's legal entity. /// /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -309,6 +319,7 @@ pub struct PersonRelationship { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonRequirements { + /// Fields that are due and can be satisfied by providing the corresponding alternative fields instead. pub alternatives: Option>, @@ -330,10 +341,11 @@ pub struct PersonRequirements { /// These fields need to be collected to enable the person's account. pub past_due: Vec, - /// Fields that may become required depending on the results of verification or review. + /// Fields that might become required depending on the results of verification or review. /// - /// Will be an empty array unless an asynchronous verification is pending. + /// It's an empty array unless an asynchronous verification is pending. /// If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + /// Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. pub pending_verification: Vec, } @@ -422,6 +434,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -429,6 +442,7 @@ pub enum AccountRequirementsErrorCode { VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, + VerificationRequiresAdditionalProofOfRegistration, } impl AccountRequirementsErrorCode { @@ -514,6 +528,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", @@ -521,6 +536,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", + AccountRequirementsErrorCode::VerificationRequiresAdditionalProofOfRegistration => "verification_requires_additional_proof_of_registration", } } } diff --git a/src/resources/generated/placeholders.rs b/src/resources/generated/placeholders.rs index 0d00ead63..8f52365f5 100644 --- a/src/resources/generated/placeholders.rs +++ b/src/resources/generated/placeholders.rs @@ -1,582 +1,445 @@ -use serde::{Deserialize, Serialize}; - use crate::ids::*; use crate::params::Object; +use serde::{Deserialize, Serialize}; #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Account { - pub id: AccountId, + pub id: AccountId, } #[cfg(not(feature = "connect"))] impl Object for Account { - type Id = AccountId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "account" - } + type Id = AccountId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "account" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Application { - pub id: ApplicationId, + pub id: ApplicationId, } #[cfg(not(feature = "connect"))] impl Object for Application { - type Id = ApplicationId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "application" - } + type Id = ApplicationId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "application" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFee { - pub id: ApplicationFeeId, + pub id: ApplicationFeeId, } #[cfg(not(feature = "connect"))] impl Object for ApplicationFee { - type Id = ApplicationFeeId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "application_fee" - } + type Id = ApplicationFeeId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "application_fee" } } #[cfg(not(feature = "checkout"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSession { - pub id: CheckoutSessionId, + pub id: CheckoutSessionId, } #[cfg(not(feature = "checkout"))] impl Object for CheckoutSession { - type Id = CheckoutSessionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "checkout_session" - } + type Id = CheckoutSessionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "checkout_session" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectCollectionTransfer { - pub id: ConnectCollectionTransferId, + pub id: ConnectCollectionTransferId, } #[cfg(not(feature = "connect"))] impl Object for ConnectCollectionTransfer { - type Id = ConnectCollectionTransferId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "connect_collection_transfer" - } + type Id = ConnectCollectionTransferId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "connect_collection_transfer" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Coupon { - pub id: CouponId, + pub id: CouponId, } #[cfg(not(feature = "billing"))] impl Object for Coupon { - type Id = CouponId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "coupon" - } + type Id = CouponId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "coupon" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Discount { - pub id: DiscountId, + pub id: DiscountId, } #[cfg(not(feature = "billing"))] impl Object for Discount { - type Id = DiscountId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "discount" - } + type Id = DiscountId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "discount" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFeeRefund { - pub id: ApplicationFeeRefundId, + pub id: ApplicationFeeRefundId, } #[cfg(not(feature = "connect"))] impl Object for ApplicationFeeRefund { - type Id = ApplicationFeeRefundId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "fee_refund" - } + type Id = ApplicationFeeRefundId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "fee_refund" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Invoice { - pub id: InvoiceId, + pub id: InvoiceId, } #[cfg(not(feature = "billing"))] impl Object for Invoice { - type Id = InvoiceId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "invoice" - } + type Id = InvoiceId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "invoice" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItem { - pub id: InvoiceItemId, + pub id: InvoiceItemId, } #[cfg(not(feature = "billing"))] impl Object for InvoiceItem { - type Id = InvoiceItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "invoiceitem" - } + type Id = InvoiceItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "invoiceitem" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorization { - pub id: IssuingAuthorizationId, + pub id: IssuingAuthorizationId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingAuthorization { - type Id = IssuingAuthorizationId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.authorization" - } + type Id = IssuingAuthorizationId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.authorization" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCard { - pub id: IssuingCardId, + pub id: IssuingCardId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingCard { - type Id = IssuingCardId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.card" - } + type Id = IssuingCardId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.card" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholder { - pub id: IssuingCardholderId, + pub id: IssuingCardholderId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingCardholder { - type Id = IssuingCardholderId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.cardholder" - } + type Id = IssuingCardholderId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.cardholder" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDispute { - pub id: IssuingDisputeId, + pub id: IssuingDisputeId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingDispute { - type Id = IssuingDisputeId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.dispute" - } + type Id = IssuingDisputeId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.dispute" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransaction { - pub id: IssuingTransactionId, + pub id: IssuingTransactionId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingTransaction { - type Id = IssuingTransactionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.transaction" - } + type Id = IssuingTransactionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.transaction" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceLineItem { - pub id: InvoiceLineItemId, + pub id: InvoiceLineItemId, } #[cfg(not(feature = "billing"))] impl Object for InvoiceLineItem { - type Id = InvoiceLineItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "line_item" - } + type Id = InvoiceLineItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "line_item" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Order { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for Order { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OrderItem { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for OrderItem { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order_item" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order_item" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OrderReturn { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for OrderReturn { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order_return" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order_return" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Person { - pub id: PersonId, + pub id: PersonId, } #[cfg(not(feature = "connect"))] impl Object for Person { - type Id = PersonId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "person" - } + type Id = PersonId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "person" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Plan { - pub id: PlanId, + pub id: PlanId, } #[cfg(not(feature = "billing"))] impl Object for Plan { - type Id = PlanId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "plan" - } + type Id = PlanId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "plan" } } #[cfg(not(feature = "fraud"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Review { - pub id: ReviewId, + pub id: ReviewId, } #[cfg(not(feature = "fraud"))] impl Object for Review { - type Id = ReviewId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "review" - } + type Id = ReviewId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "review" } } #[cfg(not(feature = "sigma"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ScheduledQueryRun { - pub id: ScheduledQueryRunId, + pub id: ScheduledQueryRunId, } #[cfg(not(feature = "sigma"))] impl Object for ScheduledQueryRun { - type Id = ScheduledQueryRunId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "scheduled_query_run" - } + type Id = ScheduledQueryRunId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "scheduled_query_run" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Sku { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for Sku { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "sku" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "sku" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Subscription { - pub id: SubscriptionId, + pub id: SubscriptionId, } #[cfg(not(feature = "billing"))] impl Object for Subscription { - type Id = SubscriptionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription" - } + type Id = SubscriptionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItem { - pub id: SubscriptionItemId, + pub id: SubscriptionItemId, } #[cfg(not(feature = "billing"))] impl Object for SubscriptionItem { - type Id = SubscriptionItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription_item" - } + type Id = SubscriptionItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription_item" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionSchedule { - pub id: SubscriptionScheduleId, + pub id: SubscriptionScheduleId, } #[cfg(not(feature = "billing"))] impl Object for SubscriptionSchedule { - type Id = SubscriptionScheduleId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription_schedule" - } + type Id = SubscriptionScheduleId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription_schedule" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleRevision { - pub id: (), + pub id: (), } #[cfg(not(feature = "billing"))] impl Object for SubscriptionScheduleRevision { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "subscription_schedule_revision" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "subscription_schedule_revision" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxId { - pub id: TaxIdId, + pub id: TaxIdId, } #[cfg(not(feature = "billing"))] impl Object for TaxId { - type Id = TaxIdId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "tax_id" - } + type Id = TaxIdId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "tax_id" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxRate { - pub id: TaxRateId, + pub id: TaxRateId, } #[cfg(not(feature = "billing"))] impl Object for TaxRate { - type Id = TaxRateId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "tax_rate" - } + type Id = TaxRateId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "tax_rate" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Topup { - pub id: TopupId, + pub id: TopupId, } #[cfg(not(feature = "connect"))] impl Object for Topup { - type Id = TopupId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "topup" - } + type Id = TopupId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "topup" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Transfer { - pub id: TransferId, + pub id: TransferId, } #[cfg(not(feature = "connect"))] impl Object for Transfer { - type Id = TransferId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "transfer" - } + type Id = TransferId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "transfer" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferReversal { - pub id: TransferReversalId, + pub id: TransferReversalId, } #[cfg(not(feature = "connect"))] impl Object for TransferReversal { - type Id = TransferReversalId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "transfer_reversal" - } + type Id = TransferReversalId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "transfer_reversal" } } #[cfg(not(feature = "webhook-endpoints"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct WebhookEndpoint { - pub id: WebhookEndpointId, + pub id: WebhookEndpointId, } #[cfg(not(feature = "webhook-endpoints"))] impl Object for WebhookEndpoint { - type Id = WebhookEndpointId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "webhook_endpoint" - } + type Id = WebhookEndpointId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "webhook_endpoint" } } diff --git a/src/resources/generated/plan.rs b/src/resources/generated/plan.rs index ac57f6243..2ad8d3ad6 100644 --- a/src/resources/generated/plan.rs +++ b/src/resources/generated/plan.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PlanId; -use crate::params::{ - Deleted, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::ids::{PlanId}; +use crate::params::{Deleted, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{CreateProduct, Currency, Product}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Plan". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Plan { /// Unique identifier for the object. @@ -89,6 +85,10 @@ pub struct Plan { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// The meter tracking the usage of a metered price. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// A brief description of the plan, hidden from customers. #[serde(skip_serializing_if = "Option::is_none")] pub nickname: Option, @@ -132,10 +132,12 @@ pub struct Plan { } impl Plan { + /// Returns a list of your plans. - pub fn list(client: &Client, params: &ListPlans<'_>) -> Response> { - client.get_query("/plans", params) - } +pub fn list(client: &Client, params: &ListPlans<'_>) -> Response> { + client.get_query("/plans", params) +} + /// Retrieves the plan with the given ID. pub fn retrieve(client: &Client, id: &PlanId, expand: &[&str]) -> Response { @@ -171,6 +173,7 @@ impl Object for Plan { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PlanTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -189,6 +192,7 @@ pub struct PlanTier { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformUsage { + /// Divide usage by this number. pub divide_by: i64, @@ -199,6 +203,7 @@ pub struct TransformUsage { /// The parameters for `Plan::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPlans<'a> { + /// Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -254,12 +259,12 @@ impl<'a> ListPlans<'a> { impl Paginable for ListPlans<'_> { type O = Plan; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Plan::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePlan<'a> { + /// Whether the plan is currently available for new subscriptions. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, diff --git a/src/resources/generated/platform_tax_fee.rs b/src/resources/generated/platform_tax_fee.rs deleted file mode 100644 index 816bc53cb..000000000 --- a/src/resources/generated/platform_tax_fee.rs +++ /dev/null @@ -1,35 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -use crate::ids::PlatformTaxFeeId; -use crate::params::Object; - -/// The resource representing a Stripe "PlatformTax". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PlatformTaxFee { - /// Unique identifier for the object. - pub id: PlatformTaxFeeId, - - /// The Connected account that incurred this charge. - pub account: String, - - /// The payment object that caused this tax to be inflicted. - pub source_transaction: String, - - /// The type of tax (VAT). - #[serde(rename = "type")] - pub type_: String, -} - -impl Object for PlatformTaxFee { - type Id = PlatformTaxFeeId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "platform_tax_fee" - } -} diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index 9e58d97f6..2d4e4e500 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PriceId; -use crate::params::{ - CurrencyMap, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::ids::{PriceId}; +use crate::params::{CurrencyMap, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{CreateProduct, Currency, CustomUnitAmount, Product, UpTo}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Price". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Price { /// Unique identifier for the object. @@ -133,12 +129,14 @@ pub struct Price { } impl Price { + /// Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). /// /// For the list of inactive prices, set `active` to false. - pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { - client.get_query("/prices", params) - } +pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { + client.get_query("/prices", params) +} + /// Creates a new price for an existing product. /// @@ -174,6 +172,7 @@ impl Object for Price { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CurrencyOption { + /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. pub custom_unit_amount: Option, @@ -204,6 +203,7 @@ pub struct CurrencyOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PriceTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -222,6 +222,7 @@ pub struct PriceTier { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Recurring { + /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. /// /// Defaults to `sum`. @@ -237,6 +238,9 @@ pub struct Recurring { /// For example, `interval=month` and `interval_count=3` bills every 3 months. pub interval_count: u64, + /// The meter tracking the usage of a metered price. + pub meter: Option, + /// Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). pub trial_period_days: Option, @@ -251,6 +255,7 @@ pub struct Recurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -261,6 +266,7 @@ pub struct TransformQuantity { /// The parameters for `Price::create`. #[derive(Clone, Debug, Serialize)] pub struct CreatePrice<'a> { + /// Whether the price can be used for new purchases. /// /// Defaults to `true`. @@ -357,7 +363,7 @@ pub struct CreatePrice<'a> { /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. /// - /// One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + /// One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. #[serde(skip_serializing_if = "Option::is_none")] pub unit_amount: Option, @@ -397,6 +403,7 @@ impl<'a> CreatePrice<'a> { /// The parameters for `Price::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPrices<'a> { + /// Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -429,6 +436,8 @@ pub struct ListPrices<'a> { pub limit: Option, /// Only return the price with these lookup_keys, if any exist. + /// + /// You can specify up to 10 lookup_keys. #[serde(skip_serializing_if = "Option::is_none")] pub lookup_keys: Option>, @@ -473,12 +482,12 @@ impl<'a> ListPrices<'a> { impl Paginable for ListPrices<'_> { type O = Price; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Price::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePrice<'a> { + /// Whether the price can be used for new purchases. /// /// Defaults to `true`. @@ -543,6 +552,7 @@ impl<'a> UpdatePrice<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCurrencyOptions { + /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] pub custom_unit_amount: Option, @@ -575,6 +585,7 @@ pub struct CreatePriceCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCustomUnitAmount { + /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -595,6 +606,7 @@ pub struct CreatePriceCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceProductData { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -640,6 +652,7 @@ pub struct CreatePriceProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceRecurring { + /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. /// /// Defaults to `sum`. @@ -658,6 +671,10 @@ pub struct CreatePriceRecurring { #[serde(skip_serializing_if = "Option::is_none")] pub interval_count: Option, + /// The meter tracking the usage of a metered price. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). #[serde(skip_serializing_if = "Option::is_none")] pub trial_period_days: Option, @@ -674,6 +691,7 @@ pub struct CreatePriceRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, @@ -703,6 +721,7 @@ pub struct CreatePriceTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -712,12 +731,17 @@ pub struct CreatePriceTransformQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListPricesRecurring { + /// Filter by billing frequency. /// /// Either `day`, `week`, `month` or `year`. #[serde(skip_serializing_if = "Option::is_none")] pub interval: Option, + /// Filter by the price's meter. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// Filter by the usage type for this price. /// /// Can be either `metered` or `licensed`. @@ -727,6 +751,7 @@ pub struct ListPricesRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePriceCurrencyOptions { + /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] pub custom_unit_amount: Option, @@ -759,6 +784,7 @@ pub struct UpdatePriceCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCurrencyOptionsCustomUnitAmount { + /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -779,6 +805,7 @@ pub struct CreatePriceCurrencyOptionsCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCurrencyOptionsTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, @@ -808,6 +835,7 @@ pub struct CreatePriceCurrencyOptionsTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePriceCurrencyOptionsCustomUnitAmount { + /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -828,6 +856,7 @@ pub struct UpdatePriceCurrencyOptionsCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePriceCurrencyOptionsTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, diff --git a/src/resources/generated/product.rs b/src/resources/generated/product.rs index 3ed50337d..4af850d95 100644 --- a/src/resources/generated/product.rs +++ b/src/resources/generated/product.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ProductId, TaxCodeId}; -use crate::params::{ - CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::params::{CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Currency, Price, TaxCode, UpTo}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Product". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Product { /// Unique identifier for the object. @@ -44,12 +40,6 @@ pub struct Product { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - /// A list of up to 15 features for this product. - /// - /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option>, - /// A list of up to 8 URLs of images for this product, meant to be displayable to the customer. #[serde(skip_serializing_if = "Option::is_none")] pub images: Option>, @@ -58,6 +48,12 @@ pub struct Product { #[serde(skip_serializing_if = "Option::is_none")] pub livemode: Option, + /// A list of up to 15 marketing features for this product. + /// + /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + #[serde(skip_serializing_if = "Option::is_none")] + pub marketing_features: Option>, + /// 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. @@ -79,6 +75,7 @@ pub struct Product { /// Extra information about a product which will appear on your customer's credit card statement. /// /// In the case that multiple products are billed at once, the first statement descriptor will be used. + /// Only used for subscription payments. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option, @@ -111,12 +108,14 @@ pub struct Product { } impl Product { + /// Returns a list of your products. /// /// The products are returned sorted by creation date, with the most recently created products appearing first. - pub fn list(client: &Client, params: &ListProducts<'_>) -> Response> { - client.get_query("/products", params) - } +pub fn list(client: &Client, params: &ListProducts<'_>) -> Response> { + client.get_query("/products", params) +} + /// Creates a new product object. pub fn create(client: &Client, params: CreateProduct<'_>) -> Response { @@ -160,6 +159,7 @@ impl Object for Product { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PackageDimensions { + /// Height, in inches. pub height: f64, @@ -174,8 +174,9 @@ pub struct PackageDimensions { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ProductFeature { - /// The feature's name. +pub struct ProductMarketingFeature { + + /// The marketing feature name. /// /// Up to 80 characters long. #[serde(skip_serializing_if = "Option::is_none")] @@ -185,6 +186,7 @@ pub struct ProductFeature { /// The parameters for `Product::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateProduct<'a> { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -207,12 +209,6 @@ pub struct CreateProduct<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A list of up to 15 features for this product. - /// - /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option>, - /// An identifier will be randomly generated by Stripe. /// /// You can optionally override this ID, but the ID must be unique across all products in your Stripe account. @@ -223,6 +219,12 @@ pub struct CreateProduct<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub images: Option>, + /// A list of up to 15 marketing features for this product. + /// + /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + #[serde(skip_serializing_if = "Option::is_none")] + pub marketing_features: Option>, + /// 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. @@ -247,6 +249,7 @@ pub struct CreateProduct<'a> { /// While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. /// The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. /// Non-ASCII characters are automatically stripped. It must contain at least one letter. + /// Only used for subscription payments. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, @@ -281,9 +284,9 @@ impl<'a> CreateProduct<'a> { default_price_data: Default::default(), description: Default::default(), expand: Default::default(), - features: Default::default(), id: Default::default(), images: Default::default(), + marketing_features: Default::default(), metadata: Default::default(), name, package_dimensions: Default::default(), @@ -300,6 +303,7 @@ impl<'a> CreateProduct<'a> { /// The parameters for `Product::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListProducts<'a> { + /// Only return products that are active or inactive (e.g., pass `false` to list all inactive products). #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -371,12 +375,12 @@ impl<'a> ListProducts<'a> { impl Paginable for ListProducts<'_> { type O = Product; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Product::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateProduct<'a> { + /// Whether the product is available for purchase. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -395,16 +399,16 @@ pub struct UpdateProduct<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A list of up to 15 features for this product. - /// - /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option>, - /// A list of up to 8 URLs of images for this product, meant to be displayable to the customer. #[serde(skip_serializing_if = "Option::is_none")] pub images: Option>, + /// A list of up to 15 marketing features for this product. + /// + /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + #[serde(skip_serializing_if = "Option::is_none")] + pub marketing_features: Option>, + /// 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. @@ -431,6 +435,7 @@ pub struct UpdateProduct<'a> { /// The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. /// Non-ASCII characters are automatically stripped. It must contain at least one letter. /// May only be set if `type=service`. + /// Only used for subscription payments. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, @@ -457,8 +462,8 @@ impl<'a> UpdateProduct<'a> { default_price: Default::default(), description: Default::default(), expand: Default::default(), - features: Default::default(), images: Default::default(), + marketing_features: Default::default(), metadata: Default::default(), name: Default::default(), package_dimensions: Default::default(), @@ -473,6 +478,7 @@ impl<'a> UpdateProduct<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceData { + /// 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). @@ -510,16 +516,18 @@ pub struct CreateProductDefaultPriceData { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateProductFeatures { - /// The feature's name. +pub struct CreateProductMarketingFeatures { + + /// The marketing feature name. /// /// Up to 80 characters long. pub name: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateProductFeatures { - /// The feature's name. +pub struct UpdateProductMarketingFeatures { + + /// The marketing feature name. /// /// Up to 80 characters long. pub name: String, @@ -527,6 +535,7 @@ pub struct UpdateProductFeatures { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataCurrencyOptions { + /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] pub custom_unit_amount: Option, @@ -559,6 +568,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -574,6 +584,7 @@ pub struct CreateProductDefaultPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataCurrencyOptionsCustomUnitAmount { + /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -594,6 +605,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptionsCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataCurrencyOptionsTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, diff --git a/src/resources/generated/product_feature.rs b/src/resources/generated/product_feature.rs new file mode 100644 index 000000000..7cec743c9 --- /dev/null +++ b/src/resources/generated/product_feature.rs @@ -0,0 +1,38 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ProductFeatureId}; +use crate::params::{Object}; +use crate::resources::{EntitlementsFeature}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ProductFeature". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ProductFeature { + /// Unique identifier for the object. + pub id: ProductFeatureId, + + // Always true for a deleted object + #[serde(default)] + pub deleted: bool, + + #[serde(skip_serializing_if = "Option::is_none")] + pub entitlement_feature: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + #[serde(skip_serializing_if = "Option::is_none")] + pub livemode: Option, +} + +impl Object for ProductFeature { + type Id = ProductFeatureId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "product_feature" + } +} diff --git a/src/resources/generated/promotion_code.rs b/src/resources/generated/promotion_code.rs index f781df8ab..97a899193 100644 --- a/src/resources/generated/promotion_code.rs +++ b/src/resources/generated/promotion_code.rs @@ -2,18 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CouponId, CustomerId, PromotionCodeId}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Coupon, Currency, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PromotionCode". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PromotionCode { /// Unique identifier for the object. @@ -60,30 +57,24 @@ pub struct PromotionCode { } impl PromotionCode { + /// Returns a list of your promotion codes. - pub fn list(client: &Client, params: &ListPromotionCodes<'_>) -> Response> { - client.get_query("/promotion_codes", params) - } +pub fn list(client: &Client, params: &ListPromotionCodes<'_>) -> Response> { + client.get_query("/promotion_codes", params) +} + /// Retrieves the promotion code with the given ID. /// /// In order to retrieve a promotion code by the customer-facing `code` use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired `code`. - pub fn retrieve( - client: &Client, - id: &PromotionCodeId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &PromotionCodeId, expand: &[&str]) -> Response { client.get_query(&format!("/promotion_codes/{}", id), Expand { expand }) } /// Updates the specified promotion code by setting the values of the parameters passed. /// /// Most fields are, by design, not editable. - pub fn update( - client: &Client, - id: &PromotionCodeId, - params: UpdatePromotionCode<'_>, - ) -> Response { + pub fn update(client: &Client, id: &PromotionCodeId, params: UpdatePromotionCode<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/promotion_codes/{}", id), ¶ms) } @@ -101,6 +92,7 @@ impl Object for PromotionCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PromotionCodesResourceRestrictions { + /// Promotion code restrictions defined in each available currency option. /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -119,6 +111,7 @@ pub struct PromotionCodesResourceRestrictions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PromotionCodeCurrencyOption { + /// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). pub minimum_amount: i64, } @@ -126,6 +119,7 @@ pub struct PromotionCodeCurrencyOption { /// The parameters for `PromotionCode::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPromotionCodes<'a> { + /// Filter promotion codes by whether they are active. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -191,12 +185,12 @@ impl<'a> ListPromotionCodes<'a> { impl Paginable for ListPromotionCodes<'_> { type O = PromotionCode; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `PromotionCode::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePromotionCode<'a> { + /// Whether the promotion code is currently active. /// /// A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. @@ -233,6 +227,7 @@ impl<'a> UpdatePromotionCode<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePromotionCodeRestrictions { + /// Promotion codes defined in each available currency option. /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -242,6 +237,7 @@ pub struct UpdatePromotionCodeRestrictions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePromotionCodeRestrictionsCurrencyOptions { + /// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). #[serde(skip_serializing_if = "Option::is_none")] pub minimum_amount: Option, diff --git a/src/resources/generated/quote.rs b/src/resources/generated/quote.rs index d02645a48..2474b1571 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -2,20 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, QuoteId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, - Discount, Invoice, QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, - TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Quote". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Quote { /// Unique identifier for the object. @@ -144,10 +139,12 @@ pub struct Quote { } impl Quote { + /// Returns a list of your quotes. - pub fn list(client: &Client, params: &ListQuotes<'_>) -> Response> { - client.get_query("/quotes", params) - } +pub fn list(client: &Client, params: &ListQuotes<'_>) -> Response> { + client.get_query("/quotes", params) +} + /// Retrieves the quote with the given ID. pub fn retrieve(client: &Client, id: &QuoteId, expand: &[&str]) -> Response { @@ -167,6 +164,7 @@ impl Object for Quote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingQuoteSetting { + /// Number of days within which a customer must pay invoices generated by this quote. /// /// This value will be `null` for quotes where `collection_method=charge_automatically`. @@ -177,6 +175,7 @@ pub struct InvoiceSettingQuoteSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceAutomaticTax { + /// Automatically calculate taxes. pub enabled: bool, @@ -192,6 +191,7 @@ pub struct QuotesResourceAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceComputed { + /// The definitive totals and line items the customer will be charged on a recurring basis. /// /// Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. @@ -203,6 +203,7 @@ pub struct QuotesResourceComputed { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceFromQuote { + /// Whether this quote is a revision of a different quote. pub is_revision: bool, @@ -212,6 +213,7 @@ pub struct QuotesResourceFromQuote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceRecurring { + /// Total before any discounts or taxes are applied. pub amount_subtotal: i64, @@ -233,6 +235,7 @@ pub struct QuotesResourceRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceStatusTransitions { + /// The time that the quote was accepted. /// /// Measured in seconds since Unix epoch. @@ -251,6 +254,7 @@ pub struct QuotesResourceStatusTransitions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceSubscriptionDataSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -276,6 +280,7 @@ pub struct QuotesResourceSubscriptionDataSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. @@ -293,6 +298,7 @@ pub struct QuotesResourceTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceUpfront { + /// Total before any discounts or taxes are applied. pub amount_subtotal: i64, @@ -311,6 +317,7 @@ pub struct QuotesResourceUpfront { /// The parameters for `Quote::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListQuotes<'a> { + /// The ID of the customer whose quotes will be retrieved. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -366,9 +373,8 @@ impl<'a> ListQuotes<'a> { impl Paginable for ListQuotes<'_> { type O = Quote; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `Quote`'s `collection_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/quotes_resource_total_details.rs b/src/resources/generated/quotes_resource_total_details.rs index 94bf3821b..ac0b73415 100644 --- a/src/resources/generated/quotes_resource_total_details.rs +++ b/src/resources/generated/quotes_resource_total_details.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::resources::{Discount, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "QuotesResourceTotalDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTotalDetails { + /// This is the sum of all the discounts. pub amount_discount: i64, @@ -24,6 +24,7 @@ pub struct QuotesResourceTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -33,6 +34,7 @@ pub struct QuotesResourceTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -41,6 +43,7 @@ pub struct LineItemsDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, diff --git a/src/resources/generated/radar_radar_options.rs b/src/resources/generated/radar_radar_options.rs index fe16e861e..195f268b1 100644 --- a/src/resources/generated/radar_radar_options.rs +++ b/src/resources/generated/radar_radar_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "RadarRadarOptions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarRadarOptions { + /// 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, diff --git a/src/resources/generated/radar_value_list.rs b/src/resources/generated/radar_value_list.rs index 4d31a6339..b12daa1a4 100644 --- a/src/resources/generated/radar_value_list.rs +++ b/src/resources/generated/radar_value_list.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "RadarListList". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarValueList { /// Unique identifier for the object. diff --git a/src/resources/generated/radar_value_list_item.rs b/src/resources/generated/radar_value_list_item.rs index 20fb78df1..e9ce22046 100644 --- a/src/resources/generated/radar_value_list_item.rs +++ b/src/resources/generated/radar_value_list_item.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "RadarListListItem". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarValueListItem { /// Unique identifier for the object. diff --git a/src/resources/generated/refund.rs b/src/resources/generated/refund.rs index f91a9b9a9..e9c19a02e 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, CustomerId, PaymentIntentId, RefundId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Charge, Currency, PaymentIntent, TransferReversal}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Refund". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Refund { /// Unique identifier for the object. @@ -94,12 +93,15 @@ pub struct Refund { } impl Refund { + /// Returns a list of all refunds you created. /// - /// We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. - pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { - client.get_query("/refunds", params) - } + /// We return the refunds in sorted order, with the most recent refunds appearing first. + /// The 10 most recent refunds are always available by default on the Charge object. +pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { + client.get_query("/refunds", params) +} + /// When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. /// @@ -143,6 +145,7 @@ impl Object for Refund { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub affirm: Option, @@ -152,6 +155,9 @@ pub struct RefundDestinationDetails { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_bank_transfer: Option, @@ -191,6 +197,9 @@ pub struct RefundDestinationDetails { #[serde(skip_serializing_if = "Option::is_none")] pub klarna: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub mx_bank_transfer: Option, @@ -236,10 +245,12 @@ pub struct RefundDestinationDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct DestinationDetailsUnimplemented {} +pub struct DestinationDetailsUnimplemented { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetailsCard { + /// Value of the reference number assigned to the refund. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -263,6 +274,7 @@ pub struct RefundDestinationDetailsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetailsGeneric { + /// The reference assigned to the refund. pub reference: Option, @@ -274,6 +286,7 @@ pub struct RefundDestinationDetailsGeneric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { + /// Contains the refund details. pub display_details: Option, @@ -284,6 +297,7 @@ pub struct RefundNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextActionDisplayDetails { + pub email_sent: EmailSent, /// The expiry timestamp. @@ -292,6 +306,7 @@ pub struct RefundNextActionDisplayDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct EmailSent { + /// The timestamp when the email was sent. pub email_sent_at: Timestamp, @@ -302,6 +317,7 @@ pub struct EmailSent { /// The parameters for `Refund::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateRefund<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -387,10 +403,12 @@ impl<'a> CreateRefund<'a> { /// The parameters for `Refund::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListRefunds<'a> { + /// Only return refunds for the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, + /// Only return refunds that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -439,12 +457,12 @@ impl<'a> ListRefunds<'a> { impl Paginable for ListRefunds<'_> { type O = Refund; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Refund::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateRefund<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -460,7 +478,10 @@ pub struct UpdateRefund<'a> { impl<'a> UpdateRefund<'a> { pub fn new() -> Self { - UpdateRefund { expand: Default::default(), metadata: Default::default() } + UpdateRefund { + expand: Default::default(), + metadata: Default::default(), + } } } diff --git a/src/resources/generated/reporting_report_run.rs b/src/resources/generated/reporting_report_run.rs index 12c42f6f2..f60143333 100644 --- a/src/resources/generated/reporting_report_run.rs +++ b/src/resources/generated/reporting_report_run.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "reporting_report_run". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ReportingReportRun { /// Unique identifier for the object. diff --git a/src/resources/generated/reporting_report_type.rs b/src/resources/generated/reporting_report_type.rs index 779b48891..583237e06 100644 --- a/src/resources/generated/reporting_report_type.rs +++ b/src/resources/generated/reporting_report_type.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "reporting_report_type". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ReportingReportType { /// The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. diff --git a/src/resources/generated/reserve_transaction.rs b/src/resources/generated/reserve_transaction.rs index 6b7b7da93..266855037 100644 --- a/src/resources/generated/reserve_transaction.rs +++ b/src/resources/generated/reserve_transaction.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== +use crate::ids::{ReserveTransactionId}; +use crate::params::{Object}; +use crate::resources::{Currency}; use serde::{Deserialize, Serialize}; -use crate::ids::ReserveTransactionId; -use crate::params::Object; -use crate::resources::Currency; - /// The resource representing a Stripe "ReserveTransaction". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ReserveTransaction { diff --git a/src/resources/generated/review.rs b/src/resources/generated/review.rs index 85e11b7e2..414f64f32 100644 --- a/src/resources/generated/review.rs +++ b/src/resources/generated/review.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::ReviewId; +use crate::ids::{ReviewId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Charge, PaymentIntent, ReviewReason}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "RadarReview". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Review { /// Unique identifier for the object. @@ -66,12 +65,14 @@ pub struct Review { } impl Review { + /// Returns a list of `Review` objects that have `open` set to `true`. /// /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. - pub fn list(client: &Client, params: &ListReviews<'_>) -> Response> { - client.get_query("/reviews", params) - } +pub fn list(client: &Client, params: &ListReviews<'_>) -> Response> { + client.get_query("/reviews", params) +} + /// Retrieves a `Review` object. pub fn retrieve(client: &Client, id: &ReviewId, expand: &[&str]) -> Response { @@ -91,6 +92,7 @@ impl Object for Review { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarReviewResourceLocation { + /// The city where the payment originated. pub city: Option, @@ -109,6 +111,7 @@ pub struct RadarReviewResourceLocation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarReviewResourceSession { + /// The browser used in this browser session (e.g., `Chrome`). pub browser: Option, @@ -125,6 +128,8 @@ pub struct RadarReviewResourceSession { /// The parameters for `Review::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListReviews<'a> { + + /// Only return reviews that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -167,9 +172,8 @@ impl<'a> ListReviews<'a> { impl Paginable for ListReviews<'_> { type O = Review; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `Review`'s `closed_reason` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/scheduled_query_run.rs b/src/resources/generated/scheduled_query_run.rs index 0391e91d6..674d550a4 100644 --- a/src/resources/generated/scheduled_query_run.rs +++ b/src/resources/generated/scheduled_query_run.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ScheduledQueryRunId; +use crate::ids::{ScheduledQueryRunId}; use crate::params::{Object, Timestamp}; -use crate::resources::File; +use crate::resources::{File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ScheduledQueryRun". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ScheduledQueryRun { /// Unique identifier for the object. @@ -58,6 +57,7 @@ impl Object for ScheduledQueryRun { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SigmaScheduledQueryRunError { + /// Information about the run failure. pub message: String, } diff --git a/src/resources/generated/setup_attempt.rs b/src/resources/generated/setup_attempt.rs index d1ac95b81..689ba128e 100644 --- a/src/resources/generated/setup_attempt.rs +++ b/src/resources/generated/setup_attempt.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{SetupAttemptId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, - PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, SetupIntent, -}; +use crate::resources::{Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, PaymentMethodDetailsCardPresentOffline, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, SetupIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentFlowsSetupIntentSetupAttempt". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttempt { /// Unique identifier for the object. @@ -72,10 +68,12 @@ pub struct SetupAttempt { } impl SetupAttempt { + /// Returns a list of SetupAttempts that associate with a provided SetupIntent. - pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { - client.get_query("/setup_attempts", params) - } +pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { + client.get_query("/setup_attempts", params) +} + } impl Object for SetupAttempt { @@ -90,9 +88,13 @@ impl Object for SetupAttempt { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit: Option, @@ -126,6 +128,9 @@ pub struct SetupAttemptPaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub paypal: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -144,16 +149,24 @@ pub struct SetupAttemptPaymentMethodDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsAcssDebit {} +pub struct SetupAttemptPaymentMethodDetailsAcssDebit { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupAttemptPaymentMethodDetailsAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsAuBecsDebit {} +pub struct SetupAttemptPaymentMethodDetailsAuBecsDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBacsDebit {} +pub struct SetupAttemptPaymentMethodDetailsBacsDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsBancontact { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -184,10 +197,12 @@ pub struct SetupAttemptPaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBoleto {} +pub struct SetupAttemptPaymentMethodDetailsBoleto { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -254,6 +269,7 @@ pub struct SetupAttemptPaymentMethodDetailsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardChecks { + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. pub address_line1_check: Option, @@ -266,12 +282,17 @@ pub struct SetupAttemptPaymentMethodDetailsCardChecks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardPresent { + /// The ID of the Card PaymentMethod which was generated by this SetupAttempt. pub generated_card: Option>, + + /// Details about payments collected offline. + pub offline: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardWallet { + #[serde(skip_serializing_if = "Option::is_none")] pub apple_pay: Option, @@ -287,10 +308,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardWallet { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsCashapp {} +pub struct SetupAttemptPaymentMethodDetailsCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsIdeal { + /// The customer's bank. /// /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -316,19 +339,28 @@ pub struct SetupAttemptPaymentMethodDetailsIdeal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsKlarna {} +pub struct SetupAttemptPaymentMethodDetailsKlarna { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupAttemptPaymentMethodDetailsLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsLink {} +pub struct SetupAttemptPaymentMethodDetailsPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsPaypal {} +pub struct SetupAttemptPaymentMethodDetailsRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsSepaDebit {} +pub struct SetupAttemptPaymentMethodDetailsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsSofort { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -359,10 +391,12 @@ pub struct SetupAttemptPaymentMethodDetailsSofort { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsUsBankAccount {} +pub struct SetupAttemptPaymentMethodDetailsUsBankAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ThreeDSecureDetails { + /// For authenticated transactions: how the customer was authenticated by /// the issuing bank. pub authentication_flow: Option, @@ -390,6 +424,7 @@ pub struct ThreeDSecureDetails { /// The parameters for `SetupAttempt::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSetupAttempts<'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. @@ -440,9 +475,8 @@ impl<'a> ListSetupAttempts<'a> { impl Paginable for ListSetupAttempts<'_> { type O = SetupAttempt; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `SetupAttempt`'s `flow_directions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index bf16a0048..8ecaa84c9 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -2,21 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{CustomerId, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId}; +use crate::ids::{ConfirmationTokenId, CustomerId, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, - Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt, -}; +use crate::resources::{Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SetupIntent". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntent { /// Unique identifier for the object. @@ -95,11 +89,12 @@ pub struct SetupIntent { pub on_behalf_of: Option>, /// ID of the payment method used with this SetupIntent. + /// + /// If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. pub payment_method: Option>, /// Information about the payment method configuration used for this Setup Intent. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment method-specific configuration for this SetupIntent. pub payment_method_options: Option, @@ -125,10 +120,12 @@ pub struct SetupIntent { } impl SetupIntent { + /// Returns a list of SetupIntents. - pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { - client.get_query("/setup_intents", params) - } +pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { + client.get_query("/setup_intents", params) +} + /// Creates a SetupIntent object. /// @@ -149,11 +146,7 @@ impl SetupIntent { } /// Updates a SetupIntent object. - pub fn update( - client: &Client, - id: &SetupIntentId, - params: UpdateSetupIntent<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SetupIntentId, params: UpdateSetupIntent<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/setup_intents/{}", id), ¶ms) } @@ -171,6 +164,7 @@ impl Object for SetupIntent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentFlowsAutomaticPaymentMethodsSetupIntent { + /// Controls whether this SetupIntent 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. @@ -185,9 +179,9 @@ pub struct PaymentFlowsAutomaticPaymentMethodsSetupIntent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentNextAction { + #[serde(skip_serializing_if = "Option::is_none")] - pub cashapp_handle_redirect_or_display_qr_code: - Option, + pub cashapp_handle_redirect_or_display_qr_code: Option, #[serde(skip_serializing_if = "Option::is_none")] pub redirect_to_url: Option, @@ -208,6 +202,7 @@ pub struct SetupIntentNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentNextActionRedirectToUrl { + /// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. pub return_url: Option, @@ -217,6 +212,7 @@ pub struct SetupIntentNextActionRedirectToUrl { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentNextActionVerifyWithMicrodeposits { + /// The timestamp when the microdeposits are expected to land. pub arrival_date: Timestamp, @@ -231,12 +227,22 @@ pub struct SetupIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub card_present: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, @@ -252,6 +258,7 @@ pub struct SetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsAcssDebit { + /// Currency supported by the bank account. pub currency: Option, @@ -263,8 +270,20 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebit { pub verification_method: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentPaymentMethodOptionsAmazonPay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentPaymentMethodOptionsBacsDebit { + + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. pub mandate_options: Option, @@ -278,12 +297,13 @@ pub struct SetupIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -330,18 +350,23 @@ pub struct SetupIntentPaymentMethodOptionsCardMandateOptions { /// Specifies the type of mandates supported. /// /// Possible values are `india`. - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentPaymentMethodOptionsCardPresent { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsLink { + /// [Deprecated] This is a legacy parameter that no longer has any function. pub persistent_token: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit { + /// A URL for custom mandate text. #[serde(skip_serializing_if = "Option::is_none")] pub custom_mandate_url: Option, @@ -356,16 +381,19 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit { pub interval_description: Option, /// Payment schedule for the mandate. - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentPaymentMethodOptionsMandateOptionsBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsPaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -374,15 +402,18 @@ pub struct SetupIntentPaymentMethodOptionsPaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit {} +pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -397,6 +428,7 @@ pub struct SetupIntentPaymentMethodOptionsUsBankAccount { /// The parameters for `SetupIntent::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateSetupIntent<'a> { + /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. /// /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. @@ -416,6 +448,12 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub confirm: Option, + /// ID of the ConfirmationToken used to confirm this SetupIntent. + /// + /// If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + #[serde(skip_serializing_if = "Option::is_none")] + pub confirmation_token: Option, + /// ID of the Customer this SetupIntent belongs to, if one exists. /// /// If present, the SetupIntent's payment method will be attached to the Customer on successful setup. @@ -506,6 +544,7 @@ impl<'a> CreateSetupIntent<'a> { attach_to_self: Default::default(), automatic_payment_methods: Default::default(), confirm: Default::default(), + confirmation_token: Default::default(), customer: Default::default(), description: Default::default(), expand: Default::default(), @@ -528,6 +567,7 @@ impl<'a> CreateSetupIntent<'a> { /// The parameters for `SetupIntent::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListSetupIntents<'a> { + /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. /// /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. @@ -592,12 +632,12 @@ impl<'a> ListSetupIntents<'a> { impl Paginable for ListSetupIntents<'_> { type O = SetupIntent; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `SetupIntent::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateSetupIntent<'a> { + /// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. /// /// It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. @@ -642,6 +682,8 @@ pub struct UpdateSetupIntent<'a> { pub metadata: Option, /// ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + /// + /// To unset this field to null, pass in an empty string. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, @@ -685,6 +727,7 @@ impl<'a> UpdateSetupIntent<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentAutomaticPaymentMethods { + /// Controls whether this SetupIntent 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. @@ -699,12 +742,14 @@ pub struct CreateSetupIntentAutomaticPaymentMethods { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentMandateData { + /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: CreateSetupIntentMandateDataCustomerAcceptance, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodData { + /// 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, @@ -721,6 +766,17 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + /// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -797,6 +853,14 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -843,6 +907,10 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -865,14 +933,27 @@ pub struct CreateSetupIntentPaymentMethodData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptions { + /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, + /// If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + + /// If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, + /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, + /// 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, + /// 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, @@ -892,6 +973,7 @@ pub struct CreateSetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentSingleUse { + /// Amount the customer is granting permission to collect later. /// /// 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). @@ -907,6 +989,7 @@ pub struct CreateSetupIntentSingleUse { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodData { + /// 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, @@ -923,6 +1006,17 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub alipay: Option, + /// This field indicates whether this payment method can be shown again to its customer in a checkout flow. + /// + /// Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + /// The field defaults to `unspecified`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allow_redisplay: Option, + + /// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + /// 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, @@ -999,6 +1093,14 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + /// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub multibanco: Option, + /// 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, @@ -1045,6 +1147,10 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub swish: Option, + /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub twint: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -1067,14 +1173,27 @@ pub struct UpdateSetupIntentPaymentMethodData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptions { + /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, + /// If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay: Option, + + /// If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, + /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, + /// 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, + /// 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, @@ -1094,6 +1213,7 @@ pub struct UpdateSetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentMandateDataCustomerAcceptance { + /// The time at which the customer accepted the Mandate. #[serde(skip_serializing_if = "Option::is_none")] pub accepted_at: Option, @@ -1115,6 +1235,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1126,16 +1247,24 @@ pub struct CreateSetupIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAffirm {} +pub struct CreateSetupIntentPaymentMethodDataAffirm { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAfterpayClearpay {} +pub struct CreateSetupIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAlipay {} +pub struct CreateSetupIntentPaymentMethodDataAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1145,6 +1274,7 @@ pub struct CreateSetupIntentPaymentMethodDataAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataBacsDebit { + /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, @@ -1157,10 +1287,12 @@ pub struct CreateSetupIntentPaymentMethodDataBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataBancontact {} +pub struct CreateSetupIntentPaymentMethodDataBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataBillingDetails { + /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option, @@ -1179,22 +1311,27 @@ pub struct CreateSetupIntentPaymentMethodDataBillingDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataBlik {} +pub struct CreateSetupIntentPaymentMethodDataBlik { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataBoleto { + /// 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 CreateSetupIntentPaymentMethodDataCashapp {} +pub struct CreateSetupIntentPaymentMethodDataCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataCustomerBalance {} +pub struct CreateSetupIntentPaymentMethodDataCustomerBalance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataEps { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, @@ -1202,6 +1339,7 @@ pub struct CreateSetupIntentPaymentMethodDataEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataFpx { + /// Account holder type for FPX transaction. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1211,87 +1349,117 @@ pub struct CreateSetupIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataGiropay {} +pub struct CreateSetupIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataGrabpay {} +pub struct CreateSetupIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataInteracPresent {} +pub struct CreateSetupIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataKonbini {} +pub struct CreateSetupIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataLink {} +pub struct CreateSetupIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataOxxo {} +pub struct CreateSetupIntentPaymentMethodDataMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataMultibanco { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataPaynow {} +pub struct CreateSetupIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataPaypal {} +pub struct CreateSetupIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataPix {} +pub struct CreateSetupIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataPromptpay {} +pub struct CreateSetupIntentPaymentMethodDataPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataRadarOptions { + /// 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataRevolutPay {} +pub struct CreateSetupIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataSwish {} +pub struct CreateSetupIntentPaymentMethodDataSwish { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataTwint { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] - pub account_holder_type: - Option, + pub account_holder_type: Option, /// Account number of the bank account. #[serde(skip_serializing_if = "Option::is_none")] @@ -1313,13 +1481,16 @@ pub struct CreateSetupIntentPaymentMethodDataUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataWechatPay {} +pub struct CreateSetupIntentPaymentMethodDataWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataZip {} +pub struct CreateSetupIntentPaymentMethodDataZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { + /// 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). @@ -1332,12 +1503,24 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsAmazonPay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsBacsDebit { + + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1360,10 +1543,9 @@ pub struct CreateSetupIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. @@ -1371,8 +1553,13 @@ pub struct CreateSetupIntentPaymentMethodOptionsCard { pub three_d_secure: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsCardPresent { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsLink { + /// [Deprecated] This is a legacy parameter that no longer has any function. #[serde(skip_serializing_if = "Option::is_none")] pub persistent_token: Option, @@ -1380,6 +1567,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsLink { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsPaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -1389,6 +1577,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsPaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1396,10 +1585,10 @@ pub struct CreateSetupIntentPaymentMethodOptionsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -1411,12 +1600,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1428,16 +1617,24 @@ pub struct UpdateSetupIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataAffirm {} +pub struct UpdateSetupIntentPaymentMethodDataAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataAfterpayClearpay {} +pub struct UpdateSetupIntentPaymentMethodDataAfterpayClearpay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataAlipay {} +pub struct UpdateSetupIntentPaymentMethodDataAmazonPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1447,6 +1644,7 @@ pub struct UpdateSetupIntentPaymentMethodDataAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataBacsDebit { + /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, @@ -1459,10 +1657,12 @@ pub struct UpdateSetupIntentPaymentMethodDataBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataBancontact {} +pub struct UpdateSetupIntentPaymentMethodDataBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataBillingDetails { + /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option, @@ -1481,22 +1681,27 @@ pub struct UpdateSetupIntentPaymentMethodDataBillingDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataBlik {} +pub struct UpdateSetupIntentPaymentMethodDataBlik { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataBoleto { + /// 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 UpdateSetupIntentPaymentMethodDataCashapp {} +pub struct UpdateSetupIntentPaymentMethodDataCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataCustomerBalance {} +pub struct UpdateSetupIntentPaymentMethodDataCustomerBalance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataEps { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, @@ -1504,6 +1709,7 @@ pub struct UpdateSetupIntentPaymentMethodDataEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataFpx { + /// Account holder type for FPX transaction. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1513,87 +1719,117 @@ pub struct UpdateSetupIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGiropay {} +pub struct UpdateSetupIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGrabpay {} +pub struct UpdateSetupIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataInteracPresent {} +pub struct UpdateSetupIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataKonbini {} +pub struct UpdateSetupIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataLink {} +pub struct UpdateSetupIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataOxxo {} +pub struct UpdateSetupIntentPaymentMethodDataMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataMultibanco { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPaynow {} +pub struct UpdateSetupIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPaypal {} +pub struct UpdateSetupIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPix {} +pub struct UpdateSetupIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPromptpay {} +pub struct UpdateSetupIntentPaymentMethodDataPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataRadarOptions { + /// 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataRevolutPay {} +pub struct UpdateSetupIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataSwish {} +pub struct UpdateSetupIntentPaymentMethodDataSwish { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataTwint { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] - pub account_holder_type: - Option, + pub account_holder_type: Option, /// Account number of the bank account. #[serde(skip_serializing_if = "Option::is_none")] @@ -1615,13 +1851,16 @@ pub struct UpdateSetupIntentPaymentMethodDataUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataWechatPay {} +pub struct UpdateSetupIntentPaymentMethodDataWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataZip {} +pub struct UpdateSetupIntentPaymentMethodDataZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { + /// 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). @@ -1634,12 +1873,24 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsAmazonPay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsBacsDebit { + + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1662,10 +1913,9 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCard { /// /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. @@ -1673,8 +1923,13 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCard { pub three_d_secure: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsCardPresent { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsLink { + /// [Deprecated] This is a legacy parameter that no longer has any function. #[serde(skip_serializing_if = "Option::is_none")] pub persistent_token: Option, @@ -1682,6 +1937,7 @@ pub struct UpdateSetupIntentPaymentMethodOptionsLink { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsPaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -1691,6 +1947,7 @@ pub struct UpdateSetupIntentPaymentMethodOptionsPaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1698,10 +1955,10 @@ pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -1713,15 +1970,16 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentMandateDataCustomerAcceptanceOffline {} +pub struct CreateSetupIntentMandateDataCustomerAcceptanceOffline { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentMandateDataCustomerAcceptanceOnline { + /// The IP address from which the Mandate was accepted by the customer. pub ip_address: String, @@ -1731,6 +1989,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptanceOnline { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -1758,6 +2017,7 @@ pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1770,6 +2030,7 @@ pub struct CreateSetupIntentPaymentMethodDataKlarnaDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { + /// 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. @@ -1778,8 +2039,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { /// List of Stripe products where this mandate can be selected automatically. #[serde(skip_serializing_if = "Option::is_none")] - pub default_for: - Option>, + pub default_for: Option>, /// Description of the mandate interval. /// @@ -1789,17 +2049,20 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { /// Payment schedule for the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsBacsDebitMandateOptions { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1851,16 +2114,15 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -1872,16 +2134,14 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { /// 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, + pub electronic_commerce_indicator: Option, /// 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, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -1902,23 +2162,26 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// 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, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: - Option>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -1929,14 +2192,15 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] pub requested: Option>, @@ -1944,6 +2208,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -1971,6 +2236,7 @@ pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1983,6 +2249,7 @@ pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { + /// 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. @@ -1991,8 +2258,7 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { /// List of Stripe products where this mandate can be selected automatically. #[serde(skip_serializing_if = "Option::is_none")] - pub default_for: - Option>, + pub default_for: Option>, /// Description of the mandate interval. /// @@ -2002,17 +2268,20 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions { /// Payment schedule for the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsBacsDebitMandateOptions { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -2064,16 +2333,15 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -2085,16 +2353,14 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { /// 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, + pub electronic_commerce_indicator: Option, /// 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, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -2115,23 +2381,26 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// 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, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: - Option>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -2142,14 +2411,15 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] pub requested: Option>, @@ -2157,28 +2427,48 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: - Option, + pub cartes_bancaires: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: - Option, + pub cartes_bancaires: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + /// 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: - CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + pub cb_avalgo: CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, /// The exemption indicator returned from Cartes Bancaires in the ARes. /// message extension: CB-EXEMPTION; string (4 characters) @@ -2195,12 +2485,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCa #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + /// 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: - UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + pub cb_avalgo: UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, /// The exemption indicator returned from Cartes Bancaires in the ARes. /// message extension: CB-EXEMPTION; string (4 characters) @@ -2317,6 +2607,42 @@ impl std::default::Default for CreateSetupIntentMandateDataCustomerAcceptanceTyp } } +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodData`'s `allow_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl CreateSetupIntentPaymentMethodDataAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodDataAllowRedisplay::Always => "always", + CreateSetupIntentPaymentMethodDataAllowRedisplay::Limited => "limited", + CreateSetupIntentPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodDataAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodDataAllowRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodDataAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodDataEps`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2354,55 +2680,29 @@ pub enum CreateSetupIntentPaymentMethodDataEpsBank { impl CreateSetupIntentPaymentMethodDataEpsBank { pub fn as_str(self) -> &'static str { match self { - CreateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => { - "arzte_und_apotheker_bank" - } - CreateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => { - "austrian_anadi_bank_ag" - } + CreateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", + CreateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", CreateSetupIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria", - CreateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => { - "bankhaus_carl_spangler" - } - CreateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } + CreateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", + CreateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", CreateSetupIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag", CreateSetupIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag", - CreateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => { - "brull_kallmus_bank_ag" - } + CreateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", CreateSetupIntentPaymentMethodDataEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", - CreateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => { - "capital_bank_grawe_gruppe_ag" - } + CreateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", CreateSetupIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag", CreateSetupIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank", CreateSetupIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag", - CreateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => { - "erste_bank_und_sparkassen" - } - CreateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - CreateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - CreateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - CreateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } + CreateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", + CreateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + CreateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + CreateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + CreateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", CreateSetupIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", - CreateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => { - "hypo_vorarlberg_bank_ag" - } + CreateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", CreateSetupIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank", CreateSetupIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag", - CreateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + CreateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", CreateSetupIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag", CreateSetupIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien", CreateSetupIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -2645,9 +2945,7 @@ impl CreateSetupIntentPaymentMethodDataP24Bank { CreateSetupIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy", CreateSetupIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole", CreateSetupIntentPaymentMethodDataP24Bank::Envelobank => "envelobank", - CreateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => { - "etransfer_pocztowy24" - } + CreateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", CreateSetupIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank", CreateSetupIntentPaymentMethodDataP24Bank::Ideabank => "ideabank", CreateSetupIntentPaymentMethodDataP24Bank::Ing => "ing", @@ -2658,9 +2956,7 @@ impl CreateSetupIntentPaymentMethodDataP24Bank { CreateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", CreateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", CreateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", - CreateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + CreateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", CreateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", CreateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank", CreateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -2741,6 +3037,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2756,6 +3053,8 @@ pub enum CreateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -2766,6 +3065,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -2778,6 +3078,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::Affirm => "affirm", CreateSetupIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay", CreateSetupIntentPaymentMethodDataType::Alipay => "alipay", + CreateSetupIntentPaymentMethodDataType::AmazonPay => "amazon_pay", CreateSetupIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit", CreateSetupIntentPaymentMethodDataType::BacsDebit => "bacs_debit", CreateSetupIntentPaymentMethodDataType::Bancontact => "bancontact", @@ -2793,6 +3094,8 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::Klarna => "klarna", CreateSetupIntentPaymentMethodDataType::Konbini => "konbini", CreateSetupIntentPaymentMethodDataType::Link => "link", + CreateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", + CreateSetupIntentPaymentMethodDataType::Multibanco => "multibanco", CreateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", CreateSetupIntentPaymentMethodDataType::P24 => "p24", CreateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -2803,6 +3106,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreateSetupIntentPaymentMethodDataType::Sofort => "sofort", CreateSetupIntentPaymentMethodDataType::Swish => "swish", + CreateSetupIntentPaymentMethodDataType::Twint => "twint", CreateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", CreateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay", CreateSetupIntentPaymentMethodDataType::Zip => "zip", @@ -2839,9 +3143,7 @@ impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -2925,9 +3227,7 @@ impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsAcssDebitMandate self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor { fn default() -> Self { Self::Invoice } @@ -2958,16 +3258,12 @@ impl AsRef for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn default() -> Self { Self::Combined } @@ -2996,16 +3292,12 @@ impl AsRef for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -3023,13 +3315,9 @@ pub enum CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { impl CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { pub fn as_str(self) -> &'static str { match self { - CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => { - "automatic" - } + CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + CreateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3151,9 +3439,7 @@ impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardMandateOptio self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { fn default() -> Self { Self::India } @@ -3168,6 +3454,7 @@ pub enum CreateSetupIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -3184,6 +3471,7 @@ impl CreateSetupIntentPaymentMethodOptionsCardNetwork { CreateSetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners", CreateSetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover", CreateSetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + CreateSetupIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", CreateSetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac", CreateSetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", CreateSetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -3292,9 +3580,7 @@ impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecure self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -3328,24 +3614,18 @@ impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndi } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -3354,8 +3634,7 @@ impl std::default::Default /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -3383,24 +3662,18 @@ impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBa } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -3445,6 +3718,40 @@ impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSe } } +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3466,24 +3773,18 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermi } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -3494,6 +3795,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -3501,6 +3803,7 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefe pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -3512,16 +3815,12 @@ impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialC } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -3542,24 +3841,18 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionM } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -3577,9 +3870,7 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach", - CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => { - "us_domestic_wire" - } + CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => "us_domestic_wire", } } } @@ -3613,15 +3904,9 @@ pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { impl CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { pub fn as_str(self) -> &'static str { match self { - CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => { - "automatic" - } - CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => { - "instant" - } - CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", + CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", + CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3637,9 +3922,7 @@ impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountVer self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -3761,9 +4044,7 @@ impl SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -3799,9 +4080,7 @@ impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3938,6 +4217,7 @@ pub enum SetupIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -3954,6 +4234,7 @@ impl SetupIntentPaymentMethodOptionsCardNetwork { SetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners", SetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover", SetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + SetupIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", SetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac", SetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", SetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -4029,9 +4310,7 @@ impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor { pub fn as_str(self) -> &'static str { match self { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice", - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => { - "subscription" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => "subscription", } } } @@ -4065,15 +4344,9 @@ pub enum SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule { impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule { pub fn as_str(self) -> &'static str { match self { - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => { - "combined" - } - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => { - "interval" - } - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => { - "sporadic" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Combined => "combined", + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Interval => "interval", + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule::Sporadic => "sporadic", } } } @@ -4089,9 +4362,7 @@ impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebi self.as_str().fmt(f) } } -impl std::default::Default - for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule -{ +impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitPaymentSchedule { fn default() -> Self { Self::Combined } @@ -4108,12 +4379,8 @@ pub enum SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { pub fn as_str(self) -> &'static str { match self { - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => { - "business" - } - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => { - "personal" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Business => "business", + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType::Personal => "personal", } } } @@ -4129,9 +4396,7 @@ impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebi self.as_str().fmt(f) } } -impl std::default::Default - for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType -{ +impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { fn default() -> Self { Self::Business } @@ -4149,13 +4414,9 @@ pub enum SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { impl SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { pub fn as_str(self) -> &'static str { match self { - SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => { - "automatic" - } + SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } @@ -4253,6 +4514,42 @@ impl std::default::Default for UpdateSetupIntentFlowDirections { } } +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodData`'s `allow_redisplay` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl UpdateSetupIntentPaymentMethodDataAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodDataAllowRedisplay::Always => "always", + UpdateSetupIntentPaymentMethodDataAllowRedisplay::Limited => "limited", + UpdateSetupIntentPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodDataAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodDataAllowRedisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodDataAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodDataEps`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4290,55 +4587,29 @@ pub enum UpdateSetupIntentPaymentMethodDataEpsBank { impl UpdateSetupIntentPaymentMethodDataEpsBank { pub fn as_str(self) -> &'static str { match self { - UpdateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => { - "arzte_und_apotheker_bank" - } - UpdateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => { - "austrian_anadi_bank_ag" - } + UpdateSetupIntentPaymentMethodDataEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", + UpdateSetupIntentPaymentMethodDataEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", UpdateSetupIntentPaymentMethodDataEpsBank::BankAustria => "bank_austria", - UpdateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => { - "bankhaus_carl_spangler" - } - UpdateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } + UpdateSetupIntentPaymentMethodDataEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", + UpdateSetupIntentPaymentMethodDataEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", UpdateSetupIntentPaymentMethodDataEpsBank::BawagPskAg => "bawag_psk_ag", UpdateSetupIntentPaymentMethodDataEpsBank::BksBankAg => "bks_bank_ag", - UpdateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => { - "brull_kallmus_bank_ag" - } + UpdateSetupIntentPaymentMethodDataEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", UpdateSetupIntentPaymentMethodDataEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", - UpdateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => { - "capital_bank_grawe_gruppe_ag" - } + UpdateSetupIntentPaymentMethodDataEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", UpdateSetupIntentPaymentMethodDataEpsBank::DeutscheBankAg => "deutsche_bank_ag", UpdateSetupIntentPaymentMethodDataEpsBank::Dolomitenbank => "dolomitenbank", UpdateSetupIntentPaymentMethodDataEpsBank::EasybankAg => "easybank_ag", - UpdateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => { - "erste_bank_und_sparkassen" - } - UpdateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - UpdateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - UpdateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - UpdateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } + UpdateSetupIntentPaymentMethodDataEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", + UpdateSetupIntentPaymentMethodDataEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + UpdateSetupIntentPaymentMethodDataEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + UpdateSetupIntentPaymentMethodDataEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + UpdateSetupIntentPaymentMethodDataEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", UpdateSetupIntentPaymentMethodDataEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", - UpdateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => { - "hypo_vorarlberg_bank_ag" - } + UpdateSetupIntentPaymentMethodDataEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", UpdateSetupIntentPaymentMethodDataEpsBank::MarchfelderBank => "marchfelder_bank", UpdateSetupIntentPaymentMethodDataEpsBank::OberbankAg => "oberbank_ag", - UpdateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } + UpdateSetupIntentPaymentMethodDataEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", UpdateSetupIntentPaymentMethodDataEpsBank::SchoellerbankAg => "schoellerbank_ag", UpdateSetupIntentPaymentMethodDataEpsBank::SpardaBankWien => "sparda_bank_wien", UpdateSetupIntentPaymentMethodDataEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -4581,9 +4852,7 @@ impl UpdateSetupIntentPaymentMethodDataP24Bank { UpdateSetupIntentPaymentMethodDataP24Bank::CitiHandlowy => "citi_handlowy", UpdateSetupIntentPaymentMethodDataP24Bank::CreditAgricole => "credit_agricole", UpdateSetupIntentPaymentMethodDataP24Bank::Envelobank => "envelobank", - UpdateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => { - "etransfer_pocztowy24" - } + UpdateSetupIntentPaymentMethodDataP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", UpdateSetupIntentPaymentMethodDataP24Bank::GetinBank => "getin_bank", UpdateSetupIntentPaymentMethodDataP24Bank::Ideabank => "ideabank", UpdateSetupIntentPaymentMethodDataP24Bank::Ing => "ing", @@ -4594,9 +4863,7 @@ impl UpdateSetupIntentPaymentMethodDataP24Bank { UpdateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", UpdateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", UpdateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", - UpdateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + UpdateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", UpdateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", UpdateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank", UpdateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -4677,6 +4944,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -4692,6 +4960,8 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, + Multibanco, Oxxo, P24, Paynow, @@ -4702,6 +4972,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { SepaDebit, Sofort, Swish, + Twint, UsBankAccount, WechatPay, Zip, @@ -4714,6 +4985,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::Affirm => "affirm", UpdateSetupIntentPaymentMethodDataType::AfterpayClearpay => "afterpay_clearpay", UpdateSetupIntentPaymentMethodDataType::Alipay => "alipay", + UpdateSetupIntentPaymentMethodDataType::AmazonPay => "amazon_pay", UpdateSetupIntentPaymentMethodDataType::AuBecsDebit => "au_becs_debit", UpdateSetupIntentPaymentMethodDataType::BacsDebit => "bacs_debit", UpdateSetupIntentPaymentMethodDataType::Bancontact => "bancontact", @@ -4729,6 +5001,8 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::Klarna => "klarna", UpdateSetupIntentPaymentMethodDataType::Konbini => "konbini", UpdateSetupIntentPaymentMethodDataType::Link => "link", + UpdateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", + UpdateSetupIntentPaymentMethodDataType::Multibanco => "multibanco", UpdateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", UpdateSetupIntentPaymentMethodDataType::P24 => "p24", UpdateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -4739,6 +5013,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdateSetupIntentPaymentMethodDataType::Sofort => "sofort", UpdateSetupIntentPaymentMethodDataType::Swish => "swish", + UpdateSetupIntentPaymentMethodDataType::Twint => "twint", UpdateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", UpdateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay", UpdateSetupIntentPaymentMethodDataType::Zip => "zip", @@ -4775,9 +5050,7 @@ impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -4861,9 +5134,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandate self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsDefaultFor { fn default() -> Self { Self::Invoice } @@ -4894,16 +5165,12 @@ impl AsRef for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsPaymentSchedule { fn default() -> Self { Self::Combined } @@ -4932,16 +5199,12 @@ impl AsRef for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -4959,13 +5222,9 @@ pub enum UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { impl UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { pub fn as_str(self) -> &'static str { match self { - UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => { - "automatic" - } + UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + UpdateSetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -5087,9 +5346,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardMandateOptio self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { fn default() -> Self { Self::India } @@ -5104,6 +5361,7 @@ pub enum UpdateSetupIntentPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -5120,6 +5378,7 @@ impl UpdateSetupIntentPaymentMethodOptionsCardNetwork { UpdateSetupIntentPaymentMethodOptionsCardNetwork::Diners => "diners", UpdateSetupIntentPaymentMethodOptionsCardNetwork::Discover => "discover", UpdateSetupIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + UpdateSetupIntentPaymentMethodOptionsCardNetwork::Girocard => "girocard", UpdateSetupIntentPaymentMethodOptionsCardNetwork::Interac => "interac", UpdateSetupIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", UpdateSetupIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -5228,9 +5487,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -5264,24 +5521,18 @@ impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndi } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -5290,8 +5541,7 @@ impl std::default::Default /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -5319,24 +5569,18 @@ impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBa } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -5381,6 +5625,40 @@ impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSe } } +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5402,24 +5680,18 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermi } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -5430,6 +5702,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -5437,6 +5710,7 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefe pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -5448,16 +5722,12 @@ impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialC } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -5478,24 +5748,18 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionM } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -5513,9 +5777,7 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::Ach => "ach", - UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => { - "us_domestic_wire" - } + UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworksRequested::UsDomesticWire => "us_domestic_wire", } } } @@ -5549,15 +5811,9 @@ pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { pub fn as_str(self) -> &'static str { match self { - UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => { - "automatic" - } - UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => { - "instant" - } - UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } @@ -5573,9 +5829,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVer self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } diff --git a/src/resources/generated/shipping.rs b/src/resources/generated/shipping.rs index 37ec84939..a187e146f 100644 --- a/src/resources/generated/shipping.rs +++ b/src/resources/generated/shipping.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::resources::{Address}; use serde::{Deserialize, Serialize}; -use crate::resources::Address; - /// The resource representing a Stripe "Shipping". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Shipping { + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, diff --git a/src/resources/generated/shipping_rate.rs b/src/resources/generated/shipping_rate.rs index 6f77c617a..678238c7b 100644 --- a/src/resources/generated/shipping_rate.rs +++ b/src/resources/generated/shipping_rate.rs @@ -2,18 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ShippingRateId, TaxCodeId}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Currency, TaxCode}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ShippingRate". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRate { /// Unique identifier for the object. @@ -61,17 +58,17 @@ pub struct ShippingRate { pub tax_code: Option>, /// The type of calculation to use on the shipping rate. - /// - /// Can only be `fixed_amount` for now. #[serde(rename = "type")] pub type_: ShippingRateType, } impl ShippingRate { + /// Returns a list of your shipping rates. - pub fn list(client: &Client, params: &ListShippingRates<'_>) -> Response> { - client.get_query("/shipping_rates", params) - } +pub fn list(client: &Client, params: &ListShippingRates<'_>) -> Response> { + client.get_query("/shipping_rates", params) +} + /// Creates a new shipping rate object. pub fn create(client: &Client, params: CreateShippingRate<'_>) -> Response { @@ -80,20 +77,12 @@ impl ShippingRate { } /// Returns the shipping rate object with the given ID. - pub fn retrieve( - client: &Client, - id: &ShippingRateId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &ShippingRateId, expand: &[&str]) -> Response { client.get_query(&format!("/shipping_rates/{}", id), Expand { expand }) } /// Updates an existing shipping rate object. - pub fn update( - client: &Client, - id: &ShippingRateId, - params: UpdateShippingRate<'_>, - ) -> Response { + pub fn update(client: &Client, id: &ShippingRateId, params: UpdateShippingRate<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/shipping_rates/{}", id), ¶ms) } @@ -111,6 +100,7 @@ impl Object for ShippingRate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -124,6 +114,7 @@ pub struct ShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimateBound { + /// A unit of time. pub unit: ShippingRateDeliveryEstimateBoundUnit, @@ -133,6 +124,7 @@ pub struct ShippingRateDeliveryEstimateBound { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -150,6 +142,7 @@ pub struct ShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateCurrencyOption { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -162,6 +155,7 @@ pub struct ShippingRateCurrencyOption { /// The parameters for `ShippingRate::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateShippingRate<'a> { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. @@ -204,8 +198,6 @@ pub struct CreateShippingRate<'a> { pub tax_code: Option, /// The type of calculation to use on the shipping rate. - /// - /// Can only be `fixed_amount` for now. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option, @@ -229,6 +221,7 @@ impl<'a> CreateShippingRate<'a> { /// The parameters for `ShippingRate::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListShippingRates<'a> { + /// Only return shipping rates that are active or inactive. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -284,12 +277,12 @@ impl<'a> ListShippingRates<'a> { impl Paginable for ListShippingRates<'_> { type O = ShippingRate; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `ShippingRate::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateShippingRate<'a> { + /// Whether the shipping rate can be used for new purchases. /// /// Defaults to `true`. @@ -335,6 +328,7 @@ impl<'a> UpdateShippingRate<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -350,6 +344,7 @@ pub struct CreateShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -367,6 +362,7 @@ pub struct CreateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateShippingRateFixedAmount { + /// Shipping rates defined in each available currency option. /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -376,6 +372,7 @@ pub struct UpdateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMaximumUnit, @@ -385,6 +382,7 @@ pub struct CreateShippingRateDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMinimumUnit, @@ -394,6 +392,7 @@ pub struct CreateShippingRateDeliveryEstimateMinimum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -406,6 +405,7 @@ pub struct CreateShippingRateFixedAmountCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateShippingRateFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, diff --git a/src/resources/generated/source.rs b/src/resources/generated/source.rs index ac36b8aef..7c736f45e 100644 --- a/src/resources/generated/source.rs +++ b/src/resources/generated/source.rs @@ -2,19 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, SourceId, TokenId}; use crate::params::{Expand, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - Address, BillingDetails, Currency, Shipping, SourceRedirectFlowFailureReason, - SourceRedirectFlowStatus, SourceStatus, SourceUsage, -}; +use crate::resources::{Address, BillingDetails, Currency, Shipping, SourceRedirectFlowFailureReason, SourceRedirectFlowStatus, SourceStatus, SourceUsage}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Source". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Source { /// Unique identifier for the object. @@ -160,10 +156,12 @@ pub struct Source { } impl Source { + /// List source transactions for a given source. - pub fn list(client: &Client, params: &ListSources<'_>) -> Response> { - client.get_query("/sources/{source}/source_transactions", params) - } +pub fn list(client: &Client, params: &ListSources<'_>) -> Response> { + client.get_query("/sources/{source}/source_transactions", params) +} + /// Creates a new source object. pub fn create(client: &Client, params: CreateSource<'_>) -> Response { @@ -201,6 +199,7 @@ impl Object for Source { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceCodeVerificationFlow { + /// The number of attempts remaining to authenticate the source object with a verification code. pub attempts_remaining: i64, @@ -210,6 +209,7 @@ pub struct SourceCodeVerificationFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceOrder { + /// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. pub amount: i64, @@ -231,6 +231,7 @@ pub struct SourceOrder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceOrderItem { + /// The amount (price) for this order item. pub amount: Option, @@ -262,6 +263,7 @@ pub struct SourceOrderItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceOwner { + /// Owner's address. pub address: Option
, @@ -301,6 +303,7 @@ pub struct SourceOwner { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceReceiverFlow { + /// The address of the receiver source. /// /// This is the value that should be communicated to the customer to send their funds to. @@ -333,6 +336,7 @@ pub struct SourceReceiverFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceRedirectFlow { + /// The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). /// /// Present only if the redirect status is `failed`. @@ -350,6 +354,7 @@ pub struct SourceRedirectFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAchCreditTransfer { + #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, @@ -377,6 +382,7 @@ pub struct SourceTypeAchCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAchDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_name: Option, @@ -399,6 +405,7 @@ pub struct SourceTypeAchDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_address_city: Option, @@ -432,6 +439,7 @@ pub struct SourceTypeAcssDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAlipay { + #[serde(skip_serializing_if = "Option::is_none")] pub data_string: Option, @@ -444,6 +452,7 @@ pub struct SourceTypeAlipay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAuBecsDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bsb_number: Option, @@ -456,6 +465,7 @@ pub struct SourceTypeAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeBancontact { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -477,6 +487,7 @@ pub struct SourceTypeBancontact { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeCard { + #[serde(skip_serializing_if = "Option::is_none")] pub address_line1_check: Option, @@ -531,6 +542,7 @@ pub struct SourceTypeCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeCardPresent { + #[serde(skip_serializing_if = "Option::is_none")] pub application_cryptogram: Option, @@ -612,6 +624,7 @@ pub struct SourceTypeCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeEps { + #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -621,6 +634,7 @@ pub struct SourceTypeEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeGiropay { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -636,6 +650,7 @@ pub struct SourceTypeGiropay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeIdeal { + #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, @@ -651,6 +666,7 @@ pub struct SourceTypeIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeKlarna { + #[serde(skip_serializing_if = "Option::is_none")] pub background_image_url: Option, @@ -732,6 +748,7 @@ pub struct SourceTypeKlarna { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeMultibanco { + #[serde(skip_serializing_if = "Option::is_none")] pub entity: Option, @@ -765,12 +782,14 @@ pub struct SourceTypeMultibanco { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeP24 { + #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeSepaCreditTransfer { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_name: Option, @@ -807,6 +826,7 @@ pub struct SourceTypeSepaCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -831,6 +851,7 @@ pub struct SourceTypeSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeSofort { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -855,6 +876,7 @@ pub struct SourceTypeSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeThreeDSecure { + #[serde(skip_serializing_if = "Option::is_none")] pub address_line1_check: Option, @@ -918,6 +940,7 @@ pub struct SourceTypeThreeDSecure { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeWechat { + #[serde(skip_serializing_if = "Option::is_none")] pub prepay_id: Option, @@ -931,6 +954,7 @@ pub struct SourceTypeWechat { /// The parameters for `Source::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateSource<'a> { + /// Amount associated with the source. /// /// This is the amount for which the source will be chargeable once ready. @@ -1040,6 +1064,7 @@ impl<'a> CreateSource<'a> { /// The parameters for `Source::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSources<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -1078,12 +1103,12 @@ impl<'a> ListSources<'a> { impl Paginable for ListSources<'_> { type O = Source; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Source::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateSource<'a> { + /// Amount associated with the source. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1130,6 +1155,7 @@ impl<'a> UpdateSource<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceReceiver { + /// The method Stripe should use to request information needed to process a refund or mispayment. /// /// Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). @@ -1140,6 +1166,7 @@ pub struct CreateSourceReceiver { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceRedirect { + /// The URL you provide to redirect the customer back to you after they authenticated their payment. /// /// It can use your application URI scheme in the context of a mobile application. @@ -1148,6 +1175,7 @@ pub struct CreateSourceRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrder { + /// List of items constituting the order. #[serde(skip_serializing_if = "Option::is_none")] pub items: Option>, @@ -1161,6 +1189,7 @@ pub struct CreateSourceSourceOrder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceMandateParams { + /// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. #[serde(skip_serializing_if = "Option::is_none")] pub acceptance: Option, @@ -1192,6 +1221,7 @@ pub struct SourceMandateParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrder { + /// List of items constituting the order. #[serde(skip_serializing_if = "Option::is_none")] pub items: Option>, @@ -1205,6 +1235,7 @@ pub struct UpdateSourceSourceOrder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrderItems { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1231,6 +1262,7 @@ pub struct CreateSourceSourceOrderItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrderShipping { + /// Shipping address. pub address: CreateSourceSourceOrderShippingAddress, @@ -1255,6 +1287,7 @@ pub struct CreateSourceSourceOrderShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceAcceptanceParams { + /// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -1294,6 +1327,7 @@ pub struct SourceAcceptanceParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrderItems { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1320,6 +1354,7 @@ pub struct UpdateSourceSourceOrderItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrderShipping { + /// Shipping address. pub address: UpdateSourceSourceOrderShippingAddress, @@ -1344,6 +1379,7 @@ pub struct UpdateSourceSourceOrderShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrderShippingAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -1370,12 +1406,14 @@ pub struct CreateSourceSourceOrderShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceAcceptanceOfflineParams { + /// An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. pub contact_email: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceAcceptanceOnlineParams { + /// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -1391,6 +1429,7 @@ pub struct SourceAcceptanceOnlineParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrderShippingAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index 584b44d6d..51c39dc8d 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -2,26 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CouponId, CustomerId, PlanId, PriceId, PromotionCodeId, SubscriptionId}; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Account, Application, CollectionMethod, ConnectAccountReference, Currency, Customer, Discount, - Invoice, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, - InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, - InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, - SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, - SubscriptionSchedule, SubscriptionTransferData, SubscriptionsTrialsResourceTrialSettings, - TaxRate, TestHelpersTestClock, -}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Account, Application, CollectionMethod, ConnectAccountReference, Currency, Customer, Discount, Invoice, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsSepaDebit, InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, SubscriptionSchedule, SubscriptionTransferData, SubscriptionsTrialsResourceTrialSettings, TaxId, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Subscription". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Subscription { /// Unique identifier for the object. @@ -52,9 +41,7 @@ pub struct Subscription { /// A date in the future at which the subscription will automatically get canceled. pub cancel_at: Option, - /// If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. - /// - /// You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + /// Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. pub cancel_at_period_end: bool, /// If the subscription has been canceled, the date of that cancellation. @@ -125,11 +112,21 @@ pub struct Subscription { /// Describes the current discount applied to this subscription, if there is one. /// /// When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. pub discount: Option, + /// The discounts applied to the subscription. + /// + /// Subscription item discounts are applied before subscription discounts. + /// Use `expand[]=discounts` to expand each discount. + pub discounts: Vec>, + /// If the subscription has ended, the date the subscription ended. pub ended_at: Option, + pub invoice_settings: SubscriptionsResourceSubscriptionInvoiceSettings, + /// List of subscription items, each with an attached price. pub items: List, @@ -153,6 +150,9 @@ pub struct Subscription { pub on_behalf_of: Option>, /// If specified, payment collection for this subscription will be paused. + /// + /// Note that the subscription status will be unchanged and will not be updated to `paused`. + /// Learn more about [pausing collection](/billing/subscriptions/pause-payment). pub pause_collection: Option, /// Payment settings passed on to invoices created by the subscription. @@ -179,14 +179,17 @@ pub struct Subscription { /// The date might differ from the `created` date due to backdating. pub start_date: Timestamp, - /// Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + /// Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. /// /// For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. - /// A subscription in this state can only have metadata and default_source updated. - /// Once the first invoice is paid, the subscription moves into an `active` state. + /// A subscription in this status can only have metadata and default_source updated. + /// Once the first invoice is paid, the subscription moves into an `active` status. /// If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. - /// This is a terminal state, the open invoice will be voided and no further invoices will be generated. + /// This is a terminal status, the open invoice will be voided and no further invoices will be generated. /// A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + /// A subscription can only enter a `paused` status [when a trial ends without a payment method](/billing/subscriptions/trials#create-free-trials-without-payment). + /// A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. + /// The `paused` status is different from [pausing collection](/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. /// If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). /// Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). /// If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. @@ -211,12 +214,14 @@ pub struct Subscription { } impl Subscription { + /// By default, returns a list of subscriptions that have not been canceled. /// /// In order to list canceled subscriptions, specify `status=canceled`. - pub fn list(client: &Client, params: &ListSubscriptions<'_>) -> Response> { - client.get_query("/subscriptions", params) - } +pub fn list(client: &Client, params: &ListSubscriptions<'_>) -> Response> { + client.get_query("/subscriptions", params) +} + /// Creates a new subscription on an existing customer. /// @@ -227,35 +232,28 @@ impl Subscription { } /// Retrieves the subscription with the given ID. - pub fn retrieve( - client: &Client, - id: &SubscriptionId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &SubscriptionId, expand: &[&str]) -> Response { client.get_query(&format!("/subscriptions/{}", id), Expand { expand }) } /// Updates an existing subscription to match the specified parameters. /// When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. - /// To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint. + /// To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. /// /// By default, we prorate subscription changes. /// /// For example, if a customer signs up on May 1 for a $100 price, they’ll be billed $100 immediately. /// If on May 15 they switch to a $200 price, then on June 1 they’ll be billed $250 ($200 for a renewal of her subscription, plus a $50 prorating adjustment for half of the previous month’s $100 difference). /// Similarly, a downgrade generates a credit that is applied to the next invoice. - /// We also prorate when you make quantity changes. Switching prices does not normally change the billing date or generate an immediate charge unless:
  • The billing interval is changed (for example, from monthly to yearly).
  • The subscription moves from free to paid, or paid to free.
  • A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. + /// We also prorate when you make quantity changes. Switching prices does not normally change the billing date or generate an immediate charge unless:
  • The billing interval is changed (for example, from monthly to yearly).
  • The subscription moves from free to paid.
  • A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. + /// Learn about how Stripe immediately attempts payment for subscription changes. If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. /// If you pass `create_prorations`, the prorations are created but not automatically invoiced. /// If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). If you don’t want to prorate, set the `proration_behavior` option to `none`. /// With this option, the customer is billed $100 on May 1 and $200 on June 1. /// Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. /// We still reset the billing date and bill immediately for the new subscription. Updating the quantity on a subscription many times in an hour may result in [rate limiting](https://stripe.com/docs/rate-limits). /// If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](https://stripe.com/docs/billing/subscriptions/usage-based) instead. - pub fn update( - client: &Client, - id: &SubscriptionId, - params: UpdateSubscription<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SubscriptionId, params: UpdateSubscription<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/subscriptions/{}", id), ¶ms) } @@ -285,6 +283,7 @@ impl Object for Subscription { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CancellationDetails { + /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. pub comment: Option, @@ -297,6 +296,7 @@ pub struct CancellationDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionAutomaticTax { + /// Whether Stripe automatically computes tax on this subscription. pub enabled: bool, @@ -309,6 +309,7 @@ pub struct SubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -323,6 +324,7 @@ pub struct SubscriptionPendingInvoiceItemInterval { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourceBillingCycleAnchorConfig { + /// The day of the month of the billing_cycle_anchor. pub day_of_month: i64, @@ -341,6 +343,7 @@ pub struct SubscriptionsResourceBillingCycleAnchorConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePauseCollection { + /// The payment collection behavior for this subscription while paused. /// /// One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -352,6 +355,7 @@ pub struct SubscriptionsResourcePauseCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePaymentSettings { + /// Payment-method-specific configuration to provide to invoices created by the subscription. pub payment_method_options: Option, @@ -360,15 +364,15 @@ pub struct SubscriptionsResourcePaymentSettings { /// If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). pub payment_method_types: Option>, - /// Either `off`, or `on_subscription`. + /// Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. /// - /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. - pub save_default_payment_method: - Option, + /// Defaults to `off`. + pub save_default_payment_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePaymentMethodOptions { + /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. pub acss_debit: Option, @@ -384,12 +388,16 @@ pub struct SubscriptionsResourcePaymentMethodOptions { /// This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. pub us_bank_account: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -402,12 +410,13 @@ pub struct SubscriptionPaymentMethodOptionsCard { /// 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. - /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceMandateOptionsCard { + /// Amount to be charged for future payments. pub amount: Option, @@ -423,6 +432,7 @@ pub struct InvoiceMandateOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePendingUpdate { + /// If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. /// /// The timestamp is in UTC format. @@ -445,9 +455,21 @@ pub struct SubscriptionsResourcePendingUpdate { pub trial_from_plan: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionsResourceSubscriptionInvoiceSettings { + + /// The account tax IDs associated with the subscription. + /// + /// Will be set on invoices generated by the subscription. + pub account_tax_ids: Option>>, + + pub issuer: ConnectAccountReference, +} + /// The parameters for `Subscription::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateSubscription<'a> { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. /// /// You may pass up to 20 items. @@ -501,7 +523,9 @@ pub struct CreateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub cancel_at: Option, - /// Boolean indicating whether this subscription should cancel at the end of the current period. + /// Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). + /// + /// Defaults to `false`. #[serde(skip_serializing_if = "Option::is_none")] pub cancel_at_period_end: Option, @@ -516,6 +540,8 @@ pub struct CreateSubscription<'a> { /// The ID of the coupon to apply to this subscription. /// /// A coupon applied to a subscription will only affect invoices created for that particular subscription. + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -562,6 +588,12 @@ pub struct CreateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<&'a str>, + /// The coupons to redeem into discounts for the subscription. + /// + /// If not specified or empty, inherits the discount from the subscription's customer. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -583,6 +615,8 @@ pub struct CreateSubscription<'a> { pub metadata: Option, /// Indicates if a customer is on or off-session while an invoice payment is attempted. + /// + /// Defaults to `false` (on-session). #[serde(skip_serializing_if = "Option::is_none")] pub off_session: Option, @@ -592,19 +626,18 @@ pub struct CreateSubscription<'a> { /// Only applies to subscriptions with `collection_method=charge_automatically`. /// - /// Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. + /// Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. /// - /// Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. + /// Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. /// For example, SCA regulation may require 3DS authentication to complete payment. /// See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. /// This is the default behavior. Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. - /// Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. - /// This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. - /// Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - /// If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. - /// For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. + /// Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. + /// This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + /// If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. + /// For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. /// This was the default behavior for API versions prior to 2019-03-14. - /// See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. + /// See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. #[serde(skip_serializing_if = "Option::is_none")] pub payment_behavior: Option, @@ -618,13 +651,15 @@ pub struct CreateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub pending_invoice_item_interval: Option, - /// The API ID of a promotion code to apply to this subscription. + /// The promotion code to apply to this subscription. /// /// A promotion code applied to a subscription will only affect invoices created for that particular subscription. + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub promotion_code: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. /// /// If no value is passed, the default is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -684,6 +719,7 @@ impl<'a> CreateSubscription<'a> { default_source: Default::default(), default_tax_rates: Default::default(), description: Default::default(), + discounts: Default::default(), expand: Default::default(), invoice_settings: Default::default(), items: Default::default(), @@ -707,6 +743,7 @@ impl<'a> CreateSubscription<'a> { /// The parameters for `Subscription::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListSubscriptions<'a> { + /// Filter subscriptions by their automatic tax settings. #[serde(skip_serializing_if = "Option::is_none")] pub automatic_tax: Option, @@ -717,6 +754,7 @@ pub struct ListSubscriptions<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, + /// Only return subscriptions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -801,12 +839,12 @@ impl<'a> ListSubscriptions<'a> { impl Paginable for ListSubscriptions<'_> { type O = Subscription; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Subscription::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateSubscription<'a> { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. /// /// You may pass up to 20 items. @@ -847,7 +885,9 @@ pub struct UpdateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub cancel_at: Option, - /// Boolean indicating whether this subscription should cancel at the end of the current period. + /// Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). + /// + /// Defaults to `false`. #[serde(skip_serializing_if = "Option::is_none")] pub cancel_at_period_end: Option, @@ -866,6 +906,8 @@ pub struct UpdateSubscription<'a> { /// The ID of the coupon to apply to this subscription. /// /// A coupon applied to a subscription will only affect invoices created for that particular subscription. + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -904,6 +946,12 @@ pub struct UpdateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// The coupons to redeem into discounts for the subscription. + /// + /// If not specified or empty, inherits the discount from the subscription's customer. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -925,6 +973,8 @@ pub struct UpdateSubscription<'a> { pub metadata: Option, /// Indicates if a customer is on or off-session while an invoice payment is attempted. + /// + /// Defaults to `false` (on-session). #[serde(skip_serializing_if = "Option::is_none")] pub off_session: Option, @@ -933,6 +983,9 @@ pub struct UpdateSubscription<'a> { pub on_behalf_of: Option, /// If specified, payment collection for this subscription will be paused. + /// + /// Note that the subscription status will be unchanged and will not be updated to `paused`. + /// Learn more about [pausing collection](/billing/subscriptions/pause-payment). #[serde(skip_serializing_if = "Option::is_none")] pub pause_collection: Option, @@ -964,10 +1017,12 @@ pub struct UpdateSubscription<'a> { /// The promotion code to apply to this subscription. /// /// A promotion code applied to a subscription will only affect invoices created for that particular subscription. + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub promotion_code: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1026,6 +1081,7 @@ impl<'a> UpdateSubscription<'a> { default_source: Default::default(), default_tax_rates: Default::default(), description: Default::default(), + discounts: Default::default(), expand: Default::default(), invoice_settings: Default::default(), items: Default::default(), @@ -1049,11 +1105,20 @@ impl<'a> UpdateSubscription<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AddInvoiceItems { + + /// The coupons to redeem into discounts for the item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// The ID of the price object. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, @@ -1072,6 +1137,7 @@ pub struct AddInvoiceItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1085,6 +1151,7 @@ pub struct CreateSubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionBillingCycleAnchorConfig { + /// The day of the month the billing_cycle_anchor should be. /// /// Ranges from 1 to 31. @@ -1115,8 +1182,25 @@ pub struct CreateSubscriptionBillingCycleAnchorConfig { pub second: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. /// /// Will be set on invoices generated by the subscription. @@ -1132,12 +1216,17 @@ pub struct CreateSubscriptionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. #[serde(skip_serializing_if = "Option::is_none")] pub billing_thresholds: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// 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. @@ -1172,6 +1261,7 @@ pub struct CreateSubscriptionItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettings { + /// Payment-method-specific configuration to provide to invoices created by the subscription. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, @@ -1183,16 +1273,16 @@ pub struct CreateSubscriptionPaymentSettings { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, - /// Either `off`, or `on_subscription`. + /// Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. /// - /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + /// Defaults to `off` if unspecified. #[serde(skip_serializing_if = "Option::is_none")] - pub save_default_payment_method: - Option, + pub save_default_payment_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1208,6 +1298,7 @@ pub struct CreateSubscriptionPendingInvoiceItemInterval { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1221,18 +1312,21 @@ pub struct CreateSubscriptionTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreateSubscriptionTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListSubscriptionsAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1246,6 +1340,7 @@ pub struct UpdateSubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionCancellationDetails { + /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -1255,8 +1350,25 @@ pub struct UpdateSubscriptionCancellationDetails { pub feedback: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. /// /// Will be set on invoices generated by the subscription. @@ -1272,6 +1384,7 @@ pub struct UpdateSubscriptionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1288,6 +1401,10 @@ pub struct UpdateSubscriptionItems { #[serde(skip_serializing_if = "Option::is_none")] pub deleted: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Subscription item to update. #[serde(skip_serializing_if = "Option::is_none")] pub id: Option, @@ -1306,11 +1423,14 @@ pub struct UpdateSubscriptionItems { /// The ID of the price object. /// + /// One of `price` or `price_data` is required. /// When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, @@ -1328,6 +1448,7 @@ pub struct UpdateSubscriptionItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPauseCollection { + /// The payment collection behavior for this subscription while paused. /// /// One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -1340,6 +1461,7 @@ pub struct UpdateSubscriptionPauseCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettings { + /// Payment-method-specific configuration to provide to invoices created by the subscription. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, @@ -1351,16 +1473,16 @@ pub struct UpdateSubscriptionPaymentSettings { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, - /// Either `off`, or `on_subscription`. + /// Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. /// - /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + /// Defaults to `off` if unspecified. #[serde(skip_serializing_if = "Option::is_none")] - pub save_default_payment_method: - Option, + pub save_default_payment_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1376,6 +1498,7 @@ pub struct UpdateSubscriptionPendingInvoiceItemInterval { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1389,12 +1512,30 @@ pub struct UpdateSubscriptionTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: UpdateSubscriptionTrialSettingsEndBehavior, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AddInvoiceItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1406,6 +1547,7 @@ pub struct CreateSubscriptionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1417,12 +1559,30 @@ pub struct CreateSubscriptionInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptions { + /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -1437,13 +1597,16 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptions { /// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub customer_balance: - Option, + pub customer_balance: Option, /// This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1451,12 +1614,14 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItemPriceData { + /// 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). @@ -1486,6 +1651,7 @@ pub struct InvoiceItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemPriceData { + /// 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). @@ -1518,6 +1684,7 @@ pub struct SubscriptionItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1529,6 +1696,7 @@ pub struct UpdateSubscriptionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1538,8 +1706,25 @@ pub struct UpdateSubscriptionInvoiceSettingsIssuer { pub type_: UpdateSubscriptionInvoiceSettingsIssuerType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptions { + /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -1554,13 +1739,16 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptions { /// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub customer_balance: - Option, + pub customer_balance: Option, /// This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1568,37 +1756,37 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: - Option, + pub mandate_options: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontact { + /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_language: - Option, + pub preferred_language: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: - Option, + pub mandate_options: Option, /// Selected network to process this Subscription on. /// @@ -1610,18 +1798,17 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// 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. - /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance { + /// 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, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1631,25 +1818,28 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, - >, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod, - >, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1665,31 +1855,30 @@ pub struct SubscriptionItemPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: - Option, + pub mandate_options: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontact { + /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_language: - Option, + pub preferred_language: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: - Option, + pub mandate_options: Option, /// Selected network to process this Subscription on. /// @@ -1701,18 +1890,17 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// 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. - /// 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. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#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, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance { + /// 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, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1722,34 +1910,36 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, - >, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod, - >, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType, - >, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1759,8 +1949,7 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptio /// 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. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_type: - Option, + pub amount_type: Option, /// A description of the mandate or subscription that is meant to be displayed to the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1785,6 +1974,10 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceB #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections { + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. @@ -1799,15 +1992,15 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType, - >, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1817,8 +2010,7 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptio /// 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. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_type: - Option, + pub amount_type: Option, /// A description of the mandate or subscription that is meant to be displayed to the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1843,6 +2035,10 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceB #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections { + /// Provide filters for the linked accounts that the customer can select for the payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub filters: Option, + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. @@ -1856,8 +2052,8 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer -{ +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -1865,14 +2061,34 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceB } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer -{ +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// 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 UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters { + + /// The account subcategories to use to filter for selectable accounts. + /// + /// Valid subcategories are `checking` and `savings`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_subcategories: Option>, +} + /// An enum representing the possible values of an `CancellationDetails`'s `feedback` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2028,8 +2244,7 @@ impl std::default::Default for CreateSubscriptionInvoiceSettingsIssuerType { /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { Business, Personal, } @@ -2043,24 +2258,18 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOption } } -impl AsRef - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -2085,24 +2294,18 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationM } } -impl AsRef - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn default() -> Self { Self::Automatic } @@ -2129,24 +2332,18 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLan } } -impl AsRef - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn default() -> Self { Self::De } @@ -2169,24 +2366,18 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmou } } -impl AsRef - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn default() -> Self { Self::Fixed } @@ -2201,6 +2392,7 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -2213,24 +2405,15 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Amex => "amex", - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::CartesBancaires => { - "cartes_bancaires" - } + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Diners => "diners", - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Discover => { - "discover" - } - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::EftposAu => { - "eftpos_au" - } + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Discover => "discover", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Girocard => "girocard", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Interac => "interac", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Jcb => "jcb", - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => { - "mastercard" - } - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => { - "unionpay" - } + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unknown => "unknown", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Visa => "visa", } @@ -2279,26 +2462,55 @@ impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardReq } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { fn default() -> Self { Self::Any } } +/// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { Balances, Ownership, PaymentMethod, @@ -2336,18 +2548,17 @@ impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOpt /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } -impl - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -2389,24 +2600,18 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificat } } -impl AsRef - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -2419,6 +2624,7 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2433,13 +2639,16 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { Ideal, Konbini, Link, + Multibanco, P24, Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -2447,20 +2656,17 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { pub fn as_str(self) -> &'static str { match self { - CreateSubscriptionPaymentSettingsPaymentMethodTypes::AchCreditTransfer => { - "ach_credit_transfer" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::AchCreditTransfer => "ach_credit_transfer", CreateSubscriptionPaymentSettingsPaymentMethodTypes::AchDebit => "ach_debit", CreateSubscriptionPaymentSettingsPaymentMethodTypes::AcssDebit => "acss_debit", + CreateSubscriptionPaymentSettingsPaymentMethodTypes::AmazonPay => "amazon_pay", CreateSubscriptionPaymentSettingsPaymentMethodTypes::AuBecsDebit => "au_becs_debit", CreateSubscriptionPaymentSettingsPaymentMethodTypes::BacsDebit => "bacs_debit", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Bancontact => "bancontact", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -2468,15 +2674,16 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { CreateSubscriptionPaymentSettingsPaymentMethodTypes::Ideal => "ideal", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Konbini => "konbini", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Link => "link", + CreateSubscriptionPaymentSettingsPaymentMethodTypes::Multibanco => "multibanco", CreateSubscriptionPaymentSettingsPaymentMethodTypes::P24 => "p24", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::RevolutPay => "revolut_pay", + CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Sofort => "sofort", + CreateSubscriptionPaymentSettingsPaymentMethodTypes::Swish => "swish", CreateSubscriptionPaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", CreateSubscriptionPaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -2512,9 +2719,7 @@ impl CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2549,9 +2754,7 @@ impl CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::Cancel => "cancel", - CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => { - "create_invoice" - } + CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice", CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::Pause => "pause", } } @@ -2799,6 +3002,7 @@ pub enum SubscriptionPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -2815,6 +3019,7 @@ impl SubscriptionPaymentMethodOptionsCardNetwork { SubscriptionPaymentMethodOptionsCardNetwork::Diners => "diners", SubscriptionPaymentMethodOptionsCardNetwork::Discover => "discover", SubscriptionPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + SubscriptionPaymentMethodOptionsCardNetwork::Girocard => "girocard", SubscriptionPaymentMethodOptionsCardNetwork::Interac => "interac", SubscriptionPaymentMethodOptionsCardNetwork::Jcb => "jcb", SubscriptionPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", @@ -3053,6 +3258,7 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -3067,13 +3273,16 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { Ideal, Konbini, Link, + Multibanco, P24, Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -3081,20 +3290,17 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { pub fn as_str(self) -> &'static str { match self { - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AchCreditTransfer => { - "ach_credit_transfer" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AchCreditTransfer => "ach_credit_transfer", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AchDebit => "ach_debit", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AcssDebit => "acss_debit", + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AmazonPay => "amazon_pay", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::AuBecsDebit => "au_becs_debit", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::BacsDebit => "bacs_debit", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Bancontact => "bancontact", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Boleto => "boleto", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Card => "card", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Eps => "eps", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Fpx => "fpx", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -3102,18 +3308,17 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Ideal => "ideal", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Konbini => "konbini", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Link => "link", + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Multibanco => "multibanco", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::P24 => "p24", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paynow => "paynow", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paypal => "paypal", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::RevolutPay => "revolut_pay", + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Sofort => "sofort", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::UsBankAccount => { - "us_bank_account" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Swish => "swish", + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } } @@ -3148,9 +3353,7 @@ impl SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::Off => "off", - SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3327,8 +3530,7 @@ impl std::default::Default for UpdateSubscriptionPauseCollectionBehavior { /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { Business, Personal, } @@ -3342,24 +3544,18 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOption } } -impl AsRef - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { fn default() -> Self { Self::Business } @@ -3384,24 +3580,18 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationM } } -impl AsRef - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitVerificationMethod { fn default() -> Self { Self::Automatic } @@ -3428,24 +3618,18 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLan } } -impl AsRef - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage { fn default() -> Self { Self::De } @@ -3468,24 +3652,18 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmou } } -impl AsRef - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType { fn default() -> Self { Self::Fixed } @@ -3500,6 +3678,7 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork { Diners, Discover, EftposAu, + Girocard, Interac, Jcb, Mastercard, @@ -3512,24 +3691,15 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Amex => "amex", - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::CartesBancaires => { - "cartes_bancaires" - } + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Diners => "diners", - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Discover => { - "discover" - } - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::EftposAu => { - "eftpos_au" - } + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Discover => "discover", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Girocard => "girocard", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Interac => "interac", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Jcb => "jcb", - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => { - "mastercard" - } - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => { - "unionpay" - } + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unknown => "unknown", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Visa => "visa", } @@ -3578,26 +3748,55 @@ impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardReq } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { fn default() -> Self { Self::Any } } +/// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters`'s `account_subcategories` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + Checking, + Savings, +} + +impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + pub fn as_str(self) -> &'static str { + match self { + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Checking => "checking", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories::Savings => "savings", + } + } +} + +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersAccountSubcategories { + fn default() -> Self { + Self::Checking + } +} + /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { Balances, Ownership, PaymentMethod, @@ -3635,18 +3834,17 @@ impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOpt /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } -impl - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -3688,24 +3886,18 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificat } } -impl AsRef - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } @@ -3718,6 +3910,7 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -3732,13 +3925,16 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { Ideal, Konbini, Link, + Multibanco, P24, Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -3746,20 +3942,17 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { pub fn as_str(self) -> &'static str { match self { - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AchCreditTransfer => { - "ach_credit_transfer" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AchCreditTransfer => "ach_credit_transfer", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AchDebit => "ach_debit", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AcssDebit => "acss_debit", + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AmazonPay => "amazon_pay", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::AuBecsDebit => "au_becs_debit", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::BacsDebit => "bacs_debit", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Bancontact => "bancontact", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -3767,15 +3960,16 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Ideal => "ideal", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Konbini => "konbini", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Link => "link", + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Multibanco => "multibanco", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::P24 => "p24", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::RevolutPay => "revolut_pay", + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Sofort => "sofort", + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Swish => "swish", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -3811,9 +4005,7 @@ impl UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3848,9 +4040,7 @@ impl UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::Cancel => "cancel", - UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => { - "create_invoice" - } + UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice", UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod::Pause => "pause", } } diff --git a/src/resources/generated/subscription_billing_thresholds.rs b/src/resources/generated/subscription_billing_thresholds.rs index e4ec6bd85..4a0461e70 100644 --- a/src/resources/generated/subscription_billing_thresholds.rs +++ b/src/resources/generated/subscription_billing_thresholds.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionBillingThresholds". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionBillingThresholds { + /// Monetary threshold that triggers the subscription to create an invoice. pub amount_gte: Option, diff --git a/src/resources/generated/subscription_item.rs b/src/resources/generated/subscription_item.rs index 1f7a75dcc..3c029359b 100644 --- a/src/resources/generated/subscription_item.rs +++ b/src/resources/generated/subscription_item.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{PlanId, PriceId, SubscriptionId, SubscriptionItemId}; -use crate::params::{Deleted, Expand, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{Currency, Plan, Price, SubscriptionItemBillingThresholds, TaxRate}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; +use crate::resources::{Currency, Discount, Plan, Price, SubscriptionItemBillingThresholds, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionItem". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItem { /// Unique identifier for the object. @@ -31,6 +30,13 @@ pub struct SubscriptionItem { #[serde(default)] pub deleted: bool, + /// The discounts applied to the subscription item. + /// + /// Subscription item discounts are applied before subscription discounts. + /// Use `expand[]=discounts` to expand each discount. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>>, + /// 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. @@ -59,40 +65,28 @@ pub struct SubscriptionItem { } impl SubscriptionItem { + /// Returns a list of your subscription items for a given subscription. - pub fn list( - client: &Client, - params: &ListSubscriptionItems<'_>, - ) -> Response> { - client.get_query("/subscription_items", params) - } +pub fn list(client: &Client, params: &ListSubscriptionItems<'_>) -> Response> { + client.get_query("/subscription_items", params) +} + /// Adds a new item to an existing subscription. /// /// No existing items will be changed or replaced. - pub fn create( - client: &Client, - params: CreateSubscriptionItem<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateSubscriptionItem<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/subscription_items", ¶ms) } /// Retrieves the subscription item with the given ID. - pub fn retrieve( - client: &Client, - id: &SubscriptionItemId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &SubscriptionItemId, expand: &[&str]) -> Response { client.get_query(&format!("/subscription_items/{}", id), Expand { expand }) } /// Updates the plan or quantity of an item on a current subscription. - pub fn update( - client: &Client, - id: &SubscriptionItemId, - params: UpdateSubscriptionItem<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SubscriptionItemId, params: UpdateSubscriptionItem<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/subscription_items/{}", id), ¶ms) } @@ -100,10 +94,7 @@ impl SubscriptionItem { /// Deletes an item from the subscription. /// /// Removing a subscription item from a subscription will not cancel the subscription. - pub fn delete( - client: &Client, - id: &SubscriptionItemId, - ) -> Response> { + pub fn delete(client: &Client, id: &SubscriptionItemId) -> Response> { client.delete(&format!("/subscription_items/{}", id)) } } @@ -121,12 +112,17 @@ impl Object for SubscriptionItem { /// The parameters for `SubscriptionItem::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateSubscriptionItem<'a> { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. #[serde(skip_serializing_if = "Option::is_none")] pub billing_thresholds: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -166,7 +162,7 @@ pub struct CreateSubscriptionItem<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -197,6 +193,7 @@ impl<'a> CreateSubscriptionItem<'a> { pub fn new(subscription: SubscriptionId) -> Self { CreateSubscriptionItem { billing_thresholds: Default::default(), + discounts: Default::default(), expand: Default::default(), metadata: Default::default(), payment_behavior: Default::default(), @@ -215,6 +212,7 @@ impl<'a> CreateSubscriptionItem<'a> { /// The parameters for `SubscriptionItem::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSubscriptionItems<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -257,18 +255,22 @@ impl<'a> ListSubscriptionItems<'a> { impl Paginable for ListSubscriptionItems<'_> { type O = SubscriptionItem; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `SubscriptionItem::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateSubscriptionItem<'a> { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. #[serde(skip_serializing_if = "Option::is_none")] pub billing_thresholds: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -282,6 +284,8 @@ pub struct UpdateSubscriptionItem<'a> { pub metadata: Option, /// Indicates if a customer is on or off-session while an invoice payment is attempted. + /// + /// Defaults to `false` (on-session). #[serde(skip_serializing_if = "Option::is_none")] pub off_session: Option, @@ -306,15 +310,18 @@ pub struct UpdateSubscriptionItem<'a> { /// The ID of the price object. /// + /// One of `price` or `price_data` is required. /// When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -342,6 +349,7 @@ impl<'a> UpdateSubscriptionItem<'a> { pub fn new() -> Self { UpdateSubscriptionItem { billing_thresholds: Default::default(), + discounts: Default::default(), expand: Default::default(), metadata: Default::default(), off_session: Default::default(), @@ -357,8 +365,25 @@ impl<'a> UpdateSubscriptionItem<'a> { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionItemDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemPriceData { + /// 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). @@ -389,8 +414,25 @@ pub struct SubscriptionItemPriceData { pub unit_amount_decimal: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionItemDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. diff --git a/src/resources/generated/subscription_item_billing_thresholds.rs b/src/resources/generated/subscription_item_billing_thresholds.rs index 39cefc434..790b58c80 100644 --- a/src/resources/generated/subscription_item_billing_thresholds.rs +++ b/src/resources/generated/subscription_item_billing_thresholds.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionItemBillingThresholds". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemBillingThresholds { + /// Usage threshold that triggers the subscription to create an invoice. pub usage_gte: Option, } diff --git a/src/resources/generated/subscription_schedule.rs b/src/resources/generated/subscription_schedule.rs index d87c79a48..b55cf4ec6 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -2,21 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, SubscriptionScheduleId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Application, CollectionMethod, ConnectAccountReference, Coupon, Currency, Customer, - PaymentMethod, Plan, Price, Scheduled, Subscription, SubscriptionBillingThresholds, - SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxId, TaxRate, - TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CollectionMethod, ConnectAccountReference, Coupon, Currency, Customer, Discount, PaymentMethod, Plan, Price, PromotionCode, Scheduled, Subscription, SubscriptionBillingThresholds, SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxId, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionSchedule". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionSchedule { /// Unique identifier for the object. @@ -88,21 +82,17 @@ pub struct SubscriptionSchedule { } impl SubscriptionSchedule { + /// Retrieves the list of your subscription schedules. - pub fn list( - client: &Client, - params: &ListSubscriptionSchedules<'_>, - ) -> Response> { - client.get_query("/subscription_schedules", params) - } +pub fn list(client: &Client, params: &ListSubscriptionSchedules<'_>) -> Response> { + client.get_query("/subscription_schedules", params) +} + /// Creates a new subscription schedule object. /// /// Each customer can have up to 500 active or scheduled subscriptions. - pub fn create( - client: &Client, - params: CreateSubscriptionSchedule<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateSubscriptionSchedule<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/subscription_schedules", ¶ms) } @@ -110,20 +100,12 @@ impl SubscriptionSchedule { /// Retrieves the details of an existing subscription schedule. /// /// You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. - pub fn retrieve( - client: &Client, - id: &SubscriptionScheduleId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &SubscriptionScheduleId, expand: &[&str]) -> Response { client.get_query(&format!("/subscription_schedules/{}", id), Expand { expand }) } /// Updates an existing subscription schedule. - pub fn update( - client: &Client, - id: &SubscriptionScheduleId, - params: UpdateSubscriptionSchedule<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SubscriptionScheduleId, params: UpdateSubscriptionSchedule<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/subscription_schedules/{}", id), ¶ms) } @@ -141,6 +123,7 @@ impl Object for SubscriptionSchedule { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleCurrentPhase { + /// The end of this phase of the subscription schedule. pub end_date: Timestamp, @@ -150,6 +133,7 @@ pub struct SubscriptionScheduleCurrentPhase { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionSchedulePhaseConfiguration { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. pub add_invoice_items: Vec, @@ -200,6 +184,11 @@ pub struct SubscriptionSchedulePhaseConfiguration { /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, + /// The stackable discounts that will be applied to the subscription on this phase. + /// + /// Subscription item discounts are applied before subscription discounts. + pub discounts: Vec, + /// The end of this phase of the subscription schedule. pub end_date: Timestamp, @@ -235,12 +224,25 @@ pub struct SubscriptionSchedulePhaseConfiguration { pub trial_end: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DiscountsResourceStackableDiscount { + + /// ID of the coupon to create a new discount for. + pub coupon: Option>, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + pub discount: Option>, + + /// ID of the promotion code to create a new discount for. + pub promotion_code: Option>, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { + /// The account tax IDs associated with this phase of the subscription schedule. /// /// Will be set on invoices generated by this phase of the subscription schedule. - #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>>, /// Number of days within which a customer must pay invoices generated by this subscription schedule. @@ -256,6 +258,7 @@ pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SchedulesPhaseAutomaticTax { + /// Whether Stripe automatically computes tax on invoices created during this phase. pub enabled: bool, @@ -268,6 +271,10 @@ pub struct SchedulesPhaseAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleAddInvoiceItem { + + /// The stackable discounts that will be applied to the item. + pub discounts: Vec, + /// ID of the price used to generate the invoice item. pub price: Expandable, @@ -283,9 +290,16 @@ pub struct SubscriptionScheduleAddInvoiceItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleConfigurationItem { + /// Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period. pub billing_thresholds: Option, + /// The discounts applied to the subscription item. + /// + /// Subscription item discounts are applied before subscription discounts. + /// Use `expand[]=discounts` to expand each discount. + pub discounts: Vec, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. /// /// Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. @@ -310,6 +324,7 @@ pub struct SubscriptionScheduleConfigurationItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettings { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. @@ -357,6 +372,7 @@ pub struct SubscriptionScheduleDefaultSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionSchedulesResourceDefaultSettingsAutomaticTax { + /// Whether Stripe automatically computes tax on invoices created during this phase. pub enabled: bool, @@ -370,6 +386,7 @@ pub struct SubscriptionSchedulesResourceDefaultSettingsAutomaticTax { /// The parameters for `SubscriptionSchedule::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateSubscriptionSchedule<'a> { + /// The identifier of the customer to create the subscription schedule for. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -439,6 +456,7 @@ impl<'a> CreateSubscriptionSchedule<'a> { /// The parameters for `SubscriptionSchedule::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListSubscriptionSchedules<'a> { + /// Only return subscription schedules that were created canceled the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub canceled_at: Option>, @@ -507,12 +525,12 @@ impl<'a> ListSubscriptionSchedules<'a> { impl Paginable for ListSubscriptionSchedules<'_> { type O = SubscriptionSchedule; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `SubscriptionSchedule::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateSubscriptionSchedule<'a> { + /// Object representing the subscription schedule's default settings. #[serde(skip_serializing_if = "Option::is_none")] pub default_settings: Option, @@ -567,6 +585,7 @@ impl<'a> UpdateSubscriptionSchedule<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhases { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// /// You may pass up to 20 items. @@ -606,7 +625,10 @@ pub struct CreateSubscriptionSchedulePhases { #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, - /// The identifier of the coupon to apply to this phase of the subscription schedule. + /// The ID of the coupon to apply to this phase of the subscription schedule. + /// + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -635,6 +657,13 @@ pub struct CreateSubscriptionSchedulePhases { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// The coupons to redeem into discounts for the schedule phase. + /// + /// If not specified, inherits the discount from the subscription's customer. + /// Pass an empty string to avoid inheriting any discounts. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// The date at which this phase of the subscription schedule ends. /// /// If set, `iterations` must not be set. @@ -692,6 +721,7 @@ pub struct CreateSubscriptionSchedulePhases { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParams { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -753,6 +783,7 @@ pub struct SubscriptionScheduleDefaultSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhases { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// /// You may pass up to 20 items. @@ -792,7 +823,10 @@ pub struct UpdateSubscriptionSchedulePhases { #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, - /// The identifier of the coupon to apply to this phase of the subscription schedule. + /// The ID of the coupon to apply to this phase of the subscription schedule. + /// + /// This field has been deprecated and will be removed in a future API version. + /// Use `discounts` instead. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -821,6 +855,13 @@ pub struct UpdateSubscriptionSchedulePhases { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// The coupons to redeem into discounts for the schedule phase. + /// + /// If not specified, inherits the discount from the subscription's customer. + /// Pass an empty string to avoid inheriting any discounts. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// The date at which this phase of the subscription schedule ends. /// /// If set, `iterations` must not be set. @@ -884,11 +925,20 @@ pub struct UpdateSubscriptionSchedulePhases { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AddInvoiceItems { + + /// The coupons to redeem into discounts for the item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// The ID of the price object. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + /// + /// One of `price` or `price_data` is required. #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, @@ -907,6 +957,7 @@ pub struct AddInvoiceItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -918,14 +969,35 @@ pub struct CreateSubscriptionSchedulePhasesAutomaticTax { pub liability: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionSchedulePhasesDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. #[serde(skip_serializing_if = "Option::is_none")] pub billing_thresholds: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. /// /// Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. @@ -964,6 +1036,7 @@ pub struct CreateSubscriptionSchedulePhasesItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -977,6 +1050,7 @@ pub struct CreateSubscriptionSchedulePhasesTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleBillingThresholds { + /// Monetary threshold that triggers the subscription to advance to a new billing period. #[serde(skip_serializing_if = "Option::is_none")] pub amount_gte: Option, @@ -990,6 +1064,7 @@ pub struct SubscriptionScheduleBillingThresholds { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1003,6 +1078,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1016,6 +1092,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettings { + /// The account tax IDs associated with this phase of the subscription schedule. /// /// Will be set on invoices generated by this phase of the subscription schedule. @@ -1037,6 +1114,7 @@ pub struct SubscriptionScheduleInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1048,14 +1126,35 @@ pub struct UpdateSubscriptionSchedulePhasesAutomaticTax { pub liability: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionSchedulePhasesDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. #[serde(skip_serializing_if = "Option::is_none")] pub billing_thresholds: Option, + /// The coupons to redeem into discounts for the subscription item. + #[serde(skip_serializing_if = "Option::is_none")] + pub discounts: Option>, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. /// /// Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. @@ -1094,6 +1193,7 @@ pub struct UpdateSubscriptionSchedulePhasesItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1105,8 +1205,25 @@ pub struct UpdateSubscriptionSchedulePhasesTransferData { pub destination: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AddInvoiceItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1118,12 +1235,30 @@ pub struct CreateSubscriptionSchedulePhasesAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionSchedulePhasesItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsPriceData { + /// 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). @@ -1156,6 +1291,7 @@ pub struct CreateSubscriptionSchedulePhasesItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItemPriceData { + /// 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). @@ -1185,6 +1321,7 @@ pub struct InvoiceItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1196,6 +1333,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1207,6 +1345,7 @@ pub struct SubscriptionScheduleInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1218,12 +1357,30 @@ pub struct UpdateSubscriptionSchedulePhasesAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionSchedulePhasesItemsDiscounts { + + /// ID of the coupon to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub coupon: Option, + + /// ID of an existing discount on the object (or one of its ancestors) to reuse. + #[serde(skip_serializing_if = "Option::is_none")] + pub discount: Option, + + /// ID of the promotion code to create a new discount for. + #[serde(skip_serializing_if = "Option::is_none")] + pub promotion_code: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsPriceData { + /// 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). @@ -1256,6 +1413,7 @@ pub struct UpdateSubscriptionSchedulePhasesItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1271,6 +1429,7 @@ pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1544,9 +1703,7 @@ pub enum SubscriptionScheduleDefaultSettingsCollectionMethod { impl SubscriptionScheduleDefaultSettingsCollectionMethod { pub fn as_str(self) -> &'static str { match self { - SubscriptionScheduleDefaultSettingsCollectionMethod::ChargeAutomatically => { - "charge_automatically" - } + SubscriptionScheduleDefaultSettingsCollectionMethod::ChargeAutomatically => "charge_automatically", SubscriptionScheduleDefaultSettingsCollectionMethod::SendInvoice => "send_invoice", } } @@ -1581,9 +1738,7 @@ pub enum SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType { impl SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType { pub fn as_str(self) -> &'static str { match self { - SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Account => { - "account" - } + SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Account => "account", SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Self_ => "self", } } @@ -1618,9 +1773,7 @@ impl SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor { pub fn as_str(self) -> &'static str { match self { SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::Automatic => "automatic", - SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::PhaseStart => { - "phase_start" - } + SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::PhaseStart => "phase_start", } } } diff --git a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs index 026391f40..fc847865e 100644 --- a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs +++ b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs @@ -7,11 +7,13 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionsTrialsResourceTrialSettings". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceTrialSettings { + pub end_behavior: SubscriptionsTrialsResourceEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod, } @@ -29,9 +31,7 @@ impl SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Cancel => "cancel", - SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => { - "create_invoice" - } + SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice", SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Pause => "pause", } } diff --git a/src/resources/generated/tax_calculation.rs b/src/resources/generated/tax_calculation.rs index 6f98acdc0..29f3f75e0 100644 --- a/src/resources/generated/tax_calculation.rs +++ b/src/resources/generated/tax_calculation.rs @@ -2,21 +2,20 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TaxCalculationId; +use crate::ids::{TaxCalculationId}; use crate::params::{List, Object, Timestamp}; -use crate::resources::{Currency, TaxCalculationLineItem, TaxProductResourceCustomerDetails}; +use crate::resources::{Currency, TaxCalculationLineItem, TaxProductResourceCustomerDetails, TaxProductResourceShipFromDetails}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceTaxCalculation". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxCalculation { /// Unique identifier for the calculation. pub id: TaxCalculationId, - /// Total after taxes. + /// Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount_total: i64, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -33,11 +32,15 @@ pub struct TaxCalculation { pub expires_at: Option, /// The list of items the customer is purchasing. + #[serde(skip_serializing_if = "Option::is_none")] pub line_items: Option>, /// 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, + /// The details of the ship from location, such as the address. + pub ship_from_details: Option, + /// The shipping cost details for the calculation. pub shipping_cost: Option, @@ -66,6 +69,7 @@ impl Object for TaxCalculation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxBreakdown { + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -85,6 +89,7 @@ pub struct TaxProductResourceTaxBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxCalculationShippingCost { + /// The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. @@ -113,6 +118,7 @@ pub struct TaxProductResourceTaxCalculationShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -137,6 +143,7 @@ pub struct TaxProductResourceLineItemTaxBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceJurisdiction { + /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). pub country: String, @@ -154,6 +161,7 @@ pub struct TaxProductResourceJurisdiction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxRateDetails { + /// A localized display name for tax type, intended to be human-readable. /// /// For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". @@ -170,6 +178,7 @@ pub struct TaxProductResourceLineItemTaxRateDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxRateDetails { + /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). pub country: Option, @@ -283,44 +292,20 @@ pub enum TaxProductResourceLineItemTaxBreakdownTaxabilityReason { impl TaxProductResourceLineItemTaxBreakdownTaxabilityReason { pub fn as_str(self) -> &'static str { match self { - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::CustomerExempt => { - "customer_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotCollecting => { - "not_collecting" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSubjectToTax => { - "not_subject_to_tax" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::CustomerExempt => "customer_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotCollecting => "not_collecting", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSubjectToTax => "not_subject_to_tax", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSupported => "not_supported", - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionProductExempt => { - "portion_product_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionReducedRated => { - "portion_reduced_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionStandardRated => { - "portion_standard_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExempt => { - "product_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExemptHoliday => { - "product_exempt_holiday" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProportionallyRated => { - "proportionally_rated" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionProductExempt => "portion_product_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionReducedRated => "portion_reduced_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionStandardRated => "portion_standard_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExempt => "product_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExemptHoliday => "product_exempt_holiday", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProportionallyRated => "proportionally_rated", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReducedRated => "reduced_rated", - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReverseCharge => { - "reverse_charge" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::StandardRated => { - "standard_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::TaxableBasisReduced => { - "taxable_basis_reduced" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReverseCharge => "reverse_charge", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::StandardRated => "standard_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ZeroRated => "zero_rated", } } @@ -365,9 +350,7 @@ impl TaxProductResourceLineItemTaxRateDetailsTaxType { pub fn as_str(self) -> &'static str { match self { TaxProductResourceLineItemTaxRateDetailsTaxType::AmusementTax => "amusement_tax", - TaxProductResourceLineItemTaxRateDetailsTaxType::CommunicationsTax => { - "communications_tax" - } + TaxProductResourceLineItemTaxRateDetailsTaxType::CommunicationsTax => "communications_tax", TaxProductResourceLineItemTaxRateDetailsTaxType::Gst => "gst", TaxProductResourceLineItemTaxRateDetailsTaxType::Hst => "hst", TaxProductResourceLineItemTaxRateDetailsTaxType::Igst => "igst", @@ -427,28 +410,16 @@ impl TaxProductResourceTaxBreakdownTaxabilityReason { TaxProductResourceTaxBreakdownTaxabilityReason::NotCollecting => "not_collecting", TaxProductResourceTaxBreakdownTaxabilityReason::NotSubjectToTax => "not_subject_to_tax", TaxProductResourceTaxBreakdownTaxabilityReason::NotSupported => "not_supported", - TaxProductResourceTaxBreakdownTaxabilityReason::PortionProductExempt => { - "portion_product_exempt" - } - TaxProductResourceTaxBreakdownTaxabilityReason::PortionReducedRated => { - "portion_reduced_rated" - } - TaxProductResourceTaxBreakdownTaxabilityReason::PortionStandardRated => { - "portion_standard_rated" - } + TaxProductResourceTaxBreakdownTaxabilityReason::PortionProductExempt => "portion_product_exempt", + TaxProductResourceTaxBreakdownTaxabilityReason::PortionReducedRated => "portion_reduced_rated", + TaxProductResourceTaxBreakdownTaxabilityReason::PortionStandardRated => "portion_standard_rated", TaxProductResourceTaxBreakdownTaxabilityReason::ProductExempt => "product_exempt", - TaxProductResourceTaxBreakdownTaxabilityReason::ProductExemptHoliday => { - "product_exempt_holiday" - } - TaxProductResourceTaxBreakdownTaxabilityReason::ProportionallyRated => { - "proportionally_rated" - } + TaxProductResourceTaxBreakdownTaxabilityReason::ProductExemptHoliday => "product_exempt_holiday", + TaxProductResourceTaxBreakdownTaxabilityReason::ProportionallyRated => "proportionally_rated", TaxProductResourceTaxBreakdownTaxabilityReason::ReducedRated => "reduced_rated", TaxProductResourceTaxBreakdownTaxabilityReason::ReverseCharge => "reverse_charge", TaxProductResourceTaxBreakdownTaxabilityReason::StandardRated => "standard_rated", - TaxProductResourceTaxBreakdownTaxabilityReason::TaxableBasisReduced => { - "taxable_basis_reduced" - } + TaxProductResourceTaxBreakdownTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced", TaxProductResourceTaxBreakdownTaxabilityReason::ZeroRated => "zero_rated", } } diff --git a/src/resources/generated/tax_calculation_line_item.rs b/src/resources/generated/tax_calculation_line_item.rs index 2ced34f23..e59a47b1c 100644 --- a/src/resources/generated/tax_calculation_line_item.rs +++ b/src/resources/generated/tax_calculation_line_item.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{TaxCalculationLineItemId}; +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::ids::TaxCalculationLineItemId; -use crate::params::Object; - /// The resource representing a Stripe "TaxProductResourceTaxCalculationLineItem". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxCalculationLineItem { @@ -42,6 +41,7 @@ pub struct TaxCalculationLineItem { pub tax_behavior: TaxCalculationLineItemTaxBehavior, /// Detailed account of taxes relevant to this line item. + #[serde(skip_serializing_if = "Option::is_none")] pub tax_breakdown: Option>, /// The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. @@ -60,6 +60,7 @@ impl Object for TaxCalculationLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -84,6 +85,7 @@ pub struct TaxProductResourceLineItemTaxBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceJurisdiction { + /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). pub country: String, @@ -101,6 +103,7 @@ pub struct TaxProductResourceJurisdiction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxRateDetails { + /// A localized display name for tax type, intended to be human-readable. /// /// For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". @@ -247,44 +250,20 @@ pub enum TaxProductResourceLineItemTaxBreakdownTaxabilityReason { impl TaxProductResourceLineItemTaxBreakdownTaxabilityReason { pub fn as_str(self) -> &'static str { match self { - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::CustomerExempt => { - "customer_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotCollecting => { - "not_collecting" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSubjectToTax => { - "not_subject_to_tax" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::CustomerExempt => "customer_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotCollecting => "not_collecting", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSubjectToTax => "not_subject_to_tax", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::NotSupported => "not_supported", - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionProductExempt => { - "portion_product_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionReducedRated => { - "portion_reduced_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionStandardRated => { - "portion_standard_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExempt => { - "product_exempt" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExemptHoliday => { - "product_exempt_holiday" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProportionallyRated => { - "proportionally_rated" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionProductExempt => "portion_product_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionReducedRated => "portion_reduced_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::PortionStandardRated => "portion_standard_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExempt => "product_exempt", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProductExemptHoliday => "product_exempt_holiday", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ProportionallyRated => "proportionally_rated", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReducedRated => "reduced_rated", - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReverseCharge => { - "reverse_charge" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::StandardRated => { - "standard_rated" - } - TaxProductResourceLineItemTaxBreakdownTaxabilityReason::TaxableBasisReduced => { - "taxable_basis_reduced" - } + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ReverseCharge => "reverse_charge", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::StandardRated => "standard_rated", + TaxProductResourceLineItemTaxBreakdownTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced", TaxProductResourceLineItemTaxBreakdownTaxabilityReason::ZeroRated => "zero_rated", } } @@ -329,9 +308,7 @@ impl TaxProductResourceLineItemTaxRateDetailsTaxType { pub fn as_str(self) -> &'static str { match self { TaxProductResourceLineItemTaxRateDetailsTaxType::AmusementTax => "amusement_tax", - TaxProductResourceLineItemTaxRateDetailsTaxType::CommunicationsTax => { - "communications_tax" - } + TaxProductResourceLineItemTaxRateDetailsTaxType::CommunicationsTax => "communications_tax", TaxProductResourceLineItemTaxRateDetailsTaxType::Gst => "gst", TaxProductResourceLineItemTaxRateDetailsTaxType::Hst => "hst", TaxProductResourceLineItemTaxRateDetailsTaxType::Igst => "igst", diff --git a/src/resources/generated/tax_code.rs b/src/resources/generated/tax_code.rs index 0cfa2ed73..bb88ccf81 100644 --- a/src/resources/generated/tax_code.rs +++ b/src/resources/generated/tax_code.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TaxCodeId; +use crate::ids::{TaxCodeId}; use crate::params::{Expand, List, Object, Paginable}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceTaxCode". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxCode { /// Unique identifier for the object. @@ -24,10 +23,12 @@ pub struct TaxCode { } impl TaxCode { + /// A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. - pub fn list(client: &Client, params: &ListTaxCodes<'_>) -> Response> { - client.get_query("/tax_codes", params) - } +pub fn list(client: &Client, params: &ListTaxCodes<'_>) -> Response> { + client.get_query("/tax_codes", params) +} + /// Retrieves the details of an existing tax code. /// @@ -50,6 +51,7 @@ impl Object for TaxCode { /// The parameters for `TaxCode::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTaxCodes<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -88,6 +90,5 @@ impl<'a> ListTaxCodes<'a> { impl Paginable for ListTaxCodes<'_> { type O = TaxCode; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} \ No newline at end of file diff --git a/src/resources/generated/tax_deducted_at_source.rs b/src/resources/generated/tax_deducted_at_source.rs index 551c6544b..26b94c7fb 100644 --- a/src/resources/generated/tax_deducted_at_source.rs +++ b/src/resources/generated/tax_deducted_at_source.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TaxDeductedAtSourceId; +use crate::ids::{TaxDeductedAtSourceId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxDeductedAtSource". #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/tax_id.rs b/src/resources/generated/tax_id.rs index a637ea016..9bada4edb 100644 --- a/src/resources/generated/tax_id.rs +++ b/src/resources/generated/tax_id.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TaxIdId; +use crate::ids::{TaxIdId}; use crate::params::{Deleted, Expand, Expandable, List, Object, Paginable, Timestamp}; use crate::resources::{Account, Application, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "tax_id". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxId { /// Unique identifier for the object. @@ -43,7 +42,7 @@ pub struct TaxId { #[serde(skip_serializing_if = "Option::is_none")] pub owner: Option, - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. /// /// Note that some legacy tax IDs have type `unknown`. #[serde(rename = "type")] @@ -60,10 +59,12 @@ pub struct TaxId { } impl TaxId { + /// Returns a list of tax IDs. - pub fn list(client: &Client, params: &ListTaxIds<'_>) -> Response> { - client.get_query("/tax_ids", params) - } +pub fn list(client: &Client, params: &ListTaxIds<'_>) -> Response> { + client.get_query("/tax_ids", params) +} + /// Creates a new account or customer `tax_id` object. pub fn create(client: &Client, params: CreateTaxId<'_>) -> Response { @@ -94,6 +95,7 @@ impl Object for TaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIDsOwner { + /// The account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option>, @@ -113,6 +115,7 @@ pub struct TaxIDsOwner { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdVerification { + /// Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. pub status: TaxIdVerificationStatus, @@ -126,6 +129,7 @@ pub struct TaxIdVerification { /// The parameters for `TaxId::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTaxId<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -136,7 +140,7 @@ pub struct CreateTaxId<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub owner: Option, - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. #[serde(rename = "type")] pub type_: TaxIdTypeFilter, @@ -146,13 +150,19 @@ pub struct CreateTaxId<'a> { impl<'a> CreateTaxId<'a> { pub fn new(type_: TaxIdTypeFilter, value: &'a str) -> Self { - CreateTaxId { expand: Default::default(), owner: Default::default(), type_, value } + CreateTaxId { + expand: Default::default(), + owner: Default::default(), + type_, + value, + } } } /// The parameters for `TaxId::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTaxIds<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -198,11 +208,11 @@ impl<'a> ListTaxIds<'a> { impl Paginable for ListTaxIds<'_> { type O = TaxId; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTaxIdOwner { + /// Account the tax ID belongs to. /// /// Required when `type=account`. @@ -222,6 +232,7 @@ pub struct CreateTaxIdOwner { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListTaxIdsOwner { + /// Account the tax ID belongs to. /// /// Required when `type=account`. @@ -366,6 +377,7 @@ pub enum TaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -375,11 +387,13 @@ pub enum TaxIdType { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -399,13 +413,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -438,6 +456,7 @@ impl TaxIdType { TaxIdType::AuAbn => "au_abn", TaxIdType::AuArn => "au_arn", TaxIdType::BgUic => "bg_uic", + TaxIdType::BhVat => "bh_vat", TaxIdType::BoTin => "bo_tin", TaxIdType::BrCnpj => "br_cnpj", TaxIdType::BrCpf => "br_cpf", @@ -447,11 +466,13 @@ impl TaxIdType { TaxIdType::CaPstMb => "ca_pst_mb", TaxIdType::CaPstSk => "ca_pst_sk", TaxIdType::CaQst => "ca_qst", + TaxIdType::ChUid => "ch_uid", TaxIdType::ChVat => "ch_vat", TaxIdType::ClTin => "cl_tin", TaxIdType::CnTin => "cn_tin", TaxIdType::CoNit => "co_nit", TaxIdType::CrTin => "cr_tin", + TaxIdType::DeStn => "de_stn", TaxIdType::DoRcn => "do_rcn", TaxIdType::EcRuc => "ec_ruc", TaxIdType::EgTin => "eg_tin", @@ -471,13 +492,17 @@ impl TaxIdType { TaxIdType::JpTrn => "jp_trn", TaxIdType::KePin => "ke_pin", TaxIdType::KrBrn => "kr_brn", + TaxIdType::KzBin => "kz_bin", TaxIdType::LiUid => "li_uid", TaxIdType::MxRfc => "mx_rfc", TaxIdType::MyFrp => "my_frp", TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", + TaxIdType::NgTin => "ng_tin", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", + TaxIdType::OmVat => "om_vat", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", TaxIdType::RoTin => "ro_tin", @@ -530,6 +555,7 @@ pub enum TaxIdTypeFilter { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -539,11 +565,13 @@ pub enum TaxIdTypeFilter { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -563,13 +591,17 @@ pub enum TaxIdTypeFilter { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -601,6 +633,7 @@ impl TaxIdTypeFilter { TaxIdTypeFilter::AuAbn => "au_abn", TaxIdTypeFilter::AuArn => "au_arn", TaxIdTypeFilter::BgUic => "bg_uic", + TaxIdTypeFilter::BhVat => "bh_vat", TaxIdTypeFilter::BoTin => "bo_tin", TaxIdTypeFilter::BrCnpj => "br_cnpj", TaxIdTypeFilter::BrCpf => "br_cpf", @@ -610,11 +643,13 @@ impl TaxIdTypeFilter { TaxIdTypeFilter::CaPstMb => "ca_pst_mb", TaxIdTypeFilter::CaPstSk => "ca_pst_sk", TaxIdTypeFilter::CaQst => "ca_qst", + TaxIdTypeFilter::ChUid => "ch_uid", TaxIdTypeFilter::ChVat => "ch_vat", TaxIdTypeFilter::ClTin => "cl_tin", TaxIdTypeFilter::CnTin => "cn_tin", TaxIdTypeFilter::CoNit => "co_nit", TaxIdTypeFilter::CrTin => "cr_tin", + TaxIdTypeFilter::DeStn => "de_stn", TaxIdTypeFilter::DoRcn => "do_rcn", TaxIdTypeFilter::EcRuc => "ec_ruc", TaxIdTypeFilter::EgTin => "eg_tin", @@ -634,13 +669,17 @@ impl TaxIdTypeFilter { TaxIdTypeFilter::JpTrn => "jp_trn", TaxIdTypeFilter::KePin => "ke_pin", TaxIdTypeFilter::KrBrn => "kr_brn", + TaxIdTypeFilter::KzBin => "kz_bin", TaxIdTypeFilter::LiUid => "li_uid", TaxIdTypeFilter::MxRfc => "mx_rfc", TaxIdTypeFilter::MyFrp => "my_frp", TaxIdTypeFilter::MyItn => "my_itn", TaxIdTypeFilter::MySst => "my_sst", + TaxIdTypeFilter::NgTin => "ng_tin", TaxIdTypeFilter::NoVat => "no_vat", + TaxIdTypeFilter::NoVoec => "no_voec", TaxIdTypeFilter::NzGst => "nz_gst", + TaxIdTypeFilter::OmVat => "om_vat", TaxIdTypeFilter::PeRuc => "pe_ruc", TaxIdTypeFilter::PhTin => "ph_tin", TaxIdTypeFilter::RoTin => "ro_tin", diff --git a/src/resources/generated/tax_product_resource_customer_details.rs b/src/resources/generated/tax_product_resource_customer_details.rs index e44865f70..fa44b23ad 100644 --- a/src/resources/generated/tax_product_resource_customer_details.rs +++ b/src/resources/generated/tax_product_resource_customer_details.rs @@ -2,11 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::resources::{TaxProductResourcePostalAddress}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceCustomerDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceCustomerDetails { + /// The customer's postal address (for example, home or business location). pub address: Option, @@ -25,7 +27,8 @@ pub struct TaxProductResourceCustomerDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceCustomerDetailsResourceTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`. #[serde(rename = "type")] pub type_: TaxProductResourceCustomerDetailsResourceTaxIdType, @@ -33,29 +36,6 @@ pub struct TaxProductResourceCustomerDetailsResourceTaxId { pub value: String, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct TaxProductResourcePostalAddress { - /// City, district, suburb, town, or village. - pub city: Option, - - /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - pub country: String, - - /// Address line 1 (e.g., street, PO Box, or company name). - pub line1: Option, - - /// Address line 2 (e.g., apartment, suite, unit, or building). - pub line2: Option, - - /// ZIP or postal code. - pub postal_code: Option, - - /// State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. - /// - /// Example: "NY" or "TX". - pub state: Option, -} - /// An enum representing the possible values of an `TaxProductResourceCustomerDetails`'s `address_source` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -100,6 +80,7 @@ pub enum TaxProductResourceCustomerDetailsResourceTaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -109,11 +90,13 @@ pub enum TaxProductResourceCustomerDetailsResourceTaxIdType { CaPstMb, CaPstSk, CaQst, + ChUid, ChVat, ClTin, CnTin, CoNit, CrTin, + DeStn, DoRcn, EcRuc, EgTin, @@ -133,13 +116,17 @@ pub enum TaxProductResourceCustomerDetailsResourceTaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -172,6 +159,7 @@ impl TaxProductResourceCustomerDetailsResourceTaxIdType { TaxProductResourceCustomerDetailsResourceTaxIdType::AuAbn => "au_abn", TaxProductResourceCustomerDetailsResourceTaxIdType::AuArn => "au_arn", TaxProductResourceCustomerDetailsResourceTaxIdType::BgUic => "bg_uic", + TaxProductResourceCustomerDetailsResourceTaxIdType::BhVat => "bh_vat", TaxProductResourceCustomerDetailsResourceTaxIdType::BoTin => "bo_tin", TaxProductResourceCustomerDetailsResourceTaxIdType::BrCnpj => "br_cnpj", TaxProductResourceCustomerDetailsResourceTaxIdType::BrCpf => "br_cpf", @@ -181,11 +169,13 @@ impl TaxProductResourceCustomerDetailsResourceTaxIdType { TaxProductResourceCustomerDetailsResourceTaxIdType::CaPstMb => "ca_pst_mb", TaxProductResourceCustomerDetailsResourceTaxIdType::CaPstSk => "ca_pst_sk", TaxProductResourceCustomerDetailsResourceTaxIdType::CaQst => "ca_qst", + TaxProductResourceCustomerDetailsResourceTaxIdType::ChUid => "ch_uid", TaxProductResourceCustomerDetailsResourceTaxIdType::ChVat => "ch_vat", TaxProductResourceCustomerDetailsResourceTaxIdType::ClTin => "cl_tin", TaxProductResourceCustomerDetailsResourceTaxIdType::CnTin => "cn_tin", TaxProductResourceCustomerDetailsResourceTaxIdType::CoNit => "co_nit", TaxProductResourceCustomerDetailsResourceTaxIdType::CrTin => "cr_tin", + TaxProductResourceCustomerDetailsResourceTaxIdType::DeStn => "de_stn", TaxProductResourceCustomerDetailsResourceTaxIdType::DoRcn => "do_rcn", TaxProductResourceCustomerDetailsResourceTaxIdType::EcRuc => "ec_ruc", TaxProductResourceCustomerDetailsResourceTaxIdType::EgTin => "eg_tin", @@ -205,13 +195,17 @@ impl TaxProductResourceCustomerDetailsResourceTaxIdType { TaxProductResourceCustomerDetailsResourceTaxIdType::JpTrn => "jp_trn", TaxProductResourceCustomerDetailsResourceTaxIdType::KePin => "ke_pin", TaxProductResourceCustomerDetailsResourceTaxIdType::KrBrn => "kr_brn", + TaxProductResourceCustomerDetailsResourceTaxIdType::KzBin => "kz_bin", TaxProductResourceCustomerDetailsResourceTaxIdType::LiUid => "li_uid", TaxProductResourceCustomerDetailsResourceTaxIdType::MxRfc => "mx_rfc", TaxProductResourceCustomerDetailsResourceTaxIdType::MyFrp => "my_frp", TaxProductResourceCustomerDetailsResourceTaxIdType::MyItn => "my_itn", TaxProductResourceCustomerDetailsResourceTaxIdType::MySst => "my_sst", + TaxProductResourceCustomerDetailsResourceTaxIdType::NgTin => "ng_tin", TaxProductResourceCustomerDetailsResourceTaxIdType::NoVat => "no_vat", + TaxProductResourceCustomerDetailsResourceTaxIdType::NoVoec => "no_voec", TaxProductResourceCustomerDetailsResourceTaxIdType::NzGst => "nz_gst", + TaxProductResourceCustomerDetailsResourceTaxIdType::OmVat => "om_vat", TaxProductResourceCustomerDetailsResourceTaxIdType::PeRuc => "pe_ruc", TaxProductResourceCustomerDetailsResourceTaxIdType::PhTin => "ph_tin", TaxProductResourceCustomerDetailsResourceTaxIdType::RoTin => "ro_tin", @@ -266,9 +260,7 @@ pub enum TaxProductResourceCustomerDetailsTaxabilityOverride { impl TaxProductResourceCustomerDetailsTaxabilityOverride { pub fn as_str(self) -> &'static str { match self { - TaxProductResourceCustomerDetailsTaxabilityOverride::CustomerExempt => { - "customer_exempt" - } + TaxProductResourceCustomerDetailsTaxabilityOverride::CustomerExempt => "customer_exempt", TaxProductResourceCustomerDetailsTaxabilityOverride::None => "none", TaxProductResourceCustomerDetailsTaxabilityOverride::ReverseCharge => "reverse_charge", } diff --git a/src/resources/generated/tax_product_resource_ship_from_details.rs b/src/resources/generated/tax_product_resource_ship_from_details.rs new file mode 100644 index 000000000..d1457e276 --- /dev/null +++ b/src/resources/generated/tax_product_resource_ship_from_details.rs @@ -0,0 +1,13 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{TaxProductResourcePostalAddress}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "TaxProductResourceShipFromDetails". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductResourceShipFromDetails { + + pub address: TaxProductResourcePostalAddress, +} diff --git a/src/resources/generated/tax_rate.rs b/src/resources/generated/tax_rate.rs index d73dded86..a3e8eb345 100644 --- a/src/resources/generated/tax_rate.rs +++ b/src/resources/generated/tax_rate.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TaxRateId; +use crate::ids::{TaxRateId}; use crate::params::{Expand, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxRate". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxRate { /// Unique identifier for the object. @@ -79,12 +78,14 @@ pub struct TaxRate { } impl TaxRate { + /// Returns a list of your tax rates. /// /// Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. - pub fn list(client: &Client, params: &ListTaxRates<'_>) -> Response> { - client.get_query("/tax_rates", params) - } +pub fn list(client: &Client, params: &ListTaxRates<'_>) -> Response> { + client.get_query("/tax_rates", params) +} + /// Creates a new tax rate. pub fn create(client: &Client, params: CreateTaxRate<'_>) -> Response { @@ -117,6 +118,7 @@ impl Object for TaxRate { /// The parameters for `TaxRate::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTaxRate<'a> { + /// Flag determining whether the tax rate is active or inactive (archived). /// /// Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. @@ -193,6 +195,7 @@ impl<'a> CreateTaxRate<'a> { /// The parameters for `TaxRate::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTaxRates<'a> { + /// Optional flag to filter by tax rates that are either active or inactive (archived). #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -246,12 +249,12 @@ impl<'a> ListTaxRates<'a> { impl Paginable for ListTaxRates<'_> { type O = TaxRate; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `TaxRate::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateTaxRate<'a> { + /// Flag determining whether the tax rate is active or inactive (archived). /// /// Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. @@ -375,7 +378,6 @@ pub enum TaxRateTaxType { Qst, Rst, SalesTax, - ServiceTax, Vat, } @@ -393,7 +395,6 @@ impl TaxRateTaxType { TaxRateTaxType::Qst => "qst", TaxRateTaxType::Rst => "rst", TaxRateTaxType::SalesTax => "sales_tax", - TaxRateTaxType::ServiceTax => "service_tax", TaxRateTaxType::Vat => "vat", } } diff --git a/src/resources/generated/tax_registration.rs b/src/resources/generated/tax_registration.rs index 9200736f3..010a0dbe7 100644 --- a/src/resources/generated/tax_registration.rs +++ b/src/resources/generated/tax_registration.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductRegistrationsResourceTaxRegistration". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxRegistration { /// Unique identifier for the object. @@ -72,6 +72,9 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub bg: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub bh: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub ca: Option, @@ -99,6 +102,9 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub ee: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub eg: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub es: Option, @@ -111,6 +117,9 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub gb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ge: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub gr: Option, @@ -135,9 +144,15 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub jp: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ke: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub kr: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kz: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub lt: Option, @@ -156,6 +171,9 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub my: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub ng: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub nl: Option, @@ -165,6 +183,9 @@ pub struct TaxProductRegistrationsResourceCountryOptions { #[serde(skip_serializing_if = "Option::is_none")] pub nz: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub om: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub pl: Option, diff --git a/src/resources/generated/tax_settings.rs b/src/resources/generated/tax_settings.rs index be6357b5d..55fce1aa7 100644 --- a/src/resources/generated/tax_settings.rs +++ b/src/resources/generated/tax_settings.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceTaxSettings". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxSettings { diff --git a/src/resources/generated/tax_transaction.rs b/src/resources/generated/tax_transaction.rs index 790efe1d7..e3671ac55 100644 --- a/src/resources/generated/tax_transaction.rs +++ b/src/resources/generated/tax_transaction.rs @@ -4,12 +4,12 @@ use crate::ids::{TaxTransactionId}; use crate::params::{List, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TaxProductResourceCustomerDetails, TaxTransactionLineItem}; +use crate::resources::{Currency, TaxProductResourceCustomerDetails, TaxProductResourceShipFromDetails, TaxTransactionLineItem}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceTaxTransaction". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxTransaction { /// Unique identifier for the transaction. @@ -31,6 +31,7 @@ pub struct TaxTransaction { pub customer_details: TaxProductResourceCustomerDetails, /// The tax collected or refunded, by line item. + #[serde(skip_serializing_if = "Option::is_none")] pub line_items: Option>, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -41,12 +42,18 @@ pub struct TaxTransaction { /// This can be useful for storing additional information about the object in a structured format. pub metadata: Option, + /// The Unix timestamp representing when the tax liability is assumed or reduced. + pub posted_at: Timestamp, + /// A custom unique identifier, such as 'myOrder_123'. pub reference: String, /// If `type=reversal`, contains information about what was reversed. pub reversal: Option, + /// The details of the ship from location, such as the address. + pub ship_from_details: Option, + /// The shipping cost details for the transaction. pub shipping_cost: Option, diff --git a/src/resources/generated/terminal_configuration.rs b/src/resources/generated/terminal_configuration.rs index e03396e73..6a1c3d3b2 100644 --- a/src/resources/generated/terminal_configuration.rs +++ b/src/resources/generated/terminal_configuration.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalConfigurationId; +use crate::ids::{TerminalConfigurationId}; use crate::params::{Expand, Expandable, List, Object, Paginable}; -use crate::resources::File; +use crate::resources::{File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalConfigurationConfiguration". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfiguration { /// Unique identifier for the object. @@ -32,9 +31,19 @@ pub struct TerminalConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub livemode: Option, + /// String indicating the name of the Configuration object, set by the user. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub offline: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub reboot_window: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub stripe_s700: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub tipping: Option, @@ -43,19 +52,15 @@ pub struct TerminalConfiguration { } impl TerminalConfiguration { + /// Returns a list of `Configuration` objects. - pub fn list( - client: &Client, - params: &ListTerminalConfigurations<'_>, - ) -> Response> { - client.get_query("/terminal/configurations", params) - } +pub fn list(client: &Client, params: &ListTerminalConfigurations<'_>) -> Response> { + client.get_query("/terminal/configurations", params) +} + /// Creates a new `Configuration` object. - pub fn create( - client: &Client, - params: CreateTerminalConfiguration<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalConfiguration<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/terminal/configurations", ¶ms) } @@ -73,6 +78,7 @@ impl Object for TerminalConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option>, @@ -80,14 +86,28 @@ pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceOfflineConfig { + /// Determines whether to allow transactions to be collected while reader is offline. /// /// Defaults to false. pub enabled: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalConfigurationConfigurationResourceRebootWindow { + + /// Integer between 0 to 23 that represents the end hour of the reboot time window. + /// + /// The value must be different than the start_hour. + pub end_hour: i64, + + /// Integer between 0 to 23 that represents the start hour of the reboot time window. + pub start_hour: i64, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceTipping { + #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -133,6 +153,7 @@ pub struct TerminalConfigurationConfigurationResourceTipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceCurrencySpecificConfig { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -149,6 +170,7 @@ pub struct TerminalConfigurationConfigurationResourceCurrencySpecificConfig { /// The parameters for `TerminalConfiguration::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateTerminalConfiguration<'a> { + /// An object containing device type specific settings for BBPOS WisePOS E readers. #[serde(skip_serializing_if = "Option::is_none")] pub bbpos_wisepos_e: Option, @@ -157,10 +179,22 @@ pub struct CreateTerminalConfiguration<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], + /// Name of the configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option<&'a str>, + /// Configurations for collecting transactions offline. #[serde(skip_serializing_if = "Option::is_none")] pub offline: Option, + /// Reboot time settings for readers that support customized reboot time configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub reboot_window: Option, + + /// An object containing device type specific settings for Stripe S700 readers. + #[serde(skip_serializing_if = "Option::is_none")] + pub stripe_s700: Option, + /// Tipping configurations for readers supporting on-reader tips. #[serde(skip_serializing_if = "Option::is_none")] pub tipping: Option, @@ -175,7 +209,10 @@ impl<'a> CreateTerminalConfiguration<'a> { CreateTerminalConfiguration { bbpos_wisepos_e: Default::default(), expand: Default::default(), + name: Default::default(), offline: Default::default(), + reboot_window: Default::default(), + stripe_s700: Default::default(), tipping: Default::default(), verifone_p400: Default::default(), } @@ -185,6 +222,7 @@ impl<'a> CreateTerminalConfiguration<'a> { /// The parameters for `TerminalConfiguration::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalConfigurations<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -228,11 +266,11 @@ impl<'a> ListTerminalConfigurations<'a> { impl Paginable for ListTerminalConfigurations<'_> { type O = TerminalConfiguration; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationBbposWiseposE { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option, @@ -240,14 +278,36 @@ pub struct CreateTerminalConfigurationBbposWiseposE { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationOffline { + /// Determines whether to allow transactions to be collected while reader is offline. /// /// Defaults to false. pub enabled: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateTerminalConfigurationRebootWindow { + + /// Integer between 0 to 23 that represents the end hour of the reboot time window. + /// + /// The value must be different than the start_hour. + pub end_hour: i64, + + /// Integer between 0 to 23 that represents the start hour of the reboot time window. + pub start_hour: i64, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateTerminalConfigurationStripeS700 { + + /// A File ID representing an image you would like displayed on the reader. + #[serde(skip_serializing_if = "Option::is_none")] + pub splashscreen: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTipping { + /// Tipping configuration for AUD. #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -307,6 +367,7 @@ pub struct CreateTerminalConfigurationTipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationVerifoneP400 { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option, @@ -314,6 +375,7 @@ pub struct CreateTerminalConfigurationVerifoneP400 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingAud { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -329,6 +391,7 @@ pub struct CreateTerminalConfigurationTippingAud { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingCad { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -344,6 +407,7 @@ pub struct CreateTerminalConfigurationTippingCad { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingChf { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -359,6 +423,7 @@ pub struct CreateTerminalConfigurationTippingChf { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingCzk { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -374,6 +439,7 @@ pub struct CreateTerminalConfigurationTippingCzk { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingDkk { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -389,6 +455,7 @@ pub struct CreateTerminalConfigurationTippingDkk { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingEur { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -404,6 +471,7 @@ pub struct CreateTerminalConfigurationTippingEur { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingGbp { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -419,6 +487,7 @@ pub struct CreateTerminalConfigurationTippingGbp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingHkd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -434,6 +503,7 @@ pub struct CreateTerminalConfigurationTippingHkd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingMyr { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -449,6 +519,7 @@ pub struct CreateTerminalConfigurationTippingMyr { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingNok { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -464,6 +535,7 @@ pub struct CreateTerminalConfigurationTippingNok { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingNzd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -479,6 +551,7 @@ pub struct CreateTerminalConfigurationTippingNzd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingSek { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -494,6 +567,7 @@ pub struct CreateTerminalConfigurationTippingSek { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingSgd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -509,6 +583,7 @@ pub struct CreateTerminalConfigurationTippingSgd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingUsd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, diff --git a/src/resources/generated/terminal_connection_token.rs b/src/resources/generated/terminal_connection_token.rs index 487f3dc58..4c59557bf 100644 --- a/src/resources/generated/terminal_connection_token.rs +++ b/src/resources/generated/terminal_connection_token.rs @@ -2,20 +2,20 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::params::{Expand, Object}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalConnectionToken". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConnectionToken { + /// The id of the location that this connection token is scoped to. /// /// Note that location scoping only applies to internet-connected readers. - /// For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + /// For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). #[serde(skip_serializing_if = "Option::is_none")] pub location: Option, @@ -24,13 +24,11 @@ pub struct TerminalConnectionToken { } impl TerminalConnectionToken { + /// To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. /// /// On your backend, add an endpoint that creates and returns a connection token. - pub fn create( - client: &Client, - params: CreateTerminalConnectionToken<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalConnectionToken<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/terminal/connection_tokens", ¶ms) } @@ -47,6 +45,7 @@ impl Object for TerminalConnectionToken { /// The parameters for `TerminalConnectionToken::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateTerminalConnectionToken<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -55,13 +54,16 @@ pub struct CreateTerminalConnectionToken<'a> { /// /// If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. /// Note that location scoping only applies to internet-connected readers. - /// For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + /// For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). #[serde(skip_serializing_if = "Option::is_none")] pub location: Option<&'a str>, } impl<'a> CreateTerminalConnectionToken<'a> { pub fn new() -> Self { - CreateTerminalConnectionToken { expand: Default::default(), location: Default::default() } + CreateTerminalConnectionToken { + expand: Default::default(), + location: Default::default(), + } } } diff --git a/src/resources/generated/terminal_location.rs b/src/resources/generated/terminal_location.rs index d3cf75122..5dd6a89f3 100644 --- a/src/resources/generated/terminal_location.rs +++ b/src/resources/generated/terminal_location.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalLocationId; +use crate::ids::{TerminalLocationId}; use crate::params::{Expand, List, Metadata, Object, Paginable}; -use crate::resources::Address; +use crate::resources::{Address}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalLocationLocation". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalLocation { /// Unique identifier for the object. @@ -44,20 +43,16 @@ pub struct TerminalLocation { } impl TerminalLocation { + /// Returns a list of `Location` objects. - pub fn list( - client: &Client, - params: &ListTerminalLocations<'_>, - ) -> Response> { - client.get_query("/terminal/locations", params) - } +pub fn list(client: &Client, params: &ListTerminalLocations<'_>) -> Response> { + client.get_query("/terminal/locations", params) +} + /// Creates a new `Location` object. /// For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. - pub fn create( - client: &Client, - params: CreateTerminalLocation<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalLocation<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/terminal/locations", ¶ms) } @@ -76,6 +71,7 @@ impl Object for TerminalLocation { /// The parameters for `TerminalLocation::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTerminalLocation<'a> { + /// The full address of the location. pub address: CreateTerminalLocationAddress, @@ -114,6 +110,7 @@ impl<'a> CreateTerminalLocation<'a> { /// The parameters for `TerminalLocation::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalLocations<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -152,11 +149,11 @@ impl<'a> ListTerminalLocations<'a> { impl Paginable for ListTerminalLocations<'_> { type O = TerminalLocation; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalLocationAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, diff --git a/src/resources/generated/terminal_reader.rs b/src/resources/generated/terminal_reader.rs index 5e4c8b291..931ba62da 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalReaderId; +use crate::ids::{TerminalReaderId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable}; use crate::resources::{Charge, Currency, PaymentIntent, Refund, SetupIntent, TerminalLocation}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalReaderReader". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReader { /// Unique identifier for the object. @@ -29,7 +28,7 @@ pub struct TerminalReader { #[serde(skip_serializing_if = "Option::is_none")] pub device_sw_version: Option, - /// Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. + /// Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. #[serde(skip_serializing_if = "Option::is_none")] pub device_type: Option, @@ -60,18 +59,19 @@ pub struct TerminalReader { pub serial_number: Option, /// The networking status of the reader. + /// + /// We do not recommend using this field in flows that may block taking payments. #[serde(skip_serializing_if = "Option::is_none")] pub status: Option, } impl TerminalReader { + /// Returns a list of `Reader` objects. - pub fn list( - client: &Client, - params: &ListTerminalReaders<'_>, - ) -> Response> { - client.get_query("/terminal/readers", params) - } +pub fn list(client: &Client, params: &ListTerminalReaders<'_>) -> Response> { + client.get_query("/terminal/readers", params) +} + /// Creates a new `Reader` object. pub fn create(client: &Client, params: CreateTerminalReader<'_>) -> Response { @@ -92,6 +92,7 @@ impl Object for TerminalReader { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceReaderAction { + /// Failure code, only set if status is `failed`. pub failure_code: Option, @@ -120,6 +121,7 @@ pub struct TerminalReaderReaderResourceReaderAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { + /// Most recent PaymentIntent processed by the reader. pub payment_intent: Expandable, @@ -129,6 +131,11 @@ pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessConfig { + + /// Enable customer initiated cancellation when processing this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, + /// Override showing a tipping selection screen on this transaction. #[serde(skip_serializing_if = "Option::is_none")] pub skip_tipping: Option, @@ -139,6 +146,7 @@ pub struct TerminalReaderReaderResourceProcessConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessSetupIntentAction { + /// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. /// /// Only present if it was possible to generate a card PaymentMethod. @@ -153,10 +161,16 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentAction { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct TerminalReaderReaderResourceProcessSetupConfig {} +pub struct TerminalReaderReaderResourceProcessSetupConfig { + + /// Enable customer initiated cancellation when processing this SetupIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceRefundPaymentAction { + /// The amount being refunded. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -191,6 +205,9 @@ pub struct TerminalReaderReaderResourceRefundPaymentAction { #[serde(skip_serializing_if = "Option::is_none")] pub refund_application_fee: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub refund_payment_config: Option, + /// Boolean indicating whether the transfer should be reversed when refunding this charge. /// /// The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). @@ -199,8 +216,17 @@ pub struct TerminalReaderReaderResourceRefundPaymentAction { pub reverse_transfer: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderReaderResourceRefundPaymentConfig { + + /// Enable customer initiated cancellation when refunding this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceSetReaderDisplayAction { + /// Cart object to be displayed by the reader. pub cart: Option, @@ -211,6 +237,7 @@ pub struct TerminalReaderReaderResourceSetReaderDisplayAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceCart { + /// 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). @@ -232,6 +259,7 @@ pub struct TerminalReaderReaderResourceCart { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceLineItem { + /// The amount of the line item. /// /// A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -246,6 +274,7 @@ pub struct TerminalReaderReaderResourceLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceTippingConfig { + /// Amount used to calculate tip suggestions on tipping selection screen for this transaction. /// /// Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). @@ -256,6 +285,7 @@ pub struct TerminalReaderReaderResourceTippingConfig { /// The parameters for `TerminalReader::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTerminalReader<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -297,6 +327,7 @@ impl<'a> CreateTerminalReader<'a> { /// The parameters for `TerminalReader::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalReaders<'a> { + /// Filters readers by device type. #[serde(skip_serializing_if = "Option::is_none")] pub device_type: Option, @@ -355,9 +386,8 @@ impl<'a> ListTerminalReaders<'a> { impl Paginable for ListTerminalReaders<'_> { type O = TerminalReader; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `TerminalReader`'s `device_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -365,8 +395,10 @@ pub enum TerminalReaderDeviceType { BbposChipper2x, BbposWisepad3, BbposWiseposE, + MobilePhoneReader, SimulatedWiseposE, StripeM2, + StripeS700, #[serde(rename = "verifone_P400")] VerifoneP400, } @@ -377,8 +409,10 @@ impl TerminalReaderDeviceType { TerminalReaderDeviceType::BbposChipper2x => "bbpos_chipper2x", TerminalReaderDeviceType::BbposWisepad3 => "bbpos_wisepad3", TerminalReaderDeviceType::BbposWiseposE => "bbpos_wisepos_e", + TerminalReaderDeviceType::MobilePhoneReader => "mobile_phone_reader", TerminalReaderDeviceType::SimulatedWiseposE => "simulated_wisepos_e", TerminalReaderDeviceType::StripeM2 => "stripe_m2", + TerminalReaderDeviceType::StripeS700 => "stripe_s700", TerminalReaderDeviceType::VerifoneP400 => "verifone_P400", } } @@ -450,12 +484,8 @@ pub enum TerminalReaderReaderResourceReaderActionType { impl TerminalReaderReaderResourceReaderActionType { pub fn as_str(self) -> &'static str { match self { - TerminalReaderReaderResourceReaderActionType::ProcessPaymentIntent => { - "process_payment_intent" - } - TerminalReaderReaderResourceReaderActionType::ProcessSetupIntent => { - "process_setup_intent" - } + TerminalReaderReaderResourceReaderActionType::ProcessPaymentIntent => "process_payment_intent", + TerminalReaderReaderResourceReaderActionType::ProcessSetupIntent => "process_setup_intent", TerminalReaderReaderResourceReaderActionType::RefundPayment => "refund_payment", TerminalReaderReaderResourceReaderActionType::SetReaderDisplay => "set_reader_display", } @@ -493,9 +523,7 @@ impl TerminalReaderReaderResourceRefundPaymentActionReason { match self { TerminalReaderReaderResourceRefundPaymentActionReason::Duplicate => "duplicate", TerminalReaderReaderResourceRefundPaymentActionReason::Fraudulent => "fraudulent", - TerminalReaderReaderResourceRefundPaymentActionReason::RequestedByCustomer => { - "requested_by_customer" - } + TerminalReaderReaderResourceRefundPaymentActionReason::RequestedByCustomer => "requested_by_customer", } } } diff --git a/src/resources/generated/test_helpers_test_clock.rs b/src/resources/generated/test_helpers_test_clock.rs index da2f8bbf6..41c6cbdac 100644 --- a/src/resources/generated/test_helpers_test_clock.rs +++ b/src/resources/generated/test_helpers_test_clock.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TestHelpersTestClockId; +use crate::ids::{TestHelpersTestClockId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TestClock". #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/token.rs b/src/resources/generated/token.rs index 4f16f3ad4..04f8d7dc0 100644 --- a/src/resources/generated/token.rs +++ b/src/resources/generated/token.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, TokenId}; use crate::params::{Expand, Metadata, Object, Timestamp}; use crate::resources::{Address, BankAccount, Card, CompanyParams, PersonParams, TokenType}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Token". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Token { /// Unique identifier for the object. @@ -43,11 +42,12 @@ pub struct Token { } impl Token { + /// Creates a single-use token that represents a bank account’s details. /// You can use this token with any API method in place of a bank account dictionary. /// /// You can only use this token once. - /// To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts). + /// To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where controller.requirement_collection is `application`, which includes Custom accounts. pub fn create(client: &Client, params: CreateToken<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form("/tokens", ¶ms) @@ -72,6 +72,7 @@ impl Object for Token { /// The parameters for `Token::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateToken<'a> { + /// Information for the account this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -123,6 +124,7 @@ impl<'a> CreateToken<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenAccount { + /// The business type. #[serde(skip_serializing_if = "Option::is_none")] pub business_type: Option, @@ -135,7 +137,7 @@ pub struct CreateTokenAccount { #[serde(skip_serializing_if = "Option::is_none")] pub individual: Option, - /// Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). + /// Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). /// /// When creating an account token to create a new Connect account, this value must be `true`. #[serde(skip_serializing_if = "Option::is_none")] @@ -144,13 +146,15 @@ pub struct CreateTokenAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenCvcUpdate { + /// The CVC value, in string form. pub cvc: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPerson { - /// Details on the legal guardian's acceptance of the required Stripe agreements. + + /// Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. #[serde(skip_serializing_if = "Option::is_none")] pub additional_tos_acceptances: Option, @@ -201,14 +205,14 @@ pub struct CreateTokenPerson { /// The person's ID number, as appropriate for their country. /// /// For example, a social security number in the U.S., social insurance number in Canada, etc. - /// Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + /// Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, /// The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. /// /// In Thailand, this would be the laser code found on the back of an ID card. - /// Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + /// Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). #[serde(skip_serializing_if = "Option::is_none")] pub id_number_secondary: Option, @@ -271,6 +275,7 @@ pub struct CreateTokenPerson { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPii { + /// The `id_number` for the PII, in string form. #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, @@ -278,6 +283,7 @@ pub struct CreateTokenPii { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonAdditionalTosAcceptances { + /// Details on the legal guardian's acceptance of the main Stripe service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -285,6 +291,7 @@ pub struct CreateTokenPersonAdditionalTosAcceptances { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -297,6 +304,7 @@ pub struct CreateTokenPersonDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDocuments { + /// One or more documents that demonstrate proof that this person is authorized to represent the company. #[serde(skip_serializing_if = "Option::is_none")] pub company_authorization: Option, @@ -312,6 +320,7 @@ pub struct CreateTokenPersonDocuments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonRegisteredAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -339,6 +348,7 @@ pub struct CreateTokenPersonRegisteredAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonRelationship { + /// Whether the person is a director of the account's legal entity. /// /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -376,6 +386,7 @@ pub struct CreateTokenPersonRelationship { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerificationParams { + /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] pub additional_document: Option, @@ -387,6 +398,7 @@ pub struct PersonVerificationParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonAdditionalTosAcceptancesAccount { + /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -402,6 +414,7 @@ pub struct CreateTokenPersonAdditionalTosAcceptancesAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDocumentsCompanyAuthorization { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -409,6 +422,7 @@ pub struct CreateTokenPersonDocumentsCompanyAuthorization { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDocumentsPassport { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -416,6 +430,7 @@ pub struct CreateTokenPersonDocumentsPassport { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDocumentsVisa { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -423,6 +438,7 @@ pub struct CreateTokenPersonDocumentsVisa { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct VerificationDocumentParams { + /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. /// /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -481,8 +497,8 @@ impl std::default::Default for CreateTokenAccountBusinessType { #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged, rename_all = "snake_case")] pub enum CreateTokenCardUnion { - CreditCardSpecs(CreditCardSpecs), - String(String), + pub CreditCardSpecs(CreditCardSpecs), + pub String(String), } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -522,6 +538,20 @@ pub struct CreditCardSpecs { /// Cardholder's full name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, /// The card number, as a string without any separators. pub number: String, } + +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, +} diff --git a/src/resources/generated/topup.rs b/src/resources/generated/topup.rs index 915ab6e2e..77f60ade2 100644 --- a/src/resources/generated/topup.rs +++ b/src/resources/generated/topup.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TopupId; +use crate::ids::{TopupId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Currency, Source}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Topup". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Topup { /// Unique identifier for the object. @@ -79,10 +78,12 @@ pub struct Topup { } impl Topup { + /// Returns a list of top-ups. - pub fn list(client: &Client, params: &ListTopups<'_>) -> Response> { - client.get_query("/topups", params) - } +pub fn list(client: &Client, params: &ListTopups<'_>) -> Response> { + client.get_query("/topups", params) +} + /// Retrieves the details of a top-up that has previously been created. /// @@ -113,6 +114,7 @@ impl Object for Topup { /// The parameters for `Topup::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTopups<'a> { + /// A positive integer representing how much to transfer. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option>, @@ -170,12 +172,12 @@ impl<'a> ListTopups<'a> { impl Paginable for ListTopups<'_> { type O = Topup; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Topup::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateTopup<'a> { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. diff --git a/src/resources/generated/transfer.rs b/src/resources/generated/transfer.rs index ebe462785..f9760c2c5 100644 --- a/src/resources/generated/transfer.rs +++ b/src/resources/generated/transfer.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, TransferId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Account, BalanceTransaction, Charge, Currency, TransferReversal}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Transfer". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Transfer { /// Unique identifier for the object. @@ -80,12 +79,14 @@ pub struct Transfer { } impl Transfer { + /// Returns a list of existing transfers sent to connected accounts. /// /// The transfers are returned in sorted order, with the most recently created transfers appearing first. - pub fn list(client: &Client, params: &ListTransfers<'_>) -> Response> { - client.get_query("/transfers", params) - } +pub fn list(client: &Client, params: &ListTransfers<'_>) -> Response> { + client.get_query("/transfers", params) +} + /// To send funds from your Stripe account to a connected account, you create a new transfer object. /// @@ -105,11 +106,7 @@ impl Transfer { /// Updates the specified transfer by setting the values of the parameters passed. /// /// Any parameters not provided will be left unchanged. This request accepts only metadata as an argument. - pub fn update( - client: &Client, - id: &TransferId, - params: UpdateTransfer<'_>, - ) -> Response { + pub fn update(client: &Client, id: &TransferId, params: UpdateTransfer<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/transfers/{}", id), ¶ms) } @@ -128,11 +125,14 @@ impl Object for Transfer { /// The parameters for `Transfer::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTransfer<'a> { + /// A positive integer in cents (or local equivalent) representing how much to transfer. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, - /// 3-letter [ISO code for currency](https://stripe.com/docs/payouts). + /// Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + /// + /// Must be a [supported currency](https://docs.stripe.com/currencies). pub currency: Currency, /// An arbitrary string attached to the object. @@ -198,6 +198,8 @@ impl<'a> CreateTransfer<'a> { /// The parameters for `Transfer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTransfers<'a> { + + /// Only return transfers that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -250,12 +252,12 @@ impl<'a> ListTransfers<'a> { impl Paginable for ListTransfers<'_> { type O = Transfer; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Transfer::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateTransfer<'a> { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. diff --git a/src/resources/generated/transfer_reversal.rs b/src/resources/generated/transfer_reversal.rs index 342970dbc..08352aee3 100644 --- a/src/resources/generated/transfer_reversal.rs +++ b/src/resources/generated/transfer_reversal.rs @@ -2,15 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TransferReversalId; +use crate::ids::{TransferReversalId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{BalanceTransaction, Currency, Refund, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TransferReversal". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferReversal { /// Unique identifier for the object. diff --git a/src/resources/generated/treasury_financial_account.rs b/src/resources/generated/treasury_financial_account.rs index 7e986bfc6..590b4c237 100644 --- a/src/resources/generated/treasury_financial_account.rs +++ b/src/resources/generated/treasury_financial_account.rs @@ -109,6 +109,7 @@ pub struct TreasuryFinancialAccountsResourceAbaRecord { pub account_holder_name: String, /// The account number. + #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, /// The last four characters of the account number. @@ -153,6 +154,8 @@ pub enum TreasuryFinancialAccountActiveFeatures { DepositInsurance, #[serde(rename = "financial_addresses.aba")] FinancialAddressesAba, + #[serde(rename = "financial_addresses.aba.forwarding")] + FinancialAddressesAbaForwarding, #[serde(rename = "inbound_transfers.ach")] InboundTransfersAch, IntraStripeFlows, @@ -173,6 +176,7 @@ impl TreasuryFinancialAccountActiveFeatures { TreasuryFinancialAccountActiveFeatures::CardIssuing => "card_issuing", TreasuryFinancialAccountActiveFeatures::DepositInsurance => "deposit_insurance", TreasuryFinancialAccountActiveFeatures::FinancialAddressesAba => "financial_addresses.aba", + TreasuryFinancialAccountActiveFeatures::FinancialAddressesAbaForwarding => "financial_addresses.aba.forwarding", TreasuryFinancialAccountActiveFeatures::InboundTransfersAch => "inbound_transfers.ach", TreasuryFinancialAccountActiveFeatures::IntraStripeFlows => "intra_stripe_flows", TreasuryFinancialAccountActiveFeatures::OutboundPaymentsAch => "outbound_payments.ach", @@ -209,6 +213,8 @@ pub enum TreasuryFinancialAccountPendingFeatures { DepositInsurance, #[serde(rename = "financial_addresses.aba")] FinancialAddressesAba, + #[serde(rename = "financial_addresses.aba.forwarding")] + FinancialAddressesAbaForwarding, #[serde(rename = "inbound_transfers.ach")] InboundTransfersAch, IntraStripeFlows, @@ -229,6 +235,7 @@ impl TreasuryFinancialAccountPendingFeatures { TreasuryFinancialAccountPendingFeatures::CardIssuing => "card_issuing", TreasuryFinancialAccountPendingFeatures::DepositInsurance => "deposit_insurance", TreasuryFinancialAccountPendingFeatures::FinancialAddressesAba => "financial_addresses.aba", + TreasuryFinancialAccountPendingFeatures::FinancialAddressesAbaForwarding => "financial_addresses.aba.forwarding", TreasuryFinancialAccountPendingFeatures::InboundTransfersAch => "inbound_transfers.ach", TreasuryFinancialAccountPendingFeatures::IntraStripeFlows => "intra_stripe_flows", TreasuryFinancialAccountPendingFeatures::OutboundPaymentsAch => "outbound_payments.ach", @@ -265,6 +272,8 @@ pub enum TreasuryFinancialAccountRestrictedFeatures { DepositInsurance, #[serde(rename = "financial_addresses.aba")] FinancialAddressesAba, + #[serde(rename = "financial_addresses.aba.forwarding")] + FinancialAddressesAbaForwarding, #[serde(rename = "inbound_transfers.ach")] InboundTransfersAch, IntraStripeFlows, @@ -285,6 +294,7 @@ impl TreasuryFinancialAccountRestrictedFeatures { TreasuryFinancialAccountRestrictedFeatures::CardIssuing => "card_issuing", TreasuryFinancialAccountRestrictedFeatures::DepositInsurance => "deposit_insurance", TreasuryFinancialAccountRestrictedFeatures::FinancialAddressesAba => "financial_addresses.aba", + TreasuryFinancialAccountRestrictedFeatures::FinancialAddressesAbaForwarding => "financial_addresses.aba.forwarding", TreasuryFinancialAccountRestrictedFeatures::InboundTransfersAch => "inbound_transfers.ach", TreasuryFinancialAccountRestrictedFeatures::IntraStripeFlows => "intra_stripe_flows", TreasuryFinancialAccountRestrictedFeatures::OutboundPaymentsAch => "outbound_payments.ach", diff --git a/src/resources/generated/treasury_inbound_transfer.rs b/src/resources/generated/treasury_inbound_transfer.rs index d8c2013bc..4092eaaec 100644 --- a/src/resources/generated/treasury_inbound_transfer.rs +++ b/src/resources/generated/treasury_inbound_transfer.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryInboundTransferId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryInboundTransfersResourceInboundTransfer". @@ -127,7 +127,13 @@ pub struct InboundTransfersPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to debit funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: InboundTransfersPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. diff --git a/src/resources/generated/treasury_outbound_payment.rs b/src/resources/generated/treasury_outbound_payment.rs index 5e9a7826f..1df04a6fb 100644 --- a/src/resources/generated/treasury_outbound_payment.rs +++ b/src/resources/generated/treasury_outbound_payment.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryOutboundPaymentId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryOutboundPaymentsResourceOutboundPayment". @@ -82,6 +82,9 @@ pub struct TreasuryOutboundPayment { pub status_transitions: TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions, + /// Details about network-specific tracking information if available. + pub tracking_details: Option, + /// The Transaction associated with this object. pub transaction: Expandable, } @@ -144,7 +147,13 @@ pub struct OutboundPaymentsPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to send funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: OutboundPaymentsPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. @@ -183,6 +192,27 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransiti pub returned_at: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub ach: Option, + + /// The US bank account network used to send funds. + #[serde(rename = "type")] + pub type_: TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us_domestic_wire: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentsResourceAchTrackingDetails { + + /// ACH trace ID of the OutboundPayment for payments sent over the `ach` network. + pub trace_id: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TreasuryOutboundPaymentsResourceReturnedStatus { @@ -193,6 +223,19 @@ pub struct TreasuryOutboundPaymentsResourceReturnedStatus { pub transaction: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails { + + /// CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + pub chips: Option, + + /// IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + pub imad: Option, + + /// OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + pub omad: Option, +} + /// An enum representing the possible values of an `OutboundPaymentsPaymentMethodDetailsFinancialAccount`'s `network` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -401,6 +444,40 @@ impl std::default::Default for TreasuryOutboundPaymentStatus { } } +/// An enum representing the possible values of an `TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetails`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType { + Ach, + UsDomesticWire, +} + +impl TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType { + pub fn as_str(self) -> &'static str { + match self { + TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType::Ach => "ach", + TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType::UsDomesticWire => "us_domestic_wire", + } + } +} + +impl AsRef for TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TreasuryOutboundPaymentsResourceOutboundPaymentResourceTrackingDetailsType { + fn default() -> Self { + Self::Ach + } +} + /// An enum representing the possible values of an `TreasuryOutboundPaymentsResourceReturnedStatus`'s `code` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/treasury_outbound_payment_tracking_details_updated.rs b/src/resources/generated/treasury_outbound_payment_tracking_details_updated.rs new file mode 100644 index 000000000..164983ec8 --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_tracking_details_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.tracking_details_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentTrackingDetailsUpdated { +} diff --git a/src/resources/generated/treasury_outbound_transfer.rs b/src/resources/generated/treasury_outbound_transfer.rs index 1db7b7dde..1bc7c18ac 100644 --- a/src/resources/generated/treasury_outbound_transfer.rs +++ b/src/resources/generated/treasury_outbound_transfer.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryOutboundTransferId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryOutboundTransfersResourceOutboundTransfer". @@ -73,6 +73,9 @@ pub struct TreasuryOutboundTransfer { pub status_transitions: TreasuryOutboundTransfersResourceStatusTransitions, + /// Details about network-specific tracking information if available. + pub tracking_details: Option, + /// The Transaction associated with this object. pub transaction: Expandable, } @@ -122,13 +125,40 @@ pub struct OutboundTransfersPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to send funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: OutboundTransfersPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. pub routing_number: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub ach: Option, + + /// The US bank account network used to send funds. + #[serde(rename = "type")] + pub type_: TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us_domestic_wire: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransfersResourceAchTrackingDetails { + + /// ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. + pub trace_id: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TreasuryOutboundTransfersResourceReturnedDetails { @@ -155,6 +185,19 @@ pub struct TreasuryOutboundTransfersResourceStatusTransitions { pub returned_at: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails { + + /// CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + pub chips: Option, + + /// IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + pub imad: Option, + + /// OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + pub omad: Option, +} + /// An enum representing the possible values of an `OutboundTransfersPaymentMethodDetails`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -329,6 +372,40 @@ impl std::default::Default for TreasuryOutboundTransferStatus { } } +/// An enum representing the possible values of an `TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetails`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType { + Ach, + UsDomesticWire, +} + +impl TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType { + pub fn as_str(self) -> &'static str { + match self { + TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType::Ach => "ach", + TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType::UsDomesticWire => "us_domestic_wire", + } + } +} + +impl AsRef for TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TreasuryOutboundTransfersResourceOutboundTransferResourceTrackingDetailsType { + fn default() -> Self { + Self::Ach + } +} + /// An enum representing the possible values of an `TreasuryOutboundTransfersResourceReturnedDetails`'s `code` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/treasury_outbound_transfer_tracking_details_updated.rs b/src/resources/generated/treasury_outbound_transfer_tracking_details_updated.rs new file mode 100644 index 000000000..f4f6d431a --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_tracking_details_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.tracking_details_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferTrackingDetailsUpdated { +} diff --git a/src/resources/generated/treasury_received_credit.rs b/src/resources/generated/treasury_received_credit.rs index bebaebd7f..883543c17 100644 --- a/src/resources/generated/treasury_received_credit.rs +++ b/src/resources/generated/treasury_received_credit.rs @@ -94,6 +94,7 @@ pub struct TreasuryReceivedCreditsResourceLinkedFlows { pub source_flow: Option, /// The expandable object of the source flow. + #[serde(skip_serializing_if = "Option::is_none")] pub source_flow_details: Option, /// The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). diff --git a/src/resources/generated/treasury_received_debit.rs b/src/resources/generated/treasury_received_debit.rs index 3ef80636a..5b4d092af 100644 --- a/src/resources/generated/treasury_received_debit.rs +++ b/src/resources/generated/treasury_received_debit.rs @@ -90,6 +90,9 @@ pub struct TreasuryReceivedDebitsResourceLinkedFlows { /// Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. pub issuing_transaction: Option, + + /// Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + pub payout: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/treasury_transaction.rs b/src/resources/generated/treasury_transaction.rs index d90664367..189b6474a 100644 --- a/src/resources/generated/treasury_transaction.rs +++ b/src/resources/generated/treasury_transaction.rs @@ -36,6 +36,7 @@ pub struct TreasuryTransaction { /// A list of TransactionEntries that are part of this Transaction. /// /// This cannot be expanded in any list endpoints. + #[serde(skip_serializing_if = "Option::is_none")] pub entries: Option>, /// The FinancialAccount associated with this object. @@ -45,6 +46,7 @@ pub struct TreasuryTransaction { pub flow: Option, /// Details of the flow that created the Transaction. + #[serde(skip_serializing_if = "Option::is_none")] pub flow_details: Option, /// Type of the flow that created the Transaction. diff --git a/src/resources/generated/treasury_transaction_entry.rs b/src/resources/generated/treasury_transaction_entry.rs index dab4d7839..a542ede2e 100644 --- a/src/resources/generated/treasury_transaction_entry.rs +++ b/src/resources/generated/treasury_transaction_entry.rs @@ -35,6 +35,7 @@ pub struct TreasuryTransactionEntry { pub flow: Option, /// Details of the flow associated with the TransactionEntry. + #[serde(skip_serializing_if = "Option::is_none")] pub flow_details: Option, /// Type of the flow associated with the TransactionEntry. diff --git a/src/resources/generated/usage_record.rs b/src/resources/generated/usage_record.rs index 47d7bd4b8..e01a9123b 100644 --- a/src/resources/generated/usage_record.rs +++ b/src/resources/generated/usage_record.rs @@ -2,14 +2,13 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::UsageRecordId; +use crate::ids::{UsageRecordId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "UsageRecord". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UsageRecord { /// Unique identifier for the object. diff --git a/src/resources/generated/usage_record_summary.rs b/src/resources/generated/usage_record_summary.rs index db45835c7..b165ea715 100644 --- a/src/resources/generated/usage_record_summary.rs +++ b/src/resources/generated/usage_record_summary.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::UsageRecordSummaryId; +use crate::ids::{UsageRecordSummaryId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "UsageRecordSummary". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -40,6 +39,7 @@ impl Object for UsageRecordSummary { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Period { + /// The end date of this usage period. /// /// All usage up to and including this point in time is included. diff --git a/src/resources/generated/version.rs b/src/resources/generated/version.rs index 3cdd9f3fe..2e30d614d 100644 --- a/src/resources/generated/version.rs +++ b/src/resources/generated/version.rs @@ -1,3 +1,3 @@ use crate::ApiVersion; -pub const VERSION: ApiVersion = ApiVersion::V2023_10_16; +pub const VERSION: ApiVersion = ApiVersion::V2024_06_20; \ No newline at end of file diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index dc8f5261e..1c92a6d6e 100644 --- a/src/resources/generated/webhook_endpoint.rs +++ b/src/resources/generated/webhook_endpoint.rs @@ -2,16 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::WebhookEndpointId; +use crate::ids::{WebhookEndpointId}; use crate::params::{Deleted, Expand, List, Metadata, Object, Paginable, Timestamp}; use crate::resources::{ApiVersion, WebhookEndpointStatus}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "NotificationWebhookEndpoint". /// -/// For more details see +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct WebhookEndpoint { /// Unique identifier for the object. @@ -55,7 +54,7 @@ pub struct WebhookEndpoint { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). + /// The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). /// /// Only returned at creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -73,13 +72,12 @@ pub struct WebhookEndpoint { } impl WebhookEndpoint { + /// Returns a list of your webhook endpoints. - pub fn list( - client: &Client, - params: &ListWebhookEndpoints<'_>, - ) -> Response> { - client.get_query("/webhook_endpoints", params) - } +pub fn list(client: &Client, params: &ListWebhookEndpoints<'_>) -> Response> { + client.get_query("/webhook_endpoints", params) +} + /// A webhook endpoint must have a `url` and a list of `enabled_events`. /// @@ -92,22 +90,14 @@ impl WebhookEndpoint { } /// Retrieves the webhook endpoint with the given ID. - pub fn retrieve( - client: &Client, - id: &WebhookEndpointId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &WebhookEndpointId, expand: &[&str]) -> Response { client.get_query(&format!("/webhook_endpoints/{}", id), Expand { expand }) } /// Updates the webhook endpoint. /// /// You may edit the `url`, the list of `enabled_events`, and the status of your endpoint. - pub fn update( - client: &Client, - id: &WebhookEndpointId, - params: UpdateWebhookEndpoint<'_>, - ) -> Response { + pub fn update(client: &Client, id: &WebhookEndpointId, params: UpdateWebhookEndpoint<'_>) -> Response { #[allow(clippy::needless_borrows_for_generic_args)] client.post_form(&format!("/webhook_endpoints/{}", id), ¶ms) } @@ -131,6 +121,7 @@ impl Object for WebhookEndpoint { /// The parameters for `WebhookEndpoint::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateWebhookEndpoint<'a> { + /// Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. #[serde(skip_serializing_if = "Option::is_none")] pub api_version: Option, @@ -183,6 +174,7 @@ impl<'a> CreateWebhookEndpoint<'a> { /// The parameters for `WebhookEndpoint::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListWebhookEndpoints<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -221,12 +213,12 @@ impl<'a> ListWebhookEndpoints<'a> { impl Paginable for ListWebhookEndpoints<'_> { type O = WebhookEndpoint; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `WebhookEndpoint::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateWebhookEndpoint<'a> { + /// An optional description of what the webhook is used for. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -297,6 +289,8 @@ pub enum EventFilter { ApplicationFeeRefunded, #[serde(rename = "balance.available")] BalanceAvailable, + #[serde(rename = "billing.alert.triggered")] + BillingAlertTriggered, #[serde(rename = "billing_portal.configuration.created")] BillingPortalConfigurationCreated, #[serde(rename = "billing_portal.configuration.updated")] @@ -411,6 +405,8 @@ pub enum EventFilter { CustomerUpdated, #[serde(rename = "customer_cash_balance_transaction.created")] CustomerCashBalanceTransactionCreated, + #[serde(rename = "entitlements.active_entitlement_summary.updated")] + EntitlementsActiveEntitlementSummaryUpdated, #[serde(rename = "file.created")] FileCreated, #[serde(rename = "financial_connections.account.created")] @@ -423,6 +419,8 @@ pub enum EventFilter { FinancialConnectionsAccountReactivated, #[serde(rename = "financial_connections.account.refreshed_balance")] FinancialConnectionsAccountRefreshedBalance, + #[serde(rename = "financial_connections.account.refreshed_ownership")] + FinancialConnectionsAccountRefreshedOwnership, #[serde(rename = "financial_connections.account.refreshed_transactions")] FinancialConnectionsAccountRefreshedTransactions, #[serde(rename = "identity.verification_session.canceled")] @@ -447,6 +445,8 @@ pub enum EventFilter { InvoiceFinalized, #[serde(rename = "invoice.marked_uncollectible")] InvoiceMarkedUncollectible, + #[serde(rename = "invoice.overdue")] + InvoiceOverdue, #[serde(rename = "invoice.paid")] InvoicePaid, #[serde(rename = "invoice.payment_action_required")] @@ -463,6 +463,8 @@ pub enum EventFilter { InvoiceUpdated, #[serde(rename = "invoice.voided")] InvoiceVoided, + #[serde(rename = "invoice.will_be_due")] + InvoiceWillBeDue, #[serde(rename = "invoiceitem.created")] InvoiceitemCreated, #[serde(rename = "invoiceitem.deleted")] @@ -487,10 +489,20 @@ pub enum EventFilter { IssuingDisputeCreated, #[serde(rename = "issuing_dispute.funds_reinstated")] IssuingDisputeFundsReinstated, + #[serde(rename = "issuing_dispute.funds_rescinded")] + IssuingDisputeFundsRescinded, #[serde(rename = "issuing_dispute.submitted")] IssuingDisputeSubmitted, #[serde(rename = "issuing_dispute.updated")] IssuingDisputeUpdated, + #[serde(rename = "issuing_personalization_design.activated")] + IssuingPersonalizationDesignActivated, + #[serde(rename = "issuing_personalization_design.deactivated")] + IssuingPersonalizationDesignDeactivated, + #[serde(rename = "issuing_personalization_design.rejected")] + IssuingPersonalizationDesignRejected, + #[serde(rename = "issuing_personalization_design.updated")] + IssuingPersonalizationDesignUpdated, #[serde(rename = "issuing_token.created")] IssuingTokenCreated, #[serde(rename = "issuing_token.updated")] @@ -707,6 +719,8 @@ pub enum EventFilter { TreasuryOutboundPaymentPosted, #[serde(rename = "treasury.outbound_payment.returned")] TreasuryOutboundPaymentReturned, + #[serde(rename = "treasury.outbound_payment.tracking_details_updated")] + TreasuryOutboundPaymentTrackingDetailsUpdated, #[serde(rename = "treasury.outbound_transfer.canceled")] TreasuryOutboundTransferCanceled, #[serde(rename = "treasury.outbound_transfer.created")] @@ -719,6 +733,8 @@ pub enum EventFilter { TreasuryOutboundTransferPosted, #[serde(rename = "treasury.outbound_transfer.returned")] TreasuryOutboundTransferReturned, + #[serde(rename = "treasury.outbound_transfer.tracking_details_updated")] + TreasuryOutboundTransferTrackingDetailsUpdated, #[serde(rename = "treasury.received_credit.created")] TreasuryReceivedCreditCreated, #[serde(rename = "treasury.received_credit.failed")] @@ -743,12 +759,9 @@ impl EventFilter { EventFilter::ApplicationFeeRefundUpdated => "application_fee.refund.updated", EventFilter::ApplicationFeeRefunded => "application_fee.refunded", EventFilter::BalanceAvailable => "balance.available", - EventFilter::BillingPortalConfigurationCreated => { - "billing_portal.configuration.created" - } - EventFilter::BillingPortalConfigurationUpdated => { - "billing_portal.configuration.updated" - } + EventFilter::BillingAlertTriggered => "billing.alert.triggered", + EventFilter::BillingPortalConfigurationCreated => "billing_portal.configuration.created", + EventFilter::BillingPortalConfigurationUpdated => "billing_portal.configuration.updated", EventFilter::BillingPortalSessionCreated => "billing_portal.session.created", EventFilter::CapabilityUpdated => "capability.updated", EventFilter::CashBalanceFundsAvailable => "cash_balance.funds_available", @@ -765,12 +778,8 @@ impl EventFilter { EventFilter::ChargeRefunded => "charge.refunded", EventFilter::ChargeSucceeded => "charge.succeeded", EventFilter::ChargeUpdated => "charge.updated", - EventFilter::CheckoutSessionAsyncPaymentFailed => { - "checkout.session.async_payment_failed" - } - EventFilter::CheckoutSessionAsyncPaymentSucceeded => { - "checkout.session.async_payment_succeeded" - } + EventFilter::CheckoutSessionAsyncPaymentFailed => "checkout.session.async_payment_failed", + EventFilter::CheckoutSessionAsyncPaymentSucceeded => "checkout.session.async_payment_succeeded", EventFilter::CheckoutSessionCompleted => "checkout.session.completed", EventFilter::CheckoutSessionExpired => "checkout.session.expired", EventFilter::ClimateOrderCanceled => "climate.order.canceled", @@ -798,12 +807,8 @@ impl EventFilter { EventFilter::CustomerSubscriptionCreated => "customer.subscription.created", EventFilter::CustomerSubscriptionDeleted => "customer.subscription.deleted", EventFilter::CustomerSubscriptionPaused => "customer.subscription.paused", - EventFilter::CustomerSubscriptionPendingUpdateApplied => { - "customer.subscription.pending_update_applied" - } - EventFilter::CustomerSubscriptionPendingUpdateExpired => { - "customer.subscription.pending_update_expired" - } + EventFilter::CustomerSubscriptionPendingUpdateApplied => "customer.subscription.pending_update_applied", + EventFilter::CustomerSubscriptionPendingUpdateExpired => "customer.subscription.pending_update_expired", EventFilter::CustomerSubscriptionResumed => "customer.subscription.resumed", EventFilter::CustomerSubscriptionTrialWillEnd => "customer.subscription.trial_will_end", EventFilter::CustomerSubscriptionUpdated => "customer.subscription.updated", @@ -811,51 +816,28 @@ impl EventFilter { EventFilter::CustomerTaxIdDeleted => "customer.tax_id.deleted", EventFilter::CustomerTaxIdUpdated => "customer.tax_id.updated", EventFilter::CustomerUpdated => "customer.updated", - EventFilter::CustomerCashBalanceTransactionCreated => { - "customer_cash_balance_transaction.created" - } + EventFilter::CustomerCashBalanceTransactionCreated => "customer_cash_balance_transaction.created", + EventFilter::EntitlementsActiveEntitlementSummaryUpdated => "entitlements.active_entitlement_summary.updated", EventFilter::FileCreated => "file.created", - EventFilter::FinancialConnectionsAccountCreated => { - "financial_connections.account.created" - } - EventFilter::FinancialConnectionsAccountDeactivated => { - "financial_connections.account.deactivated" - } - EventFilter::FinancialConnectionsAccountDisconnected => { - "financial_connections.account.disconnected" - } - EventFilter::FinancialConnectionsAccountReactivated => { - "financial_connections.account.reactivated" - } - EventFilter::FinancialConnectionsAccountRefreshedBalance => { - "financial_connections.account.refreshed_balance" - } - EventFilter::FinancialConnectionsAccountRefreshedTransactions => { - "financial_connections.account.refreshed_transactions" - } - EventFilter::IdentityVerificationSessionCanceled => { - "identity.verification_session.canceled" - } - EventFilter::IdentityVerificationSessionCreated => { - "identity.verification_session.created" - } - EventFilter::IdentityVerificationSessionProcessing => { - "identity.verification_session.processing" - } - EventFilter::IdentityVerificationSessionRedacted => { - "identity.verification_session.redacted" - } - EventFilter::IdentityVerificationSessionRequiresInput => { - "identity.verification_session.requires_input" - } - EventFilter::IdentityVerificationSessionVerified => { - "identity.verification_session.verified" - } + EventFilter::FinancialConnectionsAccountCreated => "financial_connections.account.created", + EventFilter::FinancialConnectionsAccountDeactivated => "financial_connections.account.deactivated", + EventFilter::FinancialConnectionsAccountDisconnected => "financial_connections.account.disconnected", + EventFilter::FinancialConnectionsAccountReactivated => "financial_connections.account.reactivated", + EventFilter::FinancialConnectionsAccountRefreshedBalance => "financial_connections.account.refreshed_balance", + EventFilter::FinancialConnectionsAccountRefreshedOwnership => "financial_connections.account.refreshed_ownership", + EventFilter::FinancialConnectionsAccountRefreshedTransactions => "financial_connections.account.refreshed_transactions", + EventFilter::IdentityVerificationSessionCanceled => "identity.verification_session.canceled", + EventFilter::IdentityVerificationSessionCreated => "identity.verification_session.created", + EventFilter::IdentityVerificationSessionProcessing => "identity.verification_session.processing", + EventFilter::IdentityVerificationSessionRedacted => "identity.verification_session.redacted", + EventFilter::IdentityVerificationSessionRequiresInput => "identity.verification_session.requires_input", + EventFilter::IdentityVerificationSessionVerified => "identity.verification_session.verified", EventFilter::InvoiceCreated => "invoice.created", EventFilter::InvoiceDeleted => "invoice.deleted", EventFilter::InvoiceFinalizationFailed => "invoice.finalization_failed", EventFilter::InvoiceFinalized => "invoice.finalized", EventFilter::InvoiceMarkedUncollectible => "invoice.marked_uncollectible", + EventFilter::InvoiceOverdue => "invoice.overdue", EventFilter::InvoicePaid => "invoice.paid", EventFilter::InvoicePaymentActionRequired => "invoice.payment_action_required", EventFilter::InvoicePaymentFailed => "invoice.payment_failed", @@ -864,6 +846,7 @@ impl EventFilter { EventFilter::InvoiceUpcoming => "invoice.upcoming", EventFilter::InvoiceUpdated => "invoice.updated", EventFilter::InvoiceVoided => "invoice.voided", + EventFilter::InvoiceWillBeDue => "invoice.will_be_due", EventFilter::InvoiceitemCreated => "invoiceitem.created", EventFilter::InvoiceitemDeleted => "invoiceitem.deleted", EventFilter::IssuingAuthorizationCreated => "issuing_authorization.created", @@ -876,16 +859,19 @@ impl EventFilter { EventFilter::IssuingDisputeClosed => "issuing_dispute.closed", EventFilter::IssuingDisputeCreated => "issuing_dispute.created", EventFilter::IssuingDisputeFundsReinstated => "issuing_dispute.funds_reinstated", + EventFilter::IssuingDisputeFundsRescinded => "issuing_dispute.funds_rescinded", EventFilter::IssuingDisputeSubmitted => "issuing_dispute.submitted", EventFilter::IssuingDisputeUpdated => "issuing_dispute.updated", + EventFilter::IssuingPersonalizationDesignActivated => "issuing_personalization_design.activated", + EventFilter::IssuingPersonalizationDesignDeactivated => "issuing_personalization_design.deactivated", + EventFilter::IssuingPersonalizationDesignRejected => "issuing_personalization_design.rejected", + EventFilter::IssuingPersonalizationDesignUpdated => "issuing_personalization_design.updated", EventFilter::IssuingTokenCreated => "issuing_token.created", EventFilter::IssuingTokenUpdated => "issuing_token.updated", EventFilter::IssuingTransactionCreated => "issuing_transaction.created", EventFilter::IssuingTransactionUpdated => "issuing_transaction.updated", EventFilter::MandateUpdated => "mandate.updated", - EventFilter::PaymentIntentAmountCapturableUpdated => { - "payment_intent.amount_capturable_updated" - } + EventFilter::PaymentIntentAmountCapturableUpdated => "payment_intent.amount_capturable_updated", EventFilter::PaymentIntentCanceled => "payment_intent.canceled", EventFilter::PaymentIntentCreated => "payment_intent.created", EventFilter::PaymentIntentPartiallyFunded => "payment_intent.partially_funded", @@ -896,9 +882,7 @@ impl EventFilter { EventFilter::PaymentLinkCreated => "payment_link.created", EventFilter::PaymentLinkUpdated => "payment_link.updated", EventFilter::PaymentMethodAttached => "payment_method.attached", - EventFilter::PaymentMethodAutomaticallyUpdated => { - "payment_method.automatically_updated" - } + EventFilter::PaymentMethodAutomaticallyUpdated => "payment_method.automatically_updated", EventFilter::PaymentMethodDetached => "payment_method.detached", EventFilter::PaymentMethodUpdated => "payment_method.updated", EventFilter::PayoutCanceled => "payout.canceled", @@ -962,9 +946,7 @@ impl EventFilter { EventFilter::TestHelpersTestClockAdvancing => "test_helpers.test_clock.advancing", EventFilter::TestHelpersTestClockCreated => "test_helpers.test_clock.created", EventFilter::TestHelpersTestClockDeleted => "test_helpers.test_clock.deleted", - EventFilter::TestHelpersTestClockInternalFailure => { - "test_helpers.test_clock.internal_failure" - } + EventFilter::TestHelpersTestClockInternalFailure => "test_helpers.test_clock.internal_failure", EventFilter::TestHelpersTestClockReady => "test_helpers.test_clock.ready", EventFilter::TopupCanceled => "topup.canceled", EventFilter::TopupCreated => "topup.created", @@ -978,34 +960,28 @@ impl EventFilter { EventFilter::TreasuryCreditReversalPosted => "treasury.credit_reversal.posted", EventFilter::TreasuryDebitReversalCompleted => "treasury.debit_reversal.completed", EventFilter::TreasuryDebitReversalCreated => "treasury.debit_reversal.created", - EventFilter::TreasuryDebitReversalInitialCreditGranted => { - "treasury.debit_reversal.initial_credit_granted" - } + EventFilter::TreasuryDebitReversalInitialCreditGranted => "treasury.debit_reversal.initial_credit_granted", EventFilter::TreasuryFinancialAccountClosed => "treasury.financial_account.closed", EventFilter::TreasuryFinancialAccountCreated => "treasury.financial_account.created", - EventFilter::TreasuryFinancialAccountFeaturesStatusUpdated => { - "treasury.financial_account.features_status_updated" - } + EventFilter::TreasuryFinancialAccountFeaturesStatusUpdated => "treasury.financial_account.features_status_updated", EventFilter::TreasuryInboundTransferCanceled => "treasury.inbound_transfer.canceled", EventFilter::TreasuryInboundTransferCreated => "treasury.inbound_transfer.created", EventFilter::TreasuryInboundTransferFailed => "treasury.inbound_transfer.failed", EventFilter::TreasuryInboundTransferSucceeded => "treasury.inbound_transfer.succeeded", EventFilter::TreasuryOutboundPaymentCanceled => "treasury.outbound_payment.canceled", EventFilter::TreasuryOutboundPaymentCreated => "treasury.outbound_payment.created", - EventFilter::TreasuryOutboundPaymentExpectedArrivalDateUpdated => { - "treasury.outbound_payment.expected_arrival_date_updated" - } + EventFilter::TreasuryOutboundPaymentExpectedArrivalDateUpdated => "treasury.outbound_payment.expected_arrival_date_updated", EventFilter::TreasuryOutboundPaymentFailed => "treasury.outbound_payment.failed", EventFilter::TreasuryOutboundPaymentPosted => "treasury.outbound_payment.posted", EventFilter::TreasuryOutboundPaymentReturned => "treasury.outbound_payment.returned", + EventFilter::TreasuryOutboundPaymentTrackingDetailsUpdated => "treasury.outbound_payment.tracking_details_updated", EventFilter::TreasuryOutboundTransferCanceled => "treasury.outbound_transfer.canceled", EventFilter::TreasuryOutboundTransferCreated => "treasury.outbound_transfer.created", - EventFilter::TreasuryOutboundTransferExpectedArrivalDateUpdated => { - "treasury.outbound_transfer.expected_arrival_date_updated" - } + EventFilter::TreasuryOutboundTransferExpectedArrivalDateUpdated => "treasury.outbound_transfer.expected_arrival_date_updated", EventFilter::TreasuryOutboundTransferFailed => "treasury.outbound_transfer.failed", EventFilter::TreasuryOutboundTransferPosted => "treasury.outbound_transfer.posted", EventFilter::TreasuryOutboundTransferReturned => "treasury.outbound_transfer.returned", + EventFilter::TreasuryOutboundTransferTrackingDetailsUpdated => "treasury.outbound_transfer.tracking_details_updated", EventFilter::TreasuryReceivedCreditCreated => "treasury.received_credit.created", EventFilter::TreasuryReceivedCreditFailed => "treasury.received_credit.failed", EventFilter::TreasuryReceivedCreditSucceeded => "treasury.received_credit.succeeded",