From 2e6e57488a7b82ed877b9ba85bd192eb7fff9299 Mon Sep 17 00:00:00 2001 From: arlyon Date: Fri, 25 Aug 2023 00:21:05 +0000 Subject: [PATCH] Generate latest changes from OpenApi spec --- openapi/version.json | 2 +- src/resources/generated/account.rs | 213 ++- src/resources/generated/account_link.rs | 12 +- src/resources/generated/address.rs | 1 + src/resources/generated/api_errors.rs | 88 +- src/resources/generated/application.rs | 5 +- src/resources/generated/application_fee.rs | 30 +- src/resources/generated/balance.rs | 9 +- .../generated/balance_transaction.rs | 40 +- src/resources/generated/bank_account.rs | 15 +- src/resources/generated/billing_details.rs | 4 +- .../generated/billing_portal_configuration.rs | 18 +- .../generated/billing_portal_session.rs | 160 +- src/resources/generated/capability.rs | 8 + src/resources/generated/card.rs | 7 +- src/resources/generated/cash_balance.rs | 5 +- src/resources/generated/charge.rs | 359 +++-- src/resources/generated/checkout_session.rs | 633 ++++---- .../generated/connect_collection_transfer.rs | 5 +- src/resources/generated/coupon.rs | 32 +- src/resources/generated/credit_note.rs | 34 +- .../generated/credit_note_line_item.rs | 7 +- src/resources/generated/custom_unit_amount.rs | 1 + src/resources/generated/customer.rs | 64 +- .../generated/customer_balance_transaction.rs | 5 +- .../customer_cash_balance_transaction.rs | 19 +- src/resources/generated/discount.rs | 5 +- src/resources/generated/dispute.rs | 81 +- src/resources/generated/ephemeral_key.rs | 5 +- src/resources/generated/event.rs | 20 +- src/resources/generated/fee_refund.rs | 5 +- src/resources/generated/file.rs | 21 +- src/resources/generated/file_link.rs | 25 +- .../financial_connections_session.rs | 76 + src/resources/generated/invoice.rs | 278 ++-- ...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 +- ..._payment_method_options_us_bank_account.rs | 48 +- .../invoice_setting_rendering_options.rs | 1 + src/resources/generated/invoiceitem.rs | 37 +- .../generated/invoices_shipping_cost.rs | 7 +- .../generated/issuing_authorization.rs | 16 +- src/resources/generated/issuing_card.rs | 25 +- src/resources/generated/issuing_cardholder.rs | 32 +- src/resources/generated/issuing_dispute.rs | 26 +- .../generated/issuing_transaction.rs | 18 +- src/resources/generated/item.rs | 9 +- src/resources/generated/line_item.rs | 13 +- .../linked_account_options_us_bank_account.rs | 36 + src/resources/generated/login_link.rs | 4 +- src/resources/generated/mandate.rs | 83 +- ...andate_options_off_session_details_blik.rs | 61 - src/resources/generated/payment_intent.rs | 1324 ++++++++--------- ...happ_handle_redirect_or_display_qr_code.rs | 5 +- src/resources/generated/payment_link.rs | 125 +- src/resources/generated/payment_method.rs | 358 ++--- .../payment_method_card_present_networks.rs | 1 + .../payment_method_details_card_checks.rs | 1 + ...nt_method_details_card_wallet_apple_pay.rs | 3 +- ...t_method_details_card_wallet_google_pay.rs | 3 +- ...ptions_customer_balance_eu_bank_account.rs | 1 + src/resources/generated/payout.rs | 34 +- src/resources/generated/person.rs | 21 +- src/resources/generated/placeholders.rs | 411 ++--- src/resources/generated/plan.rs | 27 +- src/resources/generated/platform_tax_fee.rs | 5 +- src/resources/generated/price.rs | 54 +- src/resources/generated/product.rs | 89 +- src/resources/generated/promotion_code.rs | 38 +- src/resources/generated/quote.rs | 31 +- .../quotes_resource_total_details.rs | 7 +- .../generated/radar_radar_options.rs | 1 + src/resources/generated/refund.rs | 27 +- .../generated/reserve_transaction.rs | 7 +- src/resources/generated/review.rs | 21 +- .../generated/scheduled_query_run.rs | 8 +- src/resources/generated/setup_attempt.rs | 245 ++- src/resources/generated/setup_intent.rs | 769 +++++----- src/resources/generated/shipping.rs | 4 +- src/resources/generated/shipping_rate.rs | 46 +- src/resources/generated/source.rs | 63 +- src/resources/generated/subscription.rs | 512 +++---- .../subscription_billing_thresholds.rs | 1 + src/resources/generated/subscription_item.rs | 46 +- .../subscription_item_billing_thresholds.rs | 1 + .../generated/subscription_schedule.rs | 86 +- src/resources/generated/tax_calculation.rs | 87 +- .../generated/tax_calculation_line_item.rs | 60 +- src/resources/generated/tax_code.rs | 19 +- .../generated/tax_deducted_at_source.rs | 5 +- src/resources/generated/tax_id.rs | 8 +- .../tax_product_resource_customer_details.rs | 7 +- src/resources/generated/tax_rate.rs | 23 +- .../generated/terminal_configuration.rs | 10 +- .../generated/terminal_connection_token.rs | 4 +- src/resources/generated/terminal_location.rs | 7 +- src/resources/generated/terminal_reader.rs | 33 +- .../generated/test_helpers_test_clock.rs | 5 +- .../generated/three_d_secure_details.rs | 183 --- src/resources/generated/token.rs | 22 +- src/resources/generated/topup.rs | 20 +- src/resources/generated/transfer.rs | 25 +- src/resources/generated/transfer_reversal.rs | 5 +- 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 | 136 +- 109 files changed, 3941 insertions(+), 3846 deletions(-) delete mode 100644 src/resources/generated/mandate_options_off_session_details_blik.rs delete mode 100644 src/resources/generated/three_d_secure_details.rs diff --git a/openapi/version.json b/openapi/version.json index ee831c6c5..aa1a21c90 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v446" + "version": "v484" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index ccc741b1e..5d0714e70 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, - 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, VerificationDocumentParams}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Account". /// @@ -114,12 +108,14 @@ pub struct Account { } 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", ¶ms) - } +pub fn list(client: &Client, params: &ListAccounts<'_>) -> Response> { + client.get_query("/accounts", ¶ms) +} + /// 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,7 +138,7 @@ impl Account { /// 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) for a Standard or Express account, some parameters can no longer be changed. - /// These are marked as **Custom Only** or **Custom and Express** below. To update your own account, use the [Dashboard](https://dashboard.stripe.com/account). + /// These are marked as **Custom Only** or **Custom and Express** below. 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 { client.post_form(&format!("/accounts/{}", id), ¶ms) @@ -153,7 +149,7 @@ impl Account { /// Accounts created using test-mode keys can be deleted at any time. /// /// 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/account) instead. + /// 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. pub fn delete(client: &Client, id: &AccountId) -> Response> { client.delete(&format!("/accounts/{}", id)) } @@ -171,6 +167,7 @@ impl Object for Account { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BusinessProfile { + /// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). /// /// MCCs are used to classify businesses based on the goods or services they provide. @@ -206,6 +203,7 @@ pub struct BusinessProfile { #[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, @@ -353,6 +351,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>, @@ -392,6 +391,7 @@ pub struct AccountFutureRequirements { #[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). pub amount: i64, @@ -403,6 +403,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>, @@ -443,6 +444,7 @@ pub struct AccountRequirements { #[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, @@ -452,6 +454,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -464,6 +467,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, @@ -490,6 +494,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 will appear on the mandate, and as the statement descriptor. @@ -499,6 +504,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. @@ -518,12 +524,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, @@ -548,6 +556,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. @@ -561,6 +570,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. @@ -574,6 +584,7 @@ pub struct DeclineChargeOn { #[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. @@ -600,6 +611,7 @@ 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. @@ -616,6 +628,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, @@ -623,6 +636,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, @@ -642,12 +656,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, @@ -661,6 +677,7 @@ pub struct AccountTermsOfService { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountUnificationAccountController { + /// `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. @@ -676,6 +693,7 @@ pub struct AccountUnificationAccountController { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CardIssuingAccountTermsOfService { + /// The Unix timestamp marking when the account representative accepted the service agreement. pub date: Option, @@ -689,6 +707,7 @@ pub struct CardIssuingAccountTermsOfService { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Company { + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -772,11 +791,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>, @@ -794,6 +815,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, @@ -806,6 +828,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, @@ -831,6 +854,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>, @@ -950,6 +974,7 @@ impl<'a> CreateAccount<'a> { /// The parameters for `Account::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListAccounts<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -992,12 +1017,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>, @@ -1099,6 +1124,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, @@ -1118,6 +1144,7 @@ pub struct AcceptTos { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParams { + /// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. #[serde(skip_serializing_if = "Option::is_none")] pub branding: Option, @@ -1145,6 +1172,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
, @@ -1237,6 +1265,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, @@ -1384,12 +1413,12 @@ pub struct CreateAccountCapabilities { #[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")] @@ -1397,8 +1426,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")] @@ -1406,8 +1434,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")] @@ -1420,6 +1447,7 @@ 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
, @@ -1460,7 +1488,7 @@ pub struct PersonParams { #[serde(skip_serializing_if = "Option::is_none")] pub gender: Option, - /// The government-issued ID number of the individual, as appropriate for the representative’s country. + /// 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_sources/create_token?type=pii). @@ -1523,6 +1551,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, @@ -1670,12 +1699,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")] @@ -1683,8 +1712,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")] @@ -1692,8 +1720,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")] @@ -1706,6 +1733,7 @@ pub struct UpdateAccountDocuments { #[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). #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, @@ -1713,6 +1741,7 @@ pub struct AccountSettingsParamsCardIssuing { #[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, @@ -1720,6 +1749,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. @@ -1743,6 +1773,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, @@ -1771,6 +1802,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, @@ -1786,6 +1818,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, @@ -1793,6 +1826,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. @@ -1803,6 +1837,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. @@ -1813,6 +1848,7 @@ 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. @@ -1823,6 +1859,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. @@ -1833,6 +1870,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. @@ -1843,6 +1881,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. @@ -1853,6 +1892,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. @@ -1863,6 +1903,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. @@ -1873,6 +1914,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. @@ -1883,6 +1925,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. @@ -1893,6 +1936,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. @@ -1903,6 +1947,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. @@ -1913,6 +1958,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. @@ -1923,6 +1969,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. @@ -1933,6 +1980,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. @@ -1943,6 +1991,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. @@ -1953,6 +2002,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. @@ -1963,6 +2013,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. @@ -1973,6 +2024,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. @@ -1983,6 +2035,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. @@ -1993,6 +2046,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. @@ -2003,6 +2057,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. @@ -2013,6 +2068,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. @@ -2023,6 +2079,7 @@ pub struct CreateAccountCapabilitiesLegacyPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesLinkPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2033,6 +2090,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. @@ -2043,6 +2101,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. @@ -2053,6 +2112,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. @@ -2063,6 +2123,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. @@ -2073,6 +2134,7 @@ pub struct CreateAccountCapabilitiesPromptpayPayments { #[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. @@ -2083,6 +2145,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. @@ -2093,6 +2156,7 @@ pub struct CreateAccountCapabilitiesSofortPayments { #[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. @@ -2103,6 +2167,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. @@ -2113,6 +2178,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. @@ -2123,6 +2189,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. @@ -2133,6 +2200,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. @@ -2143,6 +2211,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. @@ -2153,6 +2222,7 @@ pub struct CreateAccountCapabilitiesZipPayments { #[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>, @@ -2160,6 +2230,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>, @@ -2167,6 +2238,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>, @@ -2174,6 +2246,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>, @@ -2181,6 +2254,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>, @@ -2188,6 +2262,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>, @@ -2195,6 +2270,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>, @@ -2202,6 +2278,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. @@ -2219,6 +2296,7 @@ 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). @@ -2240,6 +2318,7 @@ pub struct PayoutSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -2252,6 +2331,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, @@ -2279,6 +2359,7 @@ pub struct PersonParamsRegisteredAddress { #[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. @@ -2289,6 +2370,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. @@ -2299,6 +2381,7 @@ 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. @@ -2309,6 +2392,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. @@ -2319,6 +2403,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. @@ -2329,6 +2414,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. @@ -2339,6 +2425,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. @@ -2349,6 +2436,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. @@ -2359,6 +2447,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. @@ -2369,6 +2458,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. @@ -2379,6 +2469,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. @@ -2389,6 +2480,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. @@ -2399,6 +2491,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. @@ -2409,6 +2502,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. @@ -2419,6 +2513,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. @@ -2429,6 +2524,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. @@ -2439,6 +2535,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. @@ -2449,6 +2546,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. @@ -2459,6 +2557,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. @@ -2469,6 +2568,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. @@ -2479,6 +2579,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. @@ -2489,6 +2590,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. @@ -2499,6 +2601,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. @@ -2509,6 +2612,7 @@ 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. @@ -2519,6 +2623,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. @@ -2529,6 +2634,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. @@ -2539,6 +2645,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. @@ -2549,6 +2656,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. @@ -2559,6 +2667,7 @@ pub struct UpdateAccountCapabilitiesPromptpayPayments { #[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. @@ -2569,6 +2678,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. @@ -2579,6 +2689,7 @@ pub struct UpdateAccountCapabilitiesSofortPayments { #[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. @@ -2589,6 +2700,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. @@ -2599,6 +2711,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. @@ -2609,6 +2722,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. @@ -2619,6 +2733,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. @@ -2629,6 +2744,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. @@ -2639,6 +2755,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>, @@ -2646,6 +2763,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>, @@ -2653,6 +2771,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>, @@ -2660,6 +2779,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>, @@ -2667,6 +2787,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>, @@ -2674,6 +2795,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>, @@ -2681,6 +2803,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>, @@ -2688,6 +2811,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, @@ -2703,6 +2827,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, @@ -2718,6 +2843,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. @@ -2733,6 +2859,7 @@ 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. @@ -3820,10 +3947,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -3849,6 +3978,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -3860,6 +3990,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -3874,10 +4005,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -3903,6 +4036,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -3914,6 +4048,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", @@ -4053,6 +4188,7 @@ pub enum CompanyParamsStructure { GovernmentInstrumentality, GovernmentalUnit, IncorporatedNonProfit, + IncorporatedPartnership, LimitedLiabilityPartnership, Llc, MultiMemberLlc, @@ -4068,6 +4204,7 @@ pub enum CompanyParamsStructure { TaxExemptGovernmentInstrumentality, UnincorporatedAssociation, UnincorporatedNonProfit, + UnincorporatedPartnership, } impl CompanyParamsStructure { @@ -4078,6 +4215,7 @@ impl CompanyParamsStructure { CompanyParamsStructure::GovernmentInstrumentality => "government_instrumentality", CompanyParamsStructure::GovernmentalUnit => "governmental_unit", CompanyParamsStructure::IncorporatedNonProfit => "incorporated_non_profit", + CompanyParamsStructure::IncorporatedPartnership => "incorporated_partnership", CompanyParamsStructure::LimitedLiabilityPartnership => "limited_liability_partnership", CompanyParamsStructure::Llc => "llc", CompanyParamsStructure::MultiMemberLlc => "multi_member_llc", @@ -4090,11 +4228,10 @@ 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", } } } @@ -4125,6 +4262,7 @@ pub enum CompanyStructure { GovernmentInstrumentality, GovernmentalUnit, IncorporatedNonProfit, + IncorporatedPartnership, LimitedLiabilityPartnership, Llc, MultiMemberLlc, @@ -4140,6 +4278,7 @@ pub enum CompanyStructure { TaxExemptGovernmentInstrumentality, UnincorporatedAssociation, UnincorporatedNonProfit, + UnincorporatedPartnership, } impl CompanyStructure { @@ -4150,6 +4289,7 @@ impl CompanyStructure { CompanyStructure::GovernmentInstrumentality => "government_instrumentality", CompanyStructure::GovernmentalUnit => "governmental_unit", CompanyStructure::IncorporatedNonProfit => "incorporated_non_profit", + CompanyStructure::IncorporatedPartnership => "incorporated_partnership", CompanyStructure::LimitedLiabilityPartnership => "limited_liability_partnership", CompanyStructure::Llc => "llc", CompanyStructure::MultiMemberLlc => "multi_member_llc", @@ -4162,11 +4302,10 @@ 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", } } } diff --git a/src/resources/generated/account_link.rs b/src/resources/generated/account_link.rs index ac1cc1f69..1537a1f7b 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 { client.post_form("/account_links", ¶ms) @@ -43,6 +44,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, @@ -128,8 +130,6 @@ impl std::default::Default for AccountLinkCollect { pub enum AccountLinkType { AccountOnboarding, AccountUpdate, - CustomAccountUpdate, - CustomAccountVerification, } impl AccountLinkType { @@ -137,8 +137,6 @@ impl AccountLinkType { match self { AccountLinkType::AccountOnboarding => "account_onboarding", AccountLinkType::AccountUpdate => "account_update", - AccountLinkType::CustomAccountUpdate => "custom_account_update", - AccountLinkType::CustomAccountVerification => "custom_account_verification", } } } 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 6ab81205d..7dc416ae9 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, @@ -233,9 +233,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", @@ -256,9 +254,7 @@ impl ApiErrorsCode { ApiErrorsCode::BankAccountVerificationFailed => "bank_account_verification_failed", ApiErrorsCode::BillingInvalidMandate => "billing_invalid_mandate", ApiErrorsCode::BitcoinUpgradeRequired => "bitcoin_upgrade_required", - ApiErrorsCode::CaptureChargeAuthorizationExpired => { - "capture_charge_authorization_expired" - } + ApiErrorsCode::CaptureChargeAuthorizationExpired => "capture_charge_authorization_expired", ApiErrorsCode::CaptureUnauthorizedPayment => "capture_unauthorized_payment", ApiErrorsCode::CardDeclineRateLimitExceeded => "card_decline_rate_limit_exceeded", ApiErrorsCode::CardDeclined => "card_declined", @@ -305,9 +301,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", @@ -324,56 +318,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", @@ -388,9 +354,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", @@ -401,9 +365,7 @@ 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", @@ -414,9 +376,7 @@ impl ApiErrorsCode { ApiErrorsCode::StatusTransitionInvalid => "status_transition_invalid", 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::TerminalReaderOffline => "terminal_reader_offline", ApiErrorsCode::TerminalReaderTimeout => "terminal_reader_timeout", @@ -424,9 +384,7 @@ impl ApiErrorsCode { ApiErrorsCode::TlsVersionUnsupported => "tls_version_unsupported", ApiErrorsCode::TokenAlreadyUsed => "token_already_used", 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 507ba112d..04193ede1 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", ¶ms) - } +pub fn list(client: &Client, params: &ListApplicationFees<'_>) -> Response> { + client.get_query("/application_fees", ¶ms) +} + /// 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,6 +90,7 @@ 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, @@ -145,6 +138,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/balance.rs b/src/resources/generated/balance.rs index 8dae5e112..bfea95781 100644 --- a/src/resources/generated/balance.rs +++ b/src/resources/generated/balance.rs @@ -2,16 +2,16 @@ // This file was automatically generated. // ====================================== +use crate::params::{Object}; +use crate::resources::{Currency}; use serde::{Deserialize, Serialize}; -use crate::params::Object; -use crate::resources::Currency; - /// The resource representing a Stripe "Balance". /// /// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Balance { + /// Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). /// /// The available balance for each currency and payment type can be found in the `source_types` property. @@ -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 BalanceAmountBySourceType { + /// Amount for bank account. #[serde(skip_serializing_if = "Option::is_none")] pub bank_account: Option, @@ -78,6 +80,7 @@ pub struct BalanceAmountBySourceType { #[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_transaction.rs b/src/resources/generated/balance_transaction.rs index fecd59264..259e7c369 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". /// @@ -69,7 +66,7 @@ pub struct BalanceTransaction { /// Either `available` or `pending`. pub status: BalanceTransactionStatus, - /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. /// /// [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. /// If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. @@ -78,24 +75,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", ¶ms) - } +pub fn list(client: &Client, params: &ListBalanceTransactions<'_>) -> Response> { + client.get_query("/balance_transactions", ¶ms) +} + /// 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 }) } } @@ -112,6 +104,7 @@ impl Object for BalanceTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Fee { + /// Amount of the fee, in cents. pub amount: i64, @@ -136,9 +129,6 @@ pub struct Fee { /// The parameters for `BalanceTransaction::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListBalanceTransactions<'a> { - /// This parameter is deprecated and we recommend listing by created and filtering in memory instead. - #[serde(skip_serializing_if = "Option::is_none")] - pub available_on: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -184,7 +174,7 @@ pub struct ListBalanceTransactions<'a> { /// Only returns transactions of the given type. /// - /// One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + /// One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<&'a str>, @@ -193,7 +183,6 @@ pub struct ListBalanceTransactions<'a> { impl<'a> ListBalanceTransactions<'a> { pub fn new() -> Self { ListBalanceTransactions { - available_on: Default::default(), created: Default::default(), currency: Default::default(), ending_before: Default::default(), @@ -209,9 +198,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")] @@ -232,6 +220,7 @@ pub enum BalanceTransactionType { Payment, PaymentFailureRefund, PaymentRefund, + PaymentReversal, Payout, PayoutCancel, PayoutFailure, @@ -269,6 +258,7 @@ impl BalanceTransactionType { BalanceTransactionType::Payment => "payment", BalanceTransactionType::PaymentFailureRefund => "payment_failure_refund", BalanceTransactionType::PaymentRefund => "payment_refund", + BalanceTransactionType::PaymentReversal => "payment_reversal", BalanceTransactionType::Payout => "payout", BalanceTransactionType::PayoutCancel => "payout_cancel", BalanceTransactionType::PayoutFailure => "payout_failure", diff --git a/src/resources/generated/bank_account.rs b/src/resources/generated/bank_account.rs index 3f78d92ae..6809928f5 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)] @@ -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. @@ -142,6 +142,7 @@ pub struct ExternalAccountRequirements { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -163,10 +164,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -192,6 +195,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -203,6 +207,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -217,10 +222,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -246,6 +253,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -257,6 +265,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", 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_portal_configuration.rs b/src/resources/generated/billing_portal_configuration.rs index dfd40724e..5eff508bf 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, @@ -94,6 +95,7 @@ pub struct PortalFeatures { #[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 +107,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 +128,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 +152,7 @@ pub struct PortalSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionCancellationReason { + /// Whether the feature is enabled. pub enabled: bool, @@ -155,12 +162,14 @@ pub struct PortalSubscriptionCancellationReason { #[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. @@ -180,6 +189,7 @@ pub struct PortalSubscriptionUpdate { #[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 9f915f886..49ab3a77f 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)] @@ -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 { client.post_form("/billing_portal/sessions", ¶ms) } } @@ -75,6 +72,7 @@ impl Object for BillingPortalSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlow { + pub after_completion: PortalFlowsFlowAfterCompletion, /// Configuration when `flow.type=subscription_cancel`. @@ -93,6 +91,7 @@ pub struct PortalFlowsFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowAfterCompletion { + /// Configuration when `after_completion.type=hosted_confirmation`. pub hosted_confirmation: Option, @@ -106,30 +105,38 @@ 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, + /// The ID of the subscription to be canceled. pub subscription: String, } #[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. @@ -144,8 +151,27 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirm { pub subscription: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PortalFlowsRetention { + + /// Configuration when `retention.type=coupon_offer`. + pub coupon_offer: Option, + + /// Type of retention strategy that will be used. + #[serde(rename = "type")] + pub type_: PortalFlowsRetentionType, +} + +#[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, @@ -155,6 +181,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, @@ -171,6 +198,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. @@ -190,7 +218,7 @@ pub struct CreateBillingPortalSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub flow_data: Option, - /// The IETF language tag of the locale Customer Portal is displayed in. + /// The IETF language tag of the locale customer portal is displayed in. /// /// If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. #[serde(skip_serializing_if = "Option::is_none")] @@ -225,6 +253,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, @@ -239,8 +268,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")] @@ -249,10 +277,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")] @@ -265,24 +293,30 @@ 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, + /// The ID of the subscription to be canceled. pub subscription: String, } #[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. /// @@ -295,6 +329,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, @@ -302,12 +337,25 @@ 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, + + /// Type of retention strategy to use with the customer. + #[serde(rename = "type")] + pub type_: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType, +} + #[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, @@ -319,6 +367,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, @@ -333,6 +382,13 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems { pub quantity: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer { + + /// The ID of the coupon to be offered. + pub coupon: String, +} + /// An enum representing the possible values of an `BillingPortalSession`'s `locale` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -481,12 +537,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", } } @@ -509,6 +561,38 @@ impl std::default::Default for CreateBillingPortalSessionFlowDataAfterCompletion } } +/// An enum representing the possible values of an `CreateBillingPortalSessionFlowDataSubscriptionCancelRetention`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + CouponOffer, +} + +impl CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + pub fn as_str(self) -> &'static str { + match self { + CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => "coupon_offer", + } + } +} + +impl AsRef for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn default() -> Self { + Self::CouponOffer + } +} + /// An enum representing the possible values of an `CreateBillingPortalSessionFlowData`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -525,9 +609,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", } } } @@ -622,3 +704,35 @@ impl std::default::Default for PortalFlowsFlowType { Self::PaymentMethodUpdate } } + +/// An enum representing the possible values of an `PortalFlowsRetention`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PortalFlowsRetentionType { + CouponOffer, +} + +impl PortalFlowsRetentionType { + pub fn as_str(self) -> &'static str { + match self { + PortalFlowsRetentionType::CouponOffer => "coupon_offer", + } + } +} + +impl AsRef for PortalFlowsRetentionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PortalFlowsRetentionType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PortalFlowsRetentionType { + fn default() -> Self { + Self::CouponOffer + } +} diff --git a/src/resources/generated/capability.rs b/src/resources/generated/capability.rs index 40cb33924..3041ebbd1 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -164,10 +164,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -193,6 +195,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -204,6 +207,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -218,10 +222,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -247,6 +253,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -258,6 +265,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index e0d829a65..3ce841dd5 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". /// @@ -122,7 +121,7 @@ pub struct Card { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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, 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 78818814f..7eb3377d6 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, Dispute, Invoice, Mandate, PaymentIntent, - PaymentMethod, PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardInstallmentsPlan, - PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, - RadarRadarOptions, Refund, Review, Shipping, ThreeDSecureDetails, Transfer, -}; +use crate::resources::{Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, Shipping, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Charge". /// @@ -23,9 +16,6 @@ pub struct Charge { /// Unique identifier for the object. pub id: ChargeId, - #[serde(skip_serializing_if = "Option::is_none")] - pub alternate_statement_descriptors: Option, - /// 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). @@ -87,12 +77,6 @@ pub struct Charge { /// Often useful for displaying to users. pub description: Option, - /// ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. - pub destination: Option>, - - /// Details about the dispute if the charge has been disputed. - pub dispute: Option>, - /// Whether the charge has been disputed. pub disputed: bool, @@ -218,12 +202,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", ¶ms) - } +pub fn list(client: &Client, params: &ListCharges<'_>) -> Response> { + client.get_query("/charges", ¶ms) +} + /// Use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) to initiate a new payment instead /// of using this method. @@ -259,19 +245,9 @@ impl Object for Charge { } } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct AlternateStatementDescriptors { - /// The Kana variation of the descriptor. - #[serde(skip_serializing_if = "Option::is_none")] - pub kana: Option, - - /// The Kanji variation of the descriptor. - #[serde(skip_serializing_if = "Option::is_none")] - pub kanji: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FraudDetails { + /// Assessments from Stripe. /// /// If set, the value is `fraudulent`. @@ -287,6 +263,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. @@ -333,6 +310,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. @@ -344,6 +322,7 @@ pub struct TransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3 { + #[serde(skip_serializing_if = "Option::is_none")] pub customer_reference: Option, @@ -363,6 +342,7 @@ pub struct Level3 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3LineItems { + pub discount_amount: Option, pub product_code: String, @@ -378,6 +358,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, @@ -504,6 +485,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. @@ -521,6 +503,7 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAchCreditTransfer { + /// Account number to transfer funds to. pub account_number: Option, @@ -536,6 +519,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`. @@ -561,6 +545,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, @@ -584,10 +569,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, @@ -597,6 +584,7 @@ pub struct PaymentMethodDetailsAfterpayClearpay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAuBecsDebit { + /// Bank-State-Branch number of the bank account. pub bsb_number: Option, @@ -615,6 +603,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. @@ -634,6 +623,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, @@ -664,16 +654,19 @@ 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -702,7 +695,7 @@ pub struct PaymentMethodDetailsCard { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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, @@ -748,7 +741,7 @@ pub struct PaymentMethodDetailsCard { pub network_token: Option, /// Populated if this transaction used 3D Secure authentication. - pub three_d_secure: Option, + pub three_d_secure: Option, /// If this Card is part of a card wallet, this contains the details of the card wallet. pub wallet: Option, @@ -756,18 +749,21 @@ pub struct PaymentMethodDetailsCard { #[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, @@ -810,7 +806,7 @@ pub struct PaymentMethodDetailsCardPresent { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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. @@ -862,6 +858,7 @@ pub struct PaymentMethodDetailsCardPresent { #[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, @@ -897,6 +894,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, @@ -930,13 +928,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. @@ -963,10 +964,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. @@ -994,6 +997,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, @@ -1002,10 +1006,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`. @@ -1020,6 +1026,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`. @@ -1036,6 +1043,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, @@ -1054,12 +1062,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`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -1086,6 +1096,7 @@ pub struct PaymentMethodDetailsIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -1121,7 +1132,7 @@ pub struct PaymentMethodDetailsInteracPresent { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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. @@ -1170,6 +1181,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, @@ -1205,6 +1217,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, @@ -1216,18 +1229,21 @@ 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, @@ -1235,6 +1251,7 @@ pub struct PaymentMethodDetailsLink { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsMultibanco { + /// Entity number associated with this Multibanco payment. pub entity: Option, @@ -1244,12 +1261,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`, `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`. @@ -1267,12 +1286,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. @@ -1304,6 +1325,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, @@ -1311,12 +1333,14 @@ 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 PaymentMethodDetailsSepaCreditTransfer { + /// Name of the bank associated with the bank account. pub bank_name: Option, @@ -1329,6 +1353,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, @@ -1352,6 +1377,7 @@ pub struct PaymentMethodDetailsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSofort { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1385,10 +1411,12 @@ pub struct PaymentMethodDetailsSofort { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsStripeAccount {} +pub struct PaymentMethodDetailsStripeAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsUsBankAccount { + /// Account holder type: individual or company. pub account_holder_type: Option, @@ -1413,10 +1441,12 @@ pub struct PaymentMethodDetailsUsBankAccount { } #[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. @@ -1427,10 +1457,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>, @@ -1440,6 +1472,7 @@ pub struct PaypalSellerProtection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Rule { + /// The action taken on the payment. pub action: String, @@ -1450,9 +1483,28 @@ pub struct Rule { pub predicate: String, } +#[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, + + /// Indicates the outcome of 3D Secure authentication. + pub result: Option, + + /// Additional information about why 3D Secure succeeded or failed based + /// on the `result`. + pub result_reason: Option, + + /// The version of 3D Secure that was used. + pub version: Option, +} + /// 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). @@ -1602,6 +1654,7 @@ impl<'a> CreateCharge<'a> { /// The parameters for `Charge::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCharges<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1659,12 +1712,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. @@ -1735,6 +1788,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, @@ -1742,12 +1796,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. @@ -1916,15 +1972,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", } } } @@ -2069,9 +2119,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", @@ -2081,25 +2129,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", @@ -2383,15 +2421,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", } } } @@ -2749,6 +2781,165 @@ impl std::default::Default for PaypalSellerProtectionStatus { } } +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `authentication_flow` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeAuthenticationFlow { + Challenge, + Frictionless, +} + +impl ThreeDSecureDetailsChargeAuthenticationFlow { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeAuthenticationFlow::Challenge => "challenge", + ThreeDSecureDetailsChargeAuthenticationFlow::Frictionless => "frictionless", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeAuthenticationFlow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeAuthenticationFlow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeAuthenticationFlow { + fn default() -> Self { + Self::Challenge + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeResult { + AttemptAcknowledged, + Authenticated, + Exempted, + Failed, + NotSupported, + ProcessingError, +} + +impl ThreeDSecureDetailsChargeResult { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeResult::AttemptAcknowledged => "attempt_acknowledged", + ThreeDSecureDetailsChargeResult::Authenticated => "authenticated", + ThreeDSecureDetailsChargeResult::Exempted => "exempted", + ThreeDSecureDetailsChargeResult::Failed => "failed", + ThreeDSecureDetailsChargeResult::NotSupported => "not_supported", + ThreeDSecureDetailsChargeResult::ProcessingError => "processing_error", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeResult { + fn default() -> Self { + Self::AttemptAcknowledged + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `result_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeResultReason { + Abandoned, + Bypassed, + Canceled, + CardNotEnrolled, + NetworkNotSupported, + ProtocolError, + Rejected, +} + +impl ThreeDSecureDetailsChargeResultReason { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeResultReason::Abandoned => "abandoned", + ThreeDSecureDetailsChargeResultReason::Bypassed => "bypassed", + ThreeDSecureDetailsChargeResultReason::Canceled => "canceled", + ThreeDSecureDetailsChargeResultReason::CardNotEnrolled => "card_not_enrolled", + ThreeDSecureDetailsChargeResultReason::NetworkNotSupported => "network_not_supported", + ThreeDSecureDetailsChargeResultReason::ProtocolError => "protocol_error", + ThreeDSecureDetailsChargeResultReason::Rejected => "rejected", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeResultReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeResultReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeResultReason { + fn default() -> Self { + Self::Abandoned + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl ThreeDSecureDetailsChargeVersion { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeVersion::V1_0_2 => "1.0.2", + ThreeDSecureDetailsChargeVersion::V2_1_0 => "2.1.0", + ThreeDSecureDetailsChargeVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DestinationSpecs { /// ID of an existing, connected Stripe account. diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 747957d9a..7e4f66fb0 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -2,19 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, SubscriptionId}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, Timestamp, -}; -use crate::resources::{ - Address, CheckoutSessionItem, Currency, Customer, Discount, Invoice, - InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, - PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, - Subscription, TaxId, TaxRate, -}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; +use crate::resources::{Address, CheckoutSessionItem, Currency, Customer, Discount, Invoice, InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, Subscription, TaxId, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Session". /// @@ -200,13 +192,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", ¶ms) - } +pub fn list(client: &Client, params: &ListCheckoutSessions<'_>) -> Response> { + client.get_query("/checkout/sessions", ¶ms) +} + /// Creates a Session object. pub fn create(client: &Client, params: CreateCheckoutSession<'_>) -> Response { @@ -226,6 +217,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, @@ -307,6 +299,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. @@ -331,6 +324,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, @@ -355,6 +349,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. @@ -366,6 +361,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. @@ -377,6 +373,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. @@ -388,6 +385,7 @@ pub struct CheckoutAlipayPaymentMethodOptions { #[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. @@ -399,6 +397,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. @@ -410,6 +409,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. @@ -421,6 +421,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. @@ -437,6 +438,7 @@ pub struct CheckoutBoletoPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCardPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, @@ -467,6 +469,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, @@ -474,6 +477,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. @@ -485,6 +489,7 @@ pub struct CheckoutCashappPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalancePaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -504,6 +509,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, @@ -511,8 +517,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")] @@ -521,6 +526,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. @@ -532,6 +538,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. @@ -543,6 +550,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. @@ -554,6 +562,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. @@ -565,6 +574,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. @@ -576,6 +586,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. @@ -587,6 +598,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. @@ -603,6 +615,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. @@ -614,6 +627,7 @@ pub struct CheckoutLinkPaymentMethodOptions { #[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. @@ -630,6 +644,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. @@ -641,6 +656,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. @@ -652,12 +668,14 @@ pub struct CheckoutPaynowPaymentMethodOptions { #[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 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. @@ -669,6 +687,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. @@ -680,6 +699,7 @@ pub struct CheckoutSofortPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -698,12 +718,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`. @@ -724,6 +746,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, @@ -733,6 +756,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, @@ -743,6 +767,7 @@ pub struct PaymentPagesCheckoutSessionConsent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionConsentCollection { + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -755,6 +780,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, @@ -770,6 +796,7 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFields { + /// Configuration for `type=dropdown` fields. pub dropdown: Option, @@ -798,6 +825,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. @@ -811,6 +839,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. @@ -823,6 +852,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, @@ -835,6 +865,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. @@ -848,6 +879,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, @@ -860,6 +892,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomText { + /// Custom text that should be displayed alongside shipping address collection. pub shipping_address: Option, @@ -869,12 +902,14 @@ pub struct PaymentPagesCheckoutSessionCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomTextPosition { + /// Text may be up to 1000 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. @@ -901,6 +936,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, @@ -909,6 +945,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>>, @@ -934,6 +971,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -943,22 +981,24 @@ pub struct InvoiceSettingCustomField { #[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 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, @@ -980,6 +1020,7 @@ pub struct PaymentPagesCheckoutSessionShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, @@ -996,6 +1037,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, @@ -1005,6 +1047,7 @@ 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`. #[serde(rename = "type")] pub type_: PaymentPagesCheckoutSessionTaxIdType, @@ -1015,12 +1058,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, @@ -1036,6 +1081,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -1045,6 +1091,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -1054,6 +1101,7 @@ pub struct LineItemsDiscountAmount { /// The parameters for `CheckoutSession::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateCheckoutSession<'a> { + /// Configure actions after a Checkout Session has expired. #[serde(skip_serializing_if = "Option::is_none")] pub after_expiration: Option, @@ -1229,14 +1277,10 @@ pub struct CreateCheckoutSession<'a> { pub shipping_address_collection: Option, /// The shipping rate options to apply to this Session. - #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_options: Option>, - - /// [Deprecated] The shipping rate to apply to this Session. /// - /// Only up to one may be specified. + /// Up to a maximum of 5. #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_rates: Option>, + pub shipping_options: Option>, /// Describes the type of transaction being performed by Checkout in order to customize /// relevant text on the page, such as the submit button. @@ -1293,7 +1337,6 @@ impl<'a> CreateCheckoutSession<'a> { setup_intent_data: Default::default(), shipping_address_collection: Default::default(), shipping_options: Default::default(), - shipping_rates: Default::default(), submit_type: Default::default(), subscription_data: Default::default(), success_url, @@ -1305,6 +1348,7 @@ impl<'a> CreateCheckoutSession<'a> { /// The parameters for `CheckoutSession::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCheckoutSessions<'a> { + /// Only return the Checkout Sessions for the Customer specified. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1368,11 +1412,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, @@ -1380,12 +1424,14 @@ pub struct CreateCheckoutSessionAfterExpiration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAutomaticTax { + /// Set to true to enable automatic taxes. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionConsentCollection { + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -1401,6 +1447,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, @@ -1434,6 +1481,7 @@ pub struct CreateCheckoutSessionCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomText { + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -1445,6 +1493,7 @@ pub struct CreateCheckoutSessionCustomText { #[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`. /// @@ -1468,6 +1517,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, @@ -1479,6 +1529,7 @@ pub struct CreateCheckoutSessionDiscounts { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreation { + /// Set to `true` to enable invoice creation. pub enabled: bool, @@ -1489,6 +1540,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, @@ -1524,6 +1576,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. @@ -1605,13 +1658,14 @@ pub struct CreateCheckoutSessionPaymentIntentData { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: 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, @@ -1727,12 +1781,14 @@ 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 CreateCheckoutSessionSetupIntentData { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. @@ -1754,6 +1810,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. /// @@ -1763,6 +1820,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, @@ -1774,6 +1832,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. @@ -1786,12 +1845,6 @@ pub struct CreateCheckoutSessionSubscriptionData { #[serde(skip_serializing_if = "Option::is_none")] pub billing_cycle_anchor: Option, - /// 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. - #[serde(skip_serializing_if = "Option::is_none")] - pub coupon: Option, - /// The tax rates that will apply to any subscription item that does not have /// `tax_rates` set. /// @@ -1834,13 +1887,6 @@ pub struct CreateCheckoutSessionSubscriptionData { #[serde(skip_serializing_if = "Option::is_none")] pub trial_end: Option, - /// Indicates if a plan’s `trial_period_days` should be applied to the subscription. - /// - /// Setting `trial_end` on `subscription_data` is preferred. - /// Defaults to `false`. - #[serde(skip_serializing_if = "Option::is_none")] - pub trial_from_plan: Option, - /// Integer representing the number of trial period days before the /// customer is charged for the first time. /// @@ -1855,18 +1901,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`. @@ -1882,6 +1931,7 @@ pub struct CreateCheckoutSessionAfterExpirationRecovery { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1890,6 +1940,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. @@ -1902,6 +1953,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, @@ -1913,6 +1965,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, @@ -1924,18 +1977,21 @@ pub struct CreateCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextShippingAddress { + /// Text may be up to 1000 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextSubmit { + /// Text may be up to 1000 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>, @@ -1969,6 +2025,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. @@ -1990,6 +2047,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). @@ -2034,6 +2092,7 @@ pub struct CreateCheckoutSessionLineItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShipping { + /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress, @@ -2057,6 +2116,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, @@ -2071,6 +2131,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). @@ -2088,17 +2149,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. @@ -2110,18 +2170,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. @@ -2133,42 +2194,43 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsAlipay { #[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. @@ -2186,6 +2248,7 @@ 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, @@ -2217,18 +2280,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, @@ -2245,12 +2309,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. @@ -2262,6 +2326,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. @@ -2273,30 +2338,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. @@ -2308,6 +2374,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. @@ -2319,6 +2386,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. @@ -2332,12 +2400,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. @@ -2349,6 +2417,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsLink { #[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. @@ -2366,6 +2435,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. @@ -2381,6 +2451,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. @@ -2392,6 +2463,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, @@ -2421,6 +2493,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. @@ -2430,18 +2503,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPix { #[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. @@ -2453,10 +2527,10 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { #[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. /// @@ -2464,17 +2538,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. @@ -2490,18 +2563,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. /// @@ -2544,6 +2616,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData { #[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. @@ -2557,12 +2630,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. @@ -2576,6 +2651,7 @@ 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. @@ -2589,18 +2665,19 @@ pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataCustomFields { #[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. @@ -2629,6 +2706,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -2644,6 +2722,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, @@ -2670,6 +2749,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. @@ -2680,8 +2760,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. /// @@ -2691,17 +2770,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")] @@ -2730,35 +2808,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>, } #[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, @@ -2771,20 +2852,19 @@ 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 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`. @@ -2793,6 +2873,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferE #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -2802,6 +2883,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -2811,6 +2893,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, @@ -2818,9 +2901,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. @@ -2977,9 +3058,7 @@ impl CheckoutAcssDebitPaymentMethodOptionsVerificationMethod { match self { CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Automatic => "automatic", CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Instant => "instant", - CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => { - "microdeposits" - } + CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3334,16 +3413,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 } @@ -3363,21 +3438,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", } } } @@ -4580,24 +4645,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 } @@ -4690,9 +4749,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", } } @@ -4772,16 +4829,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 } @@ -4806,24 +4859,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 } @@ -4846,24 +4893,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 } @@ -4882,12 +4923,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", } } } @@ -4921,15 +4958,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", } } } @@ -4945,9 +4976,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 } @@ -4995,9 +5024,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsa impl CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none", } } } @@ -5008,16 +5035,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 } @@ -5081,9 +5104,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 } @@ -5102,12 +5123,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", } } } @@ -5174,12 +5191,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", } } } @@ -5212,12 +5225,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", } } } @@ -5252,12 +5261,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", } } } @@ -5306,24 +5311,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 } @@ -5358,16 +5357,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 } @@ -5383,9 +5378,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -5417,9 +5410,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsag impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none", } } } @@ -5430,16 +5421,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 } @@ -5681,9 +5668,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -5938,9 +5923,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -5975,12 +5958,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", } } } @@ -6055,24 +6034,50 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsP } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 { + fn default() -> Self { + Self::Balances + } +} + +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -6091,12 +6096,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", } } } @@ -6112,9 +6113,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 } @@ -6131,12 +6130,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", } } } @@ -6147,16 +6142,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 } @@ -7086,24 +7077,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 } @@ -7132,24 +7117,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 } @@ -7174,24 +7153,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 } @@ -7209,15 +7182,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", } } } @@ -7282,9 +7249,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", } } @@ -7326,24 +7291,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 } @@ -7423,9 +7382,7 @@ impl PaymentPagesCheckoutSessionAutomaticTaxStatus { match self { PaymentPagesCheckoutSessionAutomaticTaxStatus::Complete => "complete", PaymentPagesCheckoutSessionAutomaticTaxStatus::Failed => "failed", - PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => { - "requires_location_inputs" - } + PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => "requires_location_inputs", } } } @@ -8420,9 +8377,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 } 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 409f68c84..079fe5b0e 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", ¶ms) - } +pub fn list(client: &Client, params: &ListCoupons<'_>) -> Response> { + client.get_query("/coupons", ¶ms) +} + /// You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. /// @@ -143,12 +142,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, } @@ -156,6 +157,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, @@ -248,6 +250,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. @@ -293,12 +296,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). @@ -337,6 +340,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>, @@ -344,12 +348,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 05e780225..3bda1e191 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::resources::{CreditNoteLineItem, Currency, Customer, CustomerBalanceTransaction, Discount, Invoice, InvoicesShippingCost, Refund, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CreditNote". /// @@ -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", ¶ms) - } +pub fn list(client: &Client, params: &ListCreditNotes<'_>) -> Response> { + client.get_query("/credit_notes", ¶ms) +} + /// Issue a credit note to adjust the amount of a finalized invoice. /// @@ -142,11 +140,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 { client.post_form(&format!("/credit_notes/{}", id), ¶ms) } } @@ -163,6 +157,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, @@ -183,6 +178,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, @@ -193,6 +189,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, @@ -277,6 +274,7 @@ impl<'a> CreateCreditNote<'a> { /// The parameters for `CreditNote::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCreditNotes<'a> { + /// Only return credit notes for the customer specified by this customer ID. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -325,12 +323,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], @@ -360,6 +358,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`. @@ -408,6 +407,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, 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 28b32b713..b1fcf173d 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, InvoiceSettingRenderingOptions, PaymentMethod, PaymentSource, PaymentSourceParams, Shipping, Subscription, TaxId, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Customer". /// @@ -159,12 +153,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", ¶ms) - } +pub fn list(client: &Client, params: &ListCustomers<'_>) -> Response> { + client.get_query("/customers", ¶ms) +} + /// Creates a new customer object. pub fn create(client: &Client, params: CreateCustomer<'_>) -> Response { @@ -183,11 +179,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 { client.post_form(&format!("/customers/{}", id), ¶ms) } @@ -212,6 +204,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, @@ -224,6 +217,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, @@ -236,6 +230,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>, @@ -251,6 +246,7 @@ pub struct InvoiceSettingCustomerSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -261,6 +257,7 @@ pub struct InvoiceSettingCustomField { /// 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
, @@ -405,6 +402,7 @@ impl<'a> CreateCustomer<'a> { /// The parameters for `Customer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCustomers<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -461,12 +459,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
, @@ -605,6 +603,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")] @@ -613,6 +612,7 @@ pub struct CreateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShipping { + /// Customer shipping address. pub address: CreateCustomerShippingAddress, @@ -626,6 +626,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. @@ -636,6 +637,7 @@ pub struct CreateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettings { + /// Default custom fields to be displayed on invoices for this customer. /// /// When updating, pass an empty string to remove previously-defined fields. @@ -657,6 +659,7 @@ 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`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -667,6 +670,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")] @@ -675,6 +679,7 @@ pub struct UpdateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShipping { + /// Customer shipping address. pub address: UpdateCustomerShippingAddress, @@ -688,6 +693,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. @@ -698,6 +704,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`. @@ -708,6 +715,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, @@ -735,6 +743,7 @@ 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. @@ -748,6 +757,7 @@ pub struct CustomerInvoiceSettingsCustomFields { #[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`. @@ -759,6 +769,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`. @@ -769,6 +780,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, @@ -808,9 +820,7 @@ impl CreateCustomerCashBalanceSettingsReconciliationMode { match self { CreateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", CreateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -844,9 +854,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", } } } @@ -1192,9 +1200,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 b80fee94e..d1dc47422 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/customer_cash_balance_transaction.rs b/src/resources/generated/customer_cash_balance_transaction.rs index 260503566..e2d8951bf 100644 --- a/src/resources/generated/customer_cash_balance_transaction.rs +++ b/src/resources/generated/customer_cash_balance_transaction.rs @@ -4,7 +4,7 @@ use crate::ids::{CustomerCashBalanceTransactionId}; use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::{Currency, Customer, PaymentIntent, Refund}; +use crate::resources::{BalanceTransaction, Currency, Customer, PaymentIntent, Refund}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerCashBalanceTransaction". @@ -15,6 +15,9 @@ pub struct CustomerCashBalanceTransaction { /// Unique identifier for the object. pub id: CustomerCashBalanceTransactionId, + #[serde(skip_serializing_if = "Option::is_none")] + pub adjusted_for_overdraft: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub applied_to_payment: Option, @@ -71,6 +74,16 @@ impl Object for CustomerCashBalanceTransaction { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft { + + /// The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + pub balance_transaction: Expandable, + + /// The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + pub linked_transaction: Expandable, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction { @@ -253,6 +266,7 @@ impl std::default::Default for CustomerBalanceResourceCashBalanceTransactionReso #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum CustomerCashBalanceTransactionType { + AdjustedForOverdraft, AppliedToPayment, Funded, FundingReversed, @@ -265,6 +279,7 @@ pub enum CustomerCashBalanceTransactionType { impl CustomerCashBalanceTransactionType { pub fn as_str(self) -> &'static str { match self { + CustomerCashBalanceTransactionType::AdjustedForOverdraft => "adjusted_for_overdraft", CustomerCashBalanceTransactionType::AppliedToPayment => "applied_to_payment", CustomerCashBalanceTransactionType::Funded => "funded", CustomerCashBalanceTransactionType::FundingReversed => "funding_reversed", @@ -289,6 +304,6 @@ impl std::fmt::Display for CustomerCashBalanceTransactionType { } impl std::default::Default for CustomerCashBalanceTransactionType { fn default() -> Self { - Self::AppliedToPayment + Self::AdjustedForOverdraft } } diff --git a/src/resources/generated/discount.rs b/src/resources/generated/discount.rs index 4ab82cd45..eaaab38b6 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". /// diff --git a/src/resources/generated/dispute.rs b/src/resources/generated/dispute.rs index 72c15b2ff..2033eabf0 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". /// @@ -62,6 +61,9 @@ pub struct Dispute { /// ID of the PaymentIntent that was disputed. pub payment_intent: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_details: Option, + /// Reason given by cardholder for dispute. /// /// Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. @@ -70,15 +72,17 @@ pub struct Dispute { /// Current status of dispute. /// - /// Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. + /// Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. pub status: DisputeStatus, } impl Dispute { + /// Returns a list of your disputes. - pub fn list(client: &Client, params: &ListDisputes<'_>) -> Response> { - client.get_query("/disputes", ¶ms) - } +pub fn list(client: &Client, params: &ListDisputes<'_>) -> Response> { + client.get_query("/disputes", ¶ms) +} + /// Retrieves the dispute with the given ID. pub fn retrieve(client: &Client, id: &DisputeId, expand: &[&str]) -> Response { @@ -98,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. @@ -199,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. @@ -219,9 +225,35 @@ pub struct DisputeEvidenceDetails { pub submission_count: u64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetails { + + /// Card specific dispute details. + pub card: Option, + + /// Payment method type. + #[serde(rename = "type")] + pub type_: DisputePaymentMethodDetailsType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetailsCard { + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: String, + + /// The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. + /// + /// The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + pub network_reason_code: Option, +} + /// 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, @@ -274,14 +306,44 @@ 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, +} + +impl DisputePaymentMethodDetailsType { + pub fn as_str(self) -> &'static str { + match self { + DisputePaymentMethodDetailsType::Card => "card", + } } } + +impl AsRef for DisputePaymentMethodDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for DisputePaymentMethodDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for DisputePaymentMethodDetailsType { + fn default() -> Self { + Self::Card + } +} + /// An enum representing the possible values of an `Dispute`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum DisputeStatus { - ChargeRefunded, Lost, NeedsResponse, UnderReview, @@ -294,7 +356,6 @@ pub enum DisputeStatus { impl DisputeStatus { pub fn as_str(self) -> &'static str { match self { - DisputeStatus::ChargeRefunded => "charge_refunded", DisputeStatus::Lost => "lost", DisputeStatus::NeedsResponse => "needs_response", DisputeStatus::UnderReview => "under_review", @@ -319,6 +380,6 @@ impl std::fmt::Display for DisputeStatus { } impl std::default::Default for DisputeStatus { fn default() -> Self { - Self::ChargeRefunded + Self::Lost } } diff --git a/src/resources/generated/ephemeral_key.rs b/src/resources/generated/ephemeral_key.rs index d427f678d..41f5cb66d 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 { client.post_form("/ephemeral_keys", ¶ms) @@ -59,6 +59,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 ab2d0e79c..650ffb525 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", ¶ms) - } +pub fn list(client: &Client, params: &ListEvents<'_>) -> Response> { + client.get_query("/events", ¶ms) +} + /// 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,7 @@ pub struct NotificationEventRequest { /// The parameters for `Event::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListEvents<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -155,6 +158,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 e34feceb0..c997b012f 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 f8d3f80a2..5788aaea1 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. /// /// The files are returned sorted by creation date, with the most recently created files appearing first. - pub fn list(client: &Client, params: &ListFiles<'_>) -> Response> { - client.get_query("/files", ¶ms) - } +pub fn list(client: &Client, params: &ListFiles<'_>) -> Response> { + client.get_query("/files", ¶ms) +} + /// Retrieves the details of an existing file object. /// @@ -79,6 +80,7 @@ impl Object for File { /// The parameters for `File::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFiles<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -128,9 +130,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 af68fda6e..4c2a549b6 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", ¶ms) - } +pub fn list(client: &Client, params: &ListFileLinks<'_>) -> Response> { + client.get_query("/file_links", ¶ms) +} + /// Creates a new file link object. pub fn create(client: &Client, params: CreateFileLink<'_>) -> Response { @@ -62,11 +63,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 { client.post_form(&format!("/file_links/{}", id), ¶ms) } } @@ -84,6 +81,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], @@ -120,6 +118,7 @@ impl<'a> CreateFileLink<'a> { /// The parameters for `FileLink::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFileLinks<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -174,12 +173,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_session.rs b/src/resources/generated/financial_connections_session.rs index a6766857f..c32276e9b 100644 --- a/src/resources/generated/financial_connections_session.rs +++ b/src/resources/generated/financial_connections_session.rs @@ -34,6 +34,9 @@ pub struct FinancialConnectionsSession { /// Permissions requested for accounts collected during this session. pub permissions: Vec, + /// Data features requested to be retrieved upon account creation. + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -88,6 +91,10 @@ pub struct CreateFinancialConnectionsSession<'a> { /// Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. pub permissions: Vec, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -102,6 +109,7 @@ impl<'a> CreateFinancialConnectionsSession<'a> { expand: Default::default(), filters: Default::default(), permissions, + prefetch: Default::default(), return_url: Default::default(), } } @@ -206,6 +214,40 @@ impl std::default::Default for CreateFinancialConnectionsSessionPermissions { } } +/// An enum representing the possible values of an `CreateFinancialConnectionsSession`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateFinancialConnectionsSessionPrefetch { + Balances, + Ownership, +} + +impl CreateFinancialConnectionsSessionPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateFinancialConnectionsSessionPrefetch::Balances => "balances", + CreateFinancialConnectionsSessionPrefetch::Ownership => "ownership", + } + } +} + +impl AsRef for CreateFinancialConnectionsSessionPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateFinancialConnectionsSessionPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateFinancialConnectionsSessionPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `FinancialConnectionsSession`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -243,3 +285,37 @@ impl std::default::Default for FinancialConnectionsSessionPermissions { Self::Balances } } + +/// An enum representing the possible values of an `FinancialConnectionsSession`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum FinancialConnectionsSessionPrefetch { + Balances, + Ownership, +} + +impl FinancialConnectionsSessionPrefetch { + pub fn as_str(self) -> &'static str { + match self { + FinancialConnectionsSessionPrefetch::Balances => "balances", + FinancialConnectionsSessionPrefetch::Ownership => "ownership", + } + } +} + +impl AsRef for FinancialConnectionsSessionPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for FinancialConnectionsSessionPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for FinancialConnectionsSessionPrefetch { + fn default() -> Self { + Self::Balances + } +} diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index f359a1e8a..32d32b44c 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, 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, Currency, Customer, Discount, InvoiceLineItem, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsUsBankAccount, InvoiceSettingRenderingOptions, InvoicesShippingCost, 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")] @@ -462,12 +450,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", ¶ms) - } +pub fn list(client: &Client, params: &ListInvoices<'_>) -> Response> { + client.get_query("/invoices", ¶ms) +} + /// This endpoint creates a draft invoice for a given customer. /// @@ -502,6 +492,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. @@ -513,6 +504,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, @@ -522,6 +514,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -531,6 +524,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, @@ -551,6 +545,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, @@ -560,6 +555,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, @@ -569,6 +565,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. @@ -580,6 +577,7 @@ pub struct InvoiceTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesFromInvoice { + /// The relation between this invoice and the cloned invoice. pub action: String, @@ -589,6 +587,7 @@ pub struct InvoicesFromInvoice { #[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. @@ -606,6 +605,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, @@ -627,6 +627,7 @@ pub struct InvoicesPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, @@ -639,12 +640,14 @@ pub struct InvoicePaymentMethodOptionsCard { #[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 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`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -655,6 +658,7 @@ pub struct InvoicesResourceInvoiceTaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesStatusTransitions { + /// The time that the invoice draft was finalized. pub finalized_at: Option, @@ -670,16 +674,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. /// /// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. - #[serde(default)] pub metadata: Metadata, } /// 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. @@ -891,6 +896,7 @@ 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`. @@ -961,11 +967,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. @@ -974,6 +980,7 @@ 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. @@ -987,6 +994,7 @@ pub struct CreateInvoiceCustomFields { #[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, @@ -998,6 +1006,7 @@ pub struct CreateInvoiceDiscounts { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceFromInvoice { + /// The relation between the new invoice and the original invoice. /// /// Currently, only 'revision' is permitted. @@ -1009,6 +1018,7 @@ pub struct CreateInvoiceFromInvoice { #[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. @@ -1029,6 +1039,7 @@ pub struct CreateInvoicePaymentSettings { #[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`. @@ -1040,6 +1051,7 @@ pub struct CreateInvoiceRenderingOptions { #[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, @@ -1051,6 +1063,7 @@ pub struct CreateInvoiceShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetails { + /// Shipping address. pub address: CreateInvoiceShippingDetailsAddress, @@ -1064,6 +1077,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. @@ -1076,6 +1090,7 @@ pub struct CreateInvoiceTransferData { #[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, @@ -1103,6 +1118,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { #[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. @@ -1150,6 +1166,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, @@ -1177,27 +1194,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). @@ -1209,16 +1226,15 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCard { /// 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. #[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. /// @@ -1228,23 +1244,24 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini { +} #[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. @@ -1260,6 +1277,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, @@ -1272,21 +1290,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")] @@ -1299,11 +1316,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. /// @@ -1322,10 +1338,15 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] 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>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -1335,6 +1356,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -1344,6 +1366,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, @@ -1351,12 +1374,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, @@ -1370,8 +1393,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`. @@ -1497,24 +1520,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 } @@ -1545,16 +1562,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 } @@ -1587,16 +1600,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 } @@ -1612,9 +1621,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInt impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => { - "month" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month", } } } @@ -1625,16 +1632,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 } @@ -1661,16 +1664,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 } @@ -1688,9 +1687,7 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } @@ -1706,9 +1703,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 } @@ -1717,8 +1712,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, @@ -1736,24 +1730,50 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 { + fn default() -> Self { + Self::Balances + } +} + +/// An enum representing the possible values of an `CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -1778,24 +1798,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 } @@ -1834,9 +1848,7 @@ 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::AuBecsDebit => "au_becs_debit", @@ -1855,9 +1867,7 @@ impl CreateInvoicePaymentSettingsPaymentMethodTypes { CreateInvoicePaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateInvoicePaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateInvoicePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - CreateInvoicePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + CreateInvoicePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", CreateInvoicePaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", CreateInvoicePaymentSettingsPaymentMethodTypes::Sofort => "sofort", CreateInvoicePaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", @@ -1895,9 +1905,7 @@ impl CreateInvoiceRenderingOptionsAmountTaxDisplay { pub fn as_str(self) -> &'static str { match self { CreateInvoiceRenderingOptionsAmountTaxDisplay::ExcludeTax => "exclude_tax", - CreateInvoiceRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => { - "include_inclusive_tax" - } + CreateInvoiceRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => "include_inclusive_tax", } } } @@ -1933,9 +1941,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", @@ -1955,9 +1961,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 } @@ -1977,9 +1981,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", @@ -1999,9 +2001,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 } @@ -2032,16 +2032,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 } @@ -2133,9 +2129,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", 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_us_bank_account.rs b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs index de7dcbc4e..05503f21d 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,15 @@ 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>, } /// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions`'s `permissions` field. @@ -55,9 +59,39 @@ 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 + } +} + +/// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + Balances, +} + +impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { fn default() -> Self { Self::Balances } @@ -77,9 +111,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 ddd30974c..982cdd77d 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", ¶ms) - } +pub fn list(client: &Client, params: &ListInvoiceItems<'_>) -> Response> { + client.get_query("/invoiceitems", ¶ms) +} + /// Creates an item to be added to a draft invoice (up to 250 items per invoice). /// @@ -152,11 +148,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 { client.post_form(&format!("/invoiceitems/{}", id), ¶ms) } @@ -181,6 +173,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. @@ -323,6 +316,7 @@ impl<'a> CreateInvoiceItem<'a> { /// The parameters for `InvoiceItem::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListInvoiceItems<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -388,12 +382,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. @@ -511,6 +505,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, @@ -522,6 +517,7 @@ pub struct CreateInvoiceItemDiscounts { #[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). @@ -551,6 +547,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, diff --git a/src/resources/generated/invoices_shipping_cost.rs b/src/resources/generated/invoices_shipping_cost.rs index c2ab9c430..16157fdf7 100644 --- a/src/resources/generated/invoices_shipping_cost.rs +++ b/src/resources/generated/invoices_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". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesShippingCost { + /// 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 52710c9b4..032e4bd42 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, - IssuingTransaction, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorizationAmountDetails, IssuingAuthorizationCheck, IssuingAuthorizationMethod, IssuingAuthorizationReason, IssuingCard, IssuingCardholder, IssuingTransaction, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingAuthorization". /// @@ -121,6 +116,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`. @@ -129,6 +125,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, @@ -156,6 +153,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. @@ -197,6 +195,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, @@ -209,6 +208,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, diff --git a/src/resources/generated/issuing_card.rs b/src/resources/generated/issuing_card.rs index 24dd600d2..48cf7b7ab 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, MerchantCategory}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingCard". /// @@ -112,6 +108,7 @@ 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. @@ -135,6 +132,7 @@ pub struct IssuingCardAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardShipping { + pub address: Address, /// The delivery company that shipped a card. @@ -180,6 +178,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. @@ -188,6 +187,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). @@ -204,6 +204,7 @@ pub struct IssuingCardSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardWallets { + pub apple_pay: IssuingCardApplePay, pub google_pay: IssuingCardGooglePay, @@ -214,6 +215,7 @@ pub struct IssuingCardWallets { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardApplePay { + /// Apple Pay Eligibility. pub eligible: bool, @@ -223,6 +225,7 @@ pub struct IssuingCardApplePay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardGooglePay { + /// Google Pay Eligibility. pub eligible: bool, @@ -243,9 +246,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", } } @@ -317,9 +318,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 ad1283a7d..9b724feb9 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,11 +84,13 @@ 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. @@ -111,12 +112,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. pub card_issuing: Option, @@ -141,12 +144,14 @@ pub struct IssuingCardholderIndividual { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCardIssuing { + /// Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). pub user_terms_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividualDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -159,6 +164,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, @@ -168,6 +174,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). @@ -184,6 +191,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. /// /// Required for Celtic Spend Card users. @@ -200,12 +208,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>, @@ -270,9 +280,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", } } @@ -323,20 +331,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..734f8f5d5 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". /// @@ -67,6 +64,7 @@ impl Object for IssuingDispute { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeEvidence { + #[serde(skip_serializing_if = "Option::is_none")] pub canceled: Option, @@ -96,6 +94,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 +128,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 +152,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 +162,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>, @@ -182,6 +184,7 @@ pub struct IssuingDisputeMerchandiseNotAsDescribedEvidence { #[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 +203,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 +219,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 +238,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, @@ -327,9 +333,7 @@ impl IssuingDisputeEvidenceReason { IssuingDisputeEvidenceReason::Canceled => "canceled", IssuingDisputeEvidenceReason::Duplicate => "duplicate", IssuingDisputeEvidenceReason::Fraudulent => "fraudulent", - IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => { - "merchandise_not_as_described" - } + IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => "merchandise_not_as_described", IssuingDisputeEvidenceReason::NotReceived => "not_received", IssuingDisputeEvidenceReason::Other => "other", IssuingDisputeEvidenceReason::ServiceNotAsDescribed => "service_not_as_described", @@ -365,9 +369,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_transaction.rs b/src/resources/generated/issuing_transaction.rs index 60c061c73..ee7e99c5a 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, IssuingTransactionType, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorization, IssuingCard, IssuingCardholder, IssuingDispute, IssuingTransactionType, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingTransaction". /// @@ -101,12 +97,14 @@ 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionPurchaseDetails { + /// Information about the flight that was purchased with this transaction. pub flight: Option, @@ -125,6 +123,7 @@ pub struct IssuingTransactionPurchaseDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightData { + /// The time that the flight departed. pub departure_at: Option, @@ -143,6 +142,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, @@ -164,6 +164,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`. @@ -184,6 +185,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, @@ -193,6 +195,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. @@ -210,6 +213,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..b93655b37 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)] @@ -113,6 +110,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 +120,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 +141,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 7c2a30d3f..e982dcb17 100644 --- a/src/resources/generated/linked_account_options_us_bank_account.rs +++ b/src/resources/generated/linked_account_options_us_bank_account.rs @@ -7,12 +7,16 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + /// Data features requested to be retrieved upon account creation. + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -57,3 +61,35 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPermissions { Self::Balances } } + +/// An enum representing the possible values of an `LinkedAccountOptionsUsBankAccount`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum LinkedAccountOptionsUsBankAccountPrefetch { + Balances, +} + +impl LinkedAccountOptionsUsBankAccountPrefetch { + pub fn as_str(self) -> &'static str { + match self { + LinkedAccountOptionsUsBankAccountPrefetch::Balances => "balances", + } + } +} + +impl AsRef for LinkedAccountOptionsUsBankAccountPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for LinkedAccountOptionsUsBankAccountPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for LinkedAccountOptionsUsBankAccountPrefetch { + fn default() -> Self { + Self::Balances + } +} diff --git a/src/resources/generated/login_link.rs b/src/resources/generated/login_link.rs index 33817dc92..2a98c0680 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 634c1e566..0df37dd08 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, MandateOptionsOffSessionDetailsBlik, PaymentMethod}; +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 at which the customer accepted the Mandate. pub accepted_at: Option, @@ -81,10 +82,12 @@ 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, @@ -94,9 +97,6 @@ pub struct MandatePaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub bacs_debit: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -124,10 +124,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>, @@ -146,6 +148,7 @@ pub struct MandateAcssDebit { #[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. @@ -154,6 +157,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`. @@ -167,26 +171,16 @@ pub struct MandateBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateBlik { - /// Date at which the mandate expires. - pub expires_after: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub off_session: Option, - - /// Type of the mandate. - #[serde(rename = "type")] - pub type_: Option, +pub struct MandateCashapp { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -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. @@ -201,6 +195,7 @@ pub struct MandatePaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSepaDebit { + /// The unique reference of the mandate. pub reference: String, @@ -212,6 +207,7 @@ pub struct MandateSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSingleUse { + /// On a single use mandate, the amount of the payment. pub amount: i64, @@ -220,13 +216,16 @@ pub struct MandateSingleUse { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateUsBankAccount {} +pub struct MandateUsBankAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct OfflineAcceptance {} +pub struct OfflineAcceptance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OnlineAcceptance { + /// The IP address from which the Mandate was accepted by the customer. pub ip_address: Option, @@ -410,40 +409,6 @@ impl std::default::Default for MandateBacsDebitNetworkStatus { } } -/// An enum representing the possible values of an `MandateBlik`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum MandateBlikType { - OffSession, - OnSession, -} - -impl MandateBlikType { - pub fn as_str(self) -> &'static str { - match self { - MandateBlikType::OffSession => "off_session", - MandateBlikType::OnSession => "on_session", - } - } -} - -impl AsRef for MandateBlikType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for MandateBlikType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for MandateBlikType { - fn default() -> Self { - Self::OffSession - } -} - /// An enum representing the possible values of an `Mandate`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/mandate_options_off_session_details_blik.rs b/src/resources/generated/mandate_options_off_session_details_blik.rs deleted file mode 100644 index d219e2716..000000000 --- a/src/resources/generated/mandate_options_off_session_details_blik.rs +++ /dev/null @@ -1,61 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -use crate::resources::Currency; - -/// The resource representing a Stripe "mandate_options_off_session_details_blik". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateOptionsOffSessionDetailsBlik { - /// Amount of each recurring payment. - pub amount: Option, - - /// Currency of each recurring payment. - pub currency: Option, - - /// Frequency interval of each recurring payment. - pub interval: Option, - - /// Frequency indicator of each recurring payment. - pub interval_count: Option, -} - -/// An enum representing the possible values of an `MandateOptionsOffSessionDetailsBlik`'s `interval` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum MandateOptionsOffSessionDetailsBlikInterval { - Day, - Month, - Week, - Year, -} - -impl MandateOptionsOffSessionDetailsBlikInterval { - pub fn as_str(self) -> &'static str { - match self { - MandateOptionsOffSessionDetailsBlikInterval::Day => "day", - MandateOptionsOffSessionDetailsBlikInterval::Month => "month", - MandateOptionsOffSessionDetailsBlikInterval::Week => "week", - MandateOptionsOffSessionDetailsBlikInterval::Year => "year", - } - } -} - -impl AsRef for MandateOptionsOffSessionDetailsBlikInterval { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for MandateOptionsOffSessionDetailsBlikInterval { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for MandateOptionsOffSessionDetailsBlikInterval { - fn default() -> Self { - Self::Day - } -} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index f672906bf..4f9ef40f8 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -2,17 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, MandateId, PaymentIntentId, 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, PaymentMethodDetailsCardInstallmentsPlan, - PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentSource, Review, Shipping, -}; +use crate::resources::{Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentIntentOffSession, PaymentMethod, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentSource, Review, Shipping}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentIntent". /// @@ -182,15 +176,17 @@ pub struct PaymentIntent { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. pub transfer_group: Option, } impl PaymentIntent { + /// Returns a list of PaymentIntents. - pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { - client.get_query("/payment_intents", ¶ms) - } +pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { + client.get_query("/payment_intents", ¶ms) +} + /// Creates a PaymentIntent object. /// @@ -208,11 +204,7 @@ impl PaymentIntent { /// Client-side retrieval using a publishable key is allowed when the `client_secret` is provided in the query string. /// When retrieved with a publishable key, only a subset of properties will be returned. /// Please 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 }) } @@ -223,11 +215,7 @@ impl PaymentIntent { /// /// For example, updating the `payment_method` will always require you to confirm the PaymentIntent again. /// If you prefer to update and confirm at the same time, we recommend updating properties via 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 { client.post_form(&format!("/payment_intents/{}", id), ¶ms) } } @@ -244,12 +232,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, @@ -257,6 +247,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. @@ -271,6 +262,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, @@ -281,12 +273,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, @@ -323,8 +313,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, @@ -332,6 +321,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, @@ -347,6 +337,7 @@ pub struct PaymentIntentNextActionAlipayHandleRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionBoleto { + /// The timestamp after which the boleto expires. pub expires_at: Option, @@ -362,6 +353,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. @@ -375,6 +367,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, @@ -402,6 +395,7 @@ pub struct PaymentIntentNextActionDisplayBankTransferInstructions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferFinancialAddress { + #[serde(skip_serializing_if = "Option::is_none")] pub iban: Option, @@ -413,8 +407,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>, /// The type of financial address. #[serde(rename = "type")] @@ -426,6 +419,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { #[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, @@ -441,6 +435,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, @@ -453,6 +448,7 @@ pub struct FundingInstructionsBankTransferSortCodeRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSpeiRecord { + /// The three-digit bank code. pub bank_code: String, @@ -465,6 +461,7 @@ pub struct FundingInstructionsBankTransferSpeiRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { + /// The account holder name. pub account_holder_name: Option, @@ -491,6 +488,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, @@ -503,6 +501,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, @@ -514,6 +513,7 @@ pub struct PaymentIntentNextActionKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniStores { + /// FamilyMart instruction details. pub familymart: Option, @@ -529,6 +529,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, @@ -539,6 +540,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, @@ -549,6 +551,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, @@ -559,6 +562,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, @@ -569,6 +573,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, @@ -584,6 +589,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, @@ -607,6 +613,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, @@ -622,6 +629,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, @@ -631,6 +639,7 @@ pub struct PaymentIntentNextActionRedirectToUrl { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionVerifyWithMicrodeposits { + /// The timestamp when the microdeposits are expected to land. pub arrival_date: Timestamp, @@ -645,6 +654,7 @@ pub struct PaymentIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionWechatPayDisplayQrCode { + /// The data being used to generate QR code. pub data: String, @@ -663,6 +673,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, @@ -687,12 +698,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, @@ -795,6 +808,7 @@ pub struct PaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -813,6 +827,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. @@ -823,10 +838,12 @@ pub struct PaymentIntentPaymentMethodOptionsAuBecsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentIntentPaymentMethodOptionsBlik {} +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, @@ -880,6 +897,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. @@ -891,6 +909,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, @@ -909,6 +928,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, @@ -919,16 +939,15 @@ 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 PaymentIntentPaymentMethodOptionsSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -942,17 +961,18 @@ pub struct PaymentIntentPaymentMethodOptionsSepaDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {} +pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, /// 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. /// @@ -964,12 +984,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, @@ -980,12 +1000,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. @@ -997,6 +1019,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, @@ -1016,6 +1039,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, @@ -1037,6 +1061,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. @@ -1048,6 +1073,7 @@ pub struct PaymentMethodOptionsAlipay { #[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. @@ -1059,6 +1085,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, @@ -1073,6 +1100,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. @@ -1089,6 +1117,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>, @@ -1101,6 +1130,7 @@ pub struct PaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1147,6 +1177,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, @@ -1158,6 +1189,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, @@ -1173,6 +1205,7 @@ pub struct PaymentMethodOptionsCashapp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -1192,6 +1225,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, @@ -1199,8 +1233,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")] @@ -1209,6 +1242,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. @@ -1220,6 +1254,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. @@ -1231,6 +1266,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. @@ -1242,6 +1278,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. @@ -1252,10 +1289,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, @@ -1274,6 +1313,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, @@ -1301,6 +1341,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. @@ -1317,6 +1358,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. @@ -1328,6 +1370,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. @@ -1339,6 +1382,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, @@ -1363,6 +1407,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, @@ -1380,6 +1425,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. @@ -1391,6 +1437,7 @@ pub struct PaymentMethodOptionsPromptpay { #[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, @@ -1405,6 +1452,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. @@ -1424,6 +1472,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. @@ -1435,6 +1484,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). @@ -1452,6 +1502,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). @@ -1624,7 +1675,7 @@ pub struct CreatePaymentIntent<'a> { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: Option<&'a str>, @@ -1673,6 +1724,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 it can be a dictionary with a number of different query options. @@ -1723,12 +1775,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). @@ -1874,6 +1926,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. @@ -1888,12 +1941,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, @@ -2046,6 +2101,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, @@ -2181,6 +2237,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, @@ -2188,6 +2245,7 @@ pub struct CreatePaymentIntentRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentShipping { + /// Shipping address. pub address: CreatePaymentIntentShippingAddress, @@ -2211,6 +2269,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. @@ -2231,6 +2290,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, @@ -2383,6 +2443,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, @@ -2518,6 +2579,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentShipping { + /// Shipping address. pub address: UpdatePaymentIntentShippingAddress, @@ -2541,6 +2603,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, @@ -2548,6 +2611,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, @@ -2569,6 +2633,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -2580,16 +2645,20 @@ pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAffirm {} +pub struct CreatePaymentIntentPaymentMethodDataAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAfterpayClearpay {} +pub struct CreatePaymentIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataAlipay {} +pub struct CreatePaymentIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -2599,6 +2668,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, @@ -2611,10 +2681,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, @@ -2633,22 +2705,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, @@ -2656,6 +2733,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, @@ -2665,58 +2743,72 @@ 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 {} +pub struct CreatePaymentIntentPaymentMethodDataLink { +} #[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, @@ -2724,22 +2816,24 @@ pub struct CreatePaymentIntentPaymentMethodDataRadarOptions { #[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 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")] @@ -2761,13 +2855,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, @@ -2778,17 +2875,16 @@ 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, /// 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 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. @@ -2812,14 +2908,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 `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, /// Order identifier shown to the customer in Afterpay’s online portal. /// @@ -2834,12 +2930,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. @@ -2851,34 +2947,34 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAlipay { #[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. /// @@ -2886,12 +2982,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. @@ -2901,6 +2997,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. @@ -2918,6 +3015,7 @@ 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. @@ -2964,8 +3062,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// If not provided, defaults to `automatic`. /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -2994,6 +3091,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, @@ -3007,6 +3105,7 @@ 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. @@ -3026,6 +3125,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, @@ -3042,12 +3142,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. @@ -3059,6 +3159,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. @@ -3070,6 +3171,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. @@ -3081,6 +3183,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. @@ -3092,6 +3195,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. @@ -3102,10 +3206,12 @@ 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. @@ -3129,6 +3235,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. @@ -3164,6 +3271,7 @@ 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. @@ -3187,6 +3295,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsLink { #[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. @@ -3204,6 +3313,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. @@ -3219,6 +3329,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. @@ -3230,6 +3341,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, @@ -3259,6 +3371,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. @@ -3282,18 +3395,19 @@ 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 CreatePaymentIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -3304,12 +3418,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, @@ -3325,10 +3439,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSofort { #[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 network related functions. #[serde(skip_serializing_if = "Option::is_none")] @@ -3336,8 +3450,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. /// @@ -3345,17 +3458,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, /// 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 CreatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -3371,12 +3483,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. @@ -3388,6 +3500,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, @@ -3415,6 +3528,7 @@ pub struct CreatePaymentIntentShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -3426,16 +3540,20 @@ 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 UpdatePaymentIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -3445,6 +3563,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, @@ -3457,10 +3576,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, @@ -3479,22 +3600,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, @@ -3502,6 +3628,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, @@ -3511,58 +3638,72 @@ 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 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, @@ -3570,22 +3711,24 @@ pub struct UpdatePaymentIntentPaymentMethodDataRadarOptions { #[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 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")] @@ -3607,13 +3750,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, @@ -3624,17 +3770,16 @@ 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, /// 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 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. @@ -3658,14 +3803,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 `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, /// Order identifier shown to the customer in Afterpay’s online portal. /// @@ -3680,12 +3825,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. @@ -3697,34 +3842,34 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAlipay { #[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. /// @@ -3732,12 +3877,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. @@ -3747,6 +3892,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. @@ -3764,6 +3910,7 @@ 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. @@ -3810,8 +3957,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// If not provided, defaults to `automatic`. /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3840,6 +3986,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, @@ -3853,6 +4000,7 @@ 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. @@ -3872,6 +4020,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, @@ -3888,12 +4037,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. @@ -3905,6 +4054,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. @@ -3916,6 +4066,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. @@ -3927,6 +4078,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. @@ -3938,6 +4090,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. @@ -3948,10 +4101,12 @@ 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. @@ -3975,6 +4130,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. @@ -4010,6 +4166,7 @@ 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. @@ -4033,6 +4190,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsLink { #[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. @@ -4050,6 +4208,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. @@ -4065,6 +4224,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. @@ -4076,6 +4236,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, @@ -4105,6 +4266,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. @@ -4128,18 +4290,19 @@ 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 UpdatePaymentIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -4150,12 +4313,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, @@ -4171,10 +4334,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSofort { #[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 network related functions. #[serde(skip_serializing_if = "Option::is_none")] @@ -4182,8 +4345,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. /// @@ -4191,17 +4353,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, /// 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 UpdatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -4217,12 +4378,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. @@ -4234,6 +4395,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, @@ -4260,10 +4422,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, @@ -4273,6 +4437,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, @@ -4300,6 +4465,7 @@ pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4312,6 +4478,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. @@ -4326,17 +4493,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. @@ -4351,6 +4517,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4396,26 +4563,21 @@ 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 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")] @@ -4423,18 +4585,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>, /// For webview integrations only. /// @@ -4445,14 +4611,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[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, @@ -4480,6 +4647,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4492,6 +4660,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. @@ -4506,17 +4675,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. @@ -4531,6 +4699,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4576,26 +4745,21 @@ 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 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")] @@ -4603,18 +4767,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>, /// For webview integrations only. /// @@ -4625,14 +4793,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[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, @@ -4647,6 +4816,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[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`. @@ -4655,6 +4825,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, @@ -4669,6 +4840,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[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`. @@ -4780,57 +4952,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", @@ -5068,9 +5212,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", @@ -5080,12 +5222,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::VolkswagenBank => "volkswagen_bank", } @@ -5258,12 +5396,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", } } } @@ -5344,16 +5478,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 } @@ -5382,16 +5512,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 } @@ -5410,12 +5536,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", } } } @@ -5449,15 +5571,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", } } } @@ -5553,9 +5669,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -5571,9 +5685,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 } @@ -5605,9 +5717,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 } @@ -5625,9 +5735,7 @@ impl CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -5662,12 +5770,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", } } } @@ -5702,12 +5806,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", } } } @@ -5779,9 +5879,7 @@ impl CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -5816,12 +5914,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", } } } @@ -5917,9 +6011,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -5953,9 +6045,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -5993,9 +6083,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -6029,9 +6117,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -6047,9 +6133,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 } @@ -6076,9 +6160,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", @@ -6121,9 +6203,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } @@ -6158,9 +6238,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", } } @@ -6228,12 +6306,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", } } } @@ -6282,24 +6356,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 } @@ -6339,9 +6407,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 } @@ -6357,9 +6423,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -6407,9 +6471,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 } @@ -6555,9 +6617,7 @@ impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -6881,9 +6941,7 @@ impl CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -7138,9 +7196,7 @@ impl CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -7239,12 +7295,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", } } } @@ -7322,9 +7374,7 @@ impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -7367,24 +7417,50 @@ 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 + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -7418,9 +7494,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 } @@ -7449,16 +7523,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 } @@ -7477,12 +7547,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", } } } @@ -7498,9 +7564,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 } @@ -7536,9 +7600,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 } @@ -7884,21 +7946,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", } } } @@ -7932,9 +7984,7 @@ impl PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -8006,9 +8056,7 @@ impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -8043,9 +8091,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", } } @@ -8166,9 +8212,7 @@ impl PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", - PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => { - "challenge_only" - } + PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => "challenge_only", } } } @@ -8336,15 +8380,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", } } } @@ -8360,9 +8398,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 } @@ -8379,12 +8415,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", } } } @@ -8400,9 +8432,7 @@ 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 } @@ -8455,12 +8485,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", } } } @@ -8476,9 +8502,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 } @@ -8497,12 +8521,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", } } } @@ -8536,13 +8556,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", } } } @@ -9207,14 +9223,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", } } } @@ -9230,9 +9242,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 } @@ -9252,21 +9262,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", } } } @@ -10019,57 +10019,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", @@ -10307,9 +10279,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", @@ -10319,12 +10289,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::VolkswagenBank => "volkswagen_bank", } @@ -10497,12 +10463,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", } } } @@ -10583,16 +10545,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 } @@ -10621,16 +10579,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 } @@ -10649,12 +10603,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", } } } @@ -10688,15 +10638,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", } } } @@ -10792,9 +10736,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -10810,9 +10752,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 } @@ -10844,9 +10784,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 } @@ -10864,9 +10802,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -10901,12 +10837,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", } } } @@ -10941,12 +10873,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", } } } @@ -11018,9 +10946,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -11055,12 +10981,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", } } } @@ -11156,9 +11078,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -11192,9 +11112,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -11232,9 +11150,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -11268,9 +11184,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -11286,9 +11200,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 } @@ -11315,9 +11227,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", @@ -11360,9 +11270,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } @@ -11397,9 +11305,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", } } @@ -11467,12 +11373,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", } } } @@ -11521,24 +11423,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 } @@ -11578,9 +11474,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 } @@ -11596,9 +11490,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -11646,9 +11538,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 } @@ -11794,9 +11684,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -12120,9 +12008,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -12377,9 +12263,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -12478,12 +12362,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", } } } @@ -12561,9 +12441,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -12606,24 +12484,50 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPer } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn default() -> Self { + Self::Balances + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -12657,9 +12561,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 } @@ -12688,16 +12590,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 } @@ -12716,12 +12614,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", } } } @@ -12737,9 +12631,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 } @@ -12775,9 +12667,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 754145cae..b2419a8f0 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2,14 +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, CheckoutSessionItem, Currency, InvoiceSettingRenderingOptions, ShippingRate, TaxId, -}; +use crate::resources::{Account, CheckoutSessionItem, Currency, InvoiceSettingRenderingOptions, ShippingRate, TaxId}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentLink". /// @@ -115,10 +112,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", ¶ms) - } +pub fn list(client: &Client, params: &ListPaymentLinks<'_>) -> Response> { + client.get_query("/payment_links", ¶ms) +} + /// Creates a payment link. pub fn create(client: &Client, params: CreatePaymentLink<'_>) -> Response { @@ -131,11 +130,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 { client.post_form(&format!("/payment_links/{}", id), ¶ms) } } @@ -152,6 +147,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, @@ -165,24 +161,28 @@ 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, } #[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 { + /// If set to `auto`, enables the collection of customer consent for promotional communications. pub promotions: Option, @@ -194,6 +194,7 @@ pub struct PaymentLinksResourceConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFields { + /// Configuration for `type=dropdown` fields. pub dropdown: Option, @@ -222,6 +223,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. @@ -230,6 +232,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. @@ -243,6 +246,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. @@ -255,6 +259,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, @@ -264,6 +269,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, @@ -273,6 +279,7 @@ pub struct PaymentLinksResourceCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomText { + /// Custom text that should be displayed alongside shipping address collection. pub shipping_address: Option, @@ -282,12 +289,14 @@ pub struct PaymentLinksResourceCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomTextPosition { + /// Text may be up to 1000 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, @@ -299,6 +308,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>>, @@ -324,6 +334,7 @@ pub struct PaymentLinksResourceInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -333,6 +344,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, @@ -342,12 +354,14 @@ pub struct PaymentLinksResourcePaymentIntentData { #[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 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`. @@ -356,6 +370,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, @@ -365,6 +380,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. @@ -376,12 +392,14 @@ pub struct PaymentLinksResourceSubscriptionData { #[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. @@ -394,6 +412,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, @@ -561,6 +580,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, @@ -604,12 +624,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. @@ -678,7 +698,7 @@ pub struct UpdatePaymentLink<'a> { /// The list of payment method types that customers can use. /// - /// Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + /// Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, @@ -711,6 +731,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, @@ -728,12 +749,14 @@ 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkConsentCollection { + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -749,6 +772,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, @@ -782,6 +806,7 @@ pub struct CreatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomText { + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -793,6 +818,7 @@ pub struct CreatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -803,6 +829,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, @@ -816,6 +843,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, @@ -837,12 +865,14 @@ 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 CreatePaymentLinkShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -852,6 +882,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, @@ -859,6 +890,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. @@ -874,12 +906,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, @@ -894,6 +928,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, @@ -911,12 +946,14 @@ 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFields { + /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -950,6 +987,7 @@ pub struct UpdatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomText { + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -961,6 +999,7 @@ pub struct UpdatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -971,6 +1010,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, @@ -985,6 +1025,7 @@ pub struct UpdatePaymentLinkLineItems { #[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. /// @@ -994,6 +1035,7 @@ pub struct UpdatePaymentLinkShippingAddressCollection { #[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, @@ -1001,6 +1043,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. @@ -1009,6 +1052,7 @@ pub struct CreatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1017,6 +1061,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. @@ -1029,6 +1074,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, @@ -1040,6 +1086,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, @@ -1051,18 +1098,21 @@ pub struct CreatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1000 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextSubmit { + /// Text may be up to 1000 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>, @@ -1096,6 +1146,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, @@ -1116,6 +1167,7 @@ pub struct CreatePaymentLinkLineItemsAdjustableQuantity { #[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, @@ -1123,6 +1175,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. @@ -1131,6 +1184,7 @@ pub struct UpdatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1139,6 +1193,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. @@ -1151,6 +1206,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, @@ -1162,6 +1218,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, @@ -1173,18 +1230,21 @@ pub struct UpdatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1000 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextSubmit { + /// Text may be up to 1000 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>, @@ -1218,6 +1278,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, @@ -1238,6 +1299,7 @@ pub struct UpdatePaymentLinkLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1251,6 +1313,7 @@ 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. @@ -1264,18 +1327,19 @@ pub struct CreatePaymentLinkInvoiceCreationInvoiceDataCustomFields { #[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 UpdatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1289,6 +1353,7 @@ 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. @@ -1302,14 +1367,14 @@ pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataCustomFields { #[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, } /// An enum representing the possible values of an `CreatePaymentLinkAfterCompletion`'s `type` field. @@ -1505,16 +1570,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 } @@ -3749,16 +3810,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 } diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 9f1981e5e..cd5073307 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::{Address, BillingDetails, Charge, Customer, PaymentMethodCardPresentNetworks, RadarRadarOptions, SetupAttempt}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethod". /// @@ -151,12 +147,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", ¶ms) - } +pub fn list(client: &Client, params: &ListPaymentMethods<'_>) -> Response> { + client.get_query("/payment_methods", ¶ms) +} + /// Creates a PaymentMethod object. /// @@ -168,22 +166,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 { client.post_form(&format!("/payment_methods/{}", id), ¶ms) } } @@ -199,10 +189,12 @@ impl Object for PaymentMethod { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentFlowsPrivatePaymentMethodsAlipay {} +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, @@ -222,13 +214,16 @@ pub struct PaymentMethodAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAffirm {} +pub struct PaymentMethodAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAfterpayClearpay {} +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, @@ -243,6 +238,7 @@ pub struct PaymentMethodAuBecsDebit { #[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. @@ -258,19 +254,23 @@ pub struct PaymentMethodBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBancontact {} +pub struct PaymentMethodBancontact { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBlik {} +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`. @@ -299,7 +299,7 @@ pub struct CardDetails { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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, @@ -335,6 +335,7 @@ pub struct CardDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Networks { + /// All available networks for the card. pub available: Vec, @@ -344,6 +345,7 @@ pub struct Networks { #[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, @@ -356,6 +358,7 @@ pub struct PaymentMethodCardChecks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CardPresent { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -388,7 +391,7 @@ pub struct CardPresent { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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. @@ -420,6 +423,7 @@ pub struct CardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct WalletDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub amex_express_checkout: Option, @@ -453,19 +457,24 @@ pub struct WalletDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletAmexExpressCheckout {} +pub struct WalletAmexExpressCheckout { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletApplePay {} +pub struct WalletApplePay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletGooglePay {} +pub struct WalletGooglePay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardWalletLink {} +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. @@ -492,10 +501,12 @@ pub struct WalletMasterpass { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletSamsungPay {} +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. @@ -523,6 +534,7 @@ pub struct WalletVisaCheckout { #[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, @@ -531,10 +543,12 @@ pub struct PaymentMethodCashapp { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCustomerBalance {} +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`. @@ -543,6 +557,7 @@ pub struct PaymentMethodEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodFpx { + /// Account holder type, if provided. /// /// Can be one of `individual` or `company`. @@ -555,13 +570,16 @@ pub struct PaymentMethodFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGiropay {} +pub struct PaymentMethodGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGrabpay {} +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`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -573,6 +591,7 @@ pub struct PaymentMethodIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -605,7 +624,7 @@ pub struct PaymentMethodInteracPresent { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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. @@ -642,12 +661,14 @@ pub struct PaymentMethodInteracPresent { #[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, @@ -659,15 +680,11 @@ pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKonbini {} +pub struct PaymentMethodKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodLink { - /// Two-letter ISO code representing the funding source (i.e. - /// - /// card, bank) country beneath the Link payment method. You could use this attribute to get a sense of the international breakdown of funding sources you've collected. - #[serde(skip_serializing_if = "Option::is_none")] - pub country: Option, /// Account owner's email address. pub email: Option, @@ -678,19 +695,23 @@ pub struct PaymentMethodLink { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOxxo {} +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 {} +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. @@ -706,13 +727,16 @@ pub struct PaymentMethodPaypal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPix {} +pub struct PaymentMethodPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPromptpay {} +pub struct PaymentMethodPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodSepaDebit { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -736,12 +760,14 @@ pub struct PaymentMethodSepaDebit { #[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 PaymentMethodUsBankAccount { + /// Account holder type: individual or company. pub account_holder_type: Option, @@ -778,12 +804,14 @@ pub struct PaymentMethodUsBankAccount { #[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, @@ -792,13 +820,16 @@ pub struct PaymentMethodUsBankAccountBlocked { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodWechatPay {} +pub struct PaymentMethodWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodZip {} +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>, @@ -808,12 +839,14 @@ pub struct SepaDebitGeneratedFrom { #[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, @@ -824,6 +857,7 @@ pub struct UsBankAccountNetworks { /// 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, @@ -1044,6 +1078,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, @@ -1096,56 +1131,20 @@ 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 is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub acss_debit: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub affirm: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub au_becs_debit: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub bacs_debit: 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, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// If this is a `card` PaymentMethod, this hash contains the user's card details. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub cashapp: Option, - /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -1162,46 +1161,27 @@ pub struct UpdatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub sepa_debit: Option, - /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub zip: Option, } impl<'a> UpdatePaymentMethod<'a> { pub fn new() -> Self { UpdatePaymentMethod { - acss_debit: Default::default(), - affirm: Default::default(), - au_becs_debit: Default::default(), - bacs_debit: Default::default(), billing_details: Default::default(), - blik: Default::default(), card: Default::default(), - cashapp: Default::default(), expand: Default::default(), link: Default::default(), metadata: Default::default(), - sepa_debit: Default::default(), us_bank_account: Default::default(), - zip: Default::default(), } } } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1213,16 +1193,20 @@ pub struct CreatePaymentMethodAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAffirm {} +pub struct CreatePaymentMethodAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAfterpayClearpay {} +pub struct CreatePaymentMethodAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAlipay {} +pub struct CreatePaymentMethodAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1232,6 +1216,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, @@ -1244,25 +1229,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, @@ -1270,6 +1261,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, @@ -1279,58 +1271,72 @@ 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 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, @@ -1338,18 +1344,21 @@ pub struct CreatePaymentMethodRadarOptions { #[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 CreatePaymentMethodUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1374,47 +1383,28 @@ pub struct CreatePaymentMethodUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodWechatPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodZip {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAcssDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAffirm {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAuBecsDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodBacsDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodBlik {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodCashapp {} +pub struct CreatePaymentMethodWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodLink {} +pub struct CreatePaymentMethodZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodSepaDebit {} +pub struct UpdatePaymentMethodLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodUsBankAccount { + /// Bank account type. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodZip {} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1506,9 +1496,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", @@ -1518,25 +1506,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", @@ -1966,9 +1944,7 @@ impl PaymentMethodEpsBank { PaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", PaymentMethodEpsBank::BankAustria => "bank_austria", PaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } + PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", PaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", PaymentMethodEpsBank::BksBankAg => "bks_bank_ag", PaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", @@ -1978,25 +1954,15 @@ impl PaymentMethodEpsBank { 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::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::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", PaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", PaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", PaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", @@ -2280,12 +2246,8 @@ impl PaymentMethodInteracPresentReadMethod { match self { PaymentMethodInteracPresentReadMethod::ContactEmv => "contact_emv", PaymentMethodInteracPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } + PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", PaymentMethodInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", } } @@ -2498,7 +2460,6 @@ pub enum PaymentMethodTypeFilter { Blik, Boleto, Card, - CardPresent, Cashapp, CustomerBalance, Eps, @@ -2535,7 +2496,6 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Blik => "blik", PaymentMethodTypeFilter::Boleto => "boleto", PaymentMethodTypeFilter::Card => "card", - PaymentMethodTypeFilter::CardPresent => "card_present", PaymentMethodTypeFilter::Cashapp => "cashapp", PaymentMethodTypeFilter::CustomerBalance => "customer_balance", PaymentMethodTypeFilter::Eps => "eps", @@ -2729,12 +2689,8 @@ impl PaymentMethodUsBankAccountBlockedReason { match self { PaymentMethodUsBankAccountBlockedReason::BankAccountClosed => "bank_account_closed", PaymentMethodUsBankAccountBlockedReason::BankAccountFrozen => "bank_account_frozen", - PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => { - "bank_account_invalid_details" - } - PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => { - "bank_account_restricted" - } + PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => "bank_account_invalid_details", + PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => "bank_account_restricted", PaymentMethodUsBankAccountBlockedReason::BankAccountUnusable => "bank_account_unusable", PaymentMethodUsBankAccountBlockedReason::DebitNotAuthorized => "debit_not_authorized", } @@ -2878,8 +2834,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)] diff --git a/src/resources/generated/payment_method_card_present_networks.rs b/src/resources/generated/payment_method_card_present_networks.rs index edc632cd5..b0387e030 100644 --- a/src/resources/generated/payment_method_card_present_networks.rs +++ b/src/resources/generated/payment_method_card_present_networks.rs @@ -7,6 +7,7 @@ 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, diff --git a/src/resources/generated/payment_method_details_card_checks.rs b/src/resources/generated/payment_method_details_card_checks.rs index d01d16696..0e07be6ee 100644 --- a/src/resources/generated/payment_method_details_card_checks.rs +++ b/src/resources/generated/payment_method_details_card_checks.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_details_card_checks". #[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, 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_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/payout.rs b/src/resources/generated/payout.rs index cfe9c41c8..f0bda1cab 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". /// @@ -70,8 +69,8 @@ pub struct Payout { /// The method used to send this payout, which can be `standard` or `instant`. /// - /// `instant` is only supported for payouts to debit cards. - /// (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.). + /// `instant` is supported for payouts to debit cards and bank accounts in certain countries. + /// (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.). pub method: String, /// If the payout reverses another, this is the ID of the original payout. @@ -104,12 +103,14 @@ pub struct Payout { } impl Payout { + /// Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. /// /// The payouts are returned in sorted order, with the most recently created payouts appearing first. - pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { - client.get_query("/payouts", ¶ms) - } +pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { + client.get_query("/payouts", ¶ms) +} + /// To send funds to your own bank account, you create a new payout object. /// @@ -148,6 +149,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, @@ -182,8 +184,8 @@ pub struct CreatePayout<'a> { /// The method used to send this payout, which can be `standard` or `instant`. /// - /// `instant` is only supported for payouts to debit cards. - /// (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).). + /// `instant` is supported for payouts to debit cards and bank accounts in certain countries. + /// (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.). #[serde(skip_serializing_if = "Option::is_none")] pub method: Option, @@ -224,6 +226,7 @@ impl<'a> CreatePayout<'a> { /// The parameters for `Payout::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPayouts<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub arrival_date: Option>, @@ -280,12 +283,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], @@ -301,7 +304,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 be8219724..07b78c7f2 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". /// @@ -146,6 +145,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, @@ -158,6 +158,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, @@ -185,6 +186,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>, @@ -204,6 +206,7 @@ pub struct PersonVerificationDocument { #[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>, @@ -235,6 +238,7 @@ pub struct PersonFutureRequirements { #[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, @@ -244,6 +248,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -256,6 +261,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. @@ -283,6 +289,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>, @@ -322,10 +329,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -351,6 +360,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -362,6 +372,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -376,10 +387,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -405,6 +418,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -416,6 +430,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", 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 ec51e0351..e2eb69522 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". /// @@ -132,10 +128,12 @@ pub struct Plan { } impl Plan { + /// Returns a list of your plans. - pub fn list(client: &Client, params: &ListPlans<'_>) -> Response> { - client.get_query("/plans", ¶ms) - } +pub fn list(client: &Client, params: &ListPlans<'_>) -> Response> { + client.get_query("/plans", ¶ms) +} + /// Retrieves the plan with the given ID. pub fn retrieve(client: &Client, id: &PlanId, expand: &[&str]) -> Response { @@ -170,6 +168,7 @@ impl Object for Plan { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PlanTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -188,6 +187,7 @@ pub struct PlanTier { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformUsage { + /// Divide usage by this number. pub divide_by: i64, @@ -198,6 +198,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, @@ -253,12 +254,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 8645612dd..4ae3a7329 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,10 +129,12 @@ pub struct Price { } impl Price { + /// Returns a list of your prices. - pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { - client.get_query("/prices", ¶ms) - } +pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { + client.get_query("/prices", ¶ms) +} + /// Creates a new price for an existing product. /// @@ -170,6 +168,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, @@ -200,6 +199,7 @@ pub struct CurrencyOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PriceTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -218,6 +218,7 @@ pub struct PriceTier { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Recurring { + /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. /// /// Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. @@ -248,6 +249,7 @@ pub struct Recurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -258,6 +260,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`. @@ -394,6 +397,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, @@ -470,12 +474,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`. @@ -510,10 +514,6 @@ pub struct UpdatePrice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub nickname: Option<&'a str>, - /// The recurring components of a price such as `interval` and `usage_type`. - #[serde(skip_serializing_if = "Option::is_none")] - pub recurring: Option, - /// Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. /// /// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. @@ -536,7 +536,6 @@ impl<'a> UpdatePrice<'a> { lookup_key: Default::default(), metadata: Default::default(), nickname: Default::default(), - recurring: Default::default(), tax_behavior: Default::default(), transfer_lookup_key: Default::default(), } @@ -545,6 +544,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, @@ -577,6 +577,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, @@ -597,6 +598,7 @@ pub struct CreatePriceCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceProductData { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -642,6 +644,7 @@ pub struct CreatePriceProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceRecurring { + /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. /// /// Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. @@ -677,6 +680,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, @@ -706,6 +710,7 @@ pub struct CreatePriceTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -715,6 +720,7 @@ pub struct CreatePriceTransformQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListPricesRecurring { + /// Filter by billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -730,6 +736,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, @@ -760,15 +767,9 @@ pub struct UpdatePriceCurrencyOptions { pub unit_amount_decimal: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePriceRecurring { - /// Default number of trial days when subscribing a customer to this plan 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, -} - #[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, @@ -789,6 +790,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, @@ -818,6 +820,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, @@ -838,6 +841,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 dac375d4d..0a9e1d5b4 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". /// @@ -24,28 +20,12 @@ pub struct Product { #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, - /// A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`). - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// Only applicable to products of `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option, - /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option, - /// An array of connect application identifiers that cannot purchase this product. - /// - /// Only applicable to products of `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. #[serde(skip_serializing_if = "Option::is_none")] pub default_price: Option>, @@ -121,12 +101,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", ¶ms) - } +pub fn list(client: &Client, params: &ListProducts<'_>) -> Response> { + client.get_query("/products", ¶ms) +} + /// Creates a new product object. pub fn create(client: &Client, params: CreateProduct<'_>) -> Response { @@ -168,6 +150,7 @@ impl Object for Product { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PackageDimensions { + /// Height, in inches. pub height: f64, @@ -184,30 +167,13 @@ pub struct PackageDimensions { /// The parameters for `Product::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateProduct<'a> { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, - /// A list of up to 5 alphanumeric attributes. - /// - /// Should only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// May only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option<&'a str>, - - /// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. - /// - /// May only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. /// /// This Price will be set as the default price for this product. @@ -289,9 +255,6 @@ impl<'a> CreateProduct<'a> { pub fn new(name: &'a str) -> Self { CreateProduct { active: Default::default(), - attributes: Default::default(), - caption: Default::default(), - deactivate_on: Default::default(), default_price_data: Default::default(), description: Default::default(), expand: Default::default(), @@ -313,6 +276,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, @@ -384,35 +348,16 @@ 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, - /// A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., `["color", "size"]`). - /// - /// If a value for `attributes` is specified, the list specified will replace the existing attributes list on this product. - /// Any attributes not present after the update will be deleted from the SKUs for this product. - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// May only be set if `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option, - - /// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. - /// - /// May only be set if `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. #[serde(skip_serializing_if = "Option::is_none")] pub default_price: Option<&'a str>, @@ -480,9 +425,6 @@ impl<'a> UpdateProduct<'a> { pub fn new() -> Self { UpdateProduct { active: Default::default(), - attributes: Default::default(), - caption: Default::default(), - deactivate_on: Default::default(), default_price: Default::default(), description: Default::default(), expand: Default::default(), @@ -501,6 +443,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). @@ -539,6 +482,7 @@ pub struct CreateProductDefaultPriceData { #[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, @@ -571,6 +515,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -586,6 +531,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, @@ -606,6 +552,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/promotion_code.rs b/src/resources/generated/promotion_code.rs index d08d6eaca..51ee86d33 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", ¶ms) - } +pub fn list(client: &Client, params: &ListPromotionCodes<'_>) -> Response> { + client.get_query("/promotion_codes", ¶ms) +} + /// 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 { client.post_form(&format!("/promotion_codes/{}", id), ¶ms) } } @@ -100,6 +91,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). @@ -118,6 +110,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, } @@ -125,6 +118,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, @@ -190,12 +184,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. @@ -232,6 +226,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). @@ -241,6 +236,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 071a6f02b..6acd40ded 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -2,15 +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, Currency, Customer, Discount, Invoice, - QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, Currency, Customer, Discount, Invoice, QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Quote". /// @@ -144,10 +140,12 @@ pub struct Quote { } impl Quote { + /// Returns a list of your quotes. - pub fn list(client: &Client, params: &ListQuotes<'_>) -> Response> { - client.get_query("/quotes", ¶ms) - } +pub fn list(client: &Client, params: &ListQuotes<'_>) -> Response> { + client.get_query("/quotes", ¶ms) +} + /// Retrieves the quote with the given ID. pub fn retrieve(client: &Client, id: &QuoteId, expand: &[&str]) -> Response { @@ -167,6 +165,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`. @@ -175,6 +174,7 @@ pub struct InvoiceSettingQuoteSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceAutomaticTax { + /// Automatically calculate taxes. pub enabled: bool, @@ -184,6 +184,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. @@ -195,6 +196,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, @@ -204,6 +206,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, @@ -225,6 +228,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. @@ -243,6 +247,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. @@ -260,6 +265,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. @@ -277,6 +283,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, @@ -295,6 +302,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, @@ -350,9 +358,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 3d2a9ea7e..68978c5c8 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,13 +93,15 @@ pub struct Refund { } impl Refund { + /// Returns a list of all refunds you’ve previously created. /// /// The refunds are returned in sorted order, with the most recent refunds appearing first. /// For convenience, 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", ¶ms) - } +pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { + client.get_query("/refunds", ¶ms) +} + /// Create a refund. pub fn create(client: &Client, params: CreateRefund<'_>) -> Response { @@ -132,6 +133,7 @@ impl Object for Refund { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { + /// Contains the refund details. pub display_details: Option, @@ -142,6 +144,7 @@ pub struct RefundNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextActionDisplayDetails { + pub email_sent: EmailSent, /// The expiry timestamp. @@ -150,6 +153,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, @@ -160,6 +164,7 @@ pub struct EmailSent { /// The parameters for `Refund::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateRefund<'a> { + /// A positive integer representing how much to refund. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -232,6 +237,7 @@ 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, @@ -284,12 +290,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], @@ -305,7 +311,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 3cb8a20f3..6a3b76e1f 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", ¶ms) - } +pub fn list(client: &Client, params: &ListReviews<'_>) -> Response> { + client.get_query("/reviews", ¶ms) +} + /// 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,7 @@ pub struct RadarReviewResourceSession { /// The parameters for `Review::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListReviews<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -167,9 +171,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 001d4f079..44d9ca206 100644 --- a/src/resources/generated/setup_attempt.rs +++ b/src/resources/generated/setup_attempt.rs @@ -2,16 +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, - PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardWalletApplePay, - PaymentMethodDetailsCardWalletGooglePay, SetupIntent, ThreeDSecureDetails, -}; +use crate::resources::{Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, SetupIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentFlowsSetupIntentSetupAttempt". /// @@ -73,10 +68,12 @@ pub struct SetupAttempt { } impl SetupAttempt { + /// Returns a list of SetupAttempts associated with a provided SetupIntent. - pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { - client.get_query("/setup_attempts", ¶ms) - } +pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { + client.get_query("/setup_attempts", ¶ms) +} + } impl Object for SetupAttempt { @@ -91,6 +88,7 @@ impl Object for SetupAttempt { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -103,9 +101,6 @@ pub struct SetupAttemptPaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub bancontact: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub boleto: Option, @@ -148,16 +143,20 @@ pub struct SetupAttemptPaymentMethodDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsAcssDebit {} +pub struct SetupAttemptPaymentMethodDetailsAcssDebit { +} #[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, @@ -188,13 +187,12 @@ pub struct SetupAttemptPaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBlik {} - -#[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`. @@ -223,7 +221,7 @@ pub struct SetupAttemptPaymentMethodDetailsCard { /// 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. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// 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, @@ -261,12 +259,14 @@ pub struct SetupAttemptPaymentMethodDetailsCard { #[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>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardWallet { + #[serde(skip_serializing_if = "Option::is_none")] pub apple_pay: Option, @@ -282,10 +282,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`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -311,19 +313,24 @@ pub struct SetupAttemptPaymentMethodDetailsIdeal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsKlarna {} +pub struct SetupAttemptPaymentMethodDetailsKlarna { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsLink {} +pub struct SetupAttemptPaymentMethodDetailsLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsPaypal {} +pub struct SetupAttemptPaymentMethodDetailsPaypal { +} #[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, @@ -354,11 +361,31 @@ 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, + + /// Indicates the outcome of 3D Secure authentication. + pub result: Option, + + /// Additional information about why 3D Secure succeeded or failed based + /// on the `result`. + pub result_reason: Option, + + /// The version of 3D Secure that was used. + pub version: Option, +} /// 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 it can be a dictionary with a number of different query options. @@ -409,9 +436,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")] @@ -690,3 +716,162 @@ impl std::default::Default for SetupAttemptPaymentMethodDetailsSofortPreferredLa Self::De } } + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `authentication_flow` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsAuthenticationFlow { + Challenge, + Frictionless, +} + +impl ThreeDSecureDetailsAuthenticationFlow { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsAuthenticationFlow::Challenge => "challenge", + ThreeDSecureDetailsAuthenticationFlow::Frictionless => "frictionless", + } + } +} + +impl AsRef for ThreeDSecureDetailsAuthenticationFlow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsAuthenticationFlow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsAuthenticationFlow { + fn default() -> Self { + Self::Challenge + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsResult { + AttemptAcknowledged, + Authenticated, + Exempted, + Failed, + NotSupported, + ProcessingError, +} + +impl ThreeDSecureDetailsResult { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsResult::AttemptAcknowledged => "attempt_acknowledged", + ThreeDSecureDetailsResult::Authenticated => "authenticated", + ThreeDSecureDetailsResult::Exempted => "exempted", + ThreeDSecureDetailsResult::Failed => "failed", + ThreeDSecureDetailsResult::NotSupported => "not_supported", + ThreeDSecureDetailsResult::ProcessingError => "processing_error", + } + } +} + +impl AsRef for ThreeDSecureDetailsResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsResult { + fn default() -> Self { + Self::AttemptAcknowledged + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsResultReason { + Abandoned, + Bypassed, + Canceled, + CardNotEnrolled, + NetworkNotSupported, + ProtocolError, + Rejected, +} + +impl ThreeDSecureDetailsResultReason { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsResultReason::Abandoned => "abandoned", + ThreeDSecureDetailsResultReason::Bypassed => "bypassed", + ThreeDSecureDetailsResultReason::Canceled => "canceled", + ThreeDSecureDetailsResultReason::CardNotEnrolled => "card_not_enrolled", + ThreeDSecureDetailsResultReason::NetworkNotSupported => "network_not_supported", + ThreeDSecureDetailsResultReason::ProtocolError => "protocol_error", + ThreeDSecureDetailsResultReason::Rejected => "rejected", + } + } +} + +impl AsRef for ThreeDSecureDetailsResultReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsResultReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsResultReason { + fn default() -> Self { + Self::Abandoned + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl ThreeDSecureDetailsVersion { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsVersion::V1_0_2 => "1.0.2", + ThreeDSecureDetailsVersion::V2_1_0 => "2.1.0", + ThreeDSecureDetailsVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for ThreeDSecureDetailsVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsVersion { + fn default() -> Self { + Self::V1_0_2 + } +} diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index aa003a200..1946e3d85 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -2,16 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, PaymentMethodId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, - Mandate, MandateOptionsOffSessionDetailsBlik, - PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, SetupAttempt, -}; +use crate::resources::{Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, SetupAttempt}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SetupIntent". /// @@ -32,7 +27,7 @@ pub struct SetupIntent { #[serde(skip_serializing_if = "Option::is_none")] pub attach_to_self: Option, - /// Settings for automatic payment methods compatible with this Setup Intent. + /// Settings for dynamic payment methods compatible with this Setup Intent. pub automatic_payment_methods: Option, /// Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. @@ -120,10 +115,12 @@ pub struct SetupIntent { } impl SetupIntent { + /// Returns a list of SetupIntents. - pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { - client.get_query("/setup_intents", ¶ms) - } +pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { + client.get_query("/setup_intents", ¶ms) +} + /// Creates a SetupIntent object. /// @@ -143,11 +140,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 { client.post_form(&format!("/setup_intents/{}", id), ¶ms) } } @@ -164,6 +157,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. @@ -178,9 +172,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, @@ -201,6 +195,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, @@ -210,6 +205,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, @@ -224,11 +220,9 @@ 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 blik: Option, + pub acss_debit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -248,6 +242,7 @@ pub struct SetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsAcssDebit { + /// Currency supported by the bank account. pub currency: Option, @@ -259,14 +254,9 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebit { pub verification_method: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupIntentPaymentMethodOptionsBlik { - #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. pub mandate_options: Option, @@ -287,6 +277,7 @@ pub struct SetupIntentPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -333,18 +324,19 @@ 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 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, @@ -359,29 +351,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, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupIntentPaymentMethodOptionsMandateOptionsBlik { - /// Date at which the mandate expires. - pub expires_after: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub off_session: Option, - - /// Type of the mandate. - #[serde(rename = "type")] - pub 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. @@ -390,15 +368,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, @@ -410,6 +391,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. @@ -537,6 +519,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. @@ -601,12 +584,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. @@ -690,6 +673,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. @@ -704,12 +688,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, @@ -862,14 +848,11 @@ 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 `blik` PaymentMethod, this hash contains details about the BLIK payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -893,6 +876,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). @@ -908,6 +892,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, @@ -1060,14 +1045,11 @@ 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 `blik` PaymentMethod, this hash contains details about the BLIK payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -1091,6 +1073,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, @@ -1112,6 +1095,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1123,16 +1107,20 @@ pub struct CreateSetupIntentPaymentMethodDataAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAffirm {} +pub struct CreateSetupIntentPaymentMethodDataAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAfterpayClearpay {} +pub struct CreateSetupIntentPaymentMethodDataAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataAlipay {} +pub struct CreateSetupIntentPaymentMethodDataAlipay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1142,6 +1130,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, @@ -1154,10 +1143,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, @@ -1176,22 +1167,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, @@ -1199,6 +1195,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, @@ -1208,58 +1205,72 @@ 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 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, @@ -1267,22 +1278,24 @@ pub struct CreateSetupIntentPaymentMethodDataRadarOptions { #[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 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")] @@ -1304,13 +1317,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). @@ -1323,21 +1339,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodOptionsBlik { - /// The 6-digit BLIK code that a customer has generated using their banking application. - /// - /// Can only be set on confirmation. - #[serde(skip_serializing_if = "Option::is_none")] - pub code: Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1363,12 +1370,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsCard { /// If not provided, defaults to `automatic`. /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, } #[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, @@ -1376,6 +1383,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. @@ -1385,6 +1393,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, @@ -1392,10 +1401,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 network related functions. #[serde(skip_serializing_if = "Option::is_none")] @@ -1403,12 +1412,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { /// 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 UpdateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1420,16 +1429,20 @@ 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 UpdateSetupIntentPaymentMethodDataAuBecsDebit { + /// The account number for the bank account. pub account_number: String, @@ -1439,6 +1452,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, @@ -1451,10 +1465,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, @@ -1473,22 +1489,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, @@ -1496,6 +1517,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, @@ -1505,58 +1527,72 @@ pub struct UpdateSetupIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGiropay {} +pub struct UpdateSetupIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGrabpay {} +pub struct UpdateSetupIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataInteracPresent {} +pub struct UpdateSetupIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataKonbini {} +pub struct UpdateSetupIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataLink {} +pub struct UpdateSetupIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataOxxo {} +pub struct 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, @@ -1564,22 +1600,24 @@ pub struct UpdateSetupIntentPaymentMethodDataRadarOptions { #[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 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")] @@ -1601,13 +1639,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). @@ -1620,21 +1661,12 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodOptionsBlik { - /// The 6-digit BLIK code that a customer has generated using their banking application. - /// - /// Can only be set on confirmation. - #[serde(skip_serializing_if = "Option::is_none")] - pub code: Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1660,12 +1692,12 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCard { /// If not provided, defaults to `automatic`. /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, } #[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, @@ -1673,6 +1705,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. @@ -1682,6 +1715,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, @@ -1689,10 +1723,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 network related functions. #[serde(skip_serializing_if = "Option::is_none")] @@ -1700,15 +1734,16 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { /// 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 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, @@ -1718,6 +1753,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, @@ -1745,6 +1781,7 @@ pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1757,6 +1794,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. @@ -1765,8 +1803,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. /// @@ -1776,17 +1813,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, @@ -1838,23 +1874,26 @@ 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 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>, /// For webview integrations only. /// @@ -1865,6 +1904,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[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>, @@ -1872,6 +1912,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, @@ -1899,6 +1940,7 @@ pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1911,6 +1953,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. @@ -1919,8 +1962,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. /// @@ -1930,17 +1972,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, @@ -1992,23 +2033,26 @@ 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 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>, /// For webview integrations only. /// @@ -2019,6 +2063,7 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[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>, @@ -2163,55 +2208,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", @@ -2449,9 +2468,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", @@ -2462,9 +2479,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::VolkswagenBank => "volkswagen_bank", } @@ -2638,9 +2653,7 @@ impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -2724,9 +2737,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 } @@ -2757,16 +2768,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 } @@ -2795,16 +2802,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 } @@ -2822,13 +2825,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", } } } @@ -2950,9 +2949,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 } @@ -3065,24 +3062,50 @@ 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 + } +} + +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 { fn default() -> Self { Self::Balances } @@ -3100,9 +3123,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", } } } @@ -3136,15 +3157,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", } } } @@ -3160,9 +3175,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 } @@ -3284,9 +3297,7 @@ impl SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -3322,9 +3333,7 @@ impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3518,9 +3527,7 @@ impl SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", - SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => { - "challenge_only" - } + SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => "challenge_only", } } } @@ -3554,9 +3561,7 @@ impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor { pub fn as_str(self) -> &'static str { match self { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice", - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => { - "subscription" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => "subscription", } } } @@ -3590,15 +3595,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", } } } @@ -3614,9 +3613,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 } @@ -3633,12 +3630,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", } } } @@ -3654,48 +3647,12 @@ 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 } } -/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsMandateOptionsBlik`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - OffSession, - OnSession, -} - -impl SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - pub fn as_str(self) -> &'static str { - match self { - SetupIntentPaymentMethodOptionsMandateOptionsBlikType::OffSession => "off_session", - SetupIntentPaymentMethodOptionsMandateOptionsBlikType::OnSession => "on_session", - } - } -} - -impl AsRef for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn default() -> Self { - Self::OffSession - } -} - /// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3708,13 +3665,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", } } } @@ -3849,55 +3802,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", @@ -4135,9 +4062,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", @@ -4148,9 +4073,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::VolkswagenBank => "volkswagen_bank", } @@ -4324,9 +4247,7 @@ impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -4410,9 +4331,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 } @@ -4443,16 +4362,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 } @@ -4481,16 +4396,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 } @@ -4508,13 +4419,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", } } } @@ -4636,9 +4543,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 } @@ -4751,24 +4656,50 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermi } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 { + fn default() -> Self { + Self::Balances + } +} + +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +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 UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -4786,9 +4717,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", } } } @@ -4822,15 +4751,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", } } } @@ -4846,9 +4769,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 62ead279e..ab9f6fd82 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", ¶ms) - } +pub fn list(client: &Client, params: &ListShippingRates<'_>) -> Response> { + client.get_query("/shipping_rates", ¶ms) +} + /// Creates a new shipping rate object. pub fn create(client: &Client, params: CreateShippingRate<'_>) -> Response { @@ -79,20 +78,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 { client.post_form(&format!("/shipping_rates/{}", id), ¶ms) } } @@ -109,6 +100,7 @@ impl Object for ShippingRate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -122,6 +114,7 @@ pub struct ShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimateBound { + /// A unit of time. pub unit: ShippingRateDeliveryEstimateBoundUnit, @@ -131,6 +124,7 @@ pub struct ShippingRateDeliveryEstimateBound { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -148,6 +142,7 @@ pub struct ShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateCurrencyOption { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -160,6 +155,7 @@ pub struct ShippingRateCurrencyOption { /// The parameters for `ShippingRate::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateShippingRate<'a> { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. @@ -227,6 +223,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, @@ -282,12 +279,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`. @@ -333,6 +330,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. @@ -348,6 +346,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, @@ -365,6 +364,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). @@ -374,6 +374,7 @@ pub struct UpdateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMaximumUnit, @@ -383,6 +384,7 @@ pub struct CreateShippingRateDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMinimumUnit, @@ -392,6 +394,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, @@ -404,6 +407,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 3c1aa4422..e2ce60afb 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", ¶ms) - } +pub fn list(client: &Client, params: &ListSources<'_>) -> Response> { + client.get_query("/sources/{source}/source_transactions", ¶ms) +} + /// Creates a new source object. pub fn create(client: &Client, params: CreateSource<'_>) -> Response { @@ -199,6 +197,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, @@ -208,6 +207,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, @@ -229,6 +229,7 @@ pub struct SourceOrder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceOrderItem { + /// The amount (price) for this order item. pub amount: Option, @@ -260,6 +261,7 @@ pub struct SourceOrderItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceOwner { + /// Owner's address. pub address: Option
, @@ -299,6 +301,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. @@ -331,6 +334,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`. @@ -348,6 +352,7 @@ pub struct SourceRedirectFlow { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAchCreditTransfer { + #[serde(skip_serializing_if = "Option::is_none")] pub account_number: Option, @@ -375,6 +380,7 @@ pub struct SourceTypeAchCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAchDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_name: Option, @@ -397,6 +403,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, @@ -430,6 +437,7 @@ pub struct SourceTypeAcssDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAlipay { + #[serde(skip_serializing_if = "Option::is_none")] pub data_string: Option, @@ -442,6 +450,7 @@ pub struct SourceTypeAlipay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeAuBecsDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bsb_number: Option, @@ -454,6 +463,7 @@ pub struct SourceTypeAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeBancontact { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -475,6 +485,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, @@ -529,6 +540,7 @@ pub struct SourceTypeCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeCardPresent { + #[serde(skip_serializing_if = "Option::is_none")] pub application_cryptogram: Option, @@ -610,6 +622,7 @@ pub struct SourceTypeCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeEps { + #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -619,6 +632,7 @@ pub struct SourceTypeEps { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeGiropay { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -634,6 +648,7 @@ pub struct SourceTypeGiropay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeIdeal { + #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, @@ -649,6 +664,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, @@ -730,6 +746,7 @@ pub struct SourceTypeKlarna { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeMultibanco { + #[serde(skip_serializing_if = "Option::is_none")] pub entity: Option, @@ -763,12 +780,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, @@ -805,6 +824,7 @@ pub struct SourceTypeSepaCreditTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -829,6 +849,7 @@ pub struct SourceTypeSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeSofort { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_code: Option, @@ -853,6 +874,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, @@ -916,6 +938,7 @@ pub struct SourceTypeThreeDSecure { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SourceTypeWechat { + #[serde(skip_serializing_if = "Option::is_none")] pub prepay_id: Option, @@ -929,6 +952,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. @@ -1038,6 +1062,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. @@ -1076,12 +1101,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, @@ -1128,6 +1153,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). @@ -1138,6 +1164,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. @@ -1146,6 +1173,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>, @@ -1159,6 +1187,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, @@ -1190,6 +1219,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>, @@ -1203,6 +1233,7 @@ pub struct UpdateSourceSourceOrder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrderItems { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1229,6 +1260,7 @@ pub struct CreateSourceSourceOrderItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSourceSourceOrderShipping { + /// Shipping address. pub address: CreateSourceSourceOrderShippingAddress, @@ -1253,6 +1285,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, @@ -1292,6 +1325,7 @@ pub struct SourceAcceptanceParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrderItems { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1318,6 +1352,7 @@ pub struct UpdateSourceSourceOrderItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSourceSourceOrderShipping { + /// Shipping address. pub address: UpdateSourceSourceOrderShippingAddress, @@ -1342,6 +1377,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, @@ -1368,12 +1404,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, @@ -1389,6 +1427,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 039f834a3..c70fc0aa3 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -2,21 +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, Currency, Customer, Discount, Invoice, - InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, - InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, - InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, - SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, - SubscriptionSchedule, SubscriptionTransferData, TaxRate, TestHelpersTestClock, -}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Account, Application, CollectionMethod, Currency, Customer, Discount, Invoice, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, SubscriptionSchedule, SubscriptionTransferData, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Subscription". /// @@ -206,12 +196,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", ¶ms) - } +pub fn list(client: &Client, params: &ListSubscriptions<'_>) -> Response> { + client.get_query("/subscriptions", ¶ms) +} + /// Creates a new subscription on an existing customer. /// @@ -221,11 +213,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 }) } @@ -233,11 +221,7 @@ impl Subscription { /// /// When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. /// To preview how the proration will be calculated, use the [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. - pub fn update( - client: &Client, - id: &SubscriptionId, - params: UpdateSubscription<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SubscriptionId, params: UpdateSubscription<'_>) -> Response { client.post_form(&format!("/subscriptions/{}", id), ¶ms) } @@ -266,6 +250,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 cancelled explicitly by the user. pub comment: Option, @@ -278,12 +263,14 @@ pub struct CancellationDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionAutomaticTax { + /// Whether Stripe automatically computes tax on this subscription. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -298,6 +285,7 @@ pub struct SubscriptionPendingInvoiceItemInterval { #[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`. @@ -309,6 +297,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, @@ -320,12 +309,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, @@ -347,6 +336,7 @@ pub struct SubscriptionsResourcePaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -365,6 +355,7 @@ pub struct SubscriptionPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceMandateOptionsCard { + /// Amount to be charged for future payments. pub amount: Option, @@ -380,6 +371,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. @@ -404,11 +396,13 @@ pub struct SubscriptionsResourcePendingUpdate { #[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, } @@ -416,6 +410,7 @@ pub struct SubscriptionsTrialsResourceEndBehavior { /// 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. @@ -663,6 +658,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, @@ -757,12 +753,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. @@ -1000,6 +996,7 @@ impl<'a> UpdateSubscription<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AddInvoiceItems { + /// The ID of the price object. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, @@ -1023,12 +1020,14 @@ 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, } #[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. @@ -1069,6 +1068,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, @@ -1084,12 +1084,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`. @@ -1105,6 +1105,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. @@ -1118,24 +1119,28 @@ 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, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionCancellationDetails { + /// Additional comments about why the user canceled the subscription, if the subscription was cancelled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -1147,6 +1152,7 @@ pub struct UpdateSubscriptionCancellationDetails { #[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. @@ -1203,6 +1209,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`. @@ -1215,6 +1222,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, @@ -1230,12 +1238,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`. @@ -1251,6 +1259,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. @@ -1264,18 +1273,21 @@ 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 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 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, @@ -1290,8 +1302,7 @@ 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")] @@ -1304,12 +1315,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). @@ -1339,6 +1352,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). @@ -1371,6 +1385,7 @@ pub struct SubscriptionItemPriceData { #[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, @@ -1385,8 +1400,7 @@ 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")] @@ -1399,37 +1413,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. /// @@ -1443,16 +1457,15 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// 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. #[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. /// @@ -1462,25 +1475,24 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} #[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`. @@ -1496,31 +1508,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. /// @@ -1534,16 +1545,15 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// 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. #[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. /// @@ -1553,34 +1563,32 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} #[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, @@ -1590,8 +1598,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")] @@ -1622,19 +1629,23 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] 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>, } #[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, @@ -1644,8 +1655,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")] @@ -1676,11 +1686,15 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] 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>, } #[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`. @@ -1688,8 +1702,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`. @@ -1781,8 +1795,7 @@ impl std::default::Default for CancellationDetailsReason { /// 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, } @@ -1796,24 +1809,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 } @@ -1838,24 +1845,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 } @@ -1882,24 +1883,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 } @@ -1922,24 +1917,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 } @@ -1966,24 +1955,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", } @@ -2030,16 +2009,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 } @@ -2048,8 +2023,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, @@ -2084,6 +2058,38 @@ 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 { + Balances, +} + +impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2103,24 +2109,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 } @@ -2159,9 +2159,7 @@ 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::AuBecsDebit => "au_becs_debit", @@ -2170,9 +2168,7 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { CreateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", @@ -2182,9 +2178,7 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", CreateSubscriptionPaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Sofort => "sofort", CreateSubscriptionPaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", @@ -2222,9 +2216,7 @@ impl CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2259,9 +2251,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", } } @@ -2787,9 +2777,7 @@ 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::AuBecsDebit => "au_becs_debit", @@ -2798,9 +2786,7 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Boleto => "boleto", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Card => "card", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Fpx => "fpx", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Giropay => "giropay", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", @@ -2810,14 +2796,10 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paynow => "paynow", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paypal => "paypal", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + 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", } } @@ -2852,9 +2834,7 @@ impl SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::Off => "off", - SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2889,9 +2869,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", } } @@ -2999,8 +2977,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, } @@ -3014,24 +2991,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 } @@ -3056,24 +3027,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 } @@ -3100,24 +3065,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 } @@ -3140,24 +3099,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 } @@ -3184,24 +3137,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", } @@ -3248,16 +3191,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 } @@ -3266,8 +3205,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, @@ -3302,6 +3240,38 @@ 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 { + Balances, +} + +impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3321,24 +3291,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 } @@ -3377,9 +3341,7 @@ 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::AuBecsDebit => "au_becs_debit", @@ -3388,9 +3350,7 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", @@ -3400,9 +3360,7 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => { - "sepa_credit_transfer" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaCreditTransfer => "sepa_credit_transfer", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::SepaDebit => "sepa_debit", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Sofort => "sofort", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::UsBankAccount => "us_bank_account", @@ -3440,9 +3398,7 @@ impl UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3477,9 +3433,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 7fd7174d2..0011c3d1b 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 serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionItem". /// @@ -59,49 +58,34 @@ 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", ¶ms) - } +pub fn list(client: &Client, params: &ListSubscriptionItems<'_>) -> Response> { + client.get_query("/subscription_items", ¶ms) +} + /// 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 { 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 { client.post_form(&format!("/subscription_items/{}", id), ¶ms) } /// 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)) } } @@ -119,6 +103,7 @@ 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. @@ -213,6 +198,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. @@ -255,12 +241,12 @@ 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. @@ -357,6 +343,7 @@ impl<'a> UpdateSubscriptionItem<'a> { #[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,6 +376,7 @@ pub struct SubscriptionItemPriceData { #[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 17b05eb3d..827509dc7 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -2,16 +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, Coupon, Currency, Customer, PaymentMethod, Plan, Price, - Scheduled, Subscription, SubscriptionBillingThresholds, SubscriptionItemBillingThresholds, - SubscriptionTransferData, TaxRate, TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CollectionMethod, Coupon, Currency, Customer, PaymentMethod, Plan, Price, Scheduled, Subscription, SubscriptionBillingThresholds, SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionSchedule". /// @@ -86,41 +81,29 @@ 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", ¶ms) - } +pub fn list(client: &Client, params: &ListSubscriptionSchedules<'_>) -> Response> { + client.get_query("/subscription_schedules", ¶ms) +} + /// 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 { client.post_form("/subscription_schedules", ¶ms) } /// 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 { client.post_form(&format!("/subscription_schedules/{}", id), ¶ms) } } @@ -137,6 +120,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, @@ -146,6 +130,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,7 +185,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { pub end_date: Timestamp, /// The invoice settings applicable during this phase. - pub invoice_settings: Option, + pub invoice_settings: Option, /// Subscription items to configure the subscription to during this phase of the subscription schedule. pub items: Vec, @@ -232,7 +217,8 @@ pub struct SubscriptionSchedulePhaseConfiguration { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoiceSettingPhaseSetting { +pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { + /// Number of days within which a customer must pay invoices generated by this subscription schedule. /// /// This value will be `null` for subscription schedules where `billing=charge_automatically`. @@ -241,12 +227,14 @@ pub struct InvoiceSettingPhaseSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SchedulesPhaseAutomaticTax { + /// Whether Stripe automatically computes tax on invoices created during this phase. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleAddInvoiceItem { + /// ID of the price used to generate the invoice item. pub price: Expandable, @@ -262,6 +250,7 @@ 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, @@ -289,6 +278,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. @@ -337,6 +327,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, } @@ -344,6 +335,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, @@ -412,6 +404,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>, @@ -480,12 +473,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, @@ -539,6 +532,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. @@ -664,6 +658,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. @@ -725,6 +720,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. @@ -856,6 +852,7 @@ pub struct UpdateSubscriptionSchedulePhases { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AddInvoiceItems { + /// The ID of the price object. #[serde(skip_serializing_if = "Option::is_none")] pub price: Option, @@ -879,12 +876,14 @@ 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, } #[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. @@ -929,6 +928,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. @@ -942,6 +942,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, @@ -955,12 +956,14 @@ 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, } #[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. @@ -974,6 +977,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettings { + /// Number of days within which a customer must pay invoices generated by this subscription schedule. /// /// This value will be `null` for subscription schedules where `billing=charge_automatically`. @@ -983,12 +987,14 @@ 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, } #[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. @@ -1033,6 +1039,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. @@ -1046,12 +1053,14 @@ pub struct UpdateSubscriptionSchedulePhasesTransferData { #[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 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). @@ -1084,6 +1093,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). @@ -1113,12 +1123,14 @@ pub struct InvoiceItemPriceData { #[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 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). @@ -1151,6 +1163,7 @@ pub struct UpdateSubscriptionSchedulePhasesItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1166,6 +1179,7 @@ pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1404,9 +1418,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", } } @@ -1441,9 +1453,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/tax_calculation.rs b/src/resources/generated/tax_calculation.rs index 9223d376e..5bf86647c 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 serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxProductResourceTaxCalculation". /// @@ -66,6 +65,7 @@ impl Object for TaxCalculation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxBreakdown { + /// The amount of tax, in integer cents. pub amount: i64, @@ -85,6 +85,7 @@ pub struct TaxProductResourceTaxBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxCalculationShippingCost { + /// The shipping amount in integer cents. /// /// If `tax_behavior=inclusive`, then this amount includes taxes. @@ -113,6 +114,7 @@ pub struct TaxProductResourceTaxCalculationShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { + /// The amount of tax, in integer cents. pub amount: i64, @@ -137,6 +139,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 +157,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 +174,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 +288,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 +346,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 +406,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 f8135e39d..208a031d7 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 { @@ -60,6 +59,7 @@ impl Object for TaxCalculationLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { + /// The amount of tax, in integer cents. pub amount: i64, @@ -84,6 +84,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 +102,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 +249,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 +307,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 324517cde..66af0aec8 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", ¶ms) - } +pub fn list(client: &Client, params: &ListTaxCodes<'_>) -> Response> { + client.get_query("/tax_codes", ¶ms) +} + /// 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 2ebb701bb..f4e79692f 100644 --- a/src/resources/generated/tax_id.rs +++ b/src/resources/generated/tax_id.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TaxIdId; +use crate::ids::{TaxIdId}; use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::Customer; +use crate::resources::{Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "tax_id". /// @@ -66,6 +65,7 @@ impl Object for TaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdVerification { + /// Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. pub status: TaxIdVerificationStatus, diff --git a/src/resources/generated/tax_product_resource_customer_details.rs b/src/resources/generated/tax_product_resource_customer_details.rs index e44865f70..55fbe0f5c 100644 --- a/src/resources/generated/tax_product_resource_customer_details.rs +++ b/src/resources/generated/tax_product_resource_customer_details.rs @@ -7,6 +7,7 @@ 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,6 +26,7 @@ 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`. #[serde(rename = "type")] pub type_: TaxProductResourceCustomerDetailsResourceTaxIdType, @@ -35,6 +37,7 @@ pub struct TaxProductResourceCustomerDetailsResourceTaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourcePostalAddress { + /// City, district, suburb, town, or village. pub city: Option, @@ -266,9 +269,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_rate.rs b/src/resources/generated/tax_rate.rs index 110a924ea..5ecb5d6fb 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". /// @@ -39,7 +38,7 @@ pub struct TaxRate { /// Actual/effective tax rate percentage out of 100. /// - /// For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions. + /// For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. pub effective_percentage: Option, /// This specifies if the tax rate is inclusive or exclusive. @@ -74,12 +73,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", ¶ms) - } +pub fn list(client: &Client, params: &ListTaxRates<'_>) -> Response> { + client.get_query("/tax_rates", ¶ms) +} + /// Creates a new tax rate. pub fn create(client: &Client, params: CreateTaxRate<'_>) -> Response { @@ -110,6 +111,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. @@ -186,6 +188,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, @@ -239,12 +242,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. diff --git a/src/resources/generated/terminal_configuration.rs b/src/resources/generated/terminal_configuration.rs index 4d38d9a1f..256692de6 100644 --- a/src/resources/generated/terminal_configuration.rs +++ b/src/resources/generated/terminal_configuration.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TerminalConfigurationId; +use crate::ids::{TerminalConfigurationId}; use crate::params::{Expandable, Object}; -use crate::resources::File; +use crate::resources::{File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalConfigurationConfiguration". /// @@ -50,6 +49,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>, @@ -57,6 +57,7 @@ pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceTipping { + #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -102,6 +103,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>, diff --git a/src/resources/generated/terminal_connection_token.rs b/src/resources/generated/terminal_connection_token.rs index e38051d1f..97c9362e9 100644 --- a/src/resources/generated/terminal_connection_token.rs +++ b/src/resources/generated/terminal_connection_token.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 "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. diff --git a/src/resources/generated/terminal_location.rs b/src/resources/generated/terminal_location.rs index 76d5d585d..65b9dc4e7 100644 --- a/src/resources/generated/terminal_location.rs +++ b/src/resources/generated/terminal_location.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TerminalLocationId; +use crate::ids::{TerminalLocationId}; use crate::params::{Metadata, Object}; -use crate::resources::Address; +use crate::resources::{Address}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalLocationLocation". /// diff --git a/src/resources/generated/terminal_reader.rs b/src/resources/generated/terminal_reader.rs index 1ab1bf6b9..846cecf2a 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TerminalReaderId; +use crate::ids::{TerminalReaderId}; use crate::params::{Expandable, Metadata, Object}; use crate::resources::{Charge, Currency, PaymentIntent, Refund, SetupIntent, TerminalLocation}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalReaderReader". /// @@ -75,6 +74,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, @@ -103,6 +103,7 @@ pub struct TerminalReaderReaderResourceReaderAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { + /// Most recent PaymentIntent processed by the reader. pub payment_intent: Expandable, @@ -112,6 +113,7 @@ pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessConfig { + /// Override showing a tipping selection screen on this transaction. #[serde(skip_serializing_if = "Option::is_none")] pub skip_tipping: Option, @@ -122,18 +124,27 @@ 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. #[serde(skip_serializing_if = "Option::is_none")] pub generated_card: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub process_config: Option, + /// Most recent SetupIntent processed by the reader. pub setup_intent: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderReaderResourceProcessSetupConfig { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceRefundPaymentAction { + /// The amount being refunded. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -178,6 +189,7 @@ pub struct TerminalReaderReaderResourceRefundPaymentAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceSetReaderDisplayAction { + /// Cart object to be displayed by the reader. pub cart: Option, @@ -188,6 +200,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). @@ -209,6 +222,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). @@ -223,6 +237,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). @@ -322,12 +337,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", } @@ -365,9 +376,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/three_d_secure_details.rs b/src/resources/generated/three_d_secure_details.rs deleted file mode 100644 index b85604545..000000000 --- a/src/resources/generated/three_d_secure_details.rs +++ /dev/null @@ -1,183 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -/// The resource representing a Stripe "three_d_secure_details". -#[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, - - /// Indicates the outcome of 3D Secure authentication. - pub result: Option, - - /// Additional information about why 3D Secure succeeded or failed based - /// on the `result`. - pub result_reason: Option, - - /// The version of 3D Secure that was used. - pub version: Option, -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `authentication_flow` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsAuthenticationFlow { - Challenge, - Frictionless, -} - -impl ThreeDSecureDetailsAuthenticationFlow { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsAuthenticationFlow::Challenge => "challenge", - ThreeDSecureDetailsAuthenticationFlow::Frictionless => "frictionless", - } - } -} - -impl AsRef for ThreeDSecureDetailsAuthenticationFlow { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsAuthenticationFlow { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsAuthenticationFlow { - fn default() -> Self { - Self::Challenge - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsResult { - AttemptAcknowledged, - Authenticated, - Exempted, - Failed, - NotSupported, - ProcessingError, -} - -impl ThreeDSecureDetailsResult { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsResult::AttemptAcknowledged => "attempt_acknowledged", - ThreeDSecureDetailsResult::Authenticated => "authenticated", - ThreeDSecureDetailsResult::Exempted => "exempted", - ThreeDSecureDetailsResult::Failed => "failed", - ThreeDSecureDetailsResult::NotSupported => "not_supported", - ThreeDSecureDetailsResult::ProcessingError => "processing_error", - } - } -} - -impl AsRef for ThreeDSecureDetailsResult { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsResult { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsResult { - fn default() -> Self { - Self::AttemptAcknowledged - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result_reason` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsResultReason { - Abandoned, - Bypassed, - Canceled, - CardNotEnrolled, - NetworkNotSupported, - ProtocolError, - Rejected, -} - -impl ThreeDSecureDetailsResultReason { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsResultReason::Abandoned => "abandoned", - ThreeDSecureDetailsResultReason::Bypassed => "bypassed", - ThreeDSecureDetailsResultReason::Canceled => "canceled", - ThreeDSecureDetailsResultReason::CardNotEnrolled => "card_not_enrolled", - ThreeDSecureDetailsResultReason::NetworkNotSupported => "network_not_supported", - ThreeDSecureDetailsResultReason::ProtocolError => "protocol_error", - ThreeDSecureDetailsResultReason::Rejected => "rejected", - } - } -} - -impl AsRef for ThreeDSecureDetailsResultReason { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsResultReason { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsResultReason { - fn default() -> Self { - Self::Abandoned - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `version` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsVersion { - #[serde(rename = "1.0.2")] - V1_0_2, - #[serde(rename = "2.1.0")] - V2_1_0, - #[serde(rename = "2.2.0")] - V2_2_0, -} - -impl ThreeDSecureDetailsVersion { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsVersion::V1_0_2 => "1.0.2", - ThreeDSecureDetailsVersion::V2_1_0 => "2.1.0", - ThreeDSecureDetailsVersion::V2_2_0 => "2.2.0", - } - } -} - -impl AsRef for ThreeDSecureDetailsVersion { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsVersion { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsVersion { - fn default() -> Self { - Self::V1_0_2 - } -} diff --git a/src/resources/generated/token.rs b/src/resources/generated/token.rs index 138ad893a..cbd153a1e 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,6 +42,7 @@ pub struct Token { } impl Token { + /// Creates a single-use token that represents a bank account’s details. /// This token can be used with any API method in place of a bank account dictionary. /// @@ -70,6 +70,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 will represent. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -117,6 +118,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, @@ -138,12 +140,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 { + /// The person's address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -261,6 +265,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, @@ -268,6 +273,7 @@ pub struct CreateTokenPii { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -280,6 +286,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, @@ -295,6 +302,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, @@ -322,6 +330,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. @@ -355,6 +364,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, @@ -366,6 +376,7 @@ pub struct PersonVerificationParams { #[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>, @@ -373,6 +384,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>, @@ -380,6 +392,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>, @@ -387,6 +400,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. @@ -441,8 +455,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)] diff --git a/src/resources/generated/topup.rs b/src/resources/generated/topup.rs index 6b3a0336f..f3fb5780b 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", ¶ms) - } +pub fn list(client: &Client, params: &ListTopups<'_>) -> Response> { + client.get_query("/topups", ¶ms) +} + /// Retrieves the details of a top-up that has previously been created. /// @@ -112,6 +113,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>, @@ -169,12 +171,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 2bfad37c1..b2a8f12be 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", ¶ms) - } +pub fn list(client: &Client, params: &ListTransfers<'_>) -> Response> { + client.get_query("/transfers", ¶ms) +} + /// To send funds from your Stripe account to a connected account, you create a new transfer object. /// @@ -104,11 +105,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 { client.post_form(&format!("/transfers/{}", id), ¶ms) } } @@ -126,6 +123,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, @@ -196,6 +194,7 @@ impl<'a> CreateTransfer<'a> { /// The parameters for `Transfer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTransfers<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -248,12 +247,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 09cc244d9..f43b666c5 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/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 8a98fdbc5..30e72118f 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::V2022_11_15; +pub const VERSION: ApiVersion = ApiVersion::V2023_08_16; \ No newline at end of file diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index 868a5717c..18af0de19 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". /// @@ -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", ¶ms) - } +pub fn list(client: &Client, params: &ListWebhookEndpoints<'_>) -> Response> { + client.get_query("/webhook_endpoints", ¶ms) +} + /// A webhook endpoint must have a `url` and a list of `enabled_events`. /// @@ -91,22 +89,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 { client.post_form(&format!("/webhook_endpoints/{}", id), ¶ms) } @@ -129,6 +119,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, @@ -181,6 +172,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. @@ -219,12 +211,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, @@ -737,12 +729,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", @@ -759,12 +747,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::CouponCreated => "coupon.created", @@ -785,12 +769,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", @@ -798,43 +778,19 @@ 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::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::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::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", @@ -867,9 +823,7 @@ impl EventFilter { EventFilter::IssuingTransactionUpdated => "issuing_transaction.updated", EventFilter::MandateUpdated => "mandate.updated", EventFilter::OrderCreated => "order.created", - 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", @@ -880,9 +834,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", @@ -952,9 +904,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", @@ -968,31 +918,23 @@ 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::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",