From 7626585c93537363ac5318eb0baf3918bbd9d704 Mon Sep 17 00:00:00 2001 From: arlyon Date: Fri, 10 May 2024 00:23:27 +0000 Subject: [PATCH] feat: generate latest changes from OpenApi spec --- openapi/version.json | 2 +- src/resources/generated/account.rs | 846 +++++- src/resources/generated/account_link.rs | 9 +- src/resources/generated/account_session.rs | 192 +- src/resources/generated/address.rs | 1 + src/resources/generated/api_errors.rs | 114 +- src/resources/generated/application.rs | 5 +- src/resources/generated/application_fee.rs | 31 +- src/resources/generated/apps_secret.rs | 1 + src/resources/generated/balance.rs | 11 +- .../balance_amount_by_source_type.rs | 1 + .../generated/balance_transaction.rs | 38 +- src/resources/generated/bank_account.rs | 18 +- src/resources/generated/billing_details.rs | 4 +- src/resources/generated/billing_meter.rs | 229 ++ .../generated/billing_meter_event.rs | 48 + .../billing_meter_event_adjustment.rs | 114 + .../generated/billing_meter_event_summary.rs | 43 + .../generated/billing_portal_configuration.rs | 27 +- .../generated/billing_portal_session.rs | 63 +- src/resources/generated/capability.rs | 19 +- src/resources/generated/card.rs | 21 +- src/resources/generated/cash_balance.rs | 5 +- src/resources/generated/charge.rs | 249 +- src/resources/generated/checkout_session.rs | 1260 ++++++--- src/resources/generated/confirmation_token.rs | 420 +++ .../generated/connect_account_reference.rs | 6 +- .../generated/connect_collection_transfer.rs | 5 +- src/resources/generated/coupon.rs | 32 +- src/resources/generated/credit_note.rs | 44 +- .../generated/credit_note_line_item.rs | 7 +- src/resources/generated/custom_unit_amount.rs | 1 + src/resources/generated/customer.rs | 94 +- .../generated/customer_balance_transaction.rs | 5 +- src/resources/generated/discount.rs | 8 +- src/resources/generated/dispute.rs | 38 +- .../entitlements_active_entitlement.rs | 38 + ...entitlements_active_entitlement_summary.rs | 29 + ...ents_active_entitlement_summary_updated.rs | 10 + .../generated/entitlements_feature.rs | 45 + src/resources/generated/ephemeral_key.rs | 5 +- src/resources/generated/event.rs | 23 +- src/resources/generated/fee_refund.rs | 5 +- src/resources/generated/file.rs | 22 +- src/resources/generated/file_link.rs | 26 +- .../financial_connections_account.rs | 6 + ...connections_account_refreshed_ownership.rs | 10 + .../financial_connections_session.rs | 3 +- src/resources/generated/forwarding_request.rs | 179 ++ .../generated/identity_verification_report.rs | 213 +- .../identity_verification_session.rs | 70 +- src/resources/generated/invoice.rs | 457 ++- ...voice_payment_method_options_acss_debit.rs | 14 +- ...voice_payment_method_options_bancontact.rs | 1 + ...payment_method_options_customer_balance.rs | 14 +- .../invoice_payment_method_options_konbini.rs | 3 +- ...voice_payment_method_options_sepa_debit.rs | 10 + ..._payment_method_options_us_bank_account.rs | 29 +- .../invoice_setting_rendering_options.rs | 1 + src/resources/generated/invoiceitem.rs | 52 +- ....rs => invoices_resource_shipping_cost.rs} | 11 +- .../generated/issuing_authorization.rs | 26 +- src/resources/generated/issuing_card.rs | 46 +- src/resources/generated/issuing_cardholder.rs | 49 +- src/resources/generated/issuing_dispute.rs | 42 +- .../issuing_personalization_design.rs | 232 ++ .../generated/issuing_physical_bundle.rs | 233 ++ src/resources/generated/issuing_token.rs | 13 +- .../generated/issuing_transaction.rs | 22 +- src/resources/generated/item.rs | 9 +- src/resources/generated/line_item.rs | 20 +- .../linked_account_options_us_bank_account.rs | 3 + src/resources/generated/login_link.rs | 4 +- src/resources/generated/mandate.rs | 45 +- ...nt_flows_private_payment_methods_alipay.rs | 10 + src/resources/generated/payment_intent.rs | 2452 ++++++++++------- ...happ_handle_redirect_or_display_qr_code.rs | 5 +- src/resources/generated/payment_link.rs | 206 +- src/resources/generated/payment_method.rs | 1722 ++---------- .../generated/payment_method_acss_debit.rs | 27 + .../generated/payment_method_affirm.rs | 10 + .../payment_method_afterpay_clearpay.rs | 10 + .../generated/payment_method_amazon_pay.rs | 10 + .../generated/payment_method_au_becs_debit.rs | 21 + .../generated/payment_method_bacs_debit.rs | 23 + .../generated/payment_method_bancontact.rs | 10 + .../generated/payment_method_blik.rs | 10 + .../generated/payment_method_boleto.rs | 13 + .../generated/payment_method_card.rs | 264 ++ .../generated/payment_method_card_present.rs | 117 + .../payment_method_card_present_networks.rs | 15 - .../generated/payment_method_cashapp.rs | 16 + ...iz_payment_method_configuration_details.rs | 1 + .../generated/payment_method_configuration.rs | 507 ++++ .../payment_method_customer_balance.rs | 10 + ...ent_method_details_card_present_offline.rs | 14 + ...nt_method_details_card_wallet_apple_pay.rs | 3 +- ...t_method_details_card_wallet_google_pay.rs | 3 +- src/resources/generated/payment_method_eps.rs | 101 + src/resources/generated/payment_method_fpx.rs | 128 + .../generated/payment_method_giropay.rs | 10 + .../generated/payment_method_grabpay.rs | 10 + .../generated/payment_method_ideal.rs | 161 ++ .../payment_method_interac_present.rs | 117 + .../generated/payment_method_klarna.rs | 27 + .../generated/payment_method_konbini.rs | 10 + .../generated/payment_method_link.rs | 17 + .../generated/payment_method_mobilepay.rs | 10 + ...ptions_customer_balance_eu_bank_account.rs | 1 + ...options_us_bank_account_mandate_options.rs | 1 + .../generated/payment_method_oxxo.rs | 10 + src/resources/generated/payment_method_p24.rs | 95 + .../generated/payment_method_paynow.rs | 10 + .../generated/payment_method_paypal.rs | 21 + src/resources/generated/payment_method_pix.rs | 10 + .../generated/payment_method_promptpay.rs | 10 + .../generated/payment_method_revolut_pay.rs | 10 + .../generated/payment_method_sepa_debit.rs | 42 + .../generated/payment_method_sofort.rs | 13 + .../generated/payment_method_swish.rs | 10 + .../payment_method_us_bank_account.rs | 278 ++ .../generated/payment_method_wechat_pay.rs | 10 + src/resources/generated/payment_method_zip.rs | 10 + src/resources/generated/payout.rs | 28 +- src/resources/generated/person.rs | 27 +- src/resources/generated/placeholders.rs | 411 +-- src/resources/generated/plan.rs | 31 +- src/resources/generated/platform_tax_fee.rs | 5 +- src/resources/generated/price.rs | 56 +- src/resources/generated/product.rs | 85 +- src/resources/generated/product_feature.rs | 38 + src/resources/generated/promotion_code.rs | 38 +- src/resources/generated/quote.rs | 32 +- .../quotes_resource_total_details.rs | 7 +- .../generated/radar_radar_options.rs | 1 + src/resources/generated/refund.rs | 37 +- .../generated/reserve_transaction.rs | 7 +- src/resources/generated/review.rs | 22 +- .../generated/scheduled_query_run.rs | 8 +- src/resources/generated/setup_attempt.rs | 78 +- src/resources/generated/setup_intent.rs | 968 ++++--- src/resources/generated/shipping.rs | 4 +- src/resources/generated/shipping_rate.rs | 46 +- src/resources/generated/source.rs | 63 +- src/resources/generated/subscription.rs | 657 +++-- .../subscription_billing_thresholds.rs | 1 + src/resources/generated/subscription_item.rs | 103 +- .../subscription_item_billing_thresholds.rs | 1 + .../generated/subscription_schedule.rs | 235 +- ...riptions_trials_resource_trial_settings.rs | 6 +- src/resources/generated/tax_calculation.rs | 93 +- .../generated/tax_calculation_line_item.rs | 61 +- src/resources/generated/tax_code.rs | 19 +- .../generated/tax_deducted_at_source.rs | 5 +- src/resources/generated/tax_id.rs | 55 +- .../tax_product_resource_customer_details.rs | 42 +- .../tax_product_resource_ship_from_details.rs | 13 + src/resources/generated/tax_rate.rs | 23 +- src/resources/generated/tax_registration.rs | 21 + src/resources/generated/tax_transaction.rs | 6 +- .../generated/terminal_configuration.rs | 61 +- .../generated/terminal_connection_token.rs | 16 +- src/resources/generated/terminal_location.rs | 31 +- src/resources/generated/terminal_reader.rs | 70 +- .../generated/test_helpers_test_clock.rs | 5 +- src/resources/generated/token.rs | 46 +- src/resources/generated/topup.rs | 20 +- src/resources/generated/transfer.rs | 26 +- src/resources/generated/transfer_reversal.rs | 5 +- .../generated/treasury_financial_account.rs | 1 + .../generated/treasury_inbound_transfer.rs | 10 +- .../generated/treasury_outbound_payment.rs | 79 +- ...tbound_payment_tracking_details_updated.rs | 10 + .../generated/treasury_outbound_transfer.rs | 79 +- ...bound_transfer_tracking_details_updated.rs | 10 + .../generated/treasury_received_credit.rs | 1 + .../generated/treasury_received_debit.rs | 3 + .../generated/treasury_transaction.rs | 2 + .../generated/treasury_transaction_entry.rs | 1 + src/resources/generated/usage_record.rs | 5 +- .../generated/usage_record_summary.rs | 6 +- src/resources/generated/version.rs | 2 +- src/resources/generated/webhook_endpoint.rs | 154 +- 183 files changed, 11082 insertions(+), 5526 deletions(-) create mode 100644 src/resources/generated/billing_meter.rs create mode 100644 src/resources/generated/billing_meter_event.rs create mode 100644 src/resources/generated/billing_meter_event_adjustment.rs create mode 100644 src/resources/generated/billing_meter_event_summary.rs create mode 100644 src/resources/generated/confirmation_token.rs create mode 100644 src/resources/generated/entitlements_active_entitlement.rs create mode 100644 src/resources/generated/entitlements_active_entitlement_summary.rs create mode 100644 src/resources/generated/entitlements_active_entitlement_summary_updated.rs create mode 100644 src/resources/generated/entitlements_feature.rs create mode 100644 src/resources/generated/financial_connections_account_refreshed_ownership.rs create mode 100644 src/resources/generated/forwarding_request.rs create mode 100644 src/resources/generated/invoice_payment_method_options_sepa_debit.rs rename src/resources/generated/{invoices_shipping_cost.rs => invoices_resource_shipping_cost.rs} (96%) create mode 100644 src/resources/generated/issuing_personalization_design.rs create mode 100644 src/resources/generated/issuing_physical_bundle.rs create mode 100644 src/resources/generated/payment_flows_private_payment_methods_alipay.rs create mode 100644 src/resources/generated/payment_method_acss_debit.rs create mode 100644 src/resources/generated/payment_method_affirm.rs create mode 100644 src/resources/generated/payment_method_afterpay_clearpay.rs create mode 100644 src/resources/generated/payment_method_amazon_pay.rs create mode 100644 src/resources/generated/payment_method_au_becs_debit.rs create mode 100644 src/resources/generated/payment_method_bacs_debit.rs create mode 100644 src/resources/generated/payment_method_bancontact.rs create mode 100644 src/resources/generated/payment_method_blik.rs create mode 100644 src/resources/generated/payment_method_boleto.rs create mode 100644 src/resources/generated/payment_method_card.rs create mode 100644 src/resources/generated/payment_method_card_present.rs delete mode 100644 src/resources/generated/payment_method_card_present_networks.rs create mode 100644 src/resources/generated/payment_method_cashapp.rs create mode 100644 src/resources/generated/payment_method_customer_balance.rs create mode 100644 src/resources/generated/payment_method_details_card_present_offline.rs create mode 100644 src/resources/generated/payment_method_eps.rs create mode 100644 src/resources/generated/payment_method_fpx.rs create mode 100644 src/resources/generated/payment_method_giropay.rs create mode 100644 src/resources/generated/payment_method_grabpay.rs create mode 100644 src/resources/generated/payment_method_ideal.rs create mode 100644 src/resources/generated/payment_method_interac_present.rs create mode 100644 src/resources/generated/payment_method_klarna.rs create mode 100644 src/resources/generated/payment_method_konbini.rs create mode 100644 src/resources/generated/payment_method_link.rs create mode 100644 src/resources/generated/payment_method_mobilepay.rs create mode 100644 src/resources/generated/payment_method_oxxo.rs create mode 100644 src/resources/generated/payment_method_p24.rs create mode 100644 src/resources/generated/payment_method_paynow.rs create mode 100644 src/resources/generated/payment_method_paypal.rs create mode 100644 src/resources/generated/payment_method_pix.rs create mode 100644 src/resources/generated/payment_method_promptpay.rs create mode 100644 src/resources/generated/payment_method_revolut_pay.rs create mode 100644 src/resources/generated/payment_method_sepa_debit.rs create mode 100644 src/resources/generated/payment_method_sofort.rs create mode 100644 src/resources/generated/payment_method_swish.rs create mode 100644 src/resources/generated/payment_method_us_bank_account.rs create mode 100644 src/resources/generated/payment_method_wechat_pay.rs create mode 100644 src/resources/generated/payment_method_zip.rs create mode 100644 src/resources/generated/product_feature.rs create mode 100644 src/resources/generated/tax_product_resource_ship_from_details.rs create mode 100644 src/resources/generated/treasury_outbound_payment_tracking_details_updated.rs create mode 100644 src/resources/generated/treasury_outbound_transfer_tracking_details_updated.rs diff --git a/openapi/version.json b/openapi/version.json index 5e803d3a0..92b364bf7 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v814" + "version": "v1023" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index bb3a6bb5b..3f00e2373 100644 --- a/src/resources/generated/account.rs +++ b/src/resources/generated/account.rs @@ -2,17 +2,11 @@ // 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". /// @@ -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, @@ -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](https://docs.stripe.com/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, @@ -332,6 +335,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The status of the MobilepPay 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 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, @@ -391,6 +398,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 +429,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](https://docs.stripe.com/currencies#zero-decimal). pub amount: i64, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -441,6 +451,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 +484,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 +504,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 +517,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 +547,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 +566,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 +586,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 +618,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 +632,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 +646,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,6 +655,7 @@ 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. @@ -659,10 +682,11 @@ pub struct PaymentsSettings { #[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 +699,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 +707,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 +727,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 +748,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 +777,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 +817,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 +901,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 +925,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 +938,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 +964,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 +975,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 +1008,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 +1019,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 +1027,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 +1055,9 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, @@ -996,6 +1077,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 +1096,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 +1140,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 +1156,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 +1188,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 +1196,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 +1224,9 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, } @@ -1168,6 +1254,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 +1274,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 +1306,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 +1321,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](https://docs.stripe.com/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](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. #[serde(skip_serializing_if = "Option::is_none")] pub executives_provided: Option, @@ -1265,7 +1354,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](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. #[serde(skip_serializing_if = "Option::is_none")] pub owners_provided: Option, @@ -1285,7 +1374,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](https://docs.stripe.com/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 +1400,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 +1413,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, @@ -1407,6 +1501,10 @@ 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 oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1464,14 +1562,36 @@ pub struct CreateAccountCapabilities { 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. #[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 +1599,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 +1607,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 +1620,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 +1645,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 +1664,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](https://docs.stripe.com/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](https://docs.stripe.com/js/tokens/create_token?type=pii). #[serde(skip_serializing_if = "Option::is_none")] pub id_number_secondary: Option, @@ -1609,6 +1728,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 +1741,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, @@ -1705,6 +1829,10 @@ 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 oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1764,12 +1892,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. #[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 +1905,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 +1913,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 +1926,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 +1940,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](https://docs.stripe.com/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 +1956,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 +1980,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 +2009,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 +2025,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 +2033,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 +2044,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 +2055,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 +2077,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 +2088,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 +2099,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 +2110,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 +2121,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 +2132,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 +2143,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 +2154,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 +2165,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 +2176,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 +2187,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 +2198,7 @@ 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. @@ -2050,6 +2209,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 +2220,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 +2231,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 +2242,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 +2253,7 @@ 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. @@ -2100,6 +2264,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 +2275,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 +2286,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 +2297,18 @@ 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. + /// 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 CreateAccountCapabilitiesMobilepayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2140,6 +2319,7 @@ pub struct CreateAccountCapabilitiesLinkPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2150,6 +2330,7 @@ pub struct CreateAccountCapabilitiesOxxoPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2160,6 +2341,7 @@ pub struct CreateAccountCapabilitiesP24Payments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2170,6 +2352,7 @@ pub struct CreateAccountCapabilitiesPaynowPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2180,6 +2363,7 @@ pub struct CreateAccountCapabilitiesPromptpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2190,6 +2374,7 @@ pub struct CreateAccountCapabilitiesRevolutPayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2200,6 +2385,7 @@ pub struct CreateAccountCapabilitiesSepaDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2210,6 +2396,7 @@ pub struct CreateAccountCapabilitiesSofortPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2220,6 +2407,7 @@ pub struct CreateAccountCapabilitiesSwishPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2230,6 +2418,7 @@ pub struct CreateAccountCapabilitiesTaxReportingUs1099K { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2240,6 +2429,7 @@ pub struct CreateAccountCapabilitiesTaxReportingUs1099Misc { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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. @@ -2250,6 +2440,7 @@ pub struct CreateAccountCapabilitiesTransfers { #[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. @@ -2260,6 +2451,7 @@ pub struct CreateAccountCapabilitiesTreasury { #[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. @@ -2270,6 +2462,7 @@ pub struct CreateAccountCapabilitiesUsBankAccountAchPayments { #[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. @@ -2278,8 +2471,41 @@ pub struct CreateAccountCapabilitiesZipPayments { 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 +2513,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 +2521,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 +2529,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 +2537,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 +2545,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 +2553,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,6 +2561,7 @@ 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. /// /// This field prefixes any dynamic `statement_descriptor` specified on the charge. @@ -2346,15 +2579,16 @@ pub struct PaymentsSettingsParams { #[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](https://docs.stripe.com/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](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. #[serde(skip_serializing_if = "Option::is_none")] pub schedule: Option, @@ -2367,6 +2601,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 +2614,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 +2642,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 +2668,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 +2679,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 +2690,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 +2712,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 +2723,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 +2734,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 +2745,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 +2756,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 +2767,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 +2778,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 +2789,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 +2800,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 +2811,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 +2822,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 +2833,7 @@ 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. @@ -2581,6 +2844,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 +2855,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 +2866,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 +2877,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 +2888,7 @@ 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. @@ -2631,6 +2899,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 +2910,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 +2921,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 +2932,18 @@ 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. @@ -2671,6 +2954,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 +2965,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 +2976,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 +2987,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 +2998,7 @@ 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. @@ -2721,6 +3009,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 +3020,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 +3031,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 +3042,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 +3053,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 +3064,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 +3075,7 @@ 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. @@ -2791,6 +3086,7 @@ 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. @@ -2801,6 +3097,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 +3108,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 +3116,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 +3124,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 +3132,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 +3140,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 +3148,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 +3156,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 +3164,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 +3180,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 +3196,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 +3212,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](https://docs.stripe.com/connect/manage-payout-schedule). #[serde(skip_serializing_if = "Option::is_none")] pub delay_days: Option, @@ -3081,6 +3389,42 @@ impl std::default::Default for AccountCapabilitiesAfterpayClearpayPayments { } } +/// 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 AccountCapabilitiesAmazonPayPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesAmazonPayPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesAmazonPayPayments::Active => "active", + AccountCapabilitiesAmazonPayPayments::Inactive => "inactive", + AccountCapabilitiesAmazonPayPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesAmazonPayPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 AccountCapabilitiesAmazonPayPayments { + fn default() -> Self { + Self::Active + } +} + /// 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")] @@ -3657,6 +4001,42 @@ 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 `oxxo_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4138,6 +4518,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -4230,6 +4611,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", @@ -4294,6 +4676,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 +4939,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 +5015,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 +5040,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..e36532bc7 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 #[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..f8197315f 100644 --- a/src/resources/generated/account_session.rs +++ b/src/resources/generated/account_session.rs @@ -52,13 +52,42 @@ 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, +} + +#[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 +104,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 +120,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 +137,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, @@ -160,10 +194,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 +225,21 @@ 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, +} + +#[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 +253,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 +319,74 @@ 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 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 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 +398,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 +426,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. @@ -290,3 +466,7 @@ pub struct CreateAccountSessionComponentsPayoutsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub standard_payouts: Option, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsPayoutsListFeatures { +} 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..9d479b139 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, @@ -93,6 +93,10 @@ pub enum ApiErrorsCode { BankAccountUnverified, BankAccountVerificationFailed, BillingInvalidMandate, + BillingPolicyRemoteFunctionResponseInvalid, + BillingPolicyRemoteFunctionTimeout, + BillingPolicyRemoteFunctionUnexpectedStatusCode, + BillingPolicyRemoteFunctionUnreachable, BitcoinUpgradeRequired, CaptureChargeAuthorizationExpired, CaptureUnauthorizedPayment, @@ -118,6 +122,10 @@ pub enum ApiErrorsCode { ExpiredCard, FinancialConnectionsAccountInactive, FinancialConnectionsNoSuccessfulTransactionRefresh, + ForwardingApiInactive, + ForwardingApiInvalidParameter, + ForwardingApiUpstreamConnectionError, + ForwardingApiUpstreamConnectionTimeout, IdempotencyKeyInUse, IncorrectAddress, IncorrectCvc, @@ -213,6 +221,7 @@ pub enum ApiErrorsCode { SetupIntentMandateInvalid, SetupIntentSetupAttemptExpired, SetupIntentUnexpectedState, + ShippingAddressInvalid, ShippingCalculationFailed, SkuInactive, StateUnsupported, @@ -240,9 +249,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", @@ -263,10 +270,12 @@ impl ApiErrorsCode { ApiErrorsCode::BankAccountUnverified => "bank_account_unverified", ApiErrorsCode::BankAccountVerificationFailed => "bank_account_verification_failed", ApiErrorsCode::BillingInvalidMandate => "billing_invalid_mandate", + ApiErrorsCode::BillingPolicyRemoteFunctionResponseInvalid => "billing_policy_remote_function_response_invalid", + ApiErrorsCode::BillingPolicyRemoteFunctionTimeout => "billing_policy_remote_function_timeout", + ApiErrorsCode::BillingPolicyRemoteFunctionUnexpectedStatusCode => "billing_policy_remote_function_unexpected_status_code", + ApiErrorsCode::BillingPolicyRemoteFunctionUnreachable => "billing_policy_remote_function_unreachable", 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", @@ -288,12 +297,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", @@ -320,9 +329,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 +346,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 +382,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 +393,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,9 +406,7 @@ 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::TerminalReaderOffline => "terminal_reader_offline", @@ -442,9 +416,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..370af7f62 100644 --- a/src/resources/generated/application_fee.rs +++ b/src/resources/generated/application_fee.rs @@ -2,14 +2,11 @@ // 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". /// @@ -63,24 +60,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 }) } } @@ -98,10 +90,12 @@ impl Object for ApplicationFee { /// 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 +139,5 @@ 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()); + }} \ No newline at end of file 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..46f0d2db4 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 #[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, @@ -77,6 +79,7 @@ pub struct BalanceAmountNet { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceDetail { + /// Funds that are available for use. pub available: Vec, } 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..1db4ca73e 100644 --- a/src/resources/generated/balance_transaction.rs +++ b/src/resources/generated/balance_transaction.rs @@ -2,14 +2,11 @@ // 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". /// @@ -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..3b9c88f24 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, @@ -329,6 +332,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", 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..5cc2bc21d --- /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..ebf0948de --- /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..2c2c8a3a0 --- /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..1887f66e8 --- /dev/null +++ b/src/resources/generated/billing_meter_event_summary.rs @@ -0,0 +1,43 @@ +// ====================================== +// 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 (inclusive). + 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). + 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..4fd23dccd 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -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, } @@ -106,8 +107,11 @@ pub struct AccountCapabilityRequirements { /// If the capability is disabled, this string describes why. /// - /// 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. + /// [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + /// Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`. `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, such as in [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses). `rejected.inactivity` means that the capability has been paused for inactivity. + /// This disabled reason currently only applies to the Issuing capability. + /// See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details. pub disabled_reason: Option, /// Fields that are `currently_due` and need to be collected again because validation or verification failed. @@ -123,10 +127,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, } @@ -238,6 +243,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -330,6 +336,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", diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index 458001f38..833d8a212 100644 --- a/src/resources/generated/card.rs +++ b/src/resources/generated/card.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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>, @@ -76,6 +76,7 @@ pub struct Card { /// /// 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 +95,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 +161,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 +187,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..4ba7fc469 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 #[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..afb8233e5 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -2,18 +2,11 @@ // 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, PaymentMethodDetailsCardPresentOffline, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, Shipping, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Charge". /// @@ -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. @@ -158,6 +151,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. @@ -209,12 +203,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 +250,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 +266,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 +313,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 +325,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 +345,7 @@ pub struct Level3 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3LineItems { + pub discount_amount: Option, pub product_code: String, @@ -360,6 +361,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 +380,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 +437,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, @@ -492,6 +500,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 +518,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 +534,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 +560,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 +584,12 @@ pub struct PaymentMethodDetailsAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsAffirm {} +pub struct PaymentMethodDetailsAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAfterpayClearpay { + /// The Afterpay order ID associated with this payment intent. pub order_id: Option, @@ -583,8 +597,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 +622,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 +642,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 +673,12 @@ pub struct PaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsBlik {} +pub struct PaymentMethodDetailsBlik { +} #[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, } @@ -788,12 +811,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,18 +831,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, @@ -904,6 +932,11 @@ pub struct PaymentMethodDetailsCardPresent { /// 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, @@ -913,14 +946,9 @@ pub struct PaymentMethodDetailsCardPresent { 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, @@ -939,7 +967,9 @@ pub struct PaymentMethodDetailsCardPresentReceipt { /// 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. @@ -956,6 +986,7 @@ pub struct PaymentMethodDetailsCardPresentReceipt { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardWallet { + #[serde(skip_serializing_if = "Option::is_none")] pub amex_express_checkout: Option, @@ -989,13 +1020,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 +1056,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 +1089,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 +1098,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 +1118,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 +1135,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 +1154,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 +1188,7 @@ pub struct PaymentMethodDetailsIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -1229,6 +1273,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 +1292,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,6 +1311,7 @@ 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, @@ -1275,25 +1323,55 @@ pub struct PaymentMethodDetailsKlarna { #[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 +1381,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 +1406,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 +1440,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 +1448,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 +1472,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 +1498,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 +1532,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. @@ -1462,6 +1552,7 @@ pub struct PaymentMethodDetailsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsUsBankAccount { + /// Account holder type: individual or company. pub account_holder_type: Option, @@ -1481,15 +1572,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 +1600,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 +1615,7 @@ pub struct PaypalSellerProtection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Rule { + /// The action taken on the payment. pub action: String, @@ -1525,6 +1628,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 +1665,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 +1680,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 +1728,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>, @@ -1710,6 +1815,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>, @@ -1767,12 +1874,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 +1950,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 +1958,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 +2049,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 +2083,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 +2117,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 +2171,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 } @@ -2167,15 +2270,9 @@ impl PaymentMethodDetailsCardPresentReadMethod { 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" - } + PaymentMethodDetailsCardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodDetailsCardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodDetailsCardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", } } } @@ -2320,9 +2417,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 +2427,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 +2729,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..ae8e82e96 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -2,23 +2,11 @@ // 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". /// @@ -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. @@ -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. @@ -141,11 +131,12 @@ pub struct CheckoutSession { 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 +156,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,6 +169,11 @@ 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. pub setup_intent: Option>, @@ -218,7 +214,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,13 +226,12 @@ 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 { @@ -257,6 +252,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 +265,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 +313,9 @@ 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 oxxo: Option, @@ -347,6 +349,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. @@ -371,6 +374,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,6 +399,7 @@ 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. @@ -406,6 +411,7 @@ pub struct CheckoutAffirmPaymentMethodOptions { #[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. @@ -417,6 +423,7 @@ pub struct CheckoutAfterpayClearpayPaymentMethodOptions { #[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. @@ -426,8 +433,21 @@ pub struct CheckoutAlipayPaymentMethodOptions { 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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -439,6 +459,7 @@ pub struct CheckoutAuBecsDebitPaymentMethodOptions { #[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. @@ -450,6 +471,7 @@ pub struct CheckoutBacsDebitPaymentMethodOptions { #[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. @@ -461,6 +483,7 @@ pub struct CheckoutBancontactPaymentMethodOptions { #[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. @@ -477,9 +500,17 @@ pub struct CheckoutBoletoPaymentMethodOptions { #[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. @@ -507,6 +538,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,6 +546,7 @@ 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. @@ -525,6 +558,7 @@ pub struct CheckoutCashappPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalancePaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -544,6 +578,7 @@ pub struct CheckoutCustomerBalancePaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub eu_bank_transfer: Option, @@ -551,8 +586,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,6 +595,7 @@ 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. @@ -572,6 +607,7 @@ pub struct CheckoutEpsPaymentMethodOptions { #[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. @@ -583,6 +619,7 @@ pub struct CheckoutFpxPaymentMethodOptions { #[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. @@ -594,6 +631,7 @@ pub struct CheckoutGiropayPaymentMethodOptions { #[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. @@ -605,6 +643,7 @@ pub struct CheckoutGrabPayPaymentMethodOptions { #[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. @@ -616,6 +655,7 @@ pub struct CheckoutIdealPaymentMethodOptions { #[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. @@ -627,6 +667,7 @@ pub struct CheckoutKlarnaPaymentMethodOptions { #[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. @@ -643,6 +684,7 @@ pub struct CheckoutKonbiniPaymentMethodOptions { #[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. @@ -652,8 +694,21 @@ pub struct CheckoutLinkPaymentMethodOptions { 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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -670,6 +725,7 @@ pub struct CheckoutOxxoPaymentMethodOptions { #[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. @@ -681,6 +737,7 @@ pub struct CheckoutP24PaymentMethodOptions { #[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. @@ -692,6 +749,7 @@ pub struct CheckoutPaynowPaymentMethodOptions { #[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, @@ -715,15 +773,26 @@ pub struct CheckoutPaypalPaymentMethodOptions { #[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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} #[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. @@ -735,6 +804,7 @@ pub struct CheckoutSepaDebitPaymentMethodOptions { #[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. @@ -746,6 +816,7 @@ pub struct CheckoutSofortPaymentMethodOptions { #[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,6 +825,7 @@ pub struct CheckoutSwishPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -772,12 +844,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 +872,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 +888,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 +899,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 +915,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 +931,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 +960,7 @@ pub struct PaymentPagesCheckoutSessionCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -895,6 +974,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 +987,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsNumeric { + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -919,6 +1000,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 +1014,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFieldsText { + /// The maximum character length constraint for the customer's input. pub maximum_length: Option, @@ -944,6 +1027,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 +1043,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 +1077,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 +1086,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 +1117,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -1038,6 +1127,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 +1136,38 @@ 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 { + + /// Controls which payment methods are eligible to be redisplayed to returning customers. + /// + /// Corresponds to `allow_redisplay` on the payment method. + pub allow_redisplay_filters: 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 +1189,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 +1206,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 +1216,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`, or `unknown`. #[serde(rename = "type")] pub type_: PaymentPagesCheckoutSessionTaxIdType, @@ -1118,12 +1227,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 +1250,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -1148,6 +1260,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -1157,6 +1270,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,6 +1284,8 @@ 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, @@ -1293,7 +1409,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 +1418,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 +1451,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 +1463,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, @@ -1380,9 +1507,9 @@ pub struct CreateCheckoutSession<'a> { #[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 +1542,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 +1564,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 +1638,11 @@ 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()); + }} #[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 +1650,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 +1664,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 +1686,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 +1720,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 +1735,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 +1764,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 +1776,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 +1787,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 +1823,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. @@ -1773,8 +1910,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 +1939,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 +2003,10 @@ 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 OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -1898,12 +2054,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 { + + /// Controls which payment methods are eligible to be redisplayed to returning customers. + /// + /// Corresponds to `allow_redisplay` on the payment method. + #[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 +2099,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 +2109,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 +2121,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 +2194,21 @@ pub struct CreateCheckoutSessionSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionTaxIdCollection { + /// Set to true to enable Tax ID collection. 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 +2224,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 +2236,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 +2246,7 @@ pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -2072,6 +2255,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 +2268,7 @@ pub struct CreateCheckoutSessionCustomFieldsLabel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsNumeric { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -2095,6 +2280,7 @@ pub struct CreateCheckoutSessionCustomFieldsNumeric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsText { + /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] pub maximum_length: Option, @@ -2106,30 +2292,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 +2360,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 +2382,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 +2427,7 @@ pub struct CreateCheckoutSessionLineItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShipping { + /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress, @@ -2257,6 +2451,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 +2466,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). @@ -2288,17 +2484,16 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2310,18 +2505,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAffirm { #[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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2331,44 +2527,57 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAlipay { 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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2386,10 +2595,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsBoleto { #[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. @@ -2417,18 +2635,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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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, @@ -2445,12 +2664,12 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalance { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2462,6 +2681,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsEps { #[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. @@ -2473,30 +2693,31 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsFpx { #[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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2508,6 +2729,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsIdeal { #[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. @@ -2519,6 +2741,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsKlarna { #[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. @@ -2532,12 +2755,12 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsKonbini { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2547,8 +2770,21 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsLink { 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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -2566,6 +2802,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsOxxo { #[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. @@ -2581,6 +2818,7 @@ 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. @@ -2592,6 +2830,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPaynow { #[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, @@ -2621,6 +2860,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPaypal { #[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,30 +2870,31 @@ 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2665,6 +2906,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { #[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,10 +2916,10 @@ 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. /// @@ -2685,17 +2927,16 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccount { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -2711,18 +2952,17 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsWechatPay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. /// @@ -2765,6 +3005,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 +3015,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 +3029,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 +3050,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 +3076,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 +3117,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -2885,6 +3133,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 +3160,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 +3171,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 +3181,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 +3217,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 +3261,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 +3278,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 +3294,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferE #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -3058,6 +3304,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -3067,6 +3314,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 +3322,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 +3479,7 @@ impl CheckoutAcssDebitPaymentMethodOptionsVerificationMethod { match self { CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Automatic => "automatic", CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Instant => "instant", - CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => { - "microdeposits" - } + CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3353,6 +3597,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")] @@ -3472,20 +3750,56 @@ impl CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { } } -impl AsRef for CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { +impl AsRef for CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// 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 CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { +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 CheckoutBoletoPaymentMethodOptionsSetupFutureUsage { +impl std::default::Default for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { fn default() -> Self { - Self::None + Self::Any } } @@ -3590,16 +3904,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 +3929,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 +4281,38 @@ 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 `CheckoutOxxoPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4143,6 +4475,40 @@ impl std::default::Default for CheckoutPaypalPaymentMethodOptionsSetupFutureUsag } } +/// 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 CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { + None, + OffSession, +} + +impl CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage::None => "none", + CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 CheckoutRevolutPayPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CheckoutSepaDebitPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4763,12 +5129,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 +5141,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 +5442,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 +5546,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 +5603,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 +5662,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 +5692,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 +5726,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 +5756,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 +5791,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 +5809,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 +5857,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsa impl CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none", } } } @@ -5512,16 +5868,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 +5911,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 +5971,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 +5990,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 +6058,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 +6081,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 +6128,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 +6164,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 +6214,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 +6260,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 +6281,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 +6313,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsag impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none", } } } @@ -5934,16 +6324,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 +6571,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 +6593,38 @@ 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 `CreateCheckoutSessionPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -6442,9 +6858,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 +6892,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 +6927,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 +7003,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 +7025,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -6630,29 +7033,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 +7069,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 +7086,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 +7103,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 +7115,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 +7202,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -6834,6 +7219,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -6856,6 +7242,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 +7259,7 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::Klarna => "klarna", CreateCheckoutSessionPaymentMethodTypes::Konbini => "konbini", CreateCheckoutSessionPaymentMethodTypes::Link => "link", + CreateCheckoutSessionPaymentMethodTypes::Mobilepay => "mobilepay", CreateCheckoutSessionPaymentMethodTypes::Oxxo => "oxxo", CreateCheckoutSessionPaymentMethodTypes::P24 => "p24", CreateCheckoutSessionPaymentMethodTypes::Paynow => "paynow", @@ -6906,6 +7294,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 +8128,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 +8168,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 +8204,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 +8233,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 +8335,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 +8377,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 +8468,7 @@ impl PaymentPagesCheckoutSessionAutomaticTaxStatus { match self { PaymentPagesCheckoutSessionAutomaticTaxStatus::Complete => "complete", PaymentPagesCheckoutSessionAutomaticTaxStatus::Failed => "failed", - PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => { - "requires_location_inputs" - } + PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => "requires_location_inputs", } } } @@ -8338,6 +8762,76 @@ 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_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 +9567,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 +9583,7 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -9124,13 +9617,17 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -9163,6 +9660,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", @@ -9196,13 +9694,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/confirmation_token.rs b/src/resources/generated/confirmation_token.rs new file mode 100644 index 000000000..10822b2b4 --- /dev/null +++ b/src/resources/generated/confirmation_token.rs @@ -0,0 +1,420 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::client::{Client, Response}; +use crate::ids::{ConfirmationTokenId}; +use crate::params::{Expand, Object, Timestamp}; +use crate::resources::{Address, BillingDetails, CardDetails, CardPresent, PaymentFlowsPrivatePaymentMethodsAlipay, PaymentMethodAcssDebit, PaymentMethodAffirm, PaymentMethodAfterpayClearpay, PaymentMethodAmazonPay, PaymentMethodAuBecsDebit, PaymentMethodBacsDebit, PaymentMethodBancontact, PaymentMethodBlik, PaymentMethodBoleto, PaymentMethodCashapp, PaymentMethodCustomerBalance, PaymentMethodEps, PaymentMethodFpx, PaymentMethodGiropay, PaymentMethodGrabpay, PaymentMethodIdeal, PaymentMethodInteracPresent, PaymentMethodKlarna, PaymentMethodKonbini, PaymentMethodLink, PaymentMethodMobilepay, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, 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 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 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, + + #[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 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, + + /// 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, + Oxxo, + P24, + Paynow, + Paypal, + Pix, + Promptpay, + RevolutPay, + SepaDebit, + Sofort, + Swish, + 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::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::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/coupon.rs b/src/resources/generated/coupon.rs index 1c1a6c8d6..cca0f598b 100644 --- a/src/resources/generated/coupon.rs +++ b/src/resources/generated/coupon.rs @@ -2,14 +2,11 @@ // 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". /// @@ -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..63bb46283 100644 --- a/src/resources/generated/credit_note.rs +++ b/src/resources/generated/credit_note.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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, @@ -279,6 +276,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 +317,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 +330,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 +365,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 +420,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 +428,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, diff --git a/src/resources/generated/credit_note_line_item.rs b/src/resources/generated/credit_note_line_item.rs index 4461be9d3..afcefb51b 100644 --- a/src/resources/generated/credit_note_line_item.rs +++ b/src/resources/generated/credit_note_line_item.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..93b53a161 100644 --- a/src/resources/generated/customer.rs +++ b/src/resources/generated/customer.rs @@ -2,17 +2,11 @@ // 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". /// @@ -161,12 +155,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 +182,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 +208,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 +221,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 +234,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 +245,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 +258,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 +342,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 +413,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 +471,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 +555,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 +615,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 +624,7 @@ pub struct CreateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShipping { + /// Customer shipping address. pub address: CreateCustomerShippingAddress, @@ -630,6 +638,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 +655,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 +677,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_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`, `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 +688,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 +697,7 @@ pub struct UpdateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShipping { + /// Customer shipping address. pub address: UpdateCustomerShippingAddress, @@ -698,6 +711,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 +728,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 +739,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 +767,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 +793,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 +804,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 +844,7 @@ impl CreateCustomerCashBalanceSettingsReconciliationMode { match self { CreateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", CreateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -894,9 +912,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 +1092,7 @@ pub enum TaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -1109,13 +1126,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -1147,6 +1168,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", @@ -1180,13 +1202,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 +1268,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..9c1b0d717 100644 --- a/src/resources/generated/customer_balance_transaction.rs +++ b/src/resources/generated/customer_balance_transaction.rs @@ -2,11 +2,10 @@ // 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". /// diff --git a/src/resources/generated/discount.rs b/src/resources/generated/discount.rs index 4ab82cd45..457775051 100644 --- a/src/resources/generated/discount.rs +++ b/src/resources/generated/discount.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..393200b38 100644 --- a/src/resources/generated/dispute.rs +++ b/src/resources/generated/dispute.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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,13 @@ 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 paypal: Option, + /// Payment method type. #[serde(rename = "type")] pub type_: DisputePaymentMethodDetailsType, @@ -234,6 +241,7 @@ 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`. @@ -245,9 +253,20 @@ pub struct DisputePaymentMethodDetailsCard { pub network_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, @@ -300,20 +319,21 @@ 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 `DisputePaymentMethodDetails`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum DisputePaymentMethodDetailsType { Card, + Paypal, } impl DisputePaymentMethodDetailsType { pub fn as_str(self) -> &'static str { match self { DisputePaymentMethodDetailsType::Card => "card", + 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..0b4fbcfe1 --- /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..1fde068a2 --- /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..1d9f0e37d 100644 --- a/src/resources/generated/event.rs +++ b/src/resources/generated/event.rs @@ -2,12 +2,11 @@ // 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". /// @@ -48,12 +47,14 @@ 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. /// @@ -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..e9846b6ed 100644 --- a/src/resources/generated/fee_refund.rs +++ b/src/resources/generated/fee_refund.rs @@ -2,11 +2,10 @@ // 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". /// diff --git a/src/resources/generated/file.rs b/src/resources/generated/file.rs index 24bfa30a6..7d4b4f251 100644 --- a/src/resources/generated/file.rs +++ b/src/resources/generated/file.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..8c6d1cd45 100644 --- a/src/resources/generated/file_link.rs +++ b/src/resources/generated/file_link.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..71cf0bb08 100644 --- a/src/resources/generated/financial_connections_account.rs +++ b/src/resources/generated/financial_connections_account.rs @@ -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..6e52158b9 100644 --- a/src/resources/generated/financial_connections_session.rs +++ b/src/resources/generated/financial_connections_session.rs @@ -140,7 +140,8 @@ pub struct CreateFinancialConnectionsSessionAccountHolder { pub struct CreateFinancialConnectionsSessionFilters { /// 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 `CreateFinancialConnectionsSessionAccountHolder`'s `type` field. diff --git a/src/resources/generated/forwarding_request.rs b/src/resources/generated/forwarding_request.rs new file mode 100644 index 000000000..10ca6195c --- /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..5879465df 100644 --- a/src/resources/generated/identity_verification_report.rs +++ b/src/resources/generated/identity_verification_report.rs @@ -15,6 +15,11 @@ 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..f33eb7f19 100644 --- a/src/resources/generated/identity_verification_session.rs +++ b/src/resources/generated/identity_verification_session.rs @@ -15,6 +15,11 @@ 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,6 +52,12 @@ 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. @@ -59,7 +70,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 +79,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 +98,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 +126,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 +160,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 +187,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 +205,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 +277,13 @@ pub enum GelatoSessionLastErrorCode { DocumentExpired, DocumentTypeNotSupported, DocumentUnverifiedOther, + EmailUnverifiedOther, + EmailVerificationDeclined, IdNumberInsufficientDocumentData, IdNumberMismatch, IdNumberUnverifiedOther, + PhoneUnverifiedOther, + PhoneVerificationDeclined, SelfieDocumentMissingPhoto, SelfieFaceMismatch, SelfieManipulated, @@ -239,9 +301,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 +414,7 @@ impl std::default::Default for IdentityVerificationSessionStatus { pub enum IdentityVerificationSessionType { Document, IdNumber, + VerificationFlow, } impl IdentityVerificationSessionType { @@ -355,6 +422,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..73642693a 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -2,22 +2,11 @@ // 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". /// @@ -28,8 +17,7 @@ pub struct Invoice { /// /// 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")] @@ -254,7 +242,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 +325,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 +356,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 +386,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 +456,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. /// @@ -510,6 +499,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 +517,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 +527,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -545,6 +537,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 +558,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 +568,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 +578,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 +588,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 +608,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 +624,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`, or `unknown`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -686,7 +693,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 +710,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 +797,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 +846,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 +868,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 +876,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 +929,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 +946,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 +1018,11 @@ 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()); + }} #[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 +1038,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 +1060,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 +1080,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 +1092,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 +1113,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 +1127,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 +1141,7 @@ pub struct CreateInvoiceShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetails { + /// Shipping address. pub address: CreateInvoiceShippingDetailsAddress, @@ -1143,6 +1155,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. @@ -1155,6 +1168,7 @@ pub struct CreateInvoiceTransferData { #[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 +1180,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 +1201,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 +1212,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 +1222,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. @@ -1249,6 +1270,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, @@ -1276,27 +1298,27 @@ pub struct CreateInvoiceShippingDetailsAddress { #[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 +1328,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 +1348,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 +1385,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 +1398,20 @@ 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 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 +1424,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. /// @@ -1429,6 +1454,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -1438,6 +1464,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -1447,6 +1474,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,12 +1482,12 @@ 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, @@ -1473,8 +1501,8 @@ 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`. @@ -1670,24 +1698,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 +1740,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 +1778,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 +1799,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInt impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => { - "month" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month", } } } @@ -1798,16 +1810,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 +1842,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 +1866,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,9 +1883,7 @@ 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 } @@ -1894,8 +1892,7 @@ impl std::default::Default /// 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 +1910,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 +1932,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -1948,29 +1940,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 +1982,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 +2006,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2043,6 +2025,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, @@ -2053,11 +2036,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", @@ -2076,9 +2058,8 @@ impl CreateInvoicePaymentSettingsPaymentMethodTypes { 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::UsBankAccount => "us_bank_account", @@ -2138,42 +2119,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 +2169,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 +2189,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 +2209,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 +2229,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 +2260,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 +2357,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 +2465,6 @@ impl std::default::Default for InvoicePaymentMethodOptionsCardRequestThreeDSecur pub enum InvoicePendingInvoiceItemsBehavior { Exclude, Include, - IncludeAndRequire, } impl InvoicePendingInvoiceItemsBehavior { @@ -2542,7 +2472,6 @@ impl InvoicePendingInvoiceItemsBehavior { match self { InvoicePendingInvoiceItemsBehavior::Exclude => "exclude", InvoicePendingInvoiceItemsBehavior::Include => "include", - InvoicePendingInvoiceItemsBehavior::IncludeAndRequire => "include_and_require", } } } @@ -2647,6 +2576,7 @@ pub enum InvoicesPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2665,6 +2595,7 @@ pub enum InvoicesPaymentSettingsPaymentMethodTypes { Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, @@ -2678,6 +2609,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", @@ -2696,6 +2628,7 @@ impl InvoicesPaymentSettingsPaymentMethodTypes { 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", @@ -2792,6 +2725,7 @@ pub enum TaxIdType { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -2825,13 +2759,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -2864,6 +2802,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", @@ -2897,13 +2836,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", 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..fbbc5df93 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,12 +18,12 @@ pub struct InvoicePaymentMethodOptionsUsBankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { + /// 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>, @@ -33,6 +34,7 @@ pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { #[serde(rename_all = "snake_case")] pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions { Balances, + Ownership, PaymentMethod, Transactions, } @@ -41,6 +43,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 +61,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 +72,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 +97,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 +117,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/invoiceitem.rs b/src/resources/generated/invoiceitem.rs index c48a5705d..5ab57f59f 100644 --- a/src/resources/generated/invoiceitem.rs +++ b/src/resources/generated/invoiceitem.rs @@ -2,17 +2,11 @@ // 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". /// @@ -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>, @@ -258,7 +251,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 +318,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 +385,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 +410,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. @@ -513,6 +508,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 +516,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 +554,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 +562,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..e7005682b 100644 --- a/src/resources/generated/issuing_authorization.rs +++ b/src/resources/generated/issuing_authorization.rs @@ -2,15 +2,10 @@ // 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". /// @@ -132,6 +127,7 @@ impl Object for IssuingAuthorization { #[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 +144,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 +177,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 +237,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 +250,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 +275,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 +286,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 +337,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", } } diff --git a/src/resources/generated/issuing_card.rs b/src/resources/generated/issuing_card.rs index d05ad9820..78a3a0803 100644 --- a/src/resources/generated/issuing_card.rs +++ b/src/resources/generated/issuing_card.rs @@ -2,14 +2,10 @@ // 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". /// @@ -72,6 +68,10 @@ pub struct IssuingCard { #[serde(skip_serializing_if = "Option::is_none")] pub number: Option, + /// The personalization design object belonging to this card. + #[serde(skip_serializing_if = "Option::is_none")] + pub personalization_design: Option>, + /// The latest card that replaces this card, if any. pub replaced_by: Option>, @@ -112,18 +112,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,6 +153,7 @@ pub struct IssuingCardAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardShipping { + pub address: Address, /// The delivery company that shipped a card. @@ -181,6 +200,7 @@ pub struct IssuingCardShipping { #[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 +209,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 +226,7 @@ pub struct IssuingCardSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardWallets { + pub apple_pay: IssuingCardApplePay, pub google_pay: IssuingCardGooglePay, @@ -215,6 +237,7 @@ pub struct IssuingCardWallets { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardApplePay { + /// Apple Pay Eligibility. pub eligible: bool, @@ -224,6 +247,7 @@ pub struct IssuingCardApplePay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardGooglePay { + /// Google Pay Eligibility. pub eligible: bool, @@ -244,9 +268,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 +340,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", } } diff --git a/src/resources/generated/issuing_cardholder.rs b/src/resources/generated/issuing_cardholder.rs index a992b662c..e4d2e3e49 100644 --- a/src/resources/generated/issuing_cardholder.rs +++ b/src/resources/generated/issuing_cardholder.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..8e48f5c58 100644 --- a/src/resources/generated/issuing_dispute.rs +++ b/src/resources/generated/issuing_dispute.rs @@ -2,13 +2,10 @@ // 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". /// @@ -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. @@ -67,6 +65,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 +78,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 +98,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 +132,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 +156,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 +166,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 +186,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 +217,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 +233,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 +252,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 +336,7 @@ pub enum IssuingDisputeEvidenceReason { Duplicate, Fraudulent, MerchandiseNotAsDescribed, + NoValidAuthorization, NotReceived, Other, ServiceNotAsDescribed, @@ -327,9 +348,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", @@ -365,9 +385,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_personalization_design.rs b/src/resources/generated/issuing_personalization_design.rs new file mode 100644 index 000000000..5f16c5502 --- /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_physical_bundle.rs b/src/resources/generated/issuing_physical_bundle.rs new file mode 100644 index 000000000..40e621981 --- /dev/null +++ b/src/resources/generated/issuing_physical_bundle.rs @@ -0,0 +1,233 @@ +// ====================================== +// 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, + + #[serde(skip_serializing_if = "Option::is_none")] + pub features: 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, + + /// 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..008c49616 100644 --- a/src/resources/generated/issuing_token.rs +++ b/src/resources/generated/issuing_token.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..b55dc35d9 100644 --- a/src/resources/generated/issuing_transaction.rs +++ b/src/resources/generated/issuing_transaction.rs @@ -2,14 +2,10 @@ // 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". /// @@ -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,7 @@ pub struct IssuingTransactionNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionPurchaseDetails { + /// Information about the flight that was purchased with this transaction. pub flight: Option, @@ -156,6 +156,7 @@ pub struct IssuingTransactionPurchaseDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightData { + /// The time that the flight departed. pub departure_at: Option, @@ -174,6 +175,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,6 +197,7 @@ pub struct IssuingTransactionFlightDataLeg { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFuelData { + /// The type of fuel that was purchased. /// /// One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. @@ -203,7 +206,7 @@ pub struct IssuingTransactionFuelData { /// The units for `volume_decimal`. /// - /// One of `us_gallon` or `liter`. + /// One of `liter`, `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. @@ -215,6 +218,7 @@ pub struct IssuingTransactionFuelData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionLodgingData { + /// The time of checking into the lodging. pub check_in_at: Option, @@ -224,6 +228,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 +246,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..ccb981276 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,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "linked_account_options_us_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LinkedAccountOptionsUsBankAccount { + /// The list of permissions to request. /// /// The `payment_method` permission must be included. @@ -66,6 +67,7 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPermissions { #[serde(rename_all = "snake_case")] pub enum LinkedAccountOptionsUsBankAccountPrefetch { Balances, + Ownership, Transactions, } @@ -73,6 +75,7 @@ impl LinkedAccountOptionsUsBankAccountPrefetch { pub fn as_str(self) -> &'static str { match self { LinkedAccountOptionsUsBankAccountPrefetch::Balances => "balances", + LinkedAccountOptionsUsBankAccountPrefetch::Ownership => "ownership", LinkedAccountOptionsUsBankAccountPrefetch::Transactions => "transactions", } } diff --git a/src/resources/generated/login_link.rs b/src/resources/generated/login_link.rs index 07edb8ec0..3937552a9 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 #[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..15f934516 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..58c40f123 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -2,21 +2,11 @@ // 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, PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentIntent". /// @@ -130,8 +120,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, @@ -196,10 +185,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 +209,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 +220,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 +238,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 +253,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 +268,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,12 +279,10 @@ 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, @@ -318,8 +303,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 +322,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 +330,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 +346,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 +362,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 +376,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 +404,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 +419,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 +434,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferAbaRecord { + /// The ABA account number. pub account_number: String, @@ -459,6 +447,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 +463,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 +476,7 @@ pub struct FundingInstructionsBankTransferSortCodeRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSpeiRecord { + /// The three-digit bank code. pub bank_code: String, @@ -498,6 +489,7 @@ pub struct FundingInstructionsBankTransferSpeiRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSwiftRecord { + /// The account number. pub account_number: String, @@ -510,6 +502,7 @@ pub struct FundingInstructionsBankTransferSwiftRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { + /// The account holder name. pub account_holder_name: Option, @@ -536,6 +529,7 @@ pub struct FundingInstructionsBankTransferZenginRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionDisplayOxxoDetails { + /// The timestamp after which the OXXO voucher expires. pub expires_after: Option, @@ -548,6 +542,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 +554,7 @@ pub struct PaymentIntentNextActionKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniStores { + /// FamilyMart instruction details. pub familymart: Option, @@ -574,6 +570,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 +581,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 +592,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 +603,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 +614,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 +630,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 +654,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 +670,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 +680,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 +720,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 +739,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 +764,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,6 +784,9 @@ 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, @@ -833,6 +841,9 @@ 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 oxxo: Option, @@ -875,6 +886,7 @@ pub struct PaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -893,6 +905,7 @@ 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. @@ -904,6 +917,7 @@ pub struct PaymentIntentPaymentMethodOptionsAuBecsDebit { #[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. @@ -915,6 +929,7 @@ pub struct PaymentIntentPaymentMethodOptionsBlik { #[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 +950,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 +968,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. @@ -991,6 +1004,7 @@ 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. @@ -1002,6 +1016,7 @@ pub struct PaymentIntentPaymentMethodOptionsEps { #[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, @@ -1020,6 +1035,7 @@ pub struct PaymentIntentPaymentMethodOptionsLink { #[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,16 +1046,31 @@ 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 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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1053,12 +1084,13 @@ pub struct PaymentIntentPaymentMethodOptionsSepaDebit { } #[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. @@ -1072,6 +1104,7 @@ pub struct PaymentIntentPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -1080,8 +1113,7 @@ 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. /// @@ -1093,12 +1125,12 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { /// 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 +1141,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 +1160,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, @@ -1145,6 +1180,7 @@ pub struct PaymentMethodOptionsAffirm { #[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, @@ -1165,6 +1201,7 @@ pub struct PaymentMethodOptionsAfterpayClearpay { #[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. @@ -1174,8 +1211,25 @@ pub struct PaymentMethodOptionsAlipay { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsBacsDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -1187,6 +1241,7 @@ pub struct PaymentMethodOptionsBacsDebit { #[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, @@ -1201,6 +1256,7 @@ pub struct PaymentMethodOptionsBancontact { #[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. @@ -1217,6 +1273,7 @@ pub struct PaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardInstallments { + /// Installment plans that may be selected for this PaymentIntent. pub available_plans: Option>, @@ -1229,6 +1286,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 +1333,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, @@ -1286,6 +1345,7 @@ pub struct PaymentMethodOptionsCardPresent { #[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, @@ -1301,6 +1361,7 @@ pub struct PaymentMethodOptionsCashapp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -1320,6 +1381,7 @@ pub struct PaymentMethodOptionsCustomerBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalanceBankTransfer { + #[serde(skip_serializing_if = "Option::is_none")] pub eu_bank_transfer: Option, @@ -1327,8 +1389,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,6 +1398,7 @@ 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. @@ -1348,6 +1410,7 @@ pub struct PaymentMethodOptionsFpx { #[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. @@ -1359,6 +1422,7 @@ pub struct PaymentMethodOptionsGiropay { #[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. @@ -1370,6 +1434,7 @@ pub struct PaymentMethodOptionsGrabpay { #[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. @@ -1380,10 +1445,12 @@ pub struct PaymentMethodOptionsIdeal { } #[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, @@ -1402,6 +1469,7 @@ pub struct PaymentMethodOptionsKlarna { #[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, @@ -1429,6 +1497,7 @@ pub struct PaymentMethodOptionsKonbini { #[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. @@ -1445,6 +1514,7 @@ pub struct PaymentMethodOptionsOxxo { #[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. @@ -1456,6 +1526,7 @@ pub struct PaymentMethodOptionsP24 { #[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. @@ -1467,6 +1538,7 @@ pub struct PaymentMethodOptionsPaynow { #[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, @@ -1490,6 +1562,7 @@ pub struct PaymentMethodOptionsPaypal { #[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, @@ -1507,6 +1580,7 @@ pub struct PaymentMethodOptionsPix { #[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. @@ -1517,10 +1591,24 @@ pub struct PaymentMethodOptionsPromptpay { } #[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. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} #[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, @@ -1535,6 +1623,7 @@ pub struct PaymentMethodOptionsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -1554,6 +1643,7 @@ pub struct PaymentMethodOptionsWechatPay { #[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. @@ -1565,6 +1655,7 @@ pub struct PaymentMethodOptionsZip { #[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 +1673,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 +1696,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 +1707,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). @@ -1777,6 +1875,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 +1908,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 +1959,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). @@ -2015,6 +2115,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 +2130,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 +2154,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 +2241,10 @@ 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 an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2195,6 +2313,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 +2330,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 +2406,10 @@ 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 `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2338,6 +2465,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 +2473,7 @@ pub struct CreatePaymentIntentRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentShipping { + /// Shipping address. pub address: CreatePaymentIntentShippingAddress, @@ -2368,6 +2497,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 +2518,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 +2535,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 +2622,10 @@ 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 an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2548,6 +2694,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 +2711,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 +2787,10 @@ 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 `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2691,6 +2846,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentShipping { + /// Shipping address. pub address: UpdatePaymentIntentShippingAddress, @@ -2714,6 +2870,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 +2878,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 +2900,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -2753,16 +2912,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 +2939,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 +2952,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 +2976,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 +3004,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 +3014,109 @@ 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 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 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,13 +3138,16 @@ 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, @@ -2957,20 +3158,19 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -2991,14 +3191,14 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAffirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3012,12 +3212,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3027,36 +3227,56 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAlipay { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsAmazonPay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAuBecsDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsBacsDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. /// @@ -3064,12 +3284,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBancontact { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3087,6 +3307,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBlik { #[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. @@ -3104,9 +3325,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCard { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3145,18 +3367,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 +3385,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. /// @@ -3209,6 +3427,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, @@ -3222,9 +3441,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCashapp { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3241,6 +3461,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCashapp { #[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, @@ -3257,12 +3478,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalance { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3274,6 +3495,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsEps { #[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. @@ -3285,6 +3507,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsFpx { #[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. @@ -3296,6 +3519,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsGiropay { #[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. @@ -3307,6 +3531,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsGrabpay { #[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. @@ -3317,13 +3542,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsIdeal { } #[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. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3344,6 +3571,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsKlarna { #[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. @@ -3379,9 +3607,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsLink { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3400,8 +3629,29 @@ pub struct CreatePaymentIntentPaymentMethodOptionsLink { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -3419,6 +3669,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsOxxo { #[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. @@ -3434,6 +3685,7 @@ 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. @@ -3445,6 +3697,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPaynow { #[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, @@ -3474,6 +3727,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPaypal { #[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. @@ -3497,30 +3751,39 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsPromptpay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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, @@ -3531,12 +3794,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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, @@ -3552,6 +3815,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSofort { #[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, @@ -3567,10 +3831,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSwish { #[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,8 +3846,7 @@ 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. /// @@ -3591,17 +3854,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3617,12 +3879,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3634,6 +3896,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsZip { #[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 +3924,7 @@ pub struct CreatePaymentIntentShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -3672,16 +3936,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 {} +pub struct UpdatePaymentIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataAlipay {} +pub struct UpdatePaymentIntentPaymentMethodDataAlipay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +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 +3963,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 +3976,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 +4000,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 +4028,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 +4038,109 @@ 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 {} +pub struct UpdatePaymentIntentPaymentMethodDataLink { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataMobilepay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataOxxo {} +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 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,13 +4162,16 @@ 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, @@ -3876,20 +4182,19 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3910,14 +4215,14 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3931,12 +4236,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -3946,36 +4251,56 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAlipay { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsAmazonPay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAuBecsDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsBacsDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. /// @@ -3983,12 +4308,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBancontact { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -4006,6 +4331,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBlik { #[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. @@ -4023,9 +4349,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCard { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4064,18 +4391,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 +4409,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. /// @@ -4128,6 +4451,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, @@ -4141,9 +4465,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4160,6 +4485,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp { #[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, @@ -4176,12 +4502,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalance { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -4193,6 +4519,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsEps { #[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. @@ -4204,6 +4531,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsFpx { #[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. @@ -4215,6 +4543,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsGiropay { #[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. @@ -4226,6 +4555,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsGrabpay { #[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. @@ -4236,13 +4566,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsIdeal { } #[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. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4263,6 +4595,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna { #[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. @@ -4298,9 +4631,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsLink { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4308,7 +4642,27 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsLink { /// [Deprecated] This is a legacy parameter that no longer has any function. #[serde(skip_serializing_if = "Option::is_none")] - pub persistent_token: Option, + pub persistent_token: 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 no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4316,11 +4670,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsLink { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: Option, + 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. @@ -4338,6 +4693,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsOxxo { #[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. @@ -4353,6 +4709,7 @@ 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. @@ -4364,6 +4721,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPaynow { #[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, @@ -4393,6 +4751,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPaypal { #[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. @@ -4416,30 +4775,39 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsPromptpay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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, @@ -4450,12 +4818,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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, @@ -4471,6 +4839,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSofort { #[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, @@ -4486,10 +4855,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSwish { #[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,8 +4870,7 @@ 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. /// @@ -4510,17 +4878,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -4536,12 +4903,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + 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. @@ -4553,6 +4920,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsZip { #[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 +4947,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 +4962,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 +4990,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 +5003,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 +5018,16 @@ 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 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 +5042,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 +5088,15 @@ 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 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 +5107,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 +5138,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 +5155,22 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + 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 +5181,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 +5225,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 +5238,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 +5253,16 @@ 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 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 +5277,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 +5323,15 @@ 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 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 +5342,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 +5373,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 +5390,22 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + 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,22 +5416,23 @@ 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, @@ -5090,15 +5447,15 @@ 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`. @@ -5107,6 +5464,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuB #[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, @@ -5121,15 +5479,15 @@ 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`. @@ -5248,6 +5606,42 @@ impl std::default::Default for CreatePaymentIntentMandateDataCustomerAcceptanceT } } +/// 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 CreatePaymentIntentPaymentMethodDataAllowRedisplay { + Always, + Limited, + Unspecified, +} + +impl CreatePaymentIntentPaymentMethodDataAllowRedisplay { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Always => "always", + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Limited => "limited", + CreatePaymentIntentPaymentMethodDataAllowRedisplay::Unspecified => "unspecified", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodDataAllowRedisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 CreatePaymentIntentPaymentMethodDataAllowRedisplay { + fn default() -> Self { + Self::Always + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodDataEps`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5285,57 +5679,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 +5944,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 +5954,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 +6036,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -5691,6 +6052,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -5713,6 +6075,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 +6091,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::Klarna => "klarna", CreatePaymentIntentPaymentMethodDataType::Konbini => "konbini", CreatePaymentIntentPaymentMethodDataType::Link => "link", + CreatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", CreatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", CreatePaymentIntentPaymentMethodDataType::P24 => "p24", CreatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -5773,12 +6137,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 +6219,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 +6253,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 +6277,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 +6312,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 +6410,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -6086,9 +6426,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 +6458,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 +6476,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 +6498,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 +6577,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 +6613,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 +6686,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 +6753,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 +6850,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 +6884,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -6540,9 +6922,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 +6956,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -6594,9 +6972,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 } @@ -6623,9 +6999,7 @@ 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", @@ -6684,9 +7058,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 +7087,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 +7109,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 +7143,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 +7179,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 +7215,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 +7283,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 +7317,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 +7345,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 +7357,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 +7371,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 +7399,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 +7500,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 +7550,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 +7601,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 +7617,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 +7665,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 +7811,7 @@ impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -7818,9 +8135,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 +8157,70 @@ 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 `CreatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -8075,9 +8454,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 +8540,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 +8584,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 +8619,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", } } } @@ -8295,9 +8698,7 @@ impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -8372,24 +8773,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 +8795,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -8407,29 +8803,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 +8841,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 +8886,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 +8915,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 +8939,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 +8956,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 +8992,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 +9117,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 +9348,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 +9386,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 +9458,7 @@ impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -9138,9 +9493,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", } } @@ -9290,9 +9643,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 +9677,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 +9694,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 +9950,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 +9968,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 +9985,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,11 +10002,73 @@ 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::Business + Self::None } } @@ -9754,12 +10151,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 +10168,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 +10187,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 +10222,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,6 +10552,72 @@ impl std::default::Default for PaymentMethodOptionsAlipaySetupFutureUsage { } } +/// 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 PaymentMethodOptionsAmazonPaySetupFutureUsage { + None, + OffSession, +} + +impl PaymentMethodOptionsAmazonPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsAmazonPaySetupFutureUsage::None => "none", + PaymentMethodOptionsAmazonPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for PaymentMethodOptionsAmazonPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 PaymentMethodOptionsAmazonPaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `PaymentMethodOptionsBacsDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -10506,14 +10955,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 +10974,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 +10994,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", } } } @@ -11103,6 +11536,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")] @@ -11281,6 +11780,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 +11853,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 +12118,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 +12128,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 +12210,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -11724,6 +12226,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -11746,6 +12249,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 +12265,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::Klarna => "klarna", UpdatePaymentIntentPaymentMethodDataType::Konbini => "konbini", UpdatePaymentIntentPaymentMethodDataType::Link => "link", + UpdatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", UpdatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", UpdatePaymentIntentPaymentMethodDataType::P24 => "p24", UpdatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -11806,12 +12311,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 +12393,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 +12427,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 +12451,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 +12486,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 +12584,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -12119,9 +12600,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 +12632,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 +12650,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 +12672,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 +12751,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 +12787,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 +12860,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 +12927,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 +13024,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 +13058,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -12573,9 +13096,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 +13130,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -12627,9 +13146,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 } @@ -12656,9 +13173,7 @@ 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", @@ -12717,9 +13232,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 +13261,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 +13283,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 +13317,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 +13353,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 +13389,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 +13457,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 +13491,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 +13519,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 +13531,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 +13545,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 +13573,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 +13674,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 +13724,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 +13775,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 +13791,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 +13839,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 +13985,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -13851,9 +14309,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 +14331,70 @@ 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 `UpdatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -14108,9 +14628,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 +14714,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 +14758,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 +14793,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 +14872,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -14405,24 +14947,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 +14969,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -14440,29 +14977,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 +15015,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 +15060,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 +15089,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 +15113,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 +15130,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 +15166,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..e318c7b9e 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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, @@ -398,6 +413,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 +422,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 +445,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 +454,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 +464,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 +484,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 +510,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 +537,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 +603,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 +691,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 +735,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 +760,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 +813,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, @@ -834,6 +867,7 @@ impl<'a> UpdatePaymentLink<'a> { #[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 +885,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 +899,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 +921,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 +955,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 +975,7 @@ pub struct CreatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -948,6 +986,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 +1000,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, @@ -1014,18 +1054,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 +1078,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 +1086,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 +1117,14 @@ pub struct CreatePaymentLinkSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkTaxIdCollection { + /// Set to `true` to enable tax ID collection. 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 +1139,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 +1157,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 +1171,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 +1205,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 +1225,7 @@ pub struct UpdatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -1184,6 +1236,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 +1251,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. @@ -1233,12 +1287,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 +1304,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, @@ -1266,6 +1323,7 @@ pub struct UpdatePaymentLinkSubscriptionData { #[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 +1331,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 +1340,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 +1352,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 +1362,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 +1371,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 +1384,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 +1396,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 +1408,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 +1476,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 +1497,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 +1514,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 +1529,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 +1538,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 +1550,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 +1559,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 +1572,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 +1584,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 +1596,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 +1664,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 +1685,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 +1702,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 +1723,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 +1749,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 +1773,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 +1794,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 +1820,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 +1844,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 +1930,7 @@ impl CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { pub fn as_str(self) -> &'static str { match self { CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", - CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { - "hidden" - } + CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => "hidden", } } } @@ -1850,9 +1946,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 +2146,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 } @@ -3026,16 +3116,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 } @@ -4479,16 +4565,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 } @@ -5383,16 +5465,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..90751103e 100644 --- a/src/resources/generated/payment_method.rs +++ b/src/resources/generated/payment_method.rs @@ -2,15 +2,11 @@ // 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, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, PaymentMethodUsBankAccount, PaymentMethodWechatPay, PaymentMethodZip, RadarRadarOptions}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethod". /// @@ -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,9 @@ 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 oxxo: Option, @@ -157,12 +166,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 +186,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 +209,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 +229,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 +332,10 @@ 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 an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -1016,6 +414,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 +437,7 @@ impl<'a> CreatePaymentMethod<'a> { konbini: Default::default(), link: Default::default(), metadata: Default::default(), + mobilepay: Default::default(), oxxo: Default::default(), p24: Default::default(), payment_method: Default::default(), @@ -1060,6 +461,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 +514,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 +559,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 +572,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 +584,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 +611,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 +624,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 +656,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 +666,106 @@ 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 {} +pub struct CreatePaymentMethodLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodOxxo {} +pub struct CreatePaymentMethodMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +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 CreatePaymentMethodUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1340,16 +790,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 +815,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 +867,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 +877,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 +1160,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 +1324,7 @@ pub enum PaymentMethodType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2378,6 +1343,7 @@ pub enum PaymentMethodType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2400,6 +1366,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 +1385,7 @@ impl PaymentMethodType { PaymentMethodType::Klarna => "klarna", PaymentMethodType::Konbini => "konbini", PaymentMethodType::Link => "link", + PaymentMethodType::Mobilepay => "mobilepay", PaymentMethodType::Oxxo => "oxxo", PaymentMethodType::P24 => "p24", PaymentMethodType::Paynow => "paynow", @@ -2460,6 +1428,7 @@ pub enum PaymentMethodTypeFilter { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2476,6 +1445,7 @@ pub enum PaymentMethodTypeFilter { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2498,6 +1468,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 +1485,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Klarna => "klarna", PaymentMethodTypeFilter::Konbini => "konbini", PaymentMethodTypeFilter::Link => "link", + PaymentMethodTypeFilter::Mobilepay => "mobilepay", PaymentMethodTypeFilter::Oxxo => "oxxo", PaymentMethodTypeFilter::P24 => "p24", PaymentMethodTypeFilter::Paynow => "paynow", @@ -2548,186 +1520,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 +1588,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 +1596,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 +1611,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 +1644,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..def04a5cb --- /dev/null +++ b/src/resources/generated/payment_method_card.rs @@ -0,0 +1,264 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{Address}; +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, + + /// 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 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..d78e9f0a6 --- /dev/null +++ b/src/resources/generated/payment_method_card_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_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 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 `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..869c7f362 100644 --- a/src/resources/generated/payment_method_configuration.rs +++ b/src/resources/generated/payment_method_configuration.rs @@ -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,9 @@ 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, + /// The configuration's name. pub name: String, @@ -129,11 +135,17 @@ 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 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 +239,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 +386,13 @@ 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, + /// Configuration name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<&'a str>, @@ -430,6 +453,13 @@ 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, + /// 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 +473,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 +488,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 +511,7 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { klarna: Default::default(), konbini: Default::default(), link: Default::default(), + mobilepay: Default::default(), name: Default::default(), oxxo: Default::default(), p24: Default::default(), @@ -484,8 +522,10 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), + swish: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), + zip: Default::default(), } } } @@ -498,16 +538,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 +612,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 +759,13 @@ 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, + /// Configuration name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<&'a str>, @@ -746,6 +820,13 @@ 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, + /// 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 +840,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 +856,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 +879,7 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { klarna: Default::default(), konbini: Default::default(), link: Default::default(), + mobilepay: Default::default(), name: Default::default(), oxxo: Default::default(), p24: Default::default(), @@ -800,8 +889,10 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), + swish: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), + zip: Default::default(), } } } @@ -838,6 +929,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 +1097,14 @@ 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 CreatePaymentMethodConfigurationOxxo { @@ -1062,6 +1169,14 @@ 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 CreatePaymentMethodConfigurationUsBankAccount { @@ -1078,6 +1193,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 +1233,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 +1401,14 @@ 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 UpdatePaymentMethodConfigurationOxxo { @@ -1334,6 +1473,14 @@ 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 UpdatePaymentMethodConfigurationUsBankAccount { @@ -1350,6 +1497,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 +1537,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 +1705,14 @@ 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 CreatePaymentMethodConfigurationOxxoDisplayPreference { @@ -1606,6 +1777,14 @@ 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 CreatePaymentMethodConfigurationUsBankAccountDisplayPreference { @@ -1622,6 +1801,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 +1841,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 +2009,14 @@ 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 UpdatePaymentMethodConfigurationOxxoDisplayPreference { @@ -1878,6 +2081,14 @@ 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 UpdatePaymentMethodConfigurationUsBankAccountDisplayPreference { @@ -1894,6 +2105,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 +2257,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,6 +3013,42 @@ impl std::default::Default for CreatePaymentMethodConfigurationLinkDisplayPrefer } } +/// 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 CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 CreatePaymentMethodConfigurationMobilepayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// 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")] @@ -3046,6 +3337,42 @@ 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 `CreatePaymentMethodConfigurationUsBankAccountDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3118,6 +3445,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 +3695,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 +4451,42 @@ 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 `UpdatePaymentMethodConfigurationOxxoDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4340,6 +4775,42 @@ 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 `UpdatePaymentMethodConfigurationUsBankAccountDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4412,6 +4883,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_offline.rs b/src/resources/generated/payment_method_details_card_present_offline.rs new file mode 100644 index 000000000..3a893085e --- /dev/null +++ b/src/resources/generated/payment_method_details_card_present_offline.rs @@ -0,0 +1,14 @@ +// ====================================== +// 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, +} 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_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_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_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..88d9d5e7d 100644 --- a/src/resources/generated/payout.rs +++ b/src/resources/generated/payout.rs @@ -2,12 +2,11 @@ // 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 serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Payout". /// @@ -102,12 +101,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 +151,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 +227,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 +286,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 +307,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..d1a44fcd3 100644 --- a/src/resources/generated/person.rs +++ b/src/resources/generated/person.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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,13 @@ pub struct PersonVerificationDocument { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonAdditionalTosAcceptances { + pub account: PersonAdditionalTosAcceptance, } #[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 +231,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 +254,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 +274,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 +287,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 +318,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 +340,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 +433,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -514,6 +526,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", 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..bde315d27 100644 --- a/src/resources/generated/plan.rs +++ b/src/resources/generated/plan.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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 index 816bc53cb..fb759da70 100644 --- a/src/resources/generated/platform_tax_fee.rs +++ b/src/resources/generated/platform_tax_fee.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{PlatformTaxFeeId}; +use crate::params::{Object}; 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 { diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index 9e58d97f6..558a46fdf 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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,10 @@ 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. + #[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). pub trial_period_days: Option, @@ -251,6 +256,7 @@ pub struct Recurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -261,6 +267,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 +364,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 +404,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, @@ -473,12 +481,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 +551,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 +584,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 +605,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 +651,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 +670,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 +690,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 +720,7 @@ pub struct CreatePriceTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -712,12 +730,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 +750,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 +783,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 +804,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 +834,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 +855,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..aa981b075 100644 --- a/src/resources/generated/product.rs +++ b/src/resources/generated/product.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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. @@ -111,12 +107,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 +158,7 @@ impl Object for Product { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PackageDimensions { + /// Height, in inches. pub height: f64, @@ -174,8 +173,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 +185,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 +208,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 +218,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. @@ -281,9 +282,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 +301,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 +373,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 +397,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. @@ -457,8 +459,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 +475,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 +513,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 +532,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 +565,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -574,6 +581,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 +602,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..f993e5cf2 --- /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..f0e2ee6dd 100644 --- a/src/resources/generated/promotion_code.rs +++ b/src/resources/generated/promotion_code.rs @@ -2,14 +2,11 @@ // 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". /// @@ -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..80b571b7a 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -2,16 +2,11 @@ // 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". /// @@ -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/refund.rs b/src/resources/generated/refund.rs index f91a9b9a9..6cd8d2830 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -2,12 +2,11 @@ // 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". /// @@ -94,12 +93,14 @@ 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) - } +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 +144,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 +154,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, @@ -236,10 +241,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 +270,7 @@ pub struct RefundDestinationDetailsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetailsGeneric { + /// The reference assigned to the refund. pub reference: Option, @@ -274,6 +282,7 @@ pub struct RefundDestinationDetailsGeneric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { + /// Contains the refund details. pub display_details: Option, @@ -284,6 +293,7 @@ pub struct RefundNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextActionDisplayDetails { + pub email_sent: EmailSent, /// The expiry timestamp. @@ -292,6 +302,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 +313,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 +399,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 +453,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 +474,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/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..7a0de7e39 100644 --- a/src/resources/generated/review.rs +++ b/src/resources/generated/review.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..1d96d9a45 100644 --- a/src/resources/generated/scheduled_query_run.rs +++ b/src/resources/generated/scheduled_query_run.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..3b03ae87c 100644 --- a/src/resources/generated/setup_attempt.rs +++ b/src/resources/generated/setup_attempt.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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..2b8ba31e0 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -2,17 +2,11 @@ // 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". /// @@ -98,8 +92,7 @@ pub struct SetupIntent { 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 +118,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 +144,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 +162,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 +177,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 +200,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 +210,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 +225,19 @@ 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 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 +253,7 @@ pub struct SetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsAcssDebit { + /// Currency supported by the bank account. pub currency: Option, @@ -263,8 +265,13 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebit { pub verification_method: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentPaymentMethodOptionsAmazonPay { +} + #[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 +285,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 +338,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 +369,15 @@ 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 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 +386,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 +412,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 +432,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 +528,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 +551,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 +616,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. @@ -685,6 +709,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 +724,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 +748,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 +835,10 @@ 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 an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -865,14 +907,23 @@ 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, + /// 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 +943,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 +959,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 +976,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 +1063,10 @@ 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 an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -1067,14 +1135,23 @@ 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, + /// 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 +1171,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 +1193,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1126,16 +1205,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 +1232,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 +1245,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 +1269,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 +1297,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 +1307,109 @@ 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 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 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 +1431,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 +1453,16 @@ 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 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 +1485,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 +1495,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 +1509,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 +1519,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 +1527,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 +1542,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 +1559,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 {} +pub struct UpdateSetupIntentPaymentMethodDataAlipay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +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 +1586,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 +1599,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 +1623,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 +1651,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 +1661,109 @@ 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 { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataLink {} +pub struct UpdateSetupIntentPaymentMethodDataMobilepay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataOxxo {} +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 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 +1785,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 +1807,16 @@ 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 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 +1839,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 +1849,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 +1863,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 +1873,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 +1881,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 +1896,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 +1915,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 +1943,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 +1956,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 +1965,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 +1975,16 @@ 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 CreateSetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1851,16 +2036,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 +2056,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 +2084,22 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// 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 +2110,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 +2126,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 +2154,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 +2167,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 +2176,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 +2186,16 @@ 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 UpdateSetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -2064,16 +2247,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 +2267,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 +2295,22 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// 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 +2321,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 +2337,28 @@ 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 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 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 +2375,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 +2497,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 +2570,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 +2835,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 +2846,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 +2927,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2756,6 +2943,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2778,6 +2966,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 +2982,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::Klarna => "klarna", CreateSetupIntentPaymentMethodDataType::Konbini => "konbini", CreateSetupIntentPaymentMethodDataType::Link => "link", + CreateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", CreateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", CreateSetupIntentPaymentMethodDataType::P24 => "p24", CreateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -2839,9 +3029,7 @@ impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -2925,9 +3113,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 +3144,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 +3178,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 +3201,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 +3325,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 } @@ -3292,9 +3464,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 +3498,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 +3518,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 +3546,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 } @@ -3466,24 +3623,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 +3645,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -3501,6 +3653,7 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefe pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -3512,16 +3665,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 +3691,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 +3720,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 +3754,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 +3772,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 +3894,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 +3930,7 @@ impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -4029,9 +4158,7 @@ impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor { pub fn as_str(self) -> &'static str { match self { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice", - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => { - "subscription" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => "subscription", } } } @@ -4065,15 +4192,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 +4210,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 +4227,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 +4244,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 +4262,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 +4362,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 +4435,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 +4700,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 +4711,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 +4792,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Affirm, AfterpayClearpay, Alipay, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -4692,6 +4808,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -4714,6 +4831,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 +4847,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::Klarna => "klarna", UpdateSetupIntentPaymentMethodDataType::Konbini => "konbini", UpdateSetupIntentPaymentMethodDataType::Link => "link", + UpdateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", UpdateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", UpdateSetupIntentPaymentMethodDataType::P24 => "p24", UpdateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -4775,9 +4894,7 @@ impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -4861,9 +4978,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 +5009,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 +5043,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 +5066,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 +5190,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 } @@ -5228,9 +5329,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 +5363,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 +5383,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 +5411,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 } @@ -5402,24 +5488,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 +5510,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Ownership, Transactions, } @@ -5437,6 +5518,7 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefe pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Ownership => "ownership", UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } @@ -5448,16 +5530,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 +5556,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 +5585,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 +5619,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 +5637,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..91580e387 100644 --- a/src/resources/generated/shipping_rate.rs +++ b/src/resources/generated/shipping_rate.rs @@ -2,14 +2,11 @@ // 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". /// @@ -68,10 +65,12 @@ pub struct ShippingRate { } 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 +79,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 +102,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 +116,7 @@ pub struct ShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimateBound { + /// A unit of time. pub unit: ShippingRateDeliveryEstimateBoundUnit, @@ -133,6 +126,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 +144,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 +157,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. @@ -229,6 +225,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 +281,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 +332,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 +348,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 +366,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 +376,7 @@ pub struct UpdateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMaximumUnit, @@ -385,6 +386,7 @@ pub struct CreateShippingRateDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMinimumUnit, @@ -394,6 +396,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 +409,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..95f700e21 100644 --- a/src/resources/generated/source.rs +++ b/src/resources/generated/source.rs @@ -2,15 +2,11 @@ // 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". /// @@ -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..cd153e746 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -2,22 +2,11 @@ // 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, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Subscription". /// @@ -125,8 +114,16 @@ 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, @@ -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,11 +232,7 @@ 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 }) } @@ -251,11 +252,7 @@ impl Subscription { /// 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 +282,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 +295,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 +308,7 @@ pub struct SubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -323,6 +323,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 +342,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 +354,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, @@ -363,12 +366,12 @@ pub struct SubscriptionsResourcePaymentSettings { /// Either `off`, or `on_subscription`. /// /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. - pub save_default_payment_method: - Option, + 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 +387,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 +409,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 +431,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. @@ -448,6 +457,7 @@ pub struct SubscriptionsResourcePendingUpdate { /// 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. @@ -516,6 +526,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 +574,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], @@ -592,19 +610,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 +635,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 ID of a 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 +703,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 +727,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 +738,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 +823,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. @@ -866,6 +888,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 +928,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], @@ -933,6 +963,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, @@ -967,7 +1000,7 @@ pub struct UpdateSubscription<'a> { #[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 +1059,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,6 +1083,11 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, @@ -1072,6 +1111,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 +1125,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 +1156,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 +1190,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 +1235,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, @@ -1187,12 +1251,12 @@ pub struct CreateSubscriptionPaymentSettings { /// /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. #[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 +1272,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 +1286,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 +1314,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 +1324,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 +1358,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 +1375,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, @@ -1328,6 +1419,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 +1432,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, @@ -1355,12 +1448,12 @@ pub struct UpdateSubscriptionPaymentSettings { /// /// With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. #[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 +1469,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 +1483,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 +1518,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 +1530,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 +1568,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 +1585,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 +1622,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 +1655,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 +1667,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 +1677,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 +1710,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 +1727,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 +1769,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 +1789,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 +1826,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 +1861,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 +1881,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 +1920,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")] @@ -1799,15 +1959,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 +1977,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")] @@ -1856,8 +2015,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,8 +2024,8 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceB } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer -{ +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -2028,8 +2187,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 +2201,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 +2237,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 +2275,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 +2309,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 } @@ -2213,24 +2347,14 @@ 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::Interac => "interac", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Jcb => "jcb", - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => { - "mastercard" - } - CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => { - "unionpay" - } + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unknown => "unknown", CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Visa => "visa", } @@ -2279,16 +2403,12 @@ 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 } @@ -2297,8 +2417,7 @@ impl std::default::Default /// 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 +2455,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 +2507,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 +2531,7 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -2437,6 +2550,7 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, @@ -2447,20 +2561,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", @@ -2472,9 +2583,8 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { 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::UsBankAccount => "us_bank_account", @@ -2512,9 +2622,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 +2657,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", } } @@ -3053,6 +3159,7 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -3071,6 +3178,7 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, @@ -3081,20 +3189,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", @@ -3106,14 +3211,11 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { 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::UsBankAccount => "us_bank_account", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::WechatPay => "wechat_pay", } } @@ -3148,9 +3250,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 +3427,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 +3441,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 +3477,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 +3515,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 +3549,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 } @@ -3512,24 +3587,14 @@ 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::Interac => "interac", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Jcb => "jcb", - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => { - "mastercard" - } - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => { - "unionpay" - } + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Unknown => "unknown", UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork::Visa => "visa", } @@ -3578,16 +3643,12 @@ 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 } @@ -3596,8 +3657,7 @@ impl std::default::Default /// 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 +3695,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 +3747,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 +3771,7 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { AchCreditTransfer, AchDebit, AcssDebit, + AmazonPay, AuBecsDebit, BacsDebit, Bancontact, @@ -3736,6 +3790,7 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { Paynow, Paypal, Promptpay, + RevolutPay, SepaCreditTransfer, SepaDebit, Sofort, @@ -3746,20 +3801,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", @@ -3771,9 +3823,8 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { 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::UsBankAccount => "us_bank_account", @@ -3811,9 +3862,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 +3897,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..7a37b30a1 100644 --- a/src/resources/generated/subscription_item.rs +++ b/src/resources/generated/subscription_item.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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], @@ -314,7 +316,7 @@ pub struct UpdateSubscriptionItem<'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")] @@ -342,6 +344,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 +360,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 +409,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..d3dc08079 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -2,17 +2,11 @@ // 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". /// @@ -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,6 +925,11 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, @@ -907,6 +953,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 +965,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 +1032,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 +1046,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 +1060,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 +1074,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 +1088,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 +1110,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 +1122,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 +1189,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 +1201,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 +1231,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 +1287,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 +1317,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 +1329,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 +1341,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 +1353,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 +1409,7 @@ pub struct UpdateSubscriptionSchedulePhasesItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1271,6 +1425,7 @@ pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1544,9 +1699,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 +1734,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 +1769,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..49de47ee0 100644 --- a/src/resources/generated/tax_calculation.rs +++ b/src/resources/generated/tax_calculation.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..32923a706 100644 --- a/src/resources/generated/tax_code.rs +++ b/src/resources/generated/tax_code.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..164e48012 100644 --- a/src/resources/generated/tax_id.rs +++ b/src/resources/generated/tax_id.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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_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`, `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_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`, `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, @@ -399,13 +411,17 @@ pub enum TaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -438,6 +454,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", @@ -471,13 +488,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 +551,7 @@ pub enum TaxIdTypeFilter { AuAbn, AuArn, BgUic, + BhVat, BoTin, BrCnpj, BrCpf, @@ -563,13 +585,17 @@ pub enum TaxIdTypeFilter { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -601,6 +627,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", @@ -634,13 +661,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..abccace18 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`, 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, @@ -133,13 +114,17 @@ pub enum TaxProductResourceCustomerDetailsResourceTaxIdType { JpTrn, KePin, KrBrn, + KzBin, LiUid, MxRfc, MyFrp, MyItn, MySst, + NgTin, NoVat, + NoVoec, NzGst, + OmVat, PeRuc, PhTin, RoTin, @@ -172,6 +157,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", @@ -205,13 +191,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 +256,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..39058b8da 100644 --- a/src/resources/generated/tax_rate.rs +++ b/src/resources/generated/tax_rate.rs @@ -2,11 +2,10 @@ // 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". /// @@ -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..906fdc530 100644 --- a/src/resources/generated/tax_registration.rs +++ b/src/resources/generated/tax_registration.rs @@ -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_transaction.rs b/src/resources/generated/tax_transaction.rs index 790efe1d7..9042512c2 100644 --- a/src/resources/generated/tax_transaction.rs +++ b/src/resources/generated/tax_transaction.rs @@ -4,7 +4,7 @@ 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". @@ -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. @@ -47,6 +48,9 @@ pub struct TaxTransaction { /// 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..829fab53d 100644 --- a/src/resources/generated/terminal_configuration.rs +++ b/src/resources/generated/terminal_configuration.rs @@ -2,12 +2,11 @@ // 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". /// @@ -32,6 +31,10 @@ 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, @@ -43,19 +46,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 +72,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,6 +80,7 @@ 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. @@ -88,6 +89,7 @@ pub struct TerminalConfigurationConfigurationResourceOfflineConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceTipping { + #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -133,6 +135,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 +152,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,6 +161,10 @@ 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, @@ -175,6 +183,7 @@ impl<'a> CreateTerminalConfiguration<'a> { CreateTerminalConfiguration { bbpos_wisepos_e: Default::default(), expand: Default::default(), + name: Default::default(), offline: Default::default(), tipping: Default::default(), verifone_p400: Default::default(), @@ -185,6 +194,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 +238,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,6 +250,7 @@ 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. @@ -248,6 +259,7 @@ pub struct CreateTerminalConfigurationOffline { #[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 +319,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 +327,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 +343,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 +359,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 +375,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 +391,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 +407,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 +423,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 +439,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 +455,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 +471,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 +487,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 +503,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 +519,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 +535,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..3603e16d5 100644 --- a/src/resources/generated/terminal_connection_token.rs +++ b/src/resources/generated/terminal_connection_token.rs @@ -2,16 +2,16 @@ // 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 #[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. @@ -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], @@ -62,6 +61,9 @@ pub struct CreateTerminalConnectionToken<'a> { 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..66313af3a 100644 --- a/src/resources/generated/terminal_location.rs +++ b/src/resources/generated/terminal_location.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..f794081af 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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`, `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, @@ -65,13 +64,12 @@ pub struct TerminalReader { } 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 +90,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 +119,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 +129,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 +144,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 +159,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 +203,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 +214,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 +235,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 +257,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 +272,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 +283,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 +325,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 +384,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,6 +393,7 @@ pub enum TerminalReaderDeviceType { BbposChipper2x, BbposWisepad3, BbposWiseposE, + MobilePhoneReader, SimulatedWiseposE, StripeM2, #[serde(rename = "verifone_P400")] @@ -377,6 +406,7 @@ 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::VerifoneP400 => "verifone_P400", @@ -450,12 +480,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 +519,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..975d8b7e5 100644 --- a/src/resources/generated/token.rs +++ b/src/resources/generated/token.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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](https://docs.stripe.com/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,12 +146,14 @@ 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. #[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..a5f777e5e 100644 --- a/src/resources/generated/topup.rs +++ b/src/resources/generated/topup.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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..3a4ee3004 100644 --- a/src/resources/generated/transfer.rs +++ b/src/resources/generated/transfer.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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,6 +125,7 @@ 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, @@ -198,6 +196,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 +250,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..c26608e8c 100644 --- a/src/resources/generated/transfer_reversal.rs +++ b/src/resources/generated/transfer_reversal.rs @@ -2,11 +2,10 @@ // 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". /// diff --git a/src/resources/generated/treasury_financial_account.rs b/src/resources/generated/treasury_financial_account.rs index 7e986bfc6..42d825472 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. 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..24b203a7b 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,10 @@ pub struct TreasuryOutboundPayment { pub status_transitions: TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions, + /// Details about network-specific tracking information if available. + #[serde(skip_serializing_if = "Option::is_none")] + pub tracking_details: Option, + /// The Transaction associated with this object. pub transaction: Expandable, } @@ -144,7 +148,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 +193,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 +224,16 @@ pub struct TreasuryOutboundPaymentsResourceReturnedStatus { pub transaction: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentsResourceUsDomesticWireTrackingDetails { + + /// IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + pub imad: String, + + /// 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 +442,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..8f9be337c 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,10 @@ pub struct TreasuryOutboundTransfer { pub status_transitions: TreasuryOutboundTransfersResourceStatusTransitions, + /// Details about network-specific tracking information if available. + #[serde(skip_serializing_if = "Option::is_none")] + pub tracking_details: Option, + /// The Transaction associated with this object. pub transaction: Expandable, } @@ -122,13 +126,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 +186,16 @@ pub struct TreasuryOutboundTransfersResourceStatusTransitions { pub returned_at: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransfersResourceUsDomesticWireTrackingDetails { + + /// IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + pub imad: String, + + /// 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 +370,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..ebce5a802 100644 --- a/src/resources/generated/usage_record.rs +++ b/src/resources/generated/usage_record.rs @@ -2,10 +2,9 @@ // 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". /// 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..b8bc10e08 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_04_10; \ No newline at end of file diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index dc8f5261e..06e9ed73e 100644 --- a/src/resources/generated/webhook_endpoint.rs +++ b/src/resources/generated/webhook_endpoint.rs @@ -2,12 +2,11 @@ // 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". /// @@ -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, @@ -411,6 +403,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 +417,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")] @@ -707,6 +703,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 +717,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 +743,8 @@ 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::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 +761,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 +790,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,46 +799,22 @@ 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", @@ -883,9 +847,7 @@ impl EventFilter { 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 +858,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 +922,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 +936,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",