diff --git a/openapi/version.json b/openapi/version.json index fb6346139..4c02c170b 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v545" + "version": "v692" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index 661c7cf96..66a8a4230 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). @@ -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, @@ -318,6 +316,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay_payments: Option, + /// The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay_payments: Option, + /// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -353,6 +355,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>, @@ -366,7 +369,7 @@ pub struct AccountFutureRequirements { /// If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. pub currently_due: Option>, - /// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. + /// This is typed as a string for consistency with `requirements.disabled_reason`. pub disabled_reason: Option, /// Fields that are `currently_due` and need to be collected again because validation or verification failed. @@ -392,6 +395,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 +407,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>, @@ -418,7 +423,8 @@ pub struct AccountRequirements { /// If the account is disabled, this string describes why. /// - /// Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. + /// [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + /// Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. pub disabled_reason: Option, /// Fields that are `currently_due` and need to be collected again because validation or verification failed. @@ -443,6 +449,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 +459,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 +472,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,15 +499,26 @@ pub struct AccountSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountBacsDebitPaymentsSettings { - /// The Bacs Direct Debit Display Name for this account. + + /// 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. - #[serde(skip_serializing_if = "Option::is_none")] + /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. + /// Mobile banking apps display it as the name of the business. + /// To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. + /// Custom branding incurs an additional monthly fee for the platform. + /// The fee appears 5 business days after requesting Bacs. + /// If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. pub display_name: Option, + + /// The Bacs Direct Debit Service user number for this account. + /// + /// For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + pub service_user_number: Option, } #[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 +538,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 +570,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 +584,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 +598,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 +625,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 +642,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 +650,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 +670,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 +691,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 +707,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 +721,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 +805,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 +829,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 +842,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 +868,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 +988,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 +1031,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 +1138,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 +1158,11 @@ pub struct AcceptTos { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParams { + + /// Settings specific to Bacs Direct Debit. + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit_payments: Option, + /// 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 +1190,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 +1283,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, @@ -1349,6 +1396,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay_payments: Option, + /// The revolut_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay_payments: Option, + /// The sepa_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -1384,12 +1435,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 +1448,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 +1456,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 +1469,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
, @@ -1523,6 +1573,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, @@ -1635,6 +1686,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay_payments: Option, + /// The revolut_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay_payments: Option, + /// The sepa_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit_payments: Option, @@ -1670,12 +1725,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 +1738,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 +1746,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")] @@ -1704,8 +1757,23 @@ pub struct UpdateAccountDocuments { pub proof_of_registration: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountSettingsParamsBacsDebitPayments { + + /// The Bacs Direct Debit Display Name for this account. + /// + /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. + /// Mobile banking apps display it as the name of the business. + /// To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. + /// Custom branding incurs an additional monthly fee for the platform. + /// If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, +} + #[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 +1781,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 +1789,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 +1813,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 +1842,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 +1858,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 +1866,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 +1877,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 +1888,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 +1899,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 +1910,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 +1921,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 +1932,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 +1943,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 +1954,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 +1965,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 +1976,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 +1987,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 +1998,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 +2009,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 +2020,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 +2031,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 +2042,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 +2053,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 +2064,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 +2075,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 +2086,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 +2097,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 +2108,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 +2119,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 +2130,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 +2141,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 +2152,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 +2163,18 @@ 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. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesRevolutPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2073,6 +2185,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 +2196,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 +2207,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 +2218,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 +2229,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 +2240,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 +2251,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 +2262,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 +2273,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 +2281,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 +2289,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 +2297,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 +2305,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 +2313,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 +2321,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 +2329,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 +2347,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 +2369,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 +2382,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 +2410,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 +2421,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 +2432,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 +2443,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 +2454,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 +2465,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 +2476,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 +2487,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 +2498,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 +2509,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 +2520,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 +2531,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 +2542,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 +2553,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 +2564,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 +2575,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 +2586,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 +2597,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 +2608,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 +2619,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 +2630,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 +2641,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 +2652,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 +2663,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 +2674,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 +2685,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 +2696,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 +2707,18 @@ 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. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesRevolutPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2559,6 +2729,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 +2740,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 +2751,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 +2762,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 +2773,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 +2784,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 +2795,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 +2806,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 +2817,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 +2825,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 +2833,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 +2841,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 +2849,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 +2857,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 +2865,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 +2873,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 +2889,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 +2905,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 +2921,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. @@ -3629,6 +3818,42 @@ impl std::default::Default for AccountCapabilitiesPromptpayPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `revolut_pay_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesRevolutPayPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesRevolutPayPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesRevolutPayPayments::Active => "active", + AccountCapabilitiesRevolutPayPayments::Inactive => "inactive", + AccountCapabilitiesRevolutPayPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesRevolutPayPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesRevolutPayPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesRevolutPayPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `sepa_debit_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3814,11 +4039,45 @@ impl std::default::Default for AccountCapabilitiesZipPayments { #[serde(rename_all = "snake_case")] pub enum AccountRequirementsErrorCode { InvalidAddressCityStatePostalCode, + InvalidAddressHighwayContractBox, + InvalidAddressPrivateMailbox, + InvalidBusinessProfileName, + InvalidBusinessProfileNameDenylisted, + InvalidCompanyNameDenylisted, + InvalidDobAgeOverMaximum, #[serde(rename = "invalid_dob_age_under_18")] InvalidDobAgeUnder18, + InvalidDobAgeUnderMinimum, + InvalidProductDescriptionLength, + InvalidProductDescriptionUrlMatch, InvalidRepresentativeCountry, + InvalidStatementDescriptorBusinessMismatch, + InvalidStatementDescriptorDenylisted, + InvalidStatementDescriptorLength, + InvalidStatementDescriptorPrefixDenylisted, + InvalidStatementDescriptorPrefixMismatch, InvalidStreetAddress, + InvalidTaxId, + InvalidTaxIdFormat, InvalidTosAcceptance, + InvalidUrlDenylisted, + InvalidUrlFormat, + InvalidUrlLength, + InvalidUrlWebPresenceDetected, + InvalidUrlWebsiteBusinessInformationMismatch, + InvalidUrlWebsiteEmpty, + InvalidUrlWebsiteInaccessible, + InvalidUrlWebsiteInaccessibleGeoblocked, + InvalidUrlWebsiteInaccessiblePasswordProtected, + InvalidUrlWebsiteIncomplete, + InvalidUrlWebsiteIncompleteCancellationPolicy, + InvalidUrlWebsiteIncompleteCustomerServiceDetails, + InvalidUrlWebsiteIncompleteLegalRestrictions, + InvalidUrlWebsiteIncompleteRefundPolicy, + InvalidUrlWebsiteIncompleteReturnPolicy, + InvalidUrlWebsiteIncompleteTermsAndConditions, + InvalidUrlWebsiteIncompleteUnderConstruction, + InvalidUrlWebsiteOther, InvalidValueOther, VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, @@ -3873,10 +4132,44 @@ impl AccountRequirementsErrorCode { pub fn as_str(self) -> &'static str { match self { AccountRequirementsErrorCode::InvalidAddressCityStatePostalCode => "invalid_address_city_state_postal_code", + AccountRequirementsErrorCode::InvalidAddressHighwayContractBox => "invalid_address_highway_contract_box", + AccountRequirementsErrorCode::InvalidAddressPrivateMailbox => "invalid_address_private_mailbox", + AccountRequirementsErrorCode::InvalidBusinessProfileName => "invalid_business_profile_name", + AccountRequirementsErrorCode::InvalidBusinessProfileNameDenylisted => "invalid_business_profile_name_denylisted", + AccountRequirementsErrorCode::InvalidCompanyNameDenylisted => "invalid_company_name_denylisted", + AccountRequirementsErrorCode::InvalidDobAgeOverMaximum => "invalid_dob_age_over_maximum", AccountRequirementsErrorCode::InvalidDobAgeUnder18 => "invalid_dob_age_under_18", + AccountRequirementsErrorCode::InvalidDobAgeUnderMinimum => "invalid_dob_age_under_minimum", + AccountRequirementsErrorCode::InvalidProductDescriptionLength => "invalid_product_description_length", + AccountRequirementsErrorCode::InvalidProductDescriptionUrlMatch => "invalid_product_description_url_match", AccountRequirementsErrorCode::InvalidRepresentativeCountry => "invalid_representative_country", + AccountRequirementsErrorCode::InvalidStatementDescriptorBusinessMismatch => "invalid_statement_descriptor_business_mismatch", + AccountRequirementsErrorCode::InvalidStatementDescriptorDenylisted => "invalid_statement_descriptor_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorLength => "invalid_statement_descriptor_length", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixDenylisted => "invalid_statement_descriptor_prefix_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixMismatch => "invalid_statement_descriptor_prefix_mismatch", AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", + AccountRequirementsErrorCode::InvalidTaxId => "invalid_tax_id", + AccountRequirementsErrorCode::InvalidTaxIdFormat => "invalid_tax_id_format", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", + AccountRequirementsErrorCode::InvalidUrlDenylisted => "invalid_url_denylisted", + AccountRequirementsErrorCode::InvalidUrlFormat => "invalid_url_format", + AccountRequirementsErrorCode::InvalidUrlLength => "invalid_url_length", + AccountRequirementsErrorCode::InvalidUrlWebPresenceDetected => "invalid_url_web_presence_detected", + AccountRequirementsErrorCode::InvalidUrlWebsiteBusinessInformationMismatch => "invalid_url_website_business_information_mismatch", + AccountRequirementsErrorCode::InvalidUrlWebsiteEmpty => "invalid_url_website_empty", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessible => "invalid_url_website_inaccessible", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessibleGeoblocked => "invalid_url_website_inaccessible_geoblocked", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessiblePasswordProtected => "invalid_url_website_inaccessible_password_protected", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncomplete => "invalid_url_website_incomplete", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCancellationPolicy => "invalid_url_website_incomplete_cancellation_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCustomerServiceDetails => "invalid_url_website_incomplete_customer_service_details", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteLegalRestrictions => "invalid_url_website_incomplete_legal_restrictions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteRefundPolicy => "invalid_url_website_incomplete_refund_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteReturnPolicy => "invalid_url_website_incomplete_return_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteTermsAndConditions => "invalid_url_website_incomplete_terms_and_conditions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteUnderConstruction => "invalid_url_website_incomplete_under_construction", + AccountRequirementsErrorCode::InvalidUrlWebsiteOther => "invalid_url_website_other", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", @@ -4101,9 +4394,7 @@ impl CompanyParamsStructure { CompanyParamsStructure::SingleMemberLlc => "single_member_llc", CompanyParamsStructure::SoleEstablishment => "sole_establishment", CompanyParamsStructure::SoleProprietorship => "sole_proprietorship", - CompanyParamsStructure::TaxExemptGovernmentInstrumentality => { - "tax_exempt_government_instrumentality" - } + CompanyParamsStructure::TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality", CompanyParamsStructure::UnincorporatedAssociation => "unincorporated_association", CompanyParamsStructure::UnincorporatedNonProfit => "unincorporated_non_profit", CompanyParamsStructure::UnincorporatedPartnership => "unincorporated_partnership", @@ -4177,9 +4468,7 @@ impl CompanyStructure { CompanyStructure::SingleMemberLlc => "single_member_llc", CompanyStructure::SoleEstablishment => "sole_establishment", CompanyStructure::SoleProprietorship => "sole_proprietorship", - CompanyStructure::TaxExemptGovernmentInstrumentality => { - "tax_exempt_government_instrumentality" - } + CompanyStructure::TaxExemptGovernmentInstrumentality => "tax_exempt_government_instrumentality", CompanyStructure::UnincorporatedAssociation => "unincorporated_association", CompanyStructure::UnincorporatedNonProfit => "unincorporated_non_profit", CompanyStructure::UnincorporatedPartnership => "unincorporated_partnership", diff --git a/src/resources/generated/account_application_authorized.rs b/src/resources/generated/account_application_authorized.rs new file mode 100644 index 000000000..d0000a5b2 --- /dev/null +++ b/src/resources/generated/account_application_authorized.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.application.authorized". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountApplicationAuthorized { +} diff --git a/src/resources/generated/account_application_deauthorized.rs b/src/resources/generated/account_application_deauthorized.rs new file mode 100644 index 000000000..5d26faa69 --- /dev/null +++ b/src/resources/generated/account_application_deauthorized.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.application.deauthorized". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountApplicationDeauthorized { +} diff --git a/src/resources/generated/account_external_account_created.rs b/src/resources/generated/account_external_account_created.rs new file mode 100644 index 000000000..98a615285 --- /dev/null +++ b/src/resources/generated/account_external_account_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.external_account.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountExternalAccountCreated { +} diff --git a/src/resources/generated/account_external_account_deleted.rs b/src/resources/generated/account_external_account_deleted.rs new file mode 100644 index 000000000..ad51527c6 --- /dev/null +++ b/src/resources/generated/account_external_account_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.external_account.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountExternalAccountDeleted { +} diff --git a/src/resources/generated/account_external_account_updated.rs b/src/resources/generated/account_external_account_updated.rs new file mode 100644 index 000000000..341ecbd1e --- /dev/null +++ b/src/resources/generated/account_external_account_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.external_account.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountExternalAccountUpdated { +} diff --git a/src/resources/generated/account_link.rs b/src/resources/generated/account_link.rs index def9a7e3e..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, diff --git a/src/resources/generated/account_session.rs b/src/resources/generated/account_session.rs index f93f9600d..d6f03a17e 100644 --- a/src/resources/generated/account_session.rs +++ b/src/resources/generated/account_session.rs @@ -51,11 +51,11 @@ impl Object for AccountSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectEmbeddedAccountSessionCreateComponents { - pub account_onboarding: ConnectEmbeddedBaseConfig, + pub account_onboarding: ConnectEmbeddedBaseConfigClaim, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedBaseConfig { +pub struct ConnectEmbeddedBaseConfigClaim { /// Whether the embedded component is enabled. pub enabled: bool, diff --git a/src/resources/generated/account_updated.rs b/src/resources/generated/account_updated.rs new file mode 100644 index 000000000..eb06d9d80 --- /dev/null +++ b/src/resources/generated/account_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "account.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountUpdated { +} 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 f88ec543f..8ddfa38b9 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, @@ -84,6 +84,7 @@ pub enum ApiErrorsCode { ApplicationFeesNotAllowed, AuthenticationRequired, BalanceInsufficient, + BalanceInvalidParameter, BankAccountBadRoutingNumbers, BankAccountDeclined, BankAccountExists, @@ -114,6 +115,7 @@ pub enum ApiErrorsCode { DebitNotAuthorized, EmailInvalid, ExpiredCard, + FinancialConnectionsAccountInactive, IdempotencyKeyInUse, IncorrectAddress, IncorrectCvc, @@ -218,11 +220,13 @@ pub enum ApiErrorsCode { TaxesCalculationFailed, TerminalLocationCountryUnsupported, TerminalReaderBusy, + TerminalReaderHardwareFault, TerminalReaderOffline, TerminalReaderTimeout, TestmodeChargesOnly, TlsVersionUnsupported, TokenAlreadyUsed, + TokenCardNetworkInvalid, TokenInUse, TransferSourceBalanceParametersMismatch, TransfersNotAllowed, @@ -234,9 +238,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", @@ -248,6 +250,7 @@ impl ApiErrorsCode { ApiErrorsCode::ApplicationFeesNotAllowed => "application_fees_not_allowed", ApiErrorsCode::AuthenticationRequired => "authentication_required", ApiErrorsCode::BalanceInsufficient => "balance_insufficient", + ApiErrorsCode::BalanceInvalidParameter => "balance_invalid_parameter", ApiErrorsCode::BankAccountBadRoutingNumbers => "bank_account_bad_routing_numbers", ApiErrorsCode::BankAccountDeclined => "bank_account_declined", ApiErrorsCode::BankAccountExists => "bank_account_exists", @@ -257,9 +260,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", @@ -280,6 +281,7 @@ impl ApiErrorsCode { ApiErrorsCode::DebitNotAuthorized => "debit_not_authorized", ApiErrorsCode::EmailInvalid => "email_invalid", ApiErrorsCode::ExpiredCard => "expired_card", + ApiErrorsCode::FinancialConnectionsAccountInactive => "financial_connections_account_inactive", ApiErrorsCode::IdempotencyKeyInUse => "idempotency_key_in_use", ApiErrorsCode::IncorrectAddress => "incorrect_address", ApiErrorsCode::IncorrectCvc => "incorrect_cvc", @@ -306,9 +308,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", @@ -325,56 +325,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", @@ -389,9 +361,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", @@ -402,9 +372,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", @@ -416,19 +384,17 @@ impl ApiErrorsCode { ApiErrorsCode::StripeTaxInactive => "stripe_tax_inactive", ApiErrorsCode::TaxIdInvalid => "tax_id_invalid", ApiErrorsCode::TaxesCalculationFailed => "taxes_calculation_failed", - ApiErrorsCode::TerminalLocationCountryUnsupported => { - "terminal_location_country_unsupported" - } + ApiErrorsCode::TerminalLocationCountryUnsupported => "terminal_location_country_unsupported", ApiErrorsCode::TerminalReaderBusy => "terminal_reader_busy", + ApiErrorsCode::TerminalReaderHardwareFault => "terminal_reader_hardware_fault", ApiErrorsCode::TerminalReaderOffline => "terminal_reader_offline", ApiErrorsCode::TerminalReaderTimeout => "terminal_reader_timeout", ApiErrorsCode::TestmodeChargesOnly => "testmode_charges_only", ApiErrorsCode::TlsVersionUnsupported => "tls_version_unsupported", ApiErrorsCode::TokenAlreadyUsed => "token_already_used", + ApiErrorsCode::TokenCardNetworkInvalid => "token_card_network_invalid", ApiErrorsCode::TokenInUse => "token_in_use", - ApiErrorsCode::TransferSourceBalanceParametersMismatch => { - "transfer_source_balance_parameters_mismatch" - } + ApiErrorsCode::TransferSourceBalanceParametersMismatch => "transfer_source_balance_parameters_mismatch", ApiErrorsCode::TransfersNotAllowed => "transfers_not_allowed", ApiErrorsCode::UrlInvalid => "url_invalid", } diff --git a/src/resources/generated/application.rs b/src/resources/generated/application.rs index 1ce12ce2c..763fd898b 100644 --- a/src/resources/generated/application.rs +++ b/src/resources/generated/application.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{ApplicationId}; +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::ids::ApplicationId; -use crate::params::Object; - /// The resource representing a Stripe "Application". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Application { diff --git a/src/resources/generated/application_fee.rs b/src/resources/generated/application_fee.rs index 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/application_fee_created.rs b/src/resources/generated/application_fee_created.rs new file mode 100644 index 000000000..54d84eafd --- /dev/null +++ b/src/resources/generated/application_fee_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "application_fee.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ApplicationFeeCreated { +} diff --git a/src/resources/generated/application_fee_refund_updated.rs b/src/resources/generated/application_fee_refund_updated.rs new file mode 100644 index 000000000..bda112ec4 --- /dev/null +++ b/src/resources/generated/application_fee_refund_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "application_fee.refund.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ApplicationFeeRefundUpdated { +} diff --git a/src/resources/generated/application_fee_refunded.rs b/src/resources/generated/application_fee_refunded.rs new file mode 100644 index 000000000..6f99b224d --- /dev/null +++ b/src/resources/generated/application_fee_refunded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "application_fee.refunded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ApplicationFeeRefunded { +} diff --git a/src/resources/generated/balance.rs b/src/resources/generated/balance.rs index d1a4232e8..37b863781 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::{BalanceAmountBySourceType, 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 { + /// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). /// /// You can find the available balance for each currency and payment type in the `source_types` property. @@ -25,7 +25,7 @@ pub struct Balance { /// Funds that you can pay out using Instant Payouts. #[serde(skip_serializing_if = "Option::is_none")] - pub instant_available: Option>, + pub instant_available: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub issuing: Option, @@ -49,6 +49,7 @@ impl Object for Balance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmount { + /// Balance amount. pub amount: i64, @@ -62,22 +63,23 @@ 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, +pub struct BalanceAmountNet { - /// Amount for card. - #[serde(skip_serializing_if = "Option::is_none")] - pub card: Option, + /// Balance amount. + pub amount: i64, + + /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + /// + /// Must be a [supported currency](https://stripe.com/docs/currencies). + pub currency: Currency, - /// Amount for FPX. #[serde(skip_serializing_if = "Option::is_none")] - pub fpx: Option, + pub source_types: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceDetail { + /// Funds that are available for use. pub available: Vec, } diff --git a/src/resources/generated/balance_amount_by_source_type.rs b/src/resources/generated/balance_amount_by_source_type.rs new file mode 100644 index 000000000..cb5f1e0ea --- /dev/null +++ b/src/resources/generated/balance_amount_by_source_type.rs @@ -0,0 +1,22 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BalanceAmountBySourceType". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BalanceAmountBySourceType { + + /// Amount for bank account. + #[serde(skip_serializing_if = "Option::is_none")] + pub bank_account: Option, + + /// Amount for card. + #[serde(skip_serializing_if = "Option::is_none")] + pub card: Option, + + /// Amount for FPX. + #[serde(skip_serializing_if = "Option::is_none")] + pub fpx: Option, +} diff --git a/src/resources/generated/balance_available.rs b/src/resources/generated/balance_available.rs new file mode 100644 index 000000000..fc21819cc --- /dev/null +++ b/src/resources/generated/balance_available.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "balance.available". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BalanceAvailable { +} diff --git a/src/resources/generated/balance_transaction.rs b/src/resources/generated/balance_transaction.rs index 24ea5ba91..bf70d2d47 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". /// @@ -19,7 +16,9 @@ pub struct BalanceTransaction { /// Unique identifier for the object. pub id: BalanceTransactionId, - /// Gross amount of the transaction (in cents (or local equivalent)). + /// Gross amount of this transaction (in cents (or local equivalent)). + /// + /// A positive value represents funds charged to another party, and a negative value represents funds sent to another party. pub amount: i64, /// The date that the transaction's net funds become available in the Stripe balance. @@ -48,15 +47,20 @@ pub struct BalanceTransaction { pub exchange_rate: Option, /// Fees (in cents (or local equivalent)) paid for this transaction. + /// + /// Represented as a positive integer when assessed. pub fee: i64, /// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. pub fee_details: Vec, - /// Net amount of the transaction (in cents (or local equivalent)). + /// Net impact to a Stripe balance (in cents (or local equivalent)). + /// + /// A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. + /// You can calculate the net impact of a transaction on a balance by `amount` - `fee`. pub net: i64, - /// Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + /// Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. pub reporting_category: String, /// This transaction relates to the Stripe object. @@ -65,7 +69,7 @@ pub struct BalanceTransaction { /// The transaction's net funds status in the Stripe balance, which are 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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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`. + /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). /// To classify transactions for accounting purposes, consider `reporting_category` instead. @@ -74,24 +78,19 @@ pub struct BalanceTransaction { } impl BalanceTransaction { + /// Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). /// /// The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. - pub fn list( - client: &Client, - params: &ListBalanceTransactions<'_>, - ) -> Response> { - client.get_query("/balance_transactions", ¶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 }) } } @@ -108,6 +107,7 @@ impl Object for BalanceTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Fee { + /// Amount of the fee, in cents. pub amount: i64, @@ -132,6 +132,7 @@ pub struct Fee { /// The parameters for `BalanceTransaction::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListBalanceTransactions<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -176,7 +177,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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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`. + /// One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `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>, @@ -200,9 +201,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")] @@ -214,6 +214,8 @@ pub enum BalanceTransactionType { ApplicationFee, ApplicationFeeRefund, Charge, + ClimateOrderPurchase, + ClimateOrderRefund, ConnectCollectionTransfer, Contribution, IssuingAuthorizationHold, @@ -228,8 +230,11 @@ pub enum BalanceTransactionType { ObligationReversalOutbound, Payment, PaymentFailureRefund, + PaymentNetworkReserveHold, + PaymentNetworkReserveRelease, PaymentRefund, PaymentReversal, + PaymentUnreconciled, Payout, PayoutCancel, PayoutFailure, @@ -258,6 +263,8 @@ impl BalanceTransactionType { BalanceTransactionType::ApplicationFee => "application_fee", BalanceTransactionType::ApplicationFeeRefund => "application_fee_refund", BalanceTransactionType::Charge => "charge", + BalanceTransactionType::ClimateOrderPurchase => "climate_order_purchase", + BalanceTransactionType::ClimateOrderRefund => "climate_order_refund", BalanceTransactionType::ConnectCollectionTransfer => "connect_collection_transfer", BalanceTransactionType::Contribution => "contribution", BalanceTransactionType::IssuingAuthorizationHold => "issuing_authorization_hold", @@ -272,8 +279,11 @@ impl BalanceTransactionType { BalanceTransactionType::ObligationReversalOutbound => "obligation_reversal_outbound", BalanceTransactionType::Payment => "payment", BalanceTransactionType::PaymentFailureRefund => "payment_failure_refund", + BalanceTransactionType::PaymentNetworkReserveHold => "payment_network_reserve_hold", + BalanceTransactionType::PaymentNetworkReserveRelease => "payment_network_reserve_release", BalanceTransactionType::PaymentRefund => "payment_refund", BalanceTransactionType::PaymentReversal => "payment_reversal", + BalanceTransactionType::PaymentUnreconciled => "payment_unreconciled", 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 8a4223af3..192b80bce 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)] @@ -99,8 +98,8 @@ pub struct BankAccount { /// Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. /// If customer bank account verification has succeeded, the bank account status will be `verified`. /// If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. - /// If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. For external accounts, possible values are `new`, `errored` and `verification_failed`. - /// If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + /// If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. For external accounts, possible values are `new`, `errored` and `verification_failed`. + /// If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. /// In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. /// Other validations aren't run against external accounts because they're only used for payouts. /// This means the other statuses don't apply. @@ -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, @@ -157,11 +158,45 @@ pub struct AccountRequirementsError { #[serde(rename_all = "snake_case")] pub enum AccountRequirementsErrorCode { InvalidAddressCityStatePostalCode, + InvalidAddressHighwayContractBox, + InvalidAddressPrivateMailbox, + InvalidBusinessProfileName, + InvalidBusinessProfileNameDenylisted, + InvalidCompanyNameDenylisted, + InvalidDobAgeOverMaximum, #[serde(rename = "invalid_dob_age_under_18")] InvalidDobAgeUnder18, + InvalidDobAgeUnderMinimum, + InvalidProductDescriptionLength, + InvalidProductDescriptionUrlMatch, InvalidRepresentativeCountry, + InvalidStatementDescriptorBusinessMismatch, + InvalidStatementDescriptorDenylisted, + InvalidStatementDescriptorLength, + InvalidStatementDescriptorPrefixDenylisted, + InvalidStatementDescriptorPrefixMismatch, InvalidStreetAddress, + InvalidTaxId, + InvalidTaxIdFormat, InvalidTosAcceptance, + InvalidUrlDenylisted, + InvalidUrlFormat, + InvalidUrlLength, + InvalidUrlWebPresenceDetected, + InvalidUrlWebsiteBusinessInformationMismatch, + InvalidUrlWebsiteEmpty, + InvalidUrlWebsiteInaccessible, + InvalidUrlWebsiteInaccessibleGeoblocked, + InvalidUrlWebsiteInaccessiblePasswordProtected, + InvalidUrlWebsiteIncomplete, + InvalidUrlWebsiteIncompleteCancellationPolicy, + InvalidUrlWebsiteIncompleteCustomerServiceDetails, + InvalidUrlWebsiteIncompleteLegalRestrictions, + InvalidUrlWebsiteIncompleteRefundPolicy, + InvalidUrlWebsiteIncompleteReturnPolicy, + InvalidUrlWebsiteIncompleteTermsAndConditions, + InvalidUrlWebsiteIncompleteUnderConstruction, + InvalidUrlWebsiteOther, InvalidValueOther, VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, @@ -216,10 +251,44 @@ impl AccountRequirementsErrorCode { pub fn as_str(self) -> &'static str { match self { AccountRequirementsErrorCode::InvalidAddressCityStatePostalCode => "invalid_address_city_state_postal_code", + AccountRequirementsErrorCode::InvalidAddressHighwayContractBox => "invalid_address_highway_contract_box", + AccountRequirementsErrorCode::InvalidAddressPrivateMailbox => "invalid_address_private_mailbox", + AccountRequirementsErrorCode::InvalidBusinessProfileName => "invalid_business_profile_name", + AccountRequirementsErrorCode::InvalidBusinessProfileNameDenylisted => "invalid_business_profile_name_denylisted", + AccountRequirementsErrorCode::InvalidCompanyNameDenylisted => "invalid_company_name_denylisted", + AccountRequirementsErrorCode::InvalidDobAgeOverMaximum => "invalid_dob_age_over_maximum", AccountRequirementsErrorCode::InvalidDobAgeUnder18 => "invalid_dob_age_under_18", + AccountRequirementsErrorCode::InvalidDobAgeUnderMinimum => "invalid_dob_age_under_minimum", + AccountRequirementsErrorCode::InvalidProductDescriptionLength => "invalid_product_description_length", + AccountRequirementsErrorCode::InvalidProductDescriptionUrlMatch => "invalid_product_description_url_match", AccountRequirementsErrorCode::InvalidRepresentativeCountry => "invalid_representative_country", + AccountRequirementsErrorCode::InvalidStatementDescriptorBusinessMismatch => "invalid_statement_descriptor_business_mismatch", + AccountRequirementsErrorCode::InvalidStatementDescriptorDenylisted => "invalid_statement_descriptor_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorLength => "invalid_statement_descriptor_length", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixDenylisted => "invalid_statement_descriptor_prefix_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixMismatch => "invalid_statement_descriptor_prefix_mismatch", AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", + AccountRequirementsErrorCode::InvalidTaxId => "invalid_tax_id", + AccountRequirementsErrorCode::InvalidTaxIdFormat => "invalid_tax_id_format", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", + AccountRequirementsErrorCode::InvalidUrlDenylisted => "invalid_url_denylisted", + AccountRequirementsErrorCode::InvalidUrlFormat => "invalid_url_format", + AccountRequirementsErrorCode::InvalidUrlLength => "invalid_url_length", + AccountRequirementsErrorCode::InvalidUrlWebPresenceDetected => "invalid_url_web_presence_detected", + AccountRequirementsErrorCode::InvalidUrlWebsiteBusinessInformationMismatch => "invalid_url_website_business_information_mismatch", + AccountRequirementsErrorCode::InvalidUrlWebsiteEmpty => "invalid_url_website_empty", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessible => "invalid_url_website_inaccessible", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessibleGeoblocked => "invalid_url_website_inaccessible_geoblocked", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessiblePasswordProtected => "invalid_url_website_inaccessible_password_protected", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncomplete => "invalid_url_website_incomplete", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCancellationPolicy => "invalid_url_website_incomplete_cancellation_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCustomerServiceDetails => "invalid_url_website_incomplete_customer_service_details", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteLegalRestrictions => "invalid_url_website_incomplete_legal_restrictions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteRefundPolicy => "invalid_url_website_incomplete_refund_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteReturnPolicy => "invalid_url_website_incomplete_return_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteTermsAndConditions => "invalid_url_website_incomplete_terms_and_conditions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteUnderConstruction => "invalid_url_website_incomplete_under_construction", + AccountRequirementsErrorCode::InvalidUrlWebsiteOther => "invalid_url_website_other", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", 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 cd7719569..2a5d6ed2b 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. @@ -169,7 +178,7 @@ pub struct PortalSubscriptionUpdate { /// Whether the feature is enabled. pub enabled: bool, - /// The list of products that support subscription updates. + /// The list of up to 10 products that support subscription updates. pub products: Option>, /// Determines how to handle prorations resulting from subscription updates. @@ -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_configuration_created.rs b/src/resources/generated/billing_portal_configuration_created.rs new file mode 100644 index 000000000..7f9d7ce2b --- /dev/null +++ b/src/resources/generated/billing_portal_configuration_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "billing_portal.configuration.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingPortalConfigurationCreated { +} diff --git a/src/resources/generated/billing_portal_configuration_updated.rs b/src/resources/generated/billing_portal_configuration_updated.rs new file mode 100644 index 000000000..26f14bc10 --- /dev/null +++ b/src/resources/generated/billing_portal_configuration_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "billing_portal.configuration.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingPortalConfigurationUpdated { +} diff --git a/src/resources/generated/billing_portal_session.rs b/src/resources/generated/billing_portal_session.rs index b02591320..b608a960d 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,18 +105,21 @@ pub struct PortalFlowsFlowAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the flow is completed. pub custom_message: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsAfterCompletionRedirect { + /// The URL the customer will be redirected to after the flow is completed. pub return_url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. pub retention: Option, @@ -127,12 +129,14 @@ pub struct PortalFlowsFlowSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionUpdate { + /// The ID of the subscription to be updated. pub subscription: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionUpdateConfirm { + /// The coupon or promotion code to apply to this subscription update. /// /// Currently, only up to one may be specified. @@ -149,6 +153,7 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsRetention { + /// Configuration when `retention.type=coupon_offer`. pub coupon_offer: Option, @@ -159,12 +164,14 @@ pub struct PortalFlowsRetention { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsCouponOffer { + /// The ID of the coupon to be offered. pub coupon: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsSubscriptionUpdateConfirmDiscount { + /// The ID of the coupon to apply to this subscription update. pub coupon: Option, @@ -174,12 +181,13 @@ 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, /// The price the customer should subscribe to through this flow. /// - /// The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + /// The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). pub price: Option, /// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. @@ -190,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. @@ -244,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, @@ -258,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")] @@ -268,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")] @@ -284,6 +293,7 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. #[serde(skip_serializing_if = "Option::is_none")] pub retention: Option, @@ -294,18 +304,19 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdate { + /// The ID of the subscription to be updated. pub subscription: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm { + /// The coupon or promotion code to apply to this subscription update. /// /// Currently, only up to one may be specified. #[serde(skip_serializing_if = "Option::is_none")] - pub discounts: - Option>, + pub discounts: Option>, /// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. /// @@ -318,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, @@ -325,12 +337,14 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletionHostedConfirmation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataAfterCompletionRedirect { + /// The URL the customer will be redirected to after the flow is completed. pub return_url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention { + /// Configuration when `retention.type=coupon_offer`. pub coupon_offer: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer, @@ -341,6 +355,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscounts { + /// The ID of the coupon to apply to this subscription update. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, @@ -352,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, @@ -368,6 +384,7 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer { + /// The ID of the coupon to be offered. pub coupon: String, } @@ -520,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", } } @@ -558,9 +571,7 @@ pub enum CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { impl CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { pub fn as_str(self) -> &'static str { match self { - CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => { - "coupon_offer" - } + CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => "coupon_offer", } } } @@ -598,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", } } } diff --git a/src/resources/generated/billing_portal_session_created.rs b/src/resources/generated/billing_portal_session_created.rs new file mode 100644 index 000000000..f4c43a3db --- /dev/null +++ b/src/resources/generated/billing_portal_session_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "billing_portal.session.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingPortalSessionCreated { +} diff --git a/src/resources/generated/capability.rs b/src/resources/generated/capability.rs index 3041ebbd1..c3b906ebb 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -158,11 +158,45 @@ pub struct AccountRequirementsError { #[serde(rename_all = "snake_case")] pub enum AccountRequirementsErrorCode { InvalidAddressCityStatePostalCode, + InvalidAddressHighwayContractBox, + InvalidAddressPrivateMailbox, + InvalidBusinessProfileName, + InvalidBusinessProfileNameDenylisted, + InvalidCompanyNameDenylisted, + InvalidDobAgeOverMaximum, #[serde(rename = "invalid_dob_age_under_18")] InvalidDobAgeUnder18, + InvalidDobAgeUnderMinimum, + InvalidProductDescriptionLength, + InvalidProductDescriptionUrlMatch, InvalidRepresentativeCountry, + InvalidStatementDescriptorBusinessMismatch, + InvalidStatementDescriptorDenylisted, + InvalidStatementDescriptorLength, + InvalidStatementDescriptorPrefixDenylisted, + InvalidStatementDescriptorPrefixMismatch, InvalidStreetAddress, + InvalidTaxId, + InvalidTaxIdFormat, InvalidTosAcceptance, + InvalidUrlDenylisted, + InvalidUrlFormat, + InvalidUrlLength, + InvalidUrlWebPresenceDetected, + InvalidUrlWebsiteBusinessInformationMismatch, + InvalidUrlWebsiteEmpty, + InvalidUrlWebsiteInaccessible, + InvalidUrlWebsiteInaccessibleGeoblocked, + InvalidUrlWebsiteInaccessiblePasswordProtected, + InvalidUrlWebsiteIncomplete, + InvalidUrlWebsiteIncompleteCancellationPolicy, + InvalidUrlWebsiteIncompleteCustomerServiceDetails, + InvalidUrlWebsiteIncompleteLegalRestrictions, + InvalidUrlWebsiteIncompleteRefundPolicy, + InvalidUrlWebsiteIncompleteReturnPolicy, + InvalidUrlWebsiteIncompleteTermsAndConditions, + InvalidUrlWebsiteIncompleteUnderConstruction, + InvalidUrlWebsiteOther, InvalidValueOther, VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, @@ -217,10 +251,44 @@ impl AccountRequirementsErrorCode { pub fn as_str(self) -> &'static str { match self { AccountRequirementsErrorCode::InvalidAddressCityStatePostalCode => "invalid_address_city_state_postal_code", + AccountRequirementsErrorCode::InvalidAddressHighwayContractBox => "invalid_address_highway_contract_box", + AccountRequirementsErrorCode::InvalidAddressPrivateMailbox => "invalid_address_private_mailbox", + AccountRequirementsErrorCode::InvalidBusinessProfileName => "invalid_business_profile_name", + AccountRequirementsErrorCode::InvalidBusinessProfileNameDenylisted => "invalid_business_profile_name_denylisted", + AccountRequirementsErrorCode::InvalidCompanyNameDenylisted => "invalid_company_name_denylisted", + AccountRequirementsErrorCode::InvalidDobAgeOverMaximum => "invalid_dob_age_over_maximum", AccountRequirementsErrorCode::InvalidDobAgeUnder18 => "invalid_dob_age_under_18", + AccountRequirementsErrorCode::InvalidDobAgeUnderMinimum => "invalid_dob_age_under_minimum", + AccountRequirementsErrorCode::InvalidProductDescriptionLength => "invalid_product_description_length", + AccountRequirementsErrorCode::InvalidProductDescriptionUrlMatch => "invalid_product_description_url_match", AccountRequirementsErrorCode::InvalidRepresentativeCountry => "invalid_representative_country", + AccountRequirementsErrorCode::InvalidStatementDescriptorBusinessMismatch => "invalid_statement_descriptor_business_mismatch", + AccountRequirementsErrorCode::InvalidStatementDescriptorDenylisted => "invalid_statement_descriptor_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorLength => "invalid_statement_descriptor_length", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixDenylisted => "invalid_statement_descriptor_prefix_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixMismatch => "invalid_statement_descriptor_prefix_mismatch", AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", + AccountRequirementsErrorCode::InvalidTaxId => "invalid_tax_id", + AccountRequirementsErrorCode::InvalidTaxIdFormat => "invalid_tax_id_format", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", + AccountRequirementsErrorCode::InvalidUrlDenylisted => "invalid_url_denylisted", + AccountRequirementsErrorCode::InvalidUrlFormat => "invalid_url_format", + AccountRequirementsErrorCode::InvalidUrlLength => "invalid_url_length", + AccountRequirementsErrorCode::InvalidUrlWebPresenceDetected => "invalid_url_web_presence_detected", + AccountRequirementsErrorCode::InvalidUrlWebsiteBusinessInformationMismatch => "invalid_url_website_business_information_mismatch", + AccountRequirementsErrorCode::InvalidUrlWebsiteEmpty => "invalid_url_website_empty", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessible => "invalid_url_website_inaccessible", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessibleGeoblocked => "invalid_url_website_inaccessible_geoblocked", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessiblePasswordProtected => "invalid_url_website_inaccessible_password_protected", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncomplete => "invalid_url_website_incomplete", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCancellationPolicy => "invalid_url_website_incomplete_cancellation_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCustomerServiceDetails => "invalid_url_website_incomplete_customer_service_details", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteLegalRestrictions => "invalid_url_website_incomplete_legal_restrictions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteRefundPolicy => "invalid_url_website_incomplete_refund_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteReturnPolicy => "invalid_url_website_incomplete_return_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteTermsAndConditions => "invalid_url_website_incomplete_terms_and_conditions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteUnderConstruction => "invalid_url_website_incomplete_under_construction", + AccountRequirementsErrorCode::InvalidUrlWebsiteOther => "invalid_url_website_other", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", diff --git a/src/resources/generated/capability_updated.rs b/src/resources/generated/capability_updated.rs new file mode 100644 index 000000000..adc2fdab1 --- /dev/null +++ b/src/resources/generated/capability_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "capability.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CapabilityUpdated { +} diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index f698fe52d..0a57b22f9 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". /// @@ -158,9 +157,9 @@ pub struct Card { #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, - /// For external accounts, possible values are `new` and `errored`. + /// For external accounts that are cards, possible values are `new` and `errored`. /// - /// If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + /// If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. #[serde(skip_serializing_if = "Option::is_none")] pub status: 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/cash_balance_funds_available.rs b/src/resources/generated/cash_balance_funds_available.rs new file mode 100644 index 000000000..58ff78121 --- /dev/null +++ b/src/resources/generated/cash_balance_funds_available.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "cash_balance.funds_available". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CashBalanceFundsAvailable { +} diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index dfbb6f459..d7ce52566 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -2,18 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, CustomerId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, - ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, - PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardInstallmentsPlan, - PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, - RadarRadarOptions, Refund, Review, Shipping, Transfer, -}; +use crate::resources::{Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, Shipping, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Charge". /// @@ -209,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. @@ -252,6 +247,7 @@ impl Object for Charge { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FraudDetails { + /// Assessments from Stripe. /// /// If set, the value is `fraudulent`. @@ -267,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. @@ -313,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. @@ -324,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, @@ -343,6 +342,7 @@ pub struct Level3 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Level3LineItems { + pub discount_amount: Option, pub product_code: String, @@ -358,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, @@ -451,6 +452,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_credit_transfer: Option, @@ -484,6 +488,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. @@ -501,6 +506,7 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAchCreditTransfer { + /// Account number to transfer funds to. pub account_number: Option, @@ -516,6 +522,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`. @@ -541,6 +548,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, @@ -564,10 +572,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, @@ -577,6 +587,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, @@ -595,6 +606,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. @@ -614,6 +626,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, @@ -644,21 +657,31 @@ 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 { + + /// The authorized amount. + pub amount_authorized: Option, + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. pub brand: Option, + /// When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_before: Option, + /// Check results by Card networks on Card address and CVC at time of payment. pub checks: Option, @@ -679,6 +702,9 @@ pub struct PaymentMethodDetailsCard { /// Four-digit number representing the card's expiration year. pub exp_year: i64, + #[serde(skip_serializing_if = "Option::is_none")] + pub extended_authorization: Option, + /// 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. @@ -697,6 +723,9 @@ pub struct PaymentMethodDetailsCard { #[serde(skip_serializing_if = "Option::is_none")] pub iin: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub incremental_authorization: Option, + /// Installment details for this payment (Mexico only). /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). @@ -718,6 +747,9 @@ pub struct PaymentMethodDetailsCard { #[serde(skip_serializing_if = "Option::is_none")] pub moto: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub multicapture: Option, + /// Identifies which network this charge was processed on. /// /// Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -727,6 +759,9 @@ pub struct PaymentMethodDetailsCard { #[serde(skip_serializing_if = "Option::is_none")] pub network_token: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub overcapture: Option, + /// Populated if this transaction used 3D Secure authentication. pub three_d_secure: Option, @@ -734,20 +769,67 @@ pub struct PaymentMethodDetailsCard { pub wallet: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization { + + /// Indicates whether or not the capture window is extended beyond the standard authorization. + pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization { + + /// Indicates whether or not the incremental authorization feature is supported. + pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture { + + /// The maximum amount that can be captured. + pub maximum_amount_capturable: i64, + + /// Indicates whether or not the authorized amount can be over-captured. + pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture { + + /// Indicates whether or not multiple captures are supported. + pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsCardChecks { + + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_line1_check: Option, + + /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_postal_code_check: Option, + + /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub cvc_check: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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, @@ -828,6 +910,9 @@ pub struct PaymentMethodDetailsCardPresent { /// Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. pub network: Option, + /// Details about payments collected offline. + pub offline: Option, + /// Defines whether the authorized amount can be over-captured or not. pub overcapture_supported: bool, @@ -840,8 +925,16 @@ pub struct PaymentMethodDetailsCardPresent { pub receipt: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsCardPresentOffline { + + /// Time at which the payment was collected while offline. + pub stored_at: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardPresentReceipt { + /// The type of account being debited or credited. #[serde(skip_serializing_if = "Option::is_none")] pub account_type: Option, @@ -877,6 +970,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, @@ -910,13 +1004,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. @@ -943,10 +1040,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. @@ -974,6 +1073,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, @@ -982,10 +1082,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`. @@ -1000,6 +1102,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`. @@ -1016,6 +1119,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, @@ -1034,12 +1138,14 @@ pub struct PaymentMethodDetailsGiropay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsGrabpay { + /// Unique transaction id generated by GrabPay. pub transaction_id: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsIdeal { + /// The customer's bank. /// /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -1066,6 +1172,7 @@ pub struct PaymentMethodDetailsIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -1150,6 +1257,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, @@ -1185,6 +1293,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, @@ -1196,18 +1305,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, @@ -1215,6 +1327,7 @@ pub struct PaymentMethodDetailsLink { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsMultibanco { + /// Entity number associated with this Multibanco payment. pub entity: Option, @@ -1224,12 +1337,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`. @@ -1247,43 +1362,41 @@ 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. /// They cannot be set or mutated. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_email: Option, /// PayPal account PayerID. /// /// This identifier uniquely identifies the PayPal customer. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_id: Option, /// Owner's full name. /// /// Values provided by PayPal directly (if supported) at the time of authorization or settlement. /// They cannot be set or mutated. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_name: Option, /// The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. - #[serde(skip_serializing_if = "Option::is_none")] pub seller_protection: Option, /// A unique ID generated by PayPal for this transaction. - #[serde(skip_serializing_if = "Option::is_none")] pub transaction_id: Option, } #[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, @@ -1291,12 +1404,18 @@ pub struct PaymentMethodDetailsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPromptpay { + /// Bill reference generated by PromptPay. pub reference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSepaCreditTransfer { + /// Name of the bank associated with the bank account. pub bank_name: Option, @@ -1309,6 +1428,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, @@ -1326,12 +1446,15 @@ pub struct PaymentMethodDetailsSepaDebit { /// Last four characters of the IBAN. pub last4: Option, - /// ID of the mandate used to make this payment. + /// Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. + /// + /// Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). pub mandate: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSofort { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1365,10 +1488,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, @@ -1393,10 +1518,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. @@ -1407,10 +1534,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>, @@ -1420,6 +1549,7 @@ pub struct PaypalSellerProtection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Rule { + /// The action taken on the payment. pub action: String, @@ -1432,10 +1562,25 @@ pub struct Rule { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ThreeDSecureDetailsCharge { + /// For authenticated transactions: how the customer was authenticated by /// the issuing bank. pub authentication_flow: Option, + /// The Electronic Commerce Indicator (ECI). + /// + /// A protocol-level field indicating what degree of authentication was performed. + pub electronic_commerce_indicator: Option, + + /// The exemption requested via 3DS and accepted by the issuer at authentication time. + pub exemption_indicator: Option, + + /// Whether Stripe requested the value of `exemption_indicator` in the transaction. + /// + /// This will depend on the outcome of Stripe's internal risk assessment. + #[serde(skip_serializing_if = "Option::is_none")] + pub exemption_indicator_applied: Option, + /// Indicates the outcome of 3D Secure authentication. pub result: Option, @@ -1443,6 +1588,10 @@ pub struct ThreeDSecureDetailsCharge { /// on the `result`. pub result_reason: Option, + /// The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + /// (dsTransId) for this payment. + pub transaction_id: Option, + /// The version of 3D Secure that was used. pub version: Option, } @@ -1450,6 +1599,7 @@ pub struct ThreeDSecureDetailsCharge { /// The parameters for `Charge::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCharge<'a> { + /// Amount intended to be collected by this payment. /// /// A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). @@ -1599,6 +1749,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>, @@ -1656,12 +1807,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. @@ -1732,6 +1883,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, @@ -1739,12 +1891,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. @@ -1825,6 +1979,142 @@ impl std::default::Default for FraudDetailsParamsUserReport { } } +/// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { + Disabled, + Enabled, +} + +impl PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { + pub fn as_str(self) -> &'static str { + match self { + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus::Disabled => "disabled", + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus::Enabled => "enabled", + } + } +} + +impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { + fn default() -> Self { + Self::Disabled + } +} + +/// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { + Available, + Unavailable, +} + +impl PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { + pub fn as_str(self) -> &'static str { + match self { + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus::Available => "available", + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus::Unavailable => "unavailable", + } + } +} + +impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { + fn default() -> Self { + Self::Available + } +} + +/// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { + Available, + Unavailable, +} + +impl PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { + pub fn as_str(self) -> &'static str { + match self { + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus::Available => "available", + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus::Unavailable => "unavailable", + } + } +} + +impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { + fn default() -> Self { + Self::Available + } +} + +/// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { + Available, + Unavailable, +} + +impl PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { + pub fn as_str(self) -> &'static str { + match self { + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus::Available => "available", + PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus::Unavailable => "unavailable", + } + } +} + +impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { + fn default() -> Self { + Self::Available + } +} + /// An enum representing the possible values of an `PaymentMethodDetailsAchDebit`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -1913,15 +2203,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", } } } @@ -2066,9 +2350,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", @@ -2078,25 +2360,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", @@ -2385,15 +2657,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", } } } @@ -2785,6 +3051,85 @@ impl std::default::Default for ThreeDSecureDetailsChargeAuthenticationFlow { } } +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl ThreeDSecureDetailsChargeElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeElectronicCommerceIndicator::V01 => "01", + ThreeDSecureDetailsChargeElectronicCommerceIndicator::V02 => "02", + ThreeDSecureDetailsChargeElectronicCommerceIndicator::V05 => "05", + ThreeDSecureDetailsChargeElectronicCommerceIndicator::V06 => "06", + ThreeDSecureDetailsChargeElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `exemption_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeExemptionIndicator { + LowRisk, + None, +} + +impl ThreeDSecureDetailsChargeExemptionIndicator { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeExemptionIndicator::LowRisk => "low_risk", + ThreeDSecureDetailsChargeExemptionIndicator::None => "none", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeExemptionIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeExemptionIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeExemptionIndicator { + fn default() -> Self { + Self::LowRisk + } +} + /// 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")] diff --git a/src/resources/generated/charge_captured.rs b/src/resources/generated/charge_captured.rs new file mode 100644 index 000000000..293b522c7 --- /dev/null +++ b/src/resources/generated/charge_captured.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.captured". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeCaptured { +} diff --git a/src/resources/generated/charge_dispute_closed.rs b/src/resources/generated/charge_dispute_closed.rs new file mode 100644 index 000000000..244851bba --- /dev/null +++ b/src/resources/generated/charge_dispute_closed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.dispute.closed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeDisputeClosed { +} diff --git a/src/resources/generated/charge_dispute_created.rs b/src/resources/generated/charge_dispute_created.rs new file mode 100644 index 000000000..97b1781c0 --- /dev/null +++ b/src/resources/generated/charge_dispute_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.dispute.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeDisputeCreated { +} diff --git a/src/resources/generated/charge_dispute_funds_reinstated.rs b/src/resources/generated/charge_dispute_funds_reinstated.rs new file mode 100644 index 000000000..0e45d95a9 --- /dev/null +++ b/src/resources/generated/charge_dispute_funds_reinstated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.dispute.funds_reinstated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeDisputeFundsReinstated { +} diff --git a/src/resources/generated/charge_dispute_funds_withdrawn.rs b/src/resources/generated/charge_dispute_funds_withdrawn.rs new file mode 100644 index 000000000..c4adb5dd2 --- /dev/null +++ b/src/resources/generated/charge_dispute_funds_withdrawn.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.dispute.funds_withdrawn". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeDisputeFundsWithdrawn { +} diff --git a/src/resources/generated/charge_dispute_updated.rs b/src/resources/generated/charge_dispute_updated.rs new file mode 100644 index 000000000..77ed8d8d4 --- /dev/null +++ b/src/resources/generated/charge_dispute_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.dispute.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeDisputeUpdated { +} diff --git a/src/resources/generated/charge_expired.rs b/src/resources/generated/charge_expired.rs new file mode 100644 index 000000000..5a75680d2 --- /dev/null +++ b/src/resources/generated/charge_expired.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.expired". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeExpired { +} diff --git a/src/resources/generated/charge_failed.rs b/src/resources/generated/charge_failed.rs new file mode 100644 index 000000000..226f43825 --- /dev/null +++ b/src/resources/generated/charge_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeFailed { +} diff --git a/src/resources/generated/charge_pending.rs b/src/resources/generated/charge_pending.rs new file mode 100644 index 000000000..d47e0b316 --- /dev/null +++ b/src/resources/generated/charge_pending.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.pending". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargePending { +} diff --git a/src/resources/generated/charge_refund_updated.rs b/src/resources/generated/charge_refund_updated.rs new file mode 100644 index 000000000..7e4f1406f --- /dev/null +++ b/src/resources/generated/charge_refund_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.refund.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeRefundUpdated { +} diff --git a/src/resources/generated/charge_refunded.rs b/src/resources/generated/charge_refunded.rs new file mode 100644 index 000000000..208ba169a --- /dev/null +++ b/src/resources/generated/charge_refunded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.refunded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeRefunded { +} diff --git a/src/resources/generated/charge_succeeded.rs b/src/resources/generated/charge_succeeded.rs new file mode 100644 index 000000000..8954fca61 --- /dev/null +++ b/src/resources/generated/charge_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeSucceeded { +} diff --git a/src/resources/generated/charge_updated.rs b/src/resources/generated/charge_updated.rs new file mode 100644 index 000000000..bda7ce76d --- /dev/null +++ b/src/resources/generated/charge_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "charge.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ChargeUpdated { +} diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 5b03d95e5..a2ecebe3b 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -2,23 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, - SubscriptionId, -}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, Timestamp, -}; -use crate::resources::{ - Address, CheckoutSessionItem, Currency, Customer, Discount, Invoice, - InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, - Subscription, TaxId, TaxRate, -}; +use crate::ids::{CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, SubscriptionId}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, CheckoutSessionItem, Currency, Customer, Discount, Invoice, InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, Subscription, TaxId, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Session". /// @@ -53,6 +41,9 @@ pub struct CheckoutSession { /// This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. pub client_reference_id: Option, + /// Client secret to be used when initializing Stripe.js embedded checkout. + pub client_secret: Option, + /// Results of `consent_collection` for this session. pub consent: Option, @@ -141,9 +132,7 @@ pub struct CheckoutSession { pub payment_method_collection: Option, /// Information about the payment method configuration used for this Checkout session if using dynamic payment methods. - #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. pub payment_method_options: Option, @@ -163,6 +152,19 @@ pub struct CheckoutSession { /// The ID of the original expired Checkout Session that triggered the recovery flow. pub recovered_from: Option, + /// Applies to Checkout Sessions with `ui_mode: embedded`. + /// + /// By default, Stripe will always redirect to your return_url after a successful confirmation. + /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub redirect_on_completion: Option, + + /// Applies to Checkout Sessions with `ui_mode: embedded`. + /// + /// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + #[serde(skip_serializing_if = "Option::is_none")] + pub return_url: Option, + /// The ID of the SetupIntent for Checkout Sessions in `setup` mode. pub setup_intent: Option>, @@ -200,6 +202,11 @@ pub struct CheckoutSession { /// Tax and discount details for the computed total amount. pub total_details: Option, + /// The UI mode of the Session. + /// + /// Can be `hosted` (default) or `embedded`. + pub ui_mode: Option, + /// The URL to the Checkout Session. /// /// Redirect customers to this URL to take them to Checkout. @@ -209,13 +216,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 { @@ -235,6 +241,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, @@ -301,9 +308,15 @@ pub struct CheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub paynow: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub paypal: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub pix: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -316,6 +329,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. @@ -340,6 +354,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, @@ -364,6 +379,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. @@ -375,6 +391,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. @@ -386,6 +403,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. @@ -397,6 +415,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. @@ -408,6 +427,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. @@ -419,6 +439,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. @@ -430,6 +451,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. @@ -446,6 +468,7 @@ pub struct CheckoutBoletoPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCardPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, @@ -476,6 +499,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, @@ -483,6 +507,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. @@ -494,6 +519,7 @@ pub struct CheckoutCashappPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalancePaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -513,6 +539,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, @@ -520,8 +547,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")] @@ -530,6 +556,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. @@ -541,6 +568,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. @@ -552,6 +580,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. @@ -563,6 +592,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. @@ -574,6 +604,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. @@ -585,6 +616,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. @@ -596,6 +628,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. @@ -612,6 +645,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. @@ -623,6 +657,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. @@ -639,6 +674,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. @@ -650,6 +686,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. @@ -659,14 +696,44 @@ pub struct CheckoutPaynowPaymentMethodOptions { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutPaypalPaymentMethodOptions { + + /// Controls when the funds will be captured from the customer's account. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Preferred locale of the PayPal checkout page that the customer is redirected to. + pub preferred_locale: Option, + + /// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. + /// + /// This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + pub reference: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPixPaymentMethodOptions { + /// The number of seconds after which Pix payment will expire. pub expires_after_seconds: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutRevolutPayPaymentMethodOptions { +} + #[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. @@ -678,6 +745,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. @@ -689,6 +757,7 @@ pub struct CheckoutSofortPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -707,12 +776,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`. @@ -733,6 +804,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, @@ -742,6 +814,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, @@ -752,6 +825,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. @@ -764,6 +838,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, @@ -779,7 +854,8 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFields { - /// Configuration for `type=dropdown` fields. + + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, /// String of your choice that your integration can use to reconcile this field. @@ -789,7 +865,7 @@ pub struct PaymentPagesCheckoutSessionCustomFields { pub label: PaymentPagesCheckoutSessionCustomFieldsLabel, - /// Configuration for `type=numeric` fields. + #[serde(skip_serializing_if = "Option::is_none")] pub numeric: Option, /// Whether the customer is required to complete the field before completing the Checkout Session. @@ -797,7 +873,7 @@ pub struct PaymentPagesCheckoutSessionCustomFields { /// Defaults to `false`. pub optional: bool, - /// Configuration for `type=text` fields. + #[serde(skip_serializing_if = "Option::is_none")] pub text: Option, /// The type of the field. @@ -807,6 +883,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. @@ -820,6 +897,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. @@ -832,6 +910,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, @@ -844,6 +923,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. @@ -857,6 +937,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, @@ -869,6 +950,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, @@ -881,12 +963,14 @@ pub struct PaymentPagesCheckoutSessionCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomTextPosition { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomerDetails { + /// The customer's address after a completed Checkout Session. /// /// Note: This property is populated only for sessions on or after March 30, 2022. @@ -913,6 +997,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, @@ -921,6 +1006,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>>, @@ -946,6 +1032,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -955,22 +1042,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, @@ -992,6 +1081,7 @@ pub struct PaymentPagesCheckoutSessionShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, @@ -1008,6 +1098,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, @@ -1017,6 +1108,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, @@ -1027,12 +1119,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, @@ -1048,6 +1142,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -1057,6 +1152,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -1064,8 +1160,9 @@ pub struct LineItemsDiscountAmount { } /// The parameters for `CheckoutSession::create`. -#[derive(Clone, Debug, Serialize)] +#[derive(Clone, Debug, Serialize, Default)] pub struct CreateCheckoutSession<'a> { + /// Configure actions after a Checkout Session has expired. #[serde(skip_serializing_if = "Option::is_none")] pub after_expiration: Option, @@ -1099,6 +1196,7 @@ pub struct CreateCheckoutSession<'a> { /// 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). + /// Required in `setup` mode when `payment_method_types` is not set. #[serde(skip_serializing_if = "Option::is_none")] pub currency: Option, @@ -1114,8 +1212,8 @@ pub struct CreateCheckoutSession<'a> { /// ID of an existing Customer, if one exists. /// - /// In `payment` mode, the customer’s most recent card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. - /// In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) will be used if it’s a card, and otherwise the most recent card will be used. + /// In `payment` mode, the customer’s most recently saved card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. + /// In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) will be used if it’s a card, otherwise the most recently saved card will be used. /// A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1215,8 +1313,8 @@ pub struct CreateCheckoutSession<'a> { /// A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. /// - /// In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - /// It is required in `setup` mode. + /// You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + /// See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. /// /// Read more about the supported payment methods and their requirements in our [payment /// method details guide](/docs/payments/checkout/payment-methods). @@ -1236,6 +1334,20 @@ pub struct CreateCheckoutSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub phone_number_collection: Option, + /// This parameter applies to `ui_mode: embedded`. + /// + /// By default, Stripe will always redirect to your return_url after a successful confirmation. + /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub redirect_on_completion: Option, + + /// The URL to redirect your customer back to after they authenticate or cancel their payment on the + /// payment method's app or site. + /// + /// This parameter is required if ui_mode is `embedded` and redirect-based payment methods are enabled on the session. + #[serde(skip_serializing_if = "Option::is_none")] + pub return_url: Option<&'a str>, + /// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. #[serde(skip_serializing_if = "Option::is_none")] pub setup_intent_data: Option, @@ -1263,17 +1375,25 @@ pub struct CreateCheckoutSession<'a> { /// The URL to which Stripe should send customers when payment or setup /// is complete. - /// If you’d like to use information from the successful Checkout Session on your page, - /// read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - pub success_url: &'a str, + /// This parameter is not allowed if ui_mode is `embedded`. + /// + /// If you’d like to use information from the successful Checkout Session on your page, read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + #[serde(skip_serializing_if = "Option::is_none")] + pub success_url: Option<&'a str>, /// Controls tax ID collection settings for the session. #[serde(skip_serializing_if = "Option::is_none")] pub tax_id_collection: Option, + + /// `ui_mode` can be `hosted` or `embedded`. + /// + /// The default is `hosted`. + #[serde(skip_serializing_if = "Option::is_none")] + pub ui_mode: Option, } impl<'a> CreateCheckoutSession<'a> { - pub fn new(success_url: &'a str) -> Self { + pub fn new() -> Self { CreateCheckoutSession { after_expiration: Default::default(), allow_promotion_codes: Default::default(), @@ -1303,13 +1423,16 @@ impl<'a> CreateCheckoutSession<'a> { payment_method_options: Default::default(), payment_method_types: Default::default(), phone_number_collection: Default::default(), + redirect_on_completion: Default::default(), + return_url: Default::default(), setup_intent_data: Default::default(), shipping_address_collection: Default::default(), shipping_options: Default::default(), submit_type: Default::default(), subscription_data: Default::default(), - success_url, + success_url: Default::default(), tax_id_collection: Default::default(), + ui_mode: Default::default(), } } } @@ -1317,6 +1440,11 @@ impl<'a> CreateCheckoutSession<'a> { /// The parameters for `CheckoutSession::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCheckoutSessions<'a> { + + /// Only return the Checkout Sessions that were created during the given date interval. + #[serde(skip_serializing_if = "Option::is_none")] + pub created: Option>, + /// Only return the Checkout Sessions for the Customer specified. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1357,6 +1485,10 @@ pub struct ListCheckoutSessions<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub starting_after: Option, + /// Only return the Checkout Sessions matching the given status. + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option, + /// Only return the Checkout Session for the subscription specified. #[serde(skip_serializing_if = "Option::is_none")] pub subscription: Option, @@ -1365,6 +1497,7 @@ pub struct ListCheckoutSessions<'a> { impl<'a> ListCheckoutSessions<'a> { pub fn new() -> Self { ListCheckoutSessions { + created: Default::default(), customer: Default::default(), customer_details: Default::default(), ending_before: Default::default(), @@ -1373,6 +1506,7 @@ impl<'a> ListCheckoutSessions<'a> { payment_intent: Default::default(), payment_link: Default::default(), starting_after: Default::default(), + status: Default::default(), subscription: Default::default(), } } @@ -1380,11 +1514,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, @@ -1392,12 +1526,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. @@ -1413,6 +1549,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, @@ -1446,6 +1583,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, @@ -1456,12 +1594,12 @@ pub struct CreateCheckoutSessionCustomText { /// Custom text that should be displayed in place of the default terms of service agreement text. #[serde(skip_serializing_if = "Option::is_none")] - pub terms_of_service_acceptance: - Option, + pub terms_of_service_acceptance: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomerUpdate { + /// Describes whether Checkout saves the billing address onto `customer.address`. /// To always collect a full billing address, use `billing_address_collection`. /// @@ -1485,6 +1623,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, @@ -1496,6 +1635,7 @@ pub struct CreateCheckoutSessionDiscounts { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreation { + /// Set to `true` to enable invoice creation. pub enabled: bool, @@ -1506,6 +1646,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, @@ -1541,6 +1682,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. @@ -1629,6 +1771,7 @@ pub struct CreateCheckoutSessionPaymentIntentData { #[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, @@ -1725,6 +1868,10 @@ pub struct CreateCheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub pix: Option, + /// contains details about the RevolutPay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// contains details about the Sepa Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -1744,12 +1891,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. @@ -1771,6 +1920,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. /// @@ -1780,6 +1930,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, @@ -1791,6 +1942,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. @@ -1859,18 +2011,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`. @@ -1886,6 +2041,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. @@ -1894,6 +2050,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. @@ -1906,6 +2063,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, @@ -1917,6 +2075,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, @@ -1928,24 +2087,28 @@ pub struct CreateCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1979,6 +2142,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. @@ -2000,6 +2164,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). @@ -2044,6 +2209,7 @@ pub struct CreateCheckoutSessionLineItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShipping { + /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress, @@ -2067,6 +2233,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, @@ -2081,6 +2248,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). @@ -2098,17 +2266,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. @@ -2120,18 +2287,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. @@ -2143,42 +2311,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. @@ -2196,6 +2365,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, @@ -2227,18 +2397,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, @@ -2255,12 +2426,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. @@ -2272,6 +2443,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. @@ -2283,30 +2455,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. @@ -2318,6 +2491,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. @@ -2329,6 +2503,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. @@ -2342,12 +2517,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. @@ -2359,6 +2534,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. @@ -2376,6 +2552,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. @@ -2391,6 +2568,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. @@ -2402,6 +2580,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, @@ -2431,6 +2610,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. @@ -2438,20 +2618,33 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPix { pub expires_after_seconds: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodOptionsRevolutPay { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[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. @@ -2463,10 +2656,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. /// @@ -2474,17 +2667,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. @@ -2500,18 +2692,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. /// @@ -2554,6 +2745,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. @@ -2567,12 +2759,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. @@ -2586,6 +2780,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. @@ -2599,18 +2794,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. @@ -2639,6 +2835,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -2654,6 +2851,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, @@ -2680,6 +2878,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. @@ -2690,8 +2889,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. /// @@ -2701,17 +2899,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")] @@ -2738,41 +2935,38 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] - pub maximum: - Option, + pub maximum: Option, /// The lower bound of the estimated range. /// /// If empty, represents no lower bound. #[serde(skip_serializing_if = "Option::is_none")] - pub minimum: - Option, + pub minimum: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -2785,20 +2979,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`. @@ -2807,6 +3000,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferE #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -2816,6 +3010,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -2825,6 +3020,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, @@ -2832,9 +3028,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. @@ -2991,9 +3185,7 @@ impl CheckoutAcssDebitPaymentMethodOptionsVerificationMethod { match self { CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Automatic => "automatic", CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Instant => "instant", - CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => { - "microdeposits" - } + CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3348,16 +3540,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 } @@ -3377,21 +3565,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", } } } @@ -3835,6 +4013,72 @@ impl std::default::Default for CheckoutPaynowPaymentMethodOptionsSetupFutureUsag } } +/// An enum representing the possible values of an `CheckoutPaypalPaymentMethodOptions`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutPaypalPaymentMethodOptionsCaptureMethod { + Manual, +} + +impl CheckoutPaypalPaymentMethodOptionsCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CheckoutPaypalPaymentMethodOptionsCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CheckoutPaypalPaymentMethodOptionsCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutPaypalPaymentMethodOptionsCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutPaypalPaymentMethodOptionsCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `CheckoutPaypalPaymentMethodOptions`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + None, + OffSession, +} + +impl CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::None => "none", + CheckoutPaypalPaymentMethodOptionsSetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutPaypalPaymentMethodOptionsSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CheckoutSepaDebitPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4163,6 +4407,42 @@ impl std::default::Default for CheckoutSessionPaymentStatus { } } +/// An enum representing the possible values of an `CheckoutSession`'s `redirect_on_completion` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutSessionRedirectOnCompletion { + Always, + IfRequired, + Never, +} + +impl CheckoutSessionRedirectOnCompletion { + pub fn as_str(self) -> &'static str { + match self { + CheckoutSessionRedirectOnCompletion::Always => "always", + CheckoutSessionRedirectOnCompletion::IfRequired => "if_required", + CheckoutSessionRedirectOnCompletion::Never => "never", + } + } +} + +impl AsRef for CheckoutSessionRedirectOnCompletion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutSessionRedirectOnCompletion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutSessionRedirectOnCompletion { + fn default() -> Self { + Self::Always + } +} + /// An enum representing the possible values of an `CheckoutSession`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4237,6 +4517,40 @@ impl std::default::Default for CheckoutSessionSubmitType { } } +/// An enum representing the possible values of an `CheckoutSession`'s `ui_mode` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutSessionUiMode { + Embedded, + Hosted, +} + +impl CheckoutSessionUiMode { + pub fn as_str(self) -> &'static str { + match self { + CheckoutSessionUiMode::Embedded => "embedded", + CheckoutSessionUiMode::Hosted => "hosted", + } + } +} + +impl AsRef for CheckoutSessionUiMode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutSessionUiMode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutSessionUiMode { + fn default() -> Self { + Self::Embedded + } +} + /// An enum representing the possible values of an `CheckoutSofortPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4594,24 +4908,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 } @@ -4704,9 +5012,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", } } @@ -4786,16 +5092,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 } @@ -4820,24 +5122,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 } @@ -4860,24 +5156,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 } @@ -4896,12 +5186,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", } } } @@ -4935,15 +5221,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", } } } @@ -4959,9 +5239,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 } @@ -5009,9 +5287,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsa impl CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none", } } } @@ -5022,16 +5298,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 } @@ -5095,9 +5367,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 } @@ -5116,12 +5386,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", } } } @@ -5188,12 +5454,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", } } } @@ -5226,12 +5488,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", } } } @@ -5266,12 +5524,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", } } } @@ -5320,24 +5574,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 } @@ -5372,16 +5620,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 } @@ -5397,9 +5641,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -5431,9 +5673,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsag impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none", } } } @@ -5444,16 +5684,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 } @@ -5695,9 +5931,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -5952,9 +6186,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -5976,6 +6208,40 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsPaypalSe } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsRevolutPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { + None, + OffSession, +} + +impl CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", + CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5989,12 +6255,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", } } } @@ -6069,24 +6331,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsP } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -6107,24 +6363,18 @@ impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsP } } -impl AsRef - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -6143,12 +6393,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", } } } @@ -6164,9 +6410,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 } @@ -6183,12 +6427,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", } } } @@ -6199,16 +6439,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 } @@ -6312,6 +6548,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -6348,6 +6585,7 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::Paypal => "paypal", CreateCheckoutSessionPaymentMethodTypes::Pix => "pix", CreateCheckoutSessionPaymentMethodTypes::Promptpay => "promptpay", + CreateCheckoutSessionPaymentMethodTypes::RevolutPay => "revolut_pay", CreateCheckoutSessionPaymentMethodTypes::SepaDebit => "sepa_debit", CreateCheckoutSessionPaymentMethodTypes::Sofort => "sofort", CreateCheckoutSessionPaymentMethodTypes::UsBankAccount => "us_bank_account", @@ -7138,24 +7376,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 } @@ -7184,24 +7416,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 } @@ -7226,24 +7452,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 } @@ -7261,15 +7481,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", } } } @@ -7334,9 +7548,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", } } @@ -7378,24 +7590,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 } @@ -7475,9 +7681,7 @@ impl PaymentPagesCheckoutSessionAutomaticTaxStatus { match self { PaymentPagesCheckoutSessionAutomaticTaxStatus::Complete => "complete", PaymentPagesCheckoutSessionAutomaticTaxStatus::Failed => "failed", - PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => { - "requires_location_inputs" - } + PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => "requires_location_inputs", } } } @@ -8472,9 +8676,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/checkout_session_async_payment_failed.rs b/src/resources/generated/checkout_session_async_payment_failed.rs new file mode 100644 index 000000000..a31cafda5 --- /dev/null +++ b/src/resources/generated/checkout_session_async_payment_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "checkout.session.async_payment_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutSessionAsyncPaymentFailed { +} diff --git a/src/resources/generated/checkout_session_async_payment_succeeded.rs b/src/resources/generated/checkout_session_async_payment_succeeded.rs new file mode 100644 index 000000000..807f042ef --- /dev/null +++ b/src/resources/generated/checkout_session_async_payment_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "checkout.session.async_payment_succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutSessionAsyncPaymentSucceeded { +} diff --git a/src/resources/generated/checkout_session_completed.rs b/src/resources/generated/checkout_session_completed.rs new file mode 100644 index 000000000..85838160c --- /dev/null +++ b/src/resources/generated/checkout_session_completed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "checkout.session.completed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutSessionCompleted { +} diff --git a/src/resources/generated/checkout_session_expired.rs b/src/resources/generated/checkout_session_expired.rs new file mode 100644 index 000000000..ab6e98351 --- /dev/null +++ b/src/resources/generated/checkout_session_expired.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "checkout.session.expired". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutSessionExpired { +} diff --git a/src/resources/generated/climate_order.rs b/src/resources/generated/climate_order.rs new file mode 100644 index 000000000..39ab394e4 --- /dev/null +++ b/src/resources/generated/climate_order.rs @@ -0,0 +1,223 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ClimateOrderId}; +use crate::params::{Expandable, Metadata, Object, Timestamp}; +use crate::resources::{ClimateProduct, ClimateSupplier, Currency}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ClimateRemovalsOrders". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrder { + /// Unique identifier for the object. + pub id: ClimateOrderId, + + /// Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + pub amount_fees: i64, + + /// Total amount of the carbon removal in the currency's smallest unit. + pub amount_subtotal: i64, + + /// Total amount of the order including fees in the currency's smallest unit. + pub amount_total: i64, + + #[serde(skip_serializing_if = "Option::is_none")] + pub beneficiary: Option, + + /// Time at which the order was canceled. + /// + /// Measured in seconds since the Unix epoch. + pub canceled_at: Option, + + /// Reason for the cancellation of this order. + pub cancellation_reason: Option, + + /// For delivered orders, a URL to a delivery certificate for the order. + pub certificate: Option, + + /// Time at which the order was confirmed. + /// + /// Measured in seconds since the Unix epoch. + pub confirmed_at: Option, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + pub currency: Currency, + + /// Time at which the order's expected_delivery_year was delayed. + /// + /// Measured in seconds since the Unix epoch. + pub delayed_at: Option, + + /// Time at which the order was delivered. + /// + /// Measured in seconds since the Unix epoch. + pub delivered_at: Option, + + /// Details about the delivery of carbon removal for this order. + pub delivery_details: Vec, + + /// The year this order is expected to be delivered. + pub expected_delivery_year: i64, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. + /// + /// This can be useful for storing additional information about the object in a structured format. + pub metadata: Metadata, + + /// Quantity of carbon removal that is included in this order. + pub metric_tons: String, + + /// Unique ID for the Climate `Product` this order is purchasing. + pub product: Expandable, + + /// Time at which the order's product was substituted for a different product. + /// + /// Measured in seconds since the Unix epoch. + pub product_substituted_at: Option, + + /// The current status of this order. + pub status: ClimateOrderStatus, +} + +impl Object for ClimateOrder { + type Id = ClimateOrderId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "climate.order" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateRemovalsBeneficiary { + + /// Publicly displayable name for the end beneficiary of carbon removal. + pub public_name: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateRemovalsOrderDeliveries { + + /// Time at which the delivery occurred. + /// + /// Measured in seconds since the Unix epoch. + pub delivered_at: Timestamp, + + /// Specific location of this delivery. + pub location: Option, + + /// Quantity of carbon removal supplied by this delivery. + pub metric_tons: String, + + /// Once retired, a URL to the registry entry for the tons from this delivery. + pub registry_url: Option, + + pub supplier: ClimateSupplier, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateRemovalsLocation { + + /// The city where the supplier is located. + pub city: Option, + + /// Two-letter ISO code representing the country where the supplier is located. + pub country: String, + + /// The geographic latitude where the supplier is located. + pub latitude: Option, + + /// The geographic longitude where the supplier is located. + pub longitude: Option, + + /// The state/county/province/region where the supplier is located. + pub region: Option, +} + +/// An enum representing the possible values of an `ClimateOrder`'s `cancellation_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ClimateOrderCancellationReason { + Expired, + ProductUnavailable, + Requested, +} + +impl ClimateOrderCancellationReason { + pub fn as_str(self) -> &'static str { + match self { + ClimateOrderCancellationReason::Expired => "expired", + ClimateOrderCancellationReason::ProductUnavailable => "product_unavailable", + ClimateOrderCancellationReason::Requested => "requested", + } + } +} + +impl AsRef for ClimateOrderCancellationReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ClimateOrderCancellationReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ClimateOrderCancellationReason { + fn default() -> Self { + Self::Expired + } +} + +/// An enum representing the possible values of an `ClimateOrder`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ClimateOrderStatus { + AwaitingFunds, + Canceled, + Confirmed, + Delivered, + Open, +} + +impl ClimateOrderStatus { + pub fn as_str(self) -> &'static str { + match self { + ClimateOrderStatus::AwaitingFunds => "awaiting_funds", + ClimateOrderStatus::Canceled => "canceled", + ClimateOrderStatus::Confirmed => "confirmed", + ClimateOrderStatus::Delivered => "delivered", + ClimateOrderStatus::Open => "open", + } + } +} + +impl AsRef for ClimateOrderStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ClimateOrderStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ClimateOrderStatus { + fn default() -> Self { + Self::AwaitingFunds + } +} diff --git a/src/resources/generated/climate_order_canceled.rs b/src/resources/generated/climate_order_canceled.rs new file mode 100644 index 000000000..8d2dc03df --- /dev/null +++ b/src/resources/generated/climate_order_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.order.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrderCanceled { +} diff --git a/src/resources/generated/climate_order_created.rs b/src/resources/generated/climate_order_created.rs new file mode 100644 index 000000000..f8420335a --- /dev/null +++ b/src/resources/generated/climate_order_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.order.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrderCreated { +} diff --git a/src/resources/generated/climate_order_delayed.rs b/src/resources/generated/climate_order_delayed.rs new file mode 100644 index 000000000..839244cb5 --- /dev/null +++ b/src/resources/generated/climate_order_delayed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.order.delayed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrderDelayed { +} diff --git a/src/resources/generated/climate_order_delivered.rs b/src/resources/generated/climate_order_delivered.rs new file mode 100644 index 000000000..d75604800 --- /dev/null +++ b/src/resources/generated/climate_order_delivered.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.order.delivered". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrderDelivered { +} diff --git a/src/resources/generated/climate_order_product_substituted.rs b/src/resources/generated/climate_order_product_substituted.rs new file mode 100644 index 000000000..dcb8f293f --- /dev/null +++ b/src/resources/generated/climate_order_product_substituted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.order.product_substituted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateOrderProductSubstituted { +} diff --git a/src/resources/generated/climate_product.rs b/src/resources/generated/climate_product.rs new file mode 100644 index 000000000..8e294fc73 --- /dev/null +++ b/src/resources/generated/climate_product.rs @@ -0,0 +1,67 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ClimateProductId}; +use crate::params::{Object, Timestamp}; +use crate::resources::{ClimateSupplier}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ClimateRemovalsProducts". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateProduct { + /// Unique identifier for the object. + /// + /// For convenience, Climate product IDs are human-readable strings that start with `climsku_`. + /// See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) for a list of available carbon removal products. + pub id: ClimateProductId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Current prices for a metric ton of carbon removal in a currency's smallest unit. + pub current_prices_per_metric_ton: ClimateRemovalsProductsPrice, + + /// The year in which the carbon removal is expected to be delivered. + pub delivery_year: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The quantity of metric tons available for reservation. + #[serde(skip_serializing_if = "Option::is_none")] + pub metric_tons_available: Option, + + /// The Climate product's name. + pub name: String, + + /// The carbon removal suppliers that fulfill orders for this Climate product. + pub suppliers: Vec, +} + +impl Object for ClimateProduct { + type Id = ClimateProductId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "climate.product" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateRemovalsProductsPrice { + + /// Fees for one metric ton of carbon removal in the currency's smallest unit. + pub amount_fees: i64, + + /// Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + pub amount_subtotal: i64, + + /// Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + pub amount_total: i64, +} diff --git a/src/resources/generated/climate_product_created.rs b/src/resources/generated/climate_product_created.rs new file mode 100644 index 000000000..068a1ce41 --- /dev/null +++ b/src/resources/generated/climate_product_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.product.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateProductCreated { +} diff --git a/src/resources/generated/climate_product_pricing_updated.rs b/src/resources/generated/climate_product_pricing_updated.rs new file mode 100644 index 000000000..7930fd9b9 --- /dev/null +++ b/src/resources/generated/climate_product_pricing_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "climate.product.pricing_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateProductPricingUpdated { +} diff --git a/src/resources/generated/climate_supplier.rs b/src/resources/generated/climate_supplier.rs new file mode 100644 index 000000000..935028cd1 --- /dev/null +++ b/src/resources/generated/climate_supplier.rs @@ -0,0 +1,98 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ClimateSupplierId}; +use crate::params::{Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ClimateRemovalsSuppliers". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateSupplier { + /// Unique identifier for the object. + pub id: ClimateSupplierId, + + /// Link to a webpage to learn more about the supplier. + pub info_url: String, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The locations in which this supplier operates. + pub locations: Vec, + + /// Name of this carbon removal supplier. + pub name: String, + + /// The scientific pathway used for carbon removal. + pub removal_pathway: ClimateSupplierRemovalPathway, +} + +impl Object for ClimateSupplier { + type Id = ClimateSupplierId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "climate.supplier" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ClimateRemovalsLocation { + + /// The city where the supplier is located. + pub city: Option, + + /// Two-letter ISO code representing the country where the supplier is located. + pub country: String, + + /// The geographic latitude where the supplier is located. + pub latitude: Option, + + /// The geographic longitude where the supplier is located. + pub longitude: Option, + + /// The state/county/province/region where the supplier is located. + pub region: Option, +} + +/// An enum representing the possible values of an `ClimateSupplier`'s `removal_pathway` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ClimateSupplierRemovalPathway { + BiomassCarbonRemovalAndStorage, + DirectAirCapture, + EnhancedWeathering, + Various, +} + +impl ClimateSupplierRemovalPathway { + pub fn as_str(self) -> &'static str { + match self { + ClimateSupplierRemovalPathway::BiomassCarbonRemovalAndStorage => "biomass_carbon_removal_and_storage", + ClimateSupplierRemovalPathway::DirectAirCapture => "direct_air_capture", + ClimateSupplierRemovalPathway::EnhancedWeathering => "enhanced_weathering", + ClimateSupplierRemovalPathway::Various => "various", + } + } +} + +impl AsRef for ClimateSupplierRemovalPathway { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ClimateSupplierRemovalPathway { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ClimateSupplierRemovalPathway { + fn default() -> Self { + Self::BiomassCarbonRemovalAndStorage + } +} 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 b32bb4f38..61d1321c4 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/coupon_created.rs b/src/resources/generated/coupon_created.rs new file mode 100644 index 000000000..c69faa21a --- /dev/null +++ b/src/resources/generated/coupon_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "coupon.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CouponCreated { +} diff --git a/src/resources/generated/coupon_deleted.rs b/src/resources/generated/coupon_deleted.rs new file mode 100644 index 000000000..0723b0189 --- /dev/null +++ b/src/resources/generated/coupon_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "coupon.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CouponDeleted { +} diff --git a/src/resources/generated/coupon_updated.rs b/src/resources/generated/coupon_updated.rs new file mode 100644 index 000000000..467f27e43 --- /dev/null +++ b/src/resources/generated/coupon_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "coupon.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CouponUpdated { +} diff --git a/src/resources/generated/credit_note.rs b/src/resources/generated/credit_note.rs index b3e206e0c..361a6b287 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`. @@ -382,9 +381,15 @@ pub struct CreateCreditNoteLines { #[serde(skip_serializing_if = "Option::is_none")] pub quantity: Option, + /// A list of up to 10 tax amounts for the credit note line item. + /// + /// Cannot be mixed with `tax_rates`. + #[serde(skip_serializing_if = "Option::is_none")] + pub tax_amounts: Option>, + /// The tax rates which apply to the credit note line item. /// - /// Only valid when the `type` is `custom_line_item`. + /// Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. #[serde(skip_serializing_if = "Option::is_none")] pub tax_rates: Option>, @@ -408,11 +413,27 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCreditNoteLinesTaxAmounts { + + /// The amount, in cents (or local equivalent), of the tax. + pub amount: i64, + + /// The id of the tax rate for this tax amount. + /// + /// The tax rate must have been automatically created by Stripe. + pub tax_rate: String, + + /// The amount on which tax is calculated, in cents (or local equivalent). + pub taxable_amount: i64, +} + /// An enum representing the possible values of an `CreateCreditNoteLines`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/credit_note_created.rs b/src/resources/generated/credit_note_created.rs new file mode 100644 index 000000000..ee5b3001f --- /dev/null +++ b/src/resources/generated/credit_note_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "credit_note.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreditNoteCreated { +} 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/credit_note_updated.rs b/src/resources/generated/credit_note_updated.rs new file mode 100644 index 000000000..570b02723 --- /dev/null +++ b/src/resources/generated/credit_note_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "credit_note.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreditNoteUpdated { +} diff --git a/src/resources/generated/credit_note_voided.rs b/src/resources/generated/credit_note_voided.rs new file mode 100644 index 000000000..e6e836fcc --- /dev/null +++ b/src/resources/generated/credit_note_voided.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "credit_note.voided". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreditNoteVoided { +} 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 c92d45ed2..1ab53323f 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". /// @@ -63,9 +57,11 @@ pub struct Customer { #[serde(default)] pub deleted: bool, - /// If Stripe bills the customer's latest invoice by automatically charging and the latest charge fails, it sets `delinquent`` to `true``. + /// Tracks the most recent state change on any invoice belonging to the customer. /// - /// If Stripe bills the invoice by sending it, and the invoice isn't paid by the due date, it also sets `delinquent`` to `true`. If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + /// Paying an invoice or marking it uncollectible via the API will set this field to false. + /// An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. + /// Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. #[serde(skip_serializing_if = "Option::is_none")] pub delinquent: Option, @@ -159,12 +155,14 @@ pub struct Customer { } impl Customer { + /// Returns a list of your customers. /// /// The customers are returned sorted by creation date, with the most recent customers appearing first. - pub fn list(client: &Client, params: &ListCustomers<'_>) -> Response> { - client.get_query("/customers", ¶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 +181,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 +206,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 +219,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 +232,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 +248,7 @@ pub struct InvoiceSettingCustomerSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -261,6 +259,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 +404,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 +461,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 +605,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 +614,7 @@ pub struct CreateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShipping { + /// Customer shipping address. pub address: CreateCustomerShippingAddress, @@ -626,16 +628,24 @@ 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. /// We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. #[serde(skip_serializing_if = "Option::is_none")] pub ip_address: Option, + + /// A flag that indicates when Stripe should validate the customer tax location. + /// + /// Defaults to `deferred`. + #[serde(skip_serializing_if = "Option::is_none")] + pub validate_location: Option, } #[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 +667,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 +678,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 +687,7 @@ pub struct UpdateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShipping { + /// Customer shipping address. pub address: UpdateCustomerShippingAddress, @@ -688,16 +701,24 @@ 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. /// We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. #[serde(skip_serializing_if = "Option::is_none")] pub ip_address: Option, + + /// A flag that indicates when Stripe should validate the customer tax location. + /// + /// Defaults to `deferred`. + #[serde(skip_serializing_if = "Option::is_none")] + pub validate_location: Option, } #[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 +729,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 +757,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 +771,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 +783,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 +794,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 +834,7 @@ impl CreateCustomerCashBalanceSettingsReconciliationMode { match self { CreateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", CreateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -832,6 +856,40 @@ impl std::default::Default for CreateCustomerCashBalanceSettingsReconciliationMo } } +/// An enum representing the possible values of an `CreateCustomerTax`'s `validate_location` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCustomerTaxValidateLocation { + Deferred, + Immediately, +} + +impl CreateCustomerTaxValidateLocation { + pub fn as_str(self) -> &'static str { + match self { + CreateCustomerTaxValidateLocation::Deferred => "deferred", + CreateCustomerTaxValidateLocation::Immediately => "immediately", + } + } +} + +impl AsRef for CreateCustomerTaxValidateLocation { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCustomerTaxValidateLocation { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCustomerTaxValidateLocation { + fn default() -> Self { + Self::Deferred + } +} + /// An enum representing the possible values of an `CustomerInvoiceSettingsRenderingOptions`'s `amount_tax_display` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -844,9 +902,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 +1248,7 @@ impl UpdateCustomerCashBalanceSettingsReconciliationMode { match self { UpdateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", UpdateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -1215,3 +1269,37 @@ impl std::default::Default for UpdateCustomerCashBalanceSettingsReconciliationMo Self::Automatic } } + +/// An enum representing the possible values of an `UpdateCustomerTax`'s `validate_location` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateCustomerTaxValidateLocation { + Deferred, + Immediately, +} + +impl UpdateCustomerTaxValidateLocation { + pub fn as_str(self) -> &'static str { + match self { + UpdateCustomerTaxValidateLocation::Deferred => "deferred", + UpdateCustomerTaxValidateLocation::Immediately => "immediately", + } + } +} + +impl AsRef for UpdateCustomerTaxValidateLocation { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateCustomerTaxValidateLocation { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateCustomerTaxValidateLocation { + fn default() -> Self { + Self::Deferred + } +} diff --git a/src/resources/generated/customer_balance_transaction.rs b/src/resources/generated/customer_balance_transaction.rs index 8b102c8a8..9c1b0d717 100644 --- a/src/resources/generated/customer_balance_transaction.rs +++ b/src/resources/generated/customer_balance_transaction.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CustomerBalanceTransactionId; +use crate::ids::{CustomerBalanceTransactionId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{CreditNote, Currency, Customer, Invoice}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerBalanceTransaction". /// diff --git a/src/resources/generated/customer_cash_balance_transaction.rs b/src/resources/generated/customer_cash_balance_transaction.rs index e2d8951bf..6bcf9a755 100644 --- a/src/resources/generated/customer_cash_balance_transaction.rs +++ b/src/resources/generated/customer_cash_balance_transaction.rs @@ -53,6 +53,9 @@ pub struct CustomerCashBalanceTransaction { #[serde(skip_serializing_if = "Option::is_none")] pub refunded_from_payment: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub transferred_to_balance: Option, + /// The type of the cash balance transaction. /// /// New types may be added in future. @@ -77,7 +80,7 @@ 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. + /// The [Balance Transaction](https://stripe.com/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. @@ -179,6 +182,13 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaym pub refund: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance { + + /// The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. + pub balance_transaction: Expandable, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction { @@ -273,6 +283,7 @@ pub enum CustomerCashBalanceTransactionType { RefundedFromPayment, ReturnCanceled, ReturnInitiated, + TransferredToBalance, UnappliedFromPayment, } @@ -286,6 +297,7 @@ impl CustomerCashBalanceTransactionType { CustomerCashBalanceTransactionType::RefundedFromPayment => "refunded_from_payment", CustomerCashBalanceTransactionType::ReturnCanceled => "return_canceled", CustomerCashBalanceTransactionType::ReturnInitiated => "return_initiated", + CustomerCashBalanceTransactionType::TransferredToBalance => "transferred_to_balance", CustomerCashBalanceTransactionType::UnappliedFromPayment => "unapplied_from_payment", } } diff --git a/src/resources/generated/customer_cash_balance_transaction_created.rs b/src/resources/generated/customer_cash_balance_transaction_created.rs new file mode 100644 index 000000000..e9b734898 --- /dev/null +++ b/src/resources/generated/customer_cash_balance_transaction_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer_cash_balance_transaction.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerCashBalanceTransactionCreated { +} diff --git a/src/resources/generated/customer_created.rs b/src/resources/generated/customer_created.rs new file mode 100644 index 000000000..968ba95d0 --- /dev/null +++ b/src/resources/generated/customer_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerCreated { +} diff --git a/src/resources/generated/customer_deleted.rs b/src/resources/generated/customer_deleted.rs new file mode 100644 index 000000000..86ed70ec8 --- /dev/null +++ b/src/resources/generated/customer_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerDeleted { +} diff --git a/src/resources/generated/customer_discount_created.rs b/src/resources/generated/customer_discount_created.rs new file mode 100644 index 000000000..de4fe6852 --- /dev/null +++ b/src/resources/generated/customer_discount_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.discount.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerDiscountCreated { +} diff --git a/src/resources/generated/customer_discount_deleted.rs b/src/resources/generated/customer_discount_deleted.rs new file mode 100644 index 000000000..68edd4264 --- /dev/null +++ b/src/resources/generated/customer_discount_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.discount.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerDiscountDeleted { +} diff --git a/src/resources/generated/customer_discount_updated.rs b/src/resources/generated/customer_discount_updated.rs new file mode 100644 index 000000000..4201b1d08 --- /dev/null +++ b/src/resources/generated/customer_discount_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.discount.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerDiscountUpdated { +} diff --git a/src/resources/generated/customer_source_created.rs b/src/resources/generated/customer_source_created.rs new file mode 100644 index 000000000..e757832b2 --- /dev/null +++ b/src/resources/generated/customer_source_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.source.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSourceCreated { +} diff --git a/src/resources/generated/customer_source_deleted.rs b/src/resources/generated/customer_source_deleted.rs new file mode 100644 index 000000000..8d99da828 --- /dev/null +++ b/src/resources/generated/customer_source_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.source.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSourceDeleted { +} diff --git a/src/resources/generated/customer_source_expiring.rs b/src/resources/generated/customer_source_expiring.rs new file mode 100644 index 000000000..35f49664f --- /dev/null +++ b/src/resources/generated/customer_source_expiring.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.source.expiring". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSourceExpiring { +} diff --git a/src/resources/generated/customer_source_updated.rs b/src/resources/generated/customer_source_updated.rs new file mode 100644 index 000000000..c5a70d947 --- /dev/null +++ b/src/resources/generated/customer_source_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.source.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSourceUpdated { +} diff --git a/src/resources/generated/customer_subscription_created.rs b/src/resources/generated/customer_subscription_created.rs new file mode 100644 index 000000000..7762b2bed --- /dev/null +++ b/src/resources/generated/customer_subscription_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionCreated { +} diff --git a/src/resources/generated/customer_subscription_deleted.rs b/src/resources/generated/customer_subscription_deleted.rs new file mode 100644 index 000000000..1d88697d6 --- /dev/null +++ b/src/resources/generated/customer_subscription_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionDeleted { +} diff --git a/src/resources/generated/customer_subscription_paused.rs b/src/resources/generated/customer_subscription_paused.rs new file mode 100644 index 000000000..ba985baf7 --- /dev/null +++ b/src/resources/generated/customer_subscription_paused.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.paused". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionPaused { +} diff --git a/src/resources/generated/customer_subscription_pending_update_applied.rs b/src/resources/generated/customer_subscription_pending_update_applied.rs new file mode 100644 index 000000000..ca27601fc --- /dev/null +++ b/src/resources/generated/customer_subscription_pending_update_applied.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.pending_update_applied". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionPendingUpdateApplied { +} diff --git a/src/resources/generated/customer_subscription_pending_update_expired.rs b/src/resources/generated/customer_subscription_pending_update_expired.rs new file mode 100644 index 000000000..e4c5ed616 --- /dev/null +++ b/src/resources/generated/customer_subscription_pending_update_expired.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.pending_update_expired". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionPendingUpdateExpired { +} diff --git a/src/resources/generated/customer_subscription_resumed.rs b/src/resources/generated/customer_subscription_resumed.rs new file mode 100644 index 000000000..4502e84fd --- /dev/null +++ b/src/resources/generated/customer_subscription_resumed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.resumed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionResumed { +} diff --git a/src/resources/generated/customer_subscription_trial_will_end.rs b/src/resources/generated/customer_subscription_trial_will_end.rs new file mode 100644 index 000000000..2db88dde8 --- /dev/null +++ b/src/resources/generated/customer_subscription_trial_will_end.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.trial_will_end". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionTrialWillEnd { +} diff --git a/src/resources/generated/customer_subscription_updated.rs b/src/resources/generated/customer_subscription_updated.rs new file mode 100644 index 000000000..0b3e01330 --- /dev/null +++ b/src/resources/generated/customer_subscription_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.subscription.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerSubscriptionUpdated { +} diff --git a/src/resources/generated/customer_tax_id_created.rs b/src/resources/generated/customer_tax_id_created.rs new file mode 100644 index 000000000..e71ba322e --- /dev/null +++ b/src/resources/generated/customer_tax_id_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.tax_id.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerTaxIdCreated { +} diff --git a/src/resources/generated/customer_tax_id_deleted.rs b/src/resources/generated/customer_tax_id_deleted.rs new file mode 100644 index 000000000..96bc37d29 --- /dev/null +++ b/src/resources/generated/customer_tax_id_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.tax_id.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerTaxIdDeleted { +} diff --git a/src/resources/generated/customer_tax_id_updated.rs b/src/resources/generated/customer_tax_id_updated.rs new file mode 100644 index 000000000..2ebf97239 --- /dev/null +++ b/src/resources/generated/customer_tax_id_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.tax_id.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerTaxIdUpdated { +} diff --git a/src/resources/generated/customer_updated.rs b/src/resources/generated/customer_updated.rs new file mode 100644 index 000000000..fea1eba07 --- /dev/null +++ b/src/resources/generated/customer_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "customer.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerUpdated { +} 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 129291a98..c4be85bf6 100644 --- a/src/resources/generated/dispute.rs +++ b/src/resources/generated/dispute.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, DisputeId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Charge, Currency, File, PaymentIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Dispute". /// @@ -78,10 +77,12 @@ pub struct Dispute { } impl Dispute { + /// Returns a list of your disputes. - pub fn list(client: &Client, params: &ListDisputes<'_>) -> Response> { - client.get_query("/disputes", ¶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 { @@ -101,6 +102,7 @@ impl Object for Dispute { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputeEvidence { + /// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. /// /// This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -202,6 +204,7 @@ pub struct DisputeEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputeEvidenceDetails { + /// Date by which evidence must be submitted in order to successfully challenge dispute. /// /// Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. @@ -224,6 +227,7 @@ pub struct DisputeEvidenceDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputePaymentMethodDetails { + /// Card specific dispute details. pub card: Option, @@ -234,6 +238,7 @@ pub struct DisputePaymentMethodDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DisputePaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -248,6 +253,7 @@ pub struct DisputePaymentMethodDetailsCard { /// The parameters for `Dispute::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListDisputes<'a> { + /// Only return disputes associated to the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, @@ -300,9 +306,8 @@ 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")] diff --git a/src/resources/generated/ephemeral_key.rs b/src/resources/generated/ephemeral_key.rs index a9ee6c0fc..9dcae0bd3 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 a3a85e112..c75f05342 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 e2b84faee..e9846b6ed 100644 --- a/src/resources/generated/fee_refund.rs +++ b/src/resources/generated/fee_refund.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ApplicationFeeRefundId; +use crate::ids::{ApplicationFeeRefundId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{ApplicationFee, BalanceTransaction, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "FeeRefund". /// diff --git a/src/resources/generated/file.rs b/src/resources/generated/file.rs index 8325cc6ac..d1d627161 100644 --- a/src/resources/generated/file.rs +++ b/src/resources/generated/file.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::FileId; +use crate::ids::{FileId}; use crate::params::{Expand, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::FileLink; +use crate::resources::{FileLink}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "File". /// @@ -50,12 +49,14 @@ pub struct File { } impl File { + /// Returns a list of the files that your account has access to. /// /// Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. - pub fn list(client: &Client, params: &ListFiles<'_>) -> Response> { - client.get_query("/files", ¶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_created.rs b/src/resources/generated/file_created.rs new file mode 100644 index 000000000..0361e55db --- /dev/null +++ b/src/resources/generated/file_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "file.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FileCreated { +} diff --git a/src/resources/generated/file_link.rs b/src/resources/generated/file_link.rs index 7b30826cc..9de472fda 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_account_created.rs b/src/resources/generated/financial_connections_account_created.rs new file mode 100644 index 000000000..232baafa5 --- /dev/null +++ b/src/resources/generated/financial_connections_account_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountCreated { +} diff --git a/src/resources/generated/financial_connections_account_deactivated.rs b/src/resources/generated/financial_connections_account_deactivated.rs new file mode 100644 index 000000000..1f321d12a --- /dev/null +++ b/src/resources/generated/financial_connections_account_deactivated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.deactivated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountDeactivated { +} diff --git a/src/resources/generated/financial_connections_account_disconnected.rs b/src/resources/generated/financial_connections_account_disconnected.rs new file mode 100644 index 000000000..3f6d2898d --- /dev/null +++ b/src/resources/generated/financial_connections_account_disconnected.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.disconnected". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountDisconnected { +} diff --git a/src/resources/generated/financial_connections_account_reactivated.rs b/src/resources/generated/financial_connections_account_reactivated.rs new file mode 100644 index 000000000..c8e075893 --- /dev/null +++ b/src/resources/generated/financial_connections_account_reactivated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.reactivated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountReactivated { +} diff --git a/src/resources/generated/financial_connections_account_refreshed_balance.rs b/src/resources/generated/financial_connections_account_refreshed_balance.rs new file mode 100644 index 000000000..e011531d8 --- /dev/null +++ b/src/resources/generated/financial_connections_account_refreshed_balance.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.refreshed_balance". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountRefreshedBalance { +} diff --git a/src/resources/generated/funding_instructions.rs b/src/resources/generated/funding_instructions.rs index 4b3ccf738..272fc84f8 100644 --- a/src/resources/generated/funding_instructions.rs +++ b/src/resources/generated/funding_instructions.rs @@ -49,6 +49,9 @@ pub struct FundingInstructionsBankTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferFinancialAddress { + #[serde(skip_serializing_if = "Option::is_none")] + pub aba: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub iban: Option, @@ -62,6 +65,9 @@ pub struct FundingInstructionsBankTransferFinancialAddress { #[serde(skip_serializing_if = "Option::is_none")] pub supported_networks: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub swift: Option, + /// The type of financial address. #[serde(rename = "type")] pub type_: FundingInstructionsBankTransferFinancialAddressType, @@ -70,6 +76,19 @@ pub struct FundingInstructionsBankTransferFinancialAddress { pub zengin: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FundingInstructionsBankTransferAbaRecord { + + /// The ABA account number. + pub account_number: String, + + /// The bank name. + pub bank_name: String, + + /// The ABA routing number. + pub routing_number: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferIbanRecord { @@ -112,6 +131,19 @@ pub struct FundingInstructionsBankTransferSpeiRecord { pub clabe: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FundingInstructionsBankTransferSwiftRecord { + + /// The account number. + pub account_number: String, + + /// The bank name. + pub bank_name: String, + + /// The SWIFT code. + pub swift_code: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { @@ -143,20 +175,26 @@ pub struct FundingInstructionsBankTransferZenginRecord { #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum FundingInstructionsBankTransferFinancialAddressSupportedNetworks { + Ach, Bacs, + DomesticWireUs, Fps, Sepa, Spei, + Swift, Zengin, } impl FundingInstructionsBankTransferFinancialAddressSupportedNetworks { pub fn as_str(self) -> &'static str { match self { + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Ach => "ach", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Bacs => "bacs", + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => "domestic_wire_us", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Fps => "fps", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Sepa => "sepa", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Spei => "spei", + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Swift => "swift", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Zengin => "zengin", } } @@ -175,7 +213,7 @@ impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressSuppor } impl std::default::Default for FundingInstructionsBankTransferFinancialAddressSupportedNetworks { fn default() -> Self { - Self::Bacs + Self::Ach } } @@ -183,18 +221,22 @@ impl std::default::Default for FundingInstructionsBankTransferFinancialAddressSu #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum FundingInstructionsBankTransferFinancialAddressType { + Aba, Iban, SortCode, Spei, + Swift, Zengin, } impl FundingInstructionsBankTransferFinancialAddressType { pub fn as_str(self) -> &'static str { match self { + FundingInstructionsBankTransferFinancialAddressType::Aba => "aba", FundingInstructionsBankTransferFinancialAddressType::Iban => "iban", FundingInstructionsBankTransferFinancialAddressType::SortCode => "sort_code", FundingInstructionsBankTransferFinancialAddressType::Spei => "spei", + FundingInstructionsBankTransferFinancialAddressType::Swift => "swift", FundingInstructionsBankTransferFinancialAddressType::Zengin => "zengin", } } @@ -213,7 +255,7 @@ impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressType { } impl std::default::Default for FundingInstructionsBankTransferFinancialAddressType { fn default() -> Self { - Self::Iban + Self::Aba } } diff --git a/src/resources/generated/identity_verification_session_canceled.rs b/src/resources/generated/identity_verification_session_canceled.rs new file mode 100644 index 000000000..eb35f0a22 --- /dev/null +++ b/src/resources/generated/identity_verification_session_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionCanceled { +} diff --git a/src/resources/generated/identity_verification_session_created.rs b/src/resources/generated/identity_verification_session_created.rs new file mode 100644 index 000000000..d66044d97 --- /dev/null +++ b/src/resources/generated/identity_verification_session_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionCreated { +} diff --git a/src/resources/generated/identity_verification_session_processing.rs b/src/resources/generated/identity_verification_session_processing.rs new file mode 100644 index 000000000..e2956dc9e --- /dev/null +++ b/src/resources/generated/identity_verification_session_processing.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.processing". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionProcessing { +} diff --git a/src/resources/generated/identity_verification_session_redacted.rs b/src/resources/generated/identity_verification_session_redacted.rs new file mode 100644 index 000000000..0e4212c7d --- /dev/null +++ b/src/resources/generated/identity_verification_session_redacted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.redacted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionRedacted { +} diff --git a/src/resources/generated/identity_verification_session_requires_input.rs b/src/resources/generated/identity_verification_session_requires_input.rs new file mode 100644 index 000000000..e47d11994 --- /dev/null +++ b/src/resources/generated/identity_verification_session_requires_input.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.requires_input". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionRequiresInput { +} diff --git a/src/resources/generated/identity_verification_session_verified.rs b/src/resources/generated/identity_verification_session_verified.rs new file mode 100644 index 000000000..e7df8e30f --- /dev/null +++ b/src/resources/generated/identity_verification_session_verified.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "identity.verification_session.verified". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IdentityVerificationSessionVerified { +} diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index c987a1f91..b0ebda03e 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")] @@ -357,6 +345,13 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub receipt_number: Option, + /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + #[serde(skip_serializing_if = "Option::is_none")] + pub rendering: Option, + + /// This is a legacy field that will be removed soon. + /// + /// For details about `rendering_options`, refer to `rendering` instead. /// Options for invoice PDF rendering. #[serde(skip_serializing_if = "Option::is_none")] pub rendering_options: Option, @@ -459,12 +454,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. /// @@ -499,6 +496,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. @@ -510,6 +508,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, @@ -519,6 +518,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -528,6 +528,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, @@ -548,6 +549,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, @@ -557,6 +559,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, @@ -566,6 +569,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. @@ -577,6 +581,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, @@ -584,8 +589,29 @@ pub struct InvoicesFromInvoice { pub invoice: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicesInvoiceRendering { + + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + pub amount_tax_display: Option, + + /// Invoice pdf rendering options. + pub pdf: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceRenderingPdf { + + /// Page size of invoice pdf. + /// + /// Options include a4, letter, and auto. + /// If set to auto, page size will be switched to a4 or letter based on customer locale. + pub page_size: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesPaymentSettings { + /// ID of the mandate to be used for this invoice. /// /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -603,6 +629,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, @@ -624,6 +651,7 @@ pub struct InvoicesPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, @@ -636,12 +664,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, @@ -652,6 +682,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, @@ -667,6 +698,7 @@ 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.*. @@ -676,6 +708,7 @@ pub struct SubscriptionDetailsData { /// 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. @@ -815,6 +848,13 @@ pub struct CreateInvoice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub pending_invoice_items_behavior: Option, + /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + #[serde(skip_serializing_if = "Option::is_none")] + pub rendering: Option, + + /// This is a legacy field that will be removed soon. + /// + /// For details about `rendering_options`, refer to `rendering` instead. /// Options for invoice PDF rendering. #[serde(skip_serializing_if = "Option::is_none")] pub rendering_options: Option, @@ -874,6 +914,7 @@ impl<'a> CreateInvoice<'a> { on_behalf_of: Default::default(), payment_settings: Default::default(), pending_invoice_items_behavior: Default::default(), + rendering: Default::default(), rendering_options: Default::default(), shipping_cost: Default::default(), shipping_details: Default::default(), @@ -887,6 +928,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`. @@ -957,11 +999,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. @@ -970,6 +1012,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. @@ -983,6 +1026,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, @@ -994,6 +1038,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. @@ -1005,6 +1050,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. @@ -1023,8 +1069,25 @@ pub struct CreateInvoicePaymentSettings { pub payment_method_types: Option>, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateInvoiceRendering { + + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + /// + /// One of `exclude_tax` or `include_inclusive_tax`. + /// `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, + + /// Invoice pdf rendering options. + #[serde(skip_serializing_if = "Option::is_none")] + pub pdf: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1036,6 +1099,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, @@ -1047,6 +1111,7 @@ pub struct CreateInvoiceShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetails { + /// Shipping address. pub address: CreateInvoiceShippingDetailsAddress, @@ -1060,6 +1125,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. @@ -1072,6 +1138,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, @@ -1097,8 +1164,19 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { pub us_bank_account: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateInvoiceRenderingPdf { + + /// Page size for invoice PDF. + /// + /// Can be set to `a4`, `letter`, or `auto`. If set to `auto`, invoice PDF page size defaults to `a4` for customers with Japanese locale and `letter` for customers with other locales. + #[serde(skip_serializing_if = "Option::is_none")] + pub page_size: Option, +} + #[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. @@ -1146,6 +1224,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, @@ -1173,27 +1252,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). @@ -1205,16 +1284,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. /// @@ -1224,23 +1302,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. @@ -1256,6 +1335,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, @@ -1268,21 +1348,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")] @@ -1295,11 +1374,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. /// @@ -1326,6 +1404,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -1335,6 +1414,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -1344,6 +1424,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 +1432,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 +1451,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 +1578,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 +1620,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 +1658,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 +1679,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInt impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => { - "month" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month", } } } @@ -1625,16 +1690,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 +1722,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 +1745,7 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } @@ -1706,9 +1761,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 +1770,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 +1788,18 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -1774,24 +1820,18 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne } } -impl AsRef - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -1816,24 +1856,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 } @@ -1872,9 +1906,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", @@ -1893,9 +1925,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", @@ -1921,6 +1951,40 @@ impl std::default::Default for CreateInvoicePaymentSettingsPaymentMethodTypes { } } +/// An enum representing the possible values of an `CreateInvoiceRendering`'s `amount_tax_display` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateInvoiceRenderingAmountTaxDisplay { + ExcludeTax, + IncludeInclusiveTax, +} + +impl CreateInvoiceRenderingAmountTaxDisplay { + pub fn as_str(self) -> &'static str { + match self { + CreateInvoiceRenderingAmountTaxDisplay::ExcludeTax => "exclude_tax", + CreateInvoiceRenderingAmountTaxDisplay::IncludeInclusiveTax => "include_inclusive_tax", + } + } +} + +impl AsRef for CreateInvoiceRenderingAmountTaxDisplay { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateInvoiceRenderingAmountTaxDisplay { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateInvoiceRenderingAmountTaxDisplay { + fn default() -> Self { + Self::ExcludeTax + } +} + /// An enum representing the possible values of an `CreateInvoiceRenderingOptions`'s `amount_tax_display` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -1933,9 +1997,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", } } } @@ -1957,6 +2019,42 @@ impl std::default::Default for CreateInvoiceRenderingOptionsAmountTaxDisplay { } } +/// An enum representing the possible values of an `CreateInvoiceRenderingPdf`'s `page_size` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateInvoiceRenderingPdfPageSize { + A4, + Auto, + Letter, +} + +impl CreateInvoiceRenderingPdfPageSize { + pub fn as_str(self) -> &'static str { + match self { + CreateInvoiceRenderingPdfPageSize::A4 => "a4", + CreateInvoiceRenderingPdfPageSize::Auto => "auto", + CreateInvoiceRenderingPdfPageSize::Letter => "letter", + } + } +} + +impl AsRef for CreateInvoiceRenderingPdfPageSize { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateInvoiceRenderingPdfPageSize { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateInvoiceRenderingPdfPageSize { + fn default() -> Self { + Self::A4 + } +} + /// An enum representing the possible values of an `CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum`'s `unit` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -1971,9 +2069,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", @@ -1993,9 +2089,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 } @@ -2015,9 +2109,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", @@ -2037,9 +2129,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 } @@ -2070,16 +2160,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 } @@ -2171,9 +2257,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", @@ -2309,6 +2393,42 @@ impl std::default::Default for InvoicePendingInvoiceItemsBehavior { } } +/// An enum representing the possible values of an `InvoiceRenderingPdf`'s `page_size` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum InvoiceRenderingPdfPageSize { + A4, + Auto, + Letter, +} + +impl InvoiceRenderingPdfPageSize { + pub fn as_str(self) -> &'static str { + match self { + InvoiceRenderingPdfPageSize::A4 => "a4", + InvoiceRenderingPdfPageSize::Auto => "auto", + InvoiceRenderingPdfPageSize::Letter => "letter", + } + } +} + +impl AsRef for InvoiceRenderingPdfPageSize { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for InvoiceRenderingPdfPageSize { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for InvoiceRenderingPdfPageSize { + fn default() -> Self { + Self::A4 + } +} + /// An enum representing the possible values of an `Invoice`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/invoice_created.rs b/src/resources/generated/invoice_created.rs new file mode 100644 index 000000000..294337c1a --- /dev/null +++ b/src/resources/generated/invoice_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceCreated { +} diff --git a/src/resources/generated/invoice_deleted.rs b/src/resources/generated/invoice_deleted.rs new file mode 100644 index 000000000..b587d5a8d --- /dev/null +++ b/src/resources/generated/invoice_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceDeleted { +} diff --git a/src/resources/generated/invoice_finalization_failed.rs b/src/resources/generated/invoice_finalization_failed.rs new file mode 100644 index 000000000..e491d782d --- /dev/null +++ b/src/resources/generated/invoice_finalization_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.finalization_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceFinalizationFailed { +} diff --git a/src/resources/generated/invoice_finalized.rs b/src/resources/generated/invoice_finalized.rs new file mode 100644 index 000000000..802a1713b --- /dev/null +++ b/src/resources/generated/invoice_finalized.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.finalized". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceFinalized { +} diff --git a/src/resources/generated/invoice_marked_uncollectible.rs b/src/resources/generated/invoice_marked_uncollectible.rs new file mode 100644 index 000000000..06f3de974 --- /dev/null +++ b/src/resources/generated/invoice_marked_uncollectible.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.marked_uncollectible". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceMarkedUncollectible { +} diff --git a/src/resources/generated/invoice_paid.rs b/src/resources/generated/invoice_paid.rs new file mode 100644 index 000000000..1b8751dd2 --- /dev/null +++ b/src/resources/generated/invoice_paid.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.paid". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaid { +} diff --git a/src/resources/generated/invoice_payment_action_required.rs b/src/resources/generated/invoice_payment_action_required.rs new file mode 100644 index 000000000..33147b733 --- /dev/null +++ b/src/resources/generated/invoice_payment_action_required.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.payment_action_required". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentActionRequired { +} diff --git a/src/resources/generated/invoice_payment_failed.rs b/src/resources/generated/invoice_payment_failed.rs new file mode 100644 index 000000000..e68287540 --- /dev/null +++ b/src/resources/generated/invoice_payment_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.payment_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentFailed { +} 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 e742f3468..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,12 @@ pub struct InvoicePaymentMethodOptionsUsBankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { + /// The list of permissions to request. /// /// The `payment_method` permission must be included. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: - Option>, + pub permissions: Option>, /// Data features requested to be retrieved upon account creation. pub prefetch: Option>, @@ -58,9 +59,7 @@ impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccount self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions -{ +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPermissions { fn default() -> Self { Self::Balances } @@ -76,9 +75,7 @@ pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { pub fn as_str(self) -> &'static str { match self { - InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => { - "balances" - } + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => "balances", } } } @@ -94,9 +91,7 @@ impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccount self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch -{ +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { fn default() -> Self { Self::Balances } @@ -116,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_payment_succeeded.rs b/src/resources/generated/invoice_payment_succeeded.rs new file mode 100644 index 000000000..9c1112463 --- /dev/null +++ b/src/resources/generated/invoice_payment_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.payment_succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentSucceeded { +} diff --git a/src/resources/generated/invoice_sent.rs b/src/resources/generated/invoice_sent.rs new file mode 100644 index 000000000..8ea535ea9 --- /dev/null +++ b/src/resources/generated/invoice_sent.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.sent". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceSent { +} diff --git a/src/resources/generated/invoice_setting_rendering_options.rs b/src/resources/generated/invoice_setting_rendering_options.rs index 282332dfc..31aba1211 100644 --- a/src/resources/generated/invoice_setting_rendering_options.rs +++ b/src/resources/generated/invoice_setting_rendering_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "InvoiceSettingRenderingOptions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. pub amount_tax_display: Option, } diff --git a/src/resources/generated/invoice_upcoming.rs b/src/resources/generated/invoice_upcoming.rs new file mode 100644 index 000000000..198adc223 --- /dev/null +++ b/src/resources/generated/invoice_upcoming.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.upcoming". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceUpcoming { +} diff --git a/src/resources/generated/invoice_updated.rs b/src/resources/generated/invoice_updated.rs new file mode 100644 index 000000000..4e865fcf8 --- /dev/null +++ b/src/resources/generated/invoice_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceUpdated { +} diff --git a/src/resources/generated/invoice_voided.rs b/src/resources/generated/invoice_voided.rs new file mode 100644 index 000000000..8de779135 --- /dev/null +++ b/src/resources/generated/invoice_voided.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice.voided". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceVoided { +} diff --git a/src/resources/generated/invoiceitem.rs b/src/resources/generated/invoiceitem.rs index bc114979d..e2b693acd 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/invoiceitem_created.rs b/src/resources/generated/invoiceitem_created.rs new file mode 100644 index 000000000..569a0f2a4 --- /dev/null +++ b/src/resources/generated/invoiceitem_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoiceitem.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceitemCreated { +} diff --git a/src/resources/generated/invoiceitem_deleted.rs b/src/resources/generated/invoiceitem_deleted.rs new file mode 100644 index 000000000..8cffca6de --- /dev/null +++ b/src/resources/generated/invoiceitem_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoiceitem.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceitemDeleted { +} 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..98466e9af 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, IssuingToken, IssuingTransaction, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingAuthorization". /// @@ -22,7 +17,8 @@ pub struct IssuingAuthorization { /// The total amount that was authorized or rejected. /// - /// This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + /// This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + /// `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. pub amount: i64, /// Detailed breakdown of amount components. @@ -49,8 +45,10 @@ pub struct IssuingAuthorization { /// Measured in seconds since the Unix epoch. pub created: Timestamp, - /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + /// The currency of the cardholder. /// + /// This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. + /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). pub currency: Currency, @@ -60,10 +58,12 @@ pub struct IssuingAuthorization { /// The total amount that was authorized or rejected. /// /// This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + /// `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. pub merchant_amount: i64, - /// The currency that was presented to the cardholder for the authorization. + /// The local currency that was presented to the cardholder for the authorization. /// + /// This currency can be different from the cardholder currency and the `currency` field on this authorization. /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). pub merchant_currency: Currency, @@ -93,6 +93,12 @@ pub struct IssuingAuthorization { /// The current status of the authorization in its lifecycle. pub status: IssuingAuthorizationStatus, + /// [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. + /// + /// If a network token was not used for this authorization, this field will be null. + #[serde(skip_serializing_if = "Option::is_none")] + pub token: Option>, + /// List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. pub transactions: Vec, @@ -121,14 +127,24 @@ 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`. pub acquiring_institution_id: Option, + + /// The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. + /// + /// Prefer `network_data.transaction_id` if present, unless you have special requirements. + pub system_trace_audit_number: Option, + + /// Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + pub transaction_id: Option, } #[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, @@ -152,10 +168,16 @@ pub struct IssuingAuthorizationPendingRequest { /// The local currency the merchant is requesting to authorize. pub merchant_currency: Currency, + + /// The card network's estimate of the likelihood that an authorization is fraudulent. + /// + /// Takes on values between 1 and 99. + pub network_risk_score: Option, } #[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. @@ -169,6 +191,14 @@ pub struct IssuingAuthorizationRequest { /// Whether this request was approved. pub approved: bool, + /// A code created by Stripe which is shared with the merchant to validate the authorization. + /// + /// This field will be populated if the authorization message was approved. + /// The code typically starts with the letter "S", followed by a six-digit number. + /// For example, "S498162". + /// Please note that the code is not guaranteed to be unique across authorizations. + pub authorization_code: Option, + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. @@ -188,15 +218,26 @@ pub struct IssuingAuthorizationRequest { /// Must be a [supported currency](https://stripe.com/docs/currencies). pub merchant_currency: Currency, + /// The card network's estimate of the likelihood that an authorization is fraudulent. + /// + /// Takes on values between 1 and 99. + pub network_risk_score: Option, + /// When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. pub reason: IssuingAuthorizationReason, - /// If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field. + /// If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. pub reason_message: Option, + + /// Time when the card network received an authorization request from the acquirer in UTC. + /// + /// Referred to by networks as transmission time. + pub requested_at: Option, } #[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,17 +250,113 @@ 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, /// Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. pub address_postal_code_check: IssuingAuthorizationCheck, + /// The exemption applied to this authorization. + pub authentication_exemption: Option, + /// Whether the cardholder provided a CVC and if it matched Stripe’s record. pub cvc_check: IssuingAuthorizationCheck, /// Whether the cardholder provided an expiry date and if it matched Stripe’s record. pub expiry_check: IssuingAuthorizationCheck, + + /// The postal code submitted as part of the authorization used for postal code verification. + pub postal_code: Option, + + /// 3D Secure details. + pub three_d_secure: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationAuthenticationExemption { + + /// The entity that requested the exemption, either the acquiring merchant or the Issuing user. + pub claimed_by: IssuingAuthorizationAuthenticationExemptionClaimedBy, + + /// The specific exemption claimed for this authorization. + #[serde(rename = "type")] + pub type_: IssuingAuthorizationAuthenticationExemptionType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationThreeDSecure { + + /// The outcome of the 3D Secure authentication request. + pub result: IssuingAuthorizationThreeDSecureResult, +} + +/// An enum representing the possible values of an `IssuingAuthorizationAuthenticationExemption`'s `claimed_by` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationAuthenticationExemptionClaimedBy { + Acquirer, + Issuer, +} + +impl IssuingAuthorizationAuthenticationExemptionClaimedBy { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationAuthenticationExemptionClaimedBy::Acquirer => "acquirer", + IssuingAuthorizationAuthenticationExemptionClaimedBy::Issuer => "issuer", + } + } +} + +impl AsRef for IssuingAuthorizationAuthenticationExemptionClaimedBy { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationAuthenticationExemptionClaimedBy { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationAuthenticationExemptionClaimedBy { + fn default() -> Self { + Self::Acquirer + } +} + +/// An enum representing the possible values of an `IssuingAuthorizationAuthenticationExemption`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationAuthenticationExemptionType { + LowValueTransaction, + TransactionRiskAnalysis, +} + +impl IssuingAuthorizationAuthenticationExemptionType { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationAuthenticationExemptionType::LowValueTransaction => "low_value_transaction", + IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => "transaction_risk_analysis", + } + } +} + +impl AsRef for IssuingAuthorizationAuthenticationExemptionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationAuthenticationExemptionType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationAuthenticationExemptionType { + fn default() -> Self { + Self::LowValueTransaction + } } /// An enum representing the possible values of an `IssuingAuthorization`'s `status` field. @@ -257,3 +394,41 @@ impl std::default::Default for IssuingAuthorizationStatus { Self::Closed } } + +/// An enum representing the possible values of an `IssuingAuthorizationThreeDSecure`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingAuthorizationThreeDSecureResult { + AttemptAcknowledged, + Authenticated, + Failed, + Required, +} + +impl IssuingAuthorizationThreeDSecureResult { + pub fn as_str(self) -> &'static str { + match self { + IssuingAuthorizationThreeDSecureResult::AttemptAcknowledged => "attempt_acknowledged", + IssuingAuthorizationThreeDSecureResult::Authenticated => "authenticated", + IssuingAuthorizationThreeDSecureResult::Failed => "failed", + IssuingAuthorizationThreeDSecureResult::Required => "required", + } + } +} + +impl AsRef for IssuingAuthorizationThreeDSecureResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingAuthorizationThreeDSecureResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingAuthorizationThreeDSecureResult { + fn default() -> Self { + Self::AttemptAcknowledged + } +} diff --git a/src/resources/generated/issuing_authorization_created.rs b/src/resources/generated/issuing_authorization_created.rs new file mode 100644 index 000000000..6fa6502fb --- /dev/null +++ b/src/resources/generated/issuing_authorization_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_authorization.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationCreated { +} diff --git a/src/resources/generated/issuing_authorization_merchant_data.rs b/src/resources/generated/issuing_authorization_merchant_data.rs index 6067fe8d5..e11965262 100644 --- a/src/resources/generated/issuing_authorization_merchant_data.rs +++ b/src/resources/generated/issuing_authorization_merchant_data.rs @@ -38,4 +38,7 @@ pub struct MerchantData { /// An ID assigned by the seller to the location of the sale. pub terminal_id: Option, + + /// URL provided by the merchant on a 3DS request. + pub url: Option, } diff --git a/src/resources/generated/issuing_authorization_request.rs b/src/resources/generated/issuing_authorization_request.rs new file mode 100644 index 000000000..1dd1313a9 --- /dev/null +++ b/src/resources/generated/issuing_authorization_request.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_authorization.request". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationRequest { +} diff --git a/src/resources/generated/issuing_authorization_updated.rs b/src/resources/generated/issuing_authorization_updated.rs new file mode 100644 index 000000000..2fea5c2f8 --- /dev/null +++ b/src/resources/generated/issuing_authorization_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_authorization.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingAuthorizationUpdated { +} diff --git a/src/resources/generated/issuing_card.rs b/src/resources/generated/issuing_card.rs index 87f07660d..34b5d0054 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. @@ -181,6 +179,7 @@ pub struct IssuingCardShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardShippingCustoms { + /// A registration number used for customs in Europe. /// /// See [](https://www.gov.uk/eori) for the UK and [](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. @@ -189,6 +188,7 @@ pub struct IssuingCardShippingCustoms { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardSpendingLimit { + /// Maximum amount allowed to spend per interval. /// /// This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -205,6 +205,7 @@ pub struct IssuingCardSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardWallets { + pub apple_pay: IssuingCardApplePay, pub google_pay: IssuingCardGooglePay, @@ -215,6 +216,7 @@ pub struct IssuingCardWallets { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardApplePay { + /// Apple Pay Eligibility. pub eligible: bool, @@ -224,6 +226,7 @@ pub struct IssuingCardApplePay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardGooglePay { + /// Google Pay Eligibility. pub eligible: bool, @@ -244,9 +247,7 @@ impl IssuingCardApplePayIneligibleReason { pub fn as_str(self) -> &'static str { match self { IssuingCardApplePayIneligibleReason::MissingAgreement => "missing_agreement", - IssuingCardApplePayIneligibleReason::MissingCardholderContact => { - "missing_cardholder_contact" - } + IssuingCardApplePayIneligibleReason::MissingCardholderContact => "missing_cardholder_contact", IssuingCardApplePayIneligibleReason::UnsupportedRegion => "unsupported_region", } } @@ -318,9 +319,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_card_created.rs b/src/resources/generated/issuing_card_created.rs new file mode 100644 index 000000000..0bb04dceb --- /dev/null +++ b/src/resources/generated/issuing_card_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_card.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingCardCreated { +} diff --git a/src/resources/generated/issuing_card_updated.rs b/src/resources/generated/issuing_card_updated.rs new file mode 100644 index 000000000..068f6c86a --- /dev/null +++ b/src/resources/generated/issuing_card_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_card.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingCardUpdated { +} diff --git a/src/resources/generated/issuing_cardholder.rs b/src/resources/generated/issuing_cardholder.rs index ad1283a7d..7ce3e924d 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,13 +112,16 @@ pub struct IssuingCardholderAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCompany { + /// Whether the company's business ID number was provided. pub tax_id_provided: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividual { + /// Information related to the card_issuing program for this cardholder. + #[serde(skip_serializing_if = "Option::is_none")] pub card_issuing: Option, /// The date of birth of this cardholder. @@ -141,12 +145,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 +165,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 +175,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 +192,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 +209,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 +281,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 +332,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_cardholder_created.rs b/src/resources/generated/issuing_cardholder_created.rs new file mode 100644 index 000000000..c771d53dd --- /dev/null +++ b/src/resources/generated/issuing_cardholder_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_cardholder.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingCardholderCreated { +} diff --git a/src/resources/generated/issuing_cardholder_updated.rs b/src/resources/generated/issuing_cardholder_updated.rs new file mode 100644 index 000000000..d1d801275 --- /dev/null +++ b/src/resources/generated/issuing_cardholder_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_cardholder.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingCardholderUpdated { +} 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_dispute_closed.rs b/src/resources/generated/issuing_dispute_closed.rs new file mode 100644 index 000000000..817df7615 --- /dev/null +++ b/src/resources/generated/issuing_dispute_closed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.closed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeClosed { +} diff --git a/src/resources/generated/issuing_dispute_created.rs b/src/resources/generated/issuing_dispute_created.rs new file mode 100644 index 000000000..27b18a2e7 --- /dev/null +++ b/src/resources/generated/issuing_dispute_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeCreated { +} diff --git a/src/resources/generated/issuing_dispute_funds_reinstated.rs b/src/resources/generated/issuing_dispute_funds_reinstated.rs new file mode 100644 index 000000000..13c7130e7 --- /dev/null +++ b/src/resources/generated/issuing_dispute_funds_reinstated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.funds_reinstated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeFundsReinstated { +} diff --git a/src/resources/generated/issuing_dispute_submitted.rs b/src/resources/generated/issuing_dispute_submitted.rs new file mode 100644 index 000000000..45f2ed43f --- /dev/null +++ b/src/resources/generated/issuing_dispute_submitted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.submitted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeSubmitted { +} diff --git a/src/resources/generated/issuing_dispute_updated.rs b/src/resources/generated/issuing_dispute_updated.rs new file mode 100644 index 000000000..7e465230d --- /dev/null +++ b/src/resources/generated/issuing_dispute_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_dispute.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingDisputeUpdated { +} diff --git a/src/resources/generated/issuing_token.rs b/src/resources/generated/issuing_token.rs new file mode 100644 index 000000000..008c49616 --- /dev/null +++ b/src/resources/generated/issuing_token.rs @@ -0,0 +1,550 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingTokenId}; +use crate::params::{Expandable, Object, Timestamp}; +use crate::resources::{IssuingCard}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingNetworkToken". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingToken { + /// Unique identifier for the object. + pub id: IssuingTokenId, + + /// Card associated with this token. + pub card: Expandable, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// The hashed ID derived from the device ID from the card network associated with the token. + pub device_fingerprint: Option, + + /// The last four digits of the token. + #[serde(skip_serializing_if = "Option::is_none")] + pub last4: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The token service provider / card network associated with the token. + pub network: IssuingTokenNetwork, + + #[serde(skip_serializing_if = "Option::is_none")] + pub network_data: Option, + + /// Time at which the token was last updated by the card network. + /// + /// Measured in seconds since the Unix epoch. + pub network_updated_at: Timestamp, + + /// The usage state of the token. + pub status: IssuingTokenStatus, + + /// The digital wallet for this token, if one was used. + #[serde(skip_serializing_if = "Option::is_none")] + pub wallet_provider: Option, +} + +impl Object for IssuingToken { + type Id = IssuingTokenId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.token" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenNetworkData { + + #[serde(skip_serializing_if = "Option::is_none")] + pub device: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mastercard: Option, + + /// The network that the token is associated with. + /// + /// An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + #[serde(rename = "type")] + pub type_: IssuingNetworkTokenNetworkDataType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub visa: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub wallet_provider: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenDevice { + + /// An obfuscated ID derived from the device ID. + #[serde(skip_serializing_if = "Option::is_none")] + pub device_fingerprint: Option, + + /// The IP address of the device at provisioning time. + #[serde(skip_serializing_if = "Option::is_none")] + pub ip_address: Option, + + /// The geographic latitude/longitude coordinates of the device at provisioning time. + /// + /// The format is [+-]decimal/[+-]decimal. + #[serde(skip_serializing_if = "Option::is_none")] + pub location: Option, + + /// The name of the device used for tokenization. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + + /// The phone number of the device used for tokenization. + #[serde(skip_serializing_if = "Option::is_none")] + pub phone_number: Option, + + /// The type of device used for tokenization. + #[serde(rename = "type")] + #[serde(skip_serializing_if = "Option::is_none")] + pub type_: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenMastercard { + + /// A unique reference ID from MasterCard to represent the card account number. + #[serde(skip_serializing_if = "Option::is_none")] + pub card_reference_id: Option, + + /// The network-unique identifier for the token. + pub token_reference_id: String, + + /// The ID of the entity requesting tokenization, specific to MasterCard. + pub token_requestor_id: String, + + /// The name of the entity requesting tokenization, if known. + /// + /// This is directly provided from MasterCard. + #[serde(skip_serializing_if = "Option::is_none")] + pub token_requestor_name: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenVisa { + + /// A unique reference ID from Visa to represent the card account number. + pub card_reference_id: String, + + /// The network-unique identifier for the token. + pub token_reference_id: String, + + /// The ID of the entity requesting tokenization, specific to Visa. + pub token_requestor_id: String, + + /// Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. + /// + /// A `00` value indicates the token was not scored by Visa. + #[serde(skip_serializing_if = "Option::is_none")] + pub token_risk_score: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenWalletProvider { + + /// The wallet provider-given account ID of the digital wallet the token belongs to. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_id: Option, + + /// An evaluation on the trustworthiness of the wallet account between 1 and 5. + /// + /// A higher score indicates more trustworthy. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_trust_score: Option, + + /// The method used for tokenizing a card. + #[serde(skip_serializing_if = "Option::is_none")] + pub card_number_source: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cardholder_address: Option, + + /// The name of the cardholder tokenizing the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub cardholder_name: Option, + + /// An evaluation on the trustworthiness of the device. + /// + /// A higher score indicates more trustworthy. + #[serde(skip_serializing_if = "Option::is_none")] + pub device_trust_score: Option, + + /// The hashed email address of the cardholder's account with the wallet provider. + #[serde(skip_serializing_if = "Option::is_none")] + pub hashed_account_email_address: Option, + + /// The reasons for suggested tokenization given by the card network. + #[serde(skip_serializing_if = "Option::is_none")] + pub reason_codes: Option>, + + /// The recommendation on responding to the tokenization request. + #[serde(skip_serializing_if = "Option::is_none")] + pub suggested_decision: Option, + + /// The version of the standard for mapping reason codes followed by the wallet provider. + #[serde(skip_serializing_if = "Option::is_none")] + pub suggested_decision_version: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingNetworkTokenAddress { + + /// The street address of the cardholder tokenizing the card. + pub line1: String, + + /// The postal code of the cardholder tokenizing the card. + pub postal_code: String, +} + +/// An enum representing the possible values of an `IssuingNetworkTokenDevice`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingNetworkTokenDeviceType { + Other, + Phone, + Watch, +} + +impl IssuingNetworkTokenDeviceType { + pub fn as_str(self) -> &'static str { + match self { + IssuingNetworkTokenDeviceType::Other => "other", + IssuingNetworkTokenDeviceType::Phone => "phone", + IssuingNetworkTokenDeviceType::Watch => "watch", + } + } +} + +impl AsRef for IssuingNetworkTokenDeviceType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingNetworkTokenDeviceType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingNetworkTokenDeviceType { + fn default() -> Self { + Self::Other + } +} + +/// An enum representing the possible values of an `IssuingNetworkTokenNetworkData`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingNetworkTokenNetworkDataType { + Mastercard, + Visa, +} + +impl IssuingNetworkTokenNetworkDataType { + pub fn as_str(self) -> &'static str { + match self { + IssuingNetworkTokenNetworkDataType::Mastercard => "mastercard", + IssuingNetworkTokenNetworkDataType::Visa => "visa", + } + } +} + +impl AsRef for IssuingNetworkTokenNetworkDataType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingNetworkTokenNetworkDataType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingNetworkTokenNetworkDataType { + fn default() -> Self { + Self::Mastercard + } +} + +/// An enum representing the possible values of an `IssuingNetworkTokenWalletProvider`'s `card_number_source` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingNetworkTokenWalletProviderCardNumberSource { + App, + Manual, + OnFile, + Other, +} + +impl IssuingNetworkTokenWalletProviderCardNumberSource { + pub fn as_str(self) -> &'static str { + match self { + IssuingNetworkTokenWalletProviderCardNumberSource::App => "app", + IssuingNetworkTokenWalletProviderCardNumberSource::Manual => "manual", + IssuingNetworkTokenWalletProviderCardNumberSource::OnFile => "on_file", + IssuingNetworkTokenWalletProviderCardNumberSource::Other => "other", + } + } +} + +impl AsRef for IssuingNetworkTokenWalletProviderCardNumberSource { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingNetworkTokenWalletProviderCardNumberSource { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingNetworkTokenWalletProviderCardNumberSource { + fn default() -> Self { + Self::App + } +} + +/// An enum representing the possible values of an `IssuingNetworkTokenWalletProvider`'s `reason_codes` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingNetworkTokenWalletProviderReasonCodes { + AccountCardTooNew, + AccountRecentlyChanged, + AccountTooNew, + AccountTooNewSinceLaunch, + AdditionalDevice, + DataExpired, + DeferIdVDecision, + DeviceRecentlyLost, + GoodActivityHistory, + HasSuspendedTokens, + HighRisk, + InactiveAccount, + LongAccountTenure, + LowAccountScore, + LowDeviceScore, + LowPhoneNumberScore, + NetworkServiceError, + OutsideHomeTerritory, + ProvisioningCardholderMismatch, + ProvisioningDeviceAndCardholderMismatch, + ProvisioningDeviceMismatch, + SameDeviceNoPriorAuthentication, + SameDeviceSuccessfulPriorAuthentication, + SoftwareUpdate, + SuspiciousActivity, + TooManyDifferentCardholders, + TooManyRecentAttempts, + TooManyRecentTokens, +} + +impl IssuingNetworkTokenWalletProviderReasonCodes { + pub fn as_str(self) -> &'static str { + match self { + IssuingNetworkTokenWalletProviderReasonCodes::AccountCardTooNew => "account_card_too_new", + IssuingNetworkTokenWalletProviderReasonCodes::AccountRecentlyChanged => "account_recently_changed", + IssuingNetworkTokenWalletProviderReasonCodes::AccountTooNew => "account_too_new", + IssuingNetworkTokenWalletProviderReasonCodes::AccountTooNewSinceLaunch => "account_too_new_since_launch", + IssuingNetworkTokenWalletProviderReasonCodes::AdditionalDevice => "additional_device", + IssuingNetworkTokenWalletProviderReasonCodes::DataExpired => "data_expired", + IssuingNetworkTokenWalletProviderReasonCodes::DeferIdVDecision => "defer_id_v_decision", + IssuingNetworkTokenWalletProviderReasonCodes::DeviceRecentlyLost => "device_recently_lost", + IssuingNetworkTokenWalletProviderReasonCodes::GoodActivityHistory => "good_activity_history", + IssuingNetworkTokenWalletProviderReasonCodes::HasSuspendedTokens => "has_suspended_tokens", + IssuingNetworkTokenWalletProviderReasonCodes::HighRisk => "high_risk", + IssuingNetworkTokenWalletProviderReasonCodes::InactiveAccount => "inactive_account", + IssuingNetworkTokenWalletProviderReasonCodes::LongAccountTenure => "long_account_tenure", + IssuingNetworkTokenWalletProviderReasonCodes::LowAccountScore => "low_account_score", + IssuingNetworkTokenWalletProviderReasonCodes::LowDeviceScore => "low_device_score", + IssuingNetworkTokenWalletProviderReasonCodes::LowPhoneNumberScore => "low_phone_number_score", + IssuingNetworkTokenWalletProviderReasonCodes::NetworkServiceError => "network_service_error", + IssuingNetworkTokenWalletProviderReasonCodes::OutsideHomeTerritory => "outside_home_territory", + IssuingNetworkTokenWalletProviderReasonCodes::ProvisioningCardholderMismatch => "provisioning_cardholder_mismatch", + IssuingNetworkTokenWalletProviderReasonCodes::ProvisioningDeviceAndCardholderMismatch => "provisioning_device_and_cardholder_mismatch", + IssuingNetworkTokenWalletProviderReasonCodes::ProvisioningDeviceMismatch => "provisioning_device_mismatch", + IssuingNetworkTokenWalletProviderReasonCodes::SameDeviceNoPriorAuthentication => "same_device_no_prior_authentication", + IssuingNetworkTokenWalletProviderReasonCodes::SameDeviceSuccessfulPriorAuthentication => "same_device_successful_prior_authentication", + IssuingNetworkTokenWalletProviderReasonCodes::SoftwareUpdate => "software_update", + IssuingNetworkTokenWalletProviderReasonCodes::SuspiciousActivity => "suspicious_activity", + IssuingNetworkTokenWalletProviderReasonCodes::TooManyDifferentCardholders => "too_many_different_cardholders", + IssuingNetworkTokenWalletProviderReasonCodes::TooManyRecentAttempts => "too_many_recent_attempts", + IssuingNetworkTokenWalletProviderReasonCodes::TooManyRecentTokens => "too_many_recent_tokens", + } + } +} + +impl AsRef for IssuingNetworkTokenWalletProviderReasonCodes { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingNetworkTokenWalletProviderReasonCodes { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingNetworkTokenWalletProviderReasonCodes { + fn default() -> Self { + Self::AccountCardTooNew + } +} + +/// An enum representing the possible values of an `IssuingNetworkTokenWalletProvider`'s `suggested_decision` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingNetworkTokenWalletProviderSuggestedDecision { + Approve, + Decline, + RequireAuth, +} + +impl IssuingNetworkTokenWalletProviderSuggestedDecision { + pub fn as_str(self) -> &'static str { + match self { + IssuingNetworkTokenWalletProviderSuggestedDecision::Approve => "approve", + IssuingNetworkTokenWalletProviderSuggestedDecision::Decline => "decline", + IssuingNetworkTokenWalletProviderSuggestedDecision::RequireAuth => "require_auth", + } + } +} + +impl AsRef for IssuingNetworkTokenWalletProviderSuggestedDecision { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingNetworkTokenWalletProviderSuggestedDecision { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingNetworkTokenWalletProviderSuggestedDecision { + fn default() -> Self { + Self::Approve + } +} + +/// An enum representing the possible values of an `IssuingToken`'s `network` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingTokenNetwork { + Mastercard, + Visa, +} + +impl IssuingTokenNetwork { + pub fn as_str(self) -> &'static str { + match self { + IssuingTokenNetwork::Mastercard => "mastercard", + IssuingTokenNetwork::Visa => "visa", + } + } +} + +impl AsRef for IssuingTokenNetwork { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingTokenNetwork { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingTokenNetwork { + fn default() -> Self { + Self::Mastercard + } +} + +/// An enum representing the possible values of an `IssuingToken`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingTokenStatus { + Active, + Deleted, + Requested, + Suspended, +} + +impl IssuingTokenStatus { + pub fn as_str(self) -> &'static str { + match self { + IssuingTokenStatus::Active => "active", + IssuingTokenStatus::Deleted => "deleted", + IssuingTokenStatus::Requested => "requested", + IssuingTokenStatus::Suspended => "suspended", + } + } +} + +impl AsRef for IssuingTokenStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingTokenStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingTokenStatus { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `IssuingToken`'s `wallet_provider` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingTokenWalletProvider { + ApplePay, + GooglePay, + SamsungPay, +} + +impl IssuingTokenWalletProvider { + pub fn as_str(self) -> &'static str { + match self { + IssuingTokenWalletProvider::ApplePay => "apple_pay", + IssuingTokenWalletProvider::GooglePay => "google_pay", + IssuingTokenWalletProvider::SamsungPay => "samsung_pay", + } + } +} + +impl AsRef for IssuingTokenWalletProvider { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingTokenWalletProvider { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingTokenWalletProvider { + fn default() -> Self { + Self::ApplePay + } +} diff --git a/src/resources/generated/issuing_token_created.rs b/src/resources/generated/issuing_token_created.rs new file mode 100644 index 000000000..e8d2d0b15 --- /dev/null +++ b/src/resources/generated/issuing_token_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_token.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTokenCreated { +} diff --git a/src/resources/generated/issuing_token_updated.rs b/src/resources/generated/issuing_token_updated.rs new file mode 100644 index 000000000..818bae824 --- /dev/null +++ b/src/resources/generated/issuing_token_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_token.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTokenUpdated { +} diff --git a/src/resources/generated/issuing_transaction.rs b/src/resources/generated/issuing_transaction.rs index f4c947b6a..50c389183 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, IssuingToken, IssuingTransactionType, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingTransaction". /// @@ -72,9 +68,18 @@ pub struct IssuingTransaction { /// This can be useful for storing additional information about the object in a structured format. pub metadata: Metadata, + /// Details about the transaction, such as processing dates, set by the card network. + pub network_data: Option, + /// Additional purchase information that is optionally provided by the merchant. pub purchase_details: Option, + /// [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. + /// + /// If a network token was not used for this transaction, this field will be null. + #[serde(skip_serializing_if = "Option::is_none")] + pub token: Option>, + /// [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts. #[serde(skip_serializing_if = "Option::is_none")] pub treasury: Option, @@ -101,6 +106,7 @@ impl Object for IssuingTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionAmountDetails { + /// The fee charged by the ATM for the cash withdrawal. pub atm_fee: Option, @@ -108,8 +114,29 @@ pub struct IssuingTransactionAmountDetails { pub cashback_amount: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionNetworkData { + + /// A code created by Stripe which is shared with the merchant to validate the authorization. + /// + /// This field will be populated if the authorization message was approved. + /// The code typically starts with the letter "S", followed by a six-digit number. + /// For example, "S498162". + /// Please note that the code is not guaranteed to be unique across authorizations. + pub authorization_code: Option, + + /// The date the transaction was processed by the card network. + /// + /// This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + pub processing_date: Option, + + /// Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + pub transaction_id: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionPurchaseDetails { + /// Information about the flight that was purchased with this transaction. pub flight: Option, @@ -128,6 +155,7 @@ pub struct IssuingTransactionPurchaseDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightData { + /// The time that the flight departed. pub departure_at: Option, @@ -146,6 +174,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, @@ -167,6 +196,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`. @@ -187,6 +217,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, @@ -196,6 +227,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. @@ -213,6 +245,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/issuing_transaction_created.rs b/src/resources/generated/issuing_transaction_created.rs new file mode 100644 index 000000000..0799bb821 --- /dev/null +++ b/src/resources/generated/issuing_transaction_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_transaction.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionCreated { +} diff --git a/src/resources/generated/issuing_transaction_updated.rs b/src/resources/generated/issuing_transaction_updated.rs new file mode 100644 index 000000000..72f34b8a9 --- /dev/null +++ b/src/resources/generated/issuing_transaction_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "issuing_transaction.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingTransactionUpdated { +} 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 1ed512a17..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,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "linked_account_options_us_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LinkedAccountOptionsUsBankAccount { + /// The list of permissions to request. /// /// The `payment_method` permission must be included. 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 ffd5600e5..541f2146b 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::MandateId; +use crate::ids::{MandateId}; use crate::params::{Expand, Expandable, Object, Timestamp}; use crate::resources::{Currency, PaymentMethod}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Mandate". /// @@ -25,7 +24,7 @@ pub struct Mandate { #[serde(skip_serializing_if = "Option::is_none")] pub multi_use: Option, - /// The account (if any) for which the mandate is intended. + /// The account (if any) that the mandate is intended for. #[serde(skip_serializing_if = "Option::is_none")] pub on_behalf_of: Option, @@ -37,7 +36,7 @@ pub struct Mandate { #[serde(skip_serializing_if = "Option::is_none")] pub single_use: Option, - /// The status of the mandate, which indicates whether it can be used to initiate a payment. + /// The mandate status indicates whether or not you can use it to initiate a payment. pub status: MandateStatus, /// The type of the 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,7 +64,8 @@ impl Object for Mandate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerAcceptance { - /// The time at which the customer accepted the Mandate. + + /// The time that the customer accepts the mandate. pub accepted_at: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -73,18 +74,18 @@ pub struct CustomerAcceptance { #[serde(skip_serializing_if = "Option::is_none")] pub online: Option, - /// The type of customer acceptance information included with the Mandate. - /// - /// One of `online` or `offline`. + /// The mandate includes the type of customer acceptance information, such as: `online` or `offline`. #[serde(rename = "type")] pub type_: CustomerAcceptanceType, } #[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, @@ -109,10 +110,9 @@ pub struct MandatePaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, - /// The type of the payment method associated with this mandate. + /// This mandate corresponds with a specific payment method type. /// - /// An additional hash is included on `payment_method_details` with a name matching this value. - /// It contains mandate information specific to the payment method. + /// The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. #[serde(rename = "type")] pub type_: String, @@ -121,10 +121,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>, @@ -143,6 +145,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. @@ -151,6 +154,7 @@ pub struct MandateAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateBacsDebit { + /// The status of the mandate on the Bacs network. /// /// Can be one of `pending`, `revoked`, `refused`, or `accepted`. @@ -164,13 +168,16 @@ pub struct MandateBacsDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateCashapp {} +pub struct MandateCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateLink {} +pub struct MandateLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandatePaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -179,12 +186,12 @@ pub struct MandatePaypal { /// PayPal account PayerID. /// /// This identifier uniquely identifies the PayPal customer. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_id: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSepaDebit { + /// The unique reference of the mandate. pub reference: String, @@ -196,25 +203,29 @@ pub struct MandateSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSingleUse { - /// On a single use mandate, the amount of the payment. + + /// The amount of the payment on a single use mandate. pub amount: i64, - /// On a single use mandate, the currency of the payment. + /// The currency of the payment on a single use mandate. pub currency: Currency, } #[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. + + /// The customer accepts the mandate from this IP address. pub ip_address: Option, - /// The user agent of the browser from which the Mandate was accepted by the customer. + /// The customer accepts the mandate using the user agent of the browser. pub user_agent: Option, } diff --git a/src/resources/generated/mandate_updated.rs b/src/resources/generated/mandate_updated.rs new file mode 100644 index 000000000..bfa867ee2 --- /dev/null +++ b/src/resources/generated/mandate_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "mandate.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct MandateUpdated { +} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index 4fa34dd30..b69b11860 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -2,21 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId, -}; +use crate::ids::{CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, - LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, - PaymentIntentOffSession, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, - PaymentSource, Review, Shipping, -}; +use crate::resources::{Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentIntentOffSession, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentSource, Review, Shipping}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentIntent". /// @@ -39,7 +29,7 @@ pub struct PaymentIntent { #[serde(skip_serializing_if = "Option::is_none")] pub amount_details: Option, - /// Amount that was collected by this PaymentIntent. + /// Amount that this PaymentIntent collects. pub amount_received: i64, /// ID of the Connect application that created the PaymentIntent. @@ -105,8 +95,7 @@ pub struct PaymentIntent { /// It will be cleared if the PaymentIntent is later updated for any reason. pub last_payment_error: Option>, - /// The latest charge created by this payment intent. - #[serde(skip_serializing_if = "Option::is_none")] + /// The latest charge created by this PaymentIntent. pub latest_charge: Option>, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -115,7 +104,7 @@ pub struct PaymentIntent { /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. /// /// This can be useful for storing additional information about the object in a structured format. - /// For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + /// Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). pub metadata: Metadata, /// If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. @@ -130,9 +119,7 @@ pub struct PaymentIntent { pub payment_method: Option>, /// Information about the payment method configuration used for this PaymentIntent. - #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for this PaymentIntent. pub payment_method_options: Option, @@ -168,9 +155,10 @@ pub struct PaymentIntent { /// It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. pub source: Option>, - /// For non-card charges, you can use this value as the complete description that appears on your customers’ statements. + /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). /// - /// Must contain at least one letter, maximum 22 characters. + /// Otherwise, you can use this value as the complete description of a charge on your customers' statements. + /// It must contain at least one letter and be 1–22 characters long. pub statement_descriptor: Option, /// Provides information about a card payment that customers see on their statements. @@ -184,30 +172,32 @@ pub struct PaymentIntent { /// Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). pub status: PaymentIntentStatus, - /// The data with which to automatically create a Transfer when the payment is finalized. + /// The data that automatically creates a Transfer after the payment finalizes. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). pub transfer_data: Option, /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + /// Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). 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. /// /// After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) /// to continue the payment. /// - /// You can read more about the different payment flows available via the Payment Intents API [here](https://stripe.com/docs/payments/payment-intents). When `confirm=true` is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. - /// You may use any parameters available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when `confirm=true` is supplied. + /// Learn more about [the available payment flows with the Payment Intents API](https://stripe.com/docs/payments/payment-intents). When you use `confirm=true` during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call. + /// You can use any parameters available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply `confirm=true`. pub fn create(client: &Client, params: CreatePaymentIntent<'_>) -> Response { client.post_form("/payment_intents", ¶ms) } @@ -217,11 +207,7 @@ impl PaymentIntent { /// You can retrieve a PaymentIntent client-side using a publishable key when the `client_secret` is in the query string. /// If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. /// Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details. - pub fn retrieve( - client: &Client, - id: &PaymentIntentId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &PaymentIntentId, expand: &[&str]) -> Response { client.get_query(&format!("/payment_intents/{}", id), &Expand { expand }) } @@ -232,11 +218,7 @@ impl PaymentIntent { /// /// For example, updating the `payment_method` always requires you to confirm the PaymentIntent again. /// If you prefer to update and confirm at the same time, we recommend updating properties through the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead. - pub fn update( - client: &Client, - id: &PaymentIntentId, - params: UpdatePaymentIntent<'_>, - ) -> Response { + pub fn update(client: &Client, id: &PaymentIntentId, params: UpdatePaymentIntent<'_>) -> Response { client.post_form(&format!("/payment_intents/{}", id), ¶ms) } } @@ -253,12 +235,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, @@ -266,6 +250,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. @@ -280,6 +265,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, @@ -290,12 +276,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, @@ -332,8 +316,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, @@ -341,6 +324,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, @@ -356,6 +340,7 @@ pub struct PaymentIntentNextActionAlipayHandleRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionBoleto { + /// The timestamp after which the boleto expires. pub expires_at: Option, @@ -371,6 +356,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. @@ -384,6 +370,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, @@ -411,6 +398,10 @@ pub struct PaymentIntentNextActionDisplayBankTransferInstructions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferFinancialAddress { + + #[serde(skip_serializing_if = "Option::is_none")] + pub aba: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub iban: Option, @@ -422,8 +413,10 @@ pub struct FundingInstructionsBankTransferFinancialAddress { /// The payment networks supported by this FinancialAddress. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_networks: - Option>, + pub supported_networks: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] + pub swift: Option, /// The type of financial address. #[serde(rename = "type")] @@ -433,8 +426,22 @@ pub struct FundingInstructionsBankTransferFinancialAddress { pub zengin: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FundingInstructionsBankTransferAbaRecord { + + /// The ABA account number. + pub account_number: String, + + /// The bank name. + pub bank_name: String, + + /// The ABA routing number. + pub routing_number: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferIbanRecord { + /// The name of the person or business that owns the bank account. pub account_holder_name: String, @@ -450,6 +457,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, @@ -462,6 +470,7 @@ pub struct FundingInstructionsBankTransferSortCodeRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSpeiRecord { + /// The three-digit bank code. pub bank_code: String, @@ -472,8 +481,22 @@ pub struct FundingInstructionsBankTransferSpeiRecord { pub clabe: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FundingInstructionsBankTransferSwiftRecord { + + /// The account number. + pub account_number: String, + + /// The bank name. + pub bank_name: String, + + /// The SWIFT code. + pub swift_code: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { + /// The account holder name. pub account_holder_name: Option, @@ -500,6 +523,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, @@ -512,6 +536,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, @@ -523,6 +548,7 @@ pub struct PaymentIntentNextActionKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniStores { + /// FamilyMart instruction details. pub familymart: Option, @@ -538,6 +564,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, @@ -548,6 +575,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, @@ -558,6 +586,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, @@ -568,6 +597,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, @@ -578,6 +608,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, @@ -593,6 +624,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, @@ -616,6 +648,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, @@ -631,6 +664,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, @@ -640,6 +674,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, @@ -654,6 +689,7 @@ pub struct PaymentIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionWechatPayDisplayQrCode { + /// The data being used to generate QR code. pub data: String, @@ -672,6 +708,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, @@ -696,12 +733,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, @@ -786,6 +825,9 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -804,6 +846,7 @@ pub struct PaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -822,6 +865,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. @@ -832,10 +876,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, @@ -854,6 +900,22 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// Can be only set confirm-time. pub network: Option, + /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_extended_authorization: Option, + + /// Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_incremental_authorization: Option, + + /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_multicapture: Option, + + /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_overcapture: Option, + /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. @@ -889,6 +951,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. @@ -900,6 +963,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, @@ -918,6 +982,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, @@ -928,16 +993,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, @@ -951,17 +1015,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. /// @@ -973,12 +1038,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, @@ -989,12 +1054,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. @@ -1006,6 +1073,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, @@ -1025,14 +1093,14 @@ 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, - /// Order identifier shown to the customer in Afterpay’s online portal. + /// An internal identifier or reference that this payment corresponds to. /// - /// We recommend using a value that helps you answer any questions a customer might have about the payment. - /// The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + /// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name. pub reference: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1046,6 +1114,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. @@ -1057,6 +1126,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. @@ -1068,6 +1138,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, @@ -1082,6 +1153,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. @@ -1098,6 +1170,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>, @@ -1110,6 +1183,7 @@ pub struct PaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1156,6 +1230,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, @@ -1167,6 +1242,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, @@ -1182,6 +1258,7 @@ pub struct PaymentMethodOptionsCashapp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -1201,6 +1278,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, @@ -1208,8 +1286,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")] @@ -1218,6 +1295,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. @@ -1229,6 +1307,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. @@ -1240,6 +1319,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. @@ -1251,6 +1331,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. @@ -1261,10 +1342,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, @@ -1283,6 +1366,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, @@ -1310,6 +1394,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. @@ -1326,6 +1411,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. @@ -1337,6 +1423,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. @@ -1348,6 +1435,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, @@ -1358,7 +1446,6 @@ pub struct PaymentMethodOptionsPaypal { /// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. /// /// This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1372,6 +1459,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, @@ -1389,6 +1477,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. @@ -1398,8 +1487,13 @@ pub struct PaymentMethodOptionsPromptpay { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOptionsRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsSofort { + /// Preferred language of the SOFORT authorization page that the customer is redirected to. pub preferred_language: Option, @@ -1414,6 +1508,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. @@ -1433,6 +1528,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. @@ -1444,6 +1540,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,8 +1549,8 @@ pub struct TransferData { #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, - /// The account (if any) the payment will be attributed to for tax - /// reporting, and where funds from the payment will be transferred to upon + /// The account (if any) that the payment is attributed to for tax + /// reporting, and where funds from the payment are transferred to after /// payment success. pub destination: Expandable, } @@ -1461,6 +1558,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). @@ -1475,7 +1573,7 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub application_fee_amount: Option, - /// When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + /// When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. #[serde(skip_serializing_if = "Option::is_none")] pub automatic_payment_methods: Option, @@ -1483,10 +1581,10 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, - /// Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. + /// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. /// /// This parameter defaults to `false`. - /// When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. + /// When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). #[serde(skip_serializing_if = "Option::is_none")] pub confirm: Option, @@ -1514,7 +1612,7 @@ pub struct CreatePaymentIntent<'a> { /// Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. /// - /// This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + /// Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). #[serde(skip_serializing_if = "Option::is_none")] pub error_on_requires_action: Option, @@ -1523,7 +1621,7 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// ID of the mandate to be used for this payment. + /// ID of the mandate that's used for this payment. /// /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). #[serde(skip_serializing_if = "Option::is_none")] @@ -1543,24 +1641,24 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. + /// Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. /// - /// This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + /// Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). #[serde(skip_serializing_if = "Option::is_none")] pub off_session: Option, - /// The Stripe account ID for which these funds are intended. + /// The Stripe account ID that these funds are intended for. /// - /// For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + /// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). #[serde(skip_serializing_if = "Option::is_none")] pub on_behalf_of: Option<&'a str>, /// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. /// - /// If neither the `payment_method` parameter nor the `source` parameter are provided with `confirm=true`, `source` will be automatically populated with `customer.default_source` to improve the migration experience for users of the Charges API. + /// If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. /// - /// We recommend that you explicitly provide the `payment_method` going forward. + /// We recommend that you explicitly provide the `payment_method` moving forward. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, @@ -1574,27 +1672,26 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_data: Option, - /// Payment-method-specific configuration for this PaymentIntent. + /// Payment method-specific configuration for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, - /// The list of payment method types (e.g. + /// The list of payment method types (for example, a card) that this PaymentIntent can use. /// - /// card) that this PaymentIntent is allowed to use. - /// If this is not provided, defaults to ["card"]. - /// Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + /// If you don't provide this, it defaults to ["card"]. + /// Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, /// Options to configure Radar. /// - /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + /// Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, - /// Email address that the receipt for the resulting payment will be sent to. + /// Email address to send the receipt to. /// - /// If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + /// If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). #[serde(skip_serializing_if = "Option::is_none")] pub receipt_email: Option<&'a str>, @@ -1617,27 +1714,28 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub shipping: Option, - /// For non-card charges, you can use this value as the complete description that appears on your customers’ statements. + /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). /// - /// Must contain at least one letter, maximum 22 characters. + /// Otherwise, you can use this value as the complete description of a charge on your customers' statements. + /// It must contain at least one letter and be 1–22 characters long. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, /// Provides information about a card payment that customers see on their statements. /// /// Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. - /// Maximum 22 characters for the concatenated descriptor. + /// The concatenated descriptor must contain 1-22 characters. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix: Option<&'a str>, - /// The parameters used to automatically create a Transfer when the payment succeeds. - /// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + /// The parameters that you can use to automatically create a Transfer. + /// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). #[serde(skip_serializing_if = "Option::is_none")] pub transfer_data: Option, /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + /// Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: Option<&'a str>, @@ -1687,13 +1785,14 @@ 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. + /// The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, - /// Only return PaymentIntents for the customer specified by this customer ID. + /// Only return PaymentIntents for the customer that this customer ID specifies. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -1737,12 +1836,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). @@ -1836,9 +1935,10 @@ pub struct UpdatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub shipping: Option, - /// For non-card charges, you can use this value as the complete description that appears on your customers’ statements. + /// For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). /// - /// Must contain at least one letter, maximum 22 characters. + /// Otherwise, you can use this value as the complete description of a charge on your customers' statements. + /// It must contain at least one letter and be 1–22 characters long. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, @@ -1892,6 +1992,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. @@ -1906,12 +2007,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, @@ -2034,6 +2137,10 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -2064,6 +2171,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, @@ -2176,6 +2284,10 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + /// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -2199,6 +2311,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, @@ -2206,6 +2319,7 @@ pub struct CreatePaymentIntentRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentShipping { + /// Shipping address. pub address: CreatePaymentIntentShippingAddress, @@ -2229,6 +2343,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. @@ -2249,6 +2364,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, @@ -2371,6 +2487,10 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -2401,6 +2521,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, @@ -2513,6 +2634,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + /// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -2536,6 +2661,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentShipping { + /// Shipping address. pub address: UpdatePaymentIntentShippingAddress, @@ -2559,6 +2685,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, @@ -2566,6 +2693,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, @@ -2587,6 +2715,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -2598,16 +2727,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, @@ -2617,6 +2750,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, @@ -2629,10 +2763,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, @@ -2651,22 +2787,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, @@ -2674,6 +2815,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, @@ -2683,81 +2825,101 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -2779,13 +2941,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, @@ -2796,17 +2961,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. @@ -2830,19 +2994,18 @@ 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. + /// An internal identifier or reference that this payment corresponds to. /// - /// We recommend using a value that helps you answer any questions a customer might have about the payment. - /// The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + /// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -2852,12 +3015,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. @@ -2869,34 +3032,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. /// @@ -2904,12 +3067,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. @@ -2919,6 +3082,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. @@ -2936,6 +3100,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. @@ -2975,6 +3140,22 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { #[serde(skip_serializing_if = "Option::is_none")] pub network: Option, + /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_extended_authorization: Option, + + /// Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_incremental_authorization: Option, + + /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_multicapture: Option, + + /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_overcapture: Option, + /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. @@ -2982,8 +3163,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. /// @@ -3008,10 +3188,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix_kanji: Option, + + /// If 3D Secure authentication was performed with a third-party provider, + /// the authentication details to use for this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub three_d_secure: Option, } #[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, @@ -3025,6 +3211,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. @@ -3044,6 +3231,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, @@ -3060,12 +3248,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. @@ -3077,6 +3265,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. @@ -3088,6 +3277,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. @@ -3099,6 +3289,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. @@ -3110,6 +3301,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. @@ -3120,10 +3312,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. @@ -3147,6 +3341,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. @@ -3182,6 +3377,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. @@ -3205,6 +3401,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. @@ -3222,6 +3419,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. @@ -3237,6 +3435,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. @@ -3248,6 +3447,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, @@ -3277,6 +3477,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. @@ -3300,18 +3501,31 @@ pub struct CreatePaymentIntentPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsPromptpay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -3322,12 +3536,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, @@ -3343,10 +3557,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")] @@ -3354,8 +3568,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. /// @@ -3363,17 +3576,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. @@ -3389,12 +3601,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. @@ -3406,6 +3618,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, @@ -3433,6 +3646,7 @@ pub struct CreatePaymentIntentShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -3444,16 +3658,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, @@ -3463,6 +3681,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, @@ -3475,10 +3694,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, @@ -3497,22 +3718,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, @@ -3520,6 +3746,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, @@ -3529,81 +3756,101 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdatePaymentIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -3625,13 +3872,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, @@ -3642,17 +3892,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. @@ -3676,19 +3925,18 @@ 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. + /// An internal identifier or reference that this payment corresponds to. /// - /// We recommend using a value that helps you answer any questions a customer might have about the payment. - /// The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + /// You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. This field differs from the statement descriptor and item name. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -3698,12 +3946,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. @@ -3715,34 +3963,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. /// @@ -3750,12 +3998,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. @@ -3765,6 +4013,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. @@ -3782,6 +4031,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. @@ -3821,6 +4071,22 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { #[serde(skip_serializing_if = "Option::is_none")] pub network: Option, + /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_extended_authorization: Option, + + /// Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_incremental_authorization: Option, + + /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_multicapture: Option, + + /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_overcapture: Option, + /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. @@ -3828,8 +4094,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. /// @@ -3854,10 +4119,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor_suffix_kanji: Option, + + /// If 3D Secure authentication was performed with a third-party provider, + /// the authentication details to use for this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub three_d_secure: Option, } #[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, @@ -3871,6 +4142,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. @@ -3890,6 +4162,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, @@ -3906,12 +4179,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. @@ -3923,6 +4196,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. @@ -3934,6 +4208,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. @@ -3945,6 +4220,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. @@ -3956,6 +4232,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. @@ -3966,10 +4243,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. @@ -3993,6 +4272,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. @@ -4028,6 +4308,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. @@ -4051,6 +4332,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. @@ -4068,6 +4350,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. @@ -4083,6 +4366,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. @@ -4094,6 +4378,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, @@ -4123,6 +4408,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. @@ -4146,18 +4432,31 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsPromptpay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsRevolutPay { + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebit { + /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -4168,12 +4467,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, @@ -4189,10 +4488,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")] @@ -4200,8 +4499,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. /// @@ -4209,17 +4507,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. @@ -4235,12 +4532,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. @@ -4252,6 +4549,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, @@ -4278,10 +4576,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, @@ -4291,6 +4591,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, @@ -4318,6 +4619,7 @@ pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4330,6 +4632,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. @@ -4344,17 +4647,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. @@ -4369,6 +4671,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4414,26 +4717,66 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { + + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. + #[serde(skip_serializing_if = "Option::is_none")] + pub ares_trans_status: Option, + + /// The cryptogram, also known as the "authentication value" (AAV, CAVV or + /// AEVV). + /// + /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.). + pub cryptogram: String, + + /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + /// provider and indicates what degree of authentication was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub electronic_commerce_indicator: Option, + + /// The exemption requested via 3DS and accepted by the issuer at authentication time. + #[serde(skip_serializing_if = "Option::is_none")] + pub exemption_indicator: Option, + + /// Network specific 3DS fields. + /// + /// Network specific arguments require an explicit card brand choice. + /// The parameter `payment_method_options.card.network`` must be populated accordingly. + #[serde(skip_serializing_if = "Option::is_none")] + pub network_options: Option, + + /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + /// AReq sent to the card Issuer's ACS. + /// + /// A string containing 2 digits from 01-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub requestor_challenge_indicator: Option, + + /// For 3D Secure 1, the XID. + /// + /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID). + pub transaction_id: String, + + /// The version of 3D Secure that was performed. + pub version: CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { + /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + 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")] @@ -4441,24 +4784,22 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, /// For webview integrations only. /// @@ -4469,14 +4810,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, @@ -4504,6 +4846,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4516,6 +4859,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. @@ -4530,17 +4874,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. @@ -4555,6 +4898,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4600,26 +4944,66 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { + + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. + #[serde(skip_serializing_if = "Option::is_none")] + pub ares_trans_status: Option, + + /// The cryptogram, also known as the "authentication value" (AAV, CAVV or + /// AEVV). + /// + /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.). + pub cryptogram: String, + + /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + /// provider and indicates what degree of authentication was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub electronic_commerce_indicator: Option, + + /// The exemption requested via 3DS and accepted by the issuer at authentication time. + #[serde(skip_serializing_if = "Option::is_none")] + pub exemption_indicator: Option, + + /// Network specific 3DS fields. + /// + /// Network specific arguments require an explicit card brand choice. + /// The parameter `payment_method_options.card.network`` must be populated accordingly. + #[serde(skip_serializing_if = "Option::is_none")] + pub network_options: Option, + + /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + /// AReq sent to the card Issuer's ACS. + /// + /// A string containing 2 digits from 01-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub requestor_challenge_indicator: Option, + + /// For 3D Secure 1, the XID. + /// + /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID). + pub transaction_id: String, + + /// The version of 3D Secure that was performed. + pub version: UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { + /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + 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")] @@ -4627,24 +5011,22 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: Option< - Vec, - >, + pub prefetch: Option>, /// For webview integrations only. /// @@ -4655,14 +5037,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, @@ -4675,8 +5058,17 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { pub type_: CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + + /// Cartes Bancaires-specific 3DS fields. + #[serde(skip_serializing_if = "Option::is_none")] + pub cartes_bancaires: Option, +} + #[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`. @@ -4685,6 +5077,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, @@ -4697,14 +5090,67 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { pub type_: UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + + /// Cartes Bancaires-specific 3DS fields. + #[serde(skip_serializing_if = "Option::is_none")] + pub cartes_bancaires: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. pub country: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + + /// The cryptogram calculation algorithm used by the card Issuer's ACS + /// to calculate the Authentication cryptogram. + /// + /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. + pub cb_avalgo: CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + + /// The exemption indicator returned from Cartes Bancaires in the ARes. + /// message extension: CB-EXEMPTION; string (4 characters) + /// This is a 3 byte bitmap (low significant byte first and most significant + /// bit first) that has been Base64 encoded. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_exemption: Option, + + /// The risk score returned from Cartes Bancaires in the ARes. + /// message extension: CB-SCORE; numeric value 0-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_score: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + + /// The cryptogram calculation algorithm used by the card Issuer's ACS + /// to calculate the Authentication cryptogram. + /// + /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. + pub cb_avalgo: UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + + /// The exemption indicator returned from Cartes Bancaires in the ARes. + /// message extension: CB-EXEMPTION; string (4 characters) + /// This is a 3 byte bitmap (low significant byte first and most significant + /// bit first) that has been Base64 encoded. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_exemption: Option, + + /// The risk score returned from Cartes Bancaires in the ARes. + /// message extension: CB-SCORE; numeric value 0-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_score: Option, +} + /// An enum representing the possible values of an `CreatePaymentIntentAutomaticPaymentMethods`'s `allow_redirects` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4810,57 +5256,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", @@ -5100,9 +5518,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", @@ -5112,12 +5528,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", } @@ -5218,6 +5630,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -5253,6 +5666,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::Paypal => "paypal", CreatePaymentIntentPaymentMethodDataType::Pix => "pix", CreatePaymentIntentPaymentMethodDataType::Promptpay => "promptpay", + CreatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay", CreatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreatePaymentIntentPaymentMethodDataType::Sofort => "sofort", CreatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", @@ -5290,12 +5704,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", } } } @@ -5376,16 +5786,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 } @@ -5414,16 +5820,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 } @@ -5442,12 +5844,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", } } } @@ -5481,15 +5879,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", } } } @@ -5585,9 +5977,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -5603,9 +5993,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 } @@ -5637,9 +6025,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 } @@ -5657,9 +6043,7 @@ impl CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -5694,12 +6078,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", } } } @@ -5734,12 +6114,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", } } } @@ -5811,9 +6187,7 @@ impl CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -5848,12 +6222,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", } } } @@ -5949,9 +6319,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -5985,9 +6353,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -6025,9 +6391,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -6061,9 +6425,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -6079,9 +6441,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 } @@ -6108,9 +6468,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", @@ -6141,214 +6499,553 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardNetwor } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { - Any, - Automatic, +pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + IfAvailable, + Never, } -impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { +impl CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available", + CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn default() -> Self { - Self::Any + Self::IfAvailable } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `setup_future_usage` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { - None, - OffSession, - OnSession, +pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + IfAvailable, + Never, } -impl CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { +impl CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", + CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available", + CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { - Self::None + Self::IfAvailable } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `capture_method` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { - Manual, +pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + IfAvailable, + Never, } -impl CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { +impl CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod::Manual => "manual", + CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", + CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { fn default() -> Self { - Self::Manual + Self::IfAvailable } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `setup_future_usage` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { - None, - OffSession, - OnSession, +pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + IfAvailable, + Never, } -impl CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { +impl CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", + CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } } -impl AsRef for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn default() -> Self { - Self::None + Self::IfAvailable } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `requested_address_types` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { - Aba, - Iban, - Sepa, - SortCode, - Spei, - Swift, - Zengin, +pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { + Any, + Automatic, } -impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { +impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => "sort_code", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift", - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => "zengin", + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { fn default() -> Self { - Self::Aba + Self::Any } } -/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `type` field. +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCard`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { - EuBankTransfer, - GbBankTransfer, - JpBankTransfer, - MxBankTransfer, - UsBankTransfer, +pub enum CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { + None, + OffSession, + OnSession, } -impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { +impl CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none", + CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + #[serde(rename = "A")] + A, + #[serde(rename = "C")] + C, + #[serde(rename = "I")] + I, + #[serde(rename = "N")] + N, + #[serde(rename = "R")] + R, + #[serde(rename = "U")] + U, + #[serde(rename = "Y")] + Y, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn default() -> Self { + Self::A + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `exemption_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + LowRisk, + None, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn default() -> Self { + Self::LowRisk + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + #[serde(rename = "0")] + V0, + #[serde(rename = "1")] + V1, + #[serde(rename = "2")] + V2, + #[serde(rename = "3")] + V3, + #[serde(rename = "4")] + V4, + #[serde(rename = "A")] + A, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn default() -> Self { + Self::V0 + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { + Manual, +} + +impl CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCashapp`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { + None, + OffSession, + OnSession, +} + +impl CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none", + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `requested_address_types` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { + Aba, + Iban, + Sepa, + SortCode, + Spei, + Swift, + Zengin, +} + +impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Aba => "aba", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Iban => "iban", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Sepa => "sepa", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::SortCode => "sort_code", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Spei => "spei", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Swift => "swift", + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes::Zengin => "zengin", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { + fn default() -> Self { + Self::Aba + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { + EuBankTransfer, + GbBankTransfer, + JpBankTransfer, + MxBankTransfer, + UsBankTransfer, +} + +impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType::EuBankTransfer => "eu_bank_transfer", @@ -6371,9 +7068,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 } @@ -6389,9 +7084,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -6439,9 +7132,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 } @@ -6587,9 +7278,7 @@ impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -6913,9 +7602,7 @@ impl CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -7170,9 +7857,7 @@ impl CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -7258,6 +7943,40 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsPromptpayS } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsRevolutPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + None, + OffSession, +} + +impl CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", + CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -7271,12 +7990,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", } } } @@ -7354,9 +8069,7 @@ impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -7399,24 +8112,18 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPer } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -7437,24 +8144,18 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPre } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -7488,9 +8189,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 } @@ -7519,16 +8218,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 } @@ -7547,12 +8242,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", } } } @@ -7568,9 +8259,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 } @@ -7606,9 +8295,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 } @@ -7718,20 +8405,26 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsZipSetupFu #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum FundingInstructionsBankTransferFinancialAddressSupportedNetworks { + Ach, Bacs, + DomesticWireUs, Fps, Sepa, Spei, + Swift, Zengin, } impl FundingInstructionsBankTransferFinancialAddressSupportedNetworks { pub fn as_str(self) -> &'static str { match self { + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Ach => "ach", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Bacs => "bacs", + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => "domestic_wire_us", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Fps => "fps", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Sepa => "sepa", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Spei => "spei", + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Swift => "swift", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Zengin => "zengin", } } @@ -7750,7 +8443,7 @@ impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressSuppor } impl std::default::Default for FundingInstructionsBankTransferFinancialAddressSupportedNetworks { fn default() -> Self { - Self::Bacs + Self::Ach } } @@ -7758,18 +8451,22 @@ impl std::default::Default for FundingInstructionsBankTransferFinancialAddressSu #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum FundingInstructionsBankTransferFinancialAddressType { + Aba, Iban, SortCode, Spei, + Swift, Zengin, } impl FundingInstructionsBankTransferFinancialAddressType { pub fn as_str(self) -> &'static str { match self { + FundingInstructionsBankTransferFinancialAddressType::Aba => "aba", FundingInstructionsBankTransferFinancialAddressType::Iban => "iban", FundingInstructionsBankTransferFinancialAddressType::SortCode => "sort_code", FundingInstructionsBankTransferFinancialAddressType::Spei => "spei", + FundingInstructionsBankTransferFinancialAddressType::Swift => "swift", FundingInstructionsBankTransferFinancialAddressType::Zengin => "zengin", } } @@ -7788,7 +8485,7 @@ impl std::fmt::Display for FundingInstructionsBankTransferFinancialAddressType { } impl std::default::Default for FundingInstructionsBankTransferFinancialAddressType { fn default() -> Self { - Self::Iban + Self::Aba } } @@ -7954,21 +8651,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", } } } @@ -8002,9 +8689,7 @@ impl PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -8076,9 +8761,7 @@ impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -8113,9 +8796,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", } } @@ -8187,38 +8868,174 @@ pub enum PaymentIntentPaymentMethodOptionsCardNetwork { Visa, } -impl PaymentIntentPaymentMethodOptionsCardNetwork { +impl PaymentIntentPaymentMethodOptionsCardNetwork { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex", + PaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", + PaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners", + PaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover", + PaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", + PaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac", + PaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", + PaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", + PaymentIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", + PaymentIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown", + PaymentIntentPaymentMethodOptionsCardNetwork::Visa => "visa", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsCardNetwork { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardNetwork { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardNetwork { + fn default() -> Self { + Self::Amex + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + IfAvailable, + Never, +} + +impl PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available", + PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + IfAvailable, + Never, +} + +impl PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available", + PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsCardRequestMulticapture { + IfAvailable, + Never, +} + +impl PaymentIntentPaymentMethodOptionsCardRequestMulticapture { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", + PaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsCardRequestOvercapture { + IfAvailable, + Never, +} + +impl PaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsCardNetwork::Amex => "amex", - PaymentIntentPaymentMethodOptionsCardNetwork::CartesBancaires => "cartes_bancaires", - PaymentIntentPaymentMethodOptionsCardNetwork::Diners => "diners", - PaymentIntentPaymentMethodOptionsCardNetwork::Discover => "discover", - PaymentIntentPaymentMethodOptionsCardNetwork::EftposAu => "eftpos_au", - PaymentIntentPaymentMethodOptionsCardNetwork::Interac => "interac", - PaymentIntentPaymentMethodOptionsCardNetwork::Jcb => "jcb", - PaymentIntentPaymentMethodOptionsCardNetwork::Mastercard => "mastercard", - PaymentIntentPaymentMethodOptionsCardNetwork::Unionpay => "unionpay", - PaymentIntentPaymentMethodOptionsCardNetwork::Unknown => "unknown", - PaymentIntentPaymentMethodOptionsCardNetwork::Visa => "visa", + PaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", + PaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } } -impl AsRef for PaymentIntentPaymentMethodOptionsCardNetwork { +impl AsRef for PaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardNetwork { +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentIntentPaymentMethodOptionsCardNetwork { +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestOvercapture { fn default() -> Self { - Self::Amex + Self::IfAvailable } } @@ -8228,6 +9045,7 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsCardNetwork { pub enum PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, ChallengeOnly, } @@ -8236,9 +9054,8 @@ impl PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", - PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => { - "challenge_only" - } + PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", + PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => "challenge_only", } } } @@ -8406,15 +9223,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", } } } @@ -8430,9 +9241,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 } @@ -8449,12 +9258,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", } } } @@ -8470,9 +9275,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 } @@ -8525,12 +9328,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", } } } @@ -8546,9 +9345,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 } @@ -8567,12 +9364,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", } } } @@ -8606,13 +9399,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", } } } @@ -9277,14 +10066,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", } } } @@ -9300,9 +10085,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 } @@ -9322,21 +10105,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", } } } @@ -10089,57 +10862,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", @@ -10379,9 +11124,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", @@ -10391,12 +11134,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,6 +11236,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -10532,6 +11272,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::Paypal => "paypal", UpdatePaymentIntentPaymentMethodDataType::Pix => "pix", UpdatePaymentIntentPaymentMethodDataType::Promptpay => "promptpay", + UpdatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay", UpdatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdatePaymentIntentPaymentMethodDataType::Sofort => "sofort", UpdatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", @@ -10569,12 +11310,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", } } } @@ -10655,16 +11392,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 } @@ -10693,16 +11426,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 } @@ -10721,12 +11450,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", } } } @@ -10760,15 +11485,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", } } } @@ -10864,9 +11583,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -10882,9 +11599,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 } @@ -10916,9 +11631,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 } @@ -10936,9 +11649,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -10973,12 +11684,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", } } } @@ -11013,12 +11720,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", } } } @@ -11090,9 +11793,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -11127,12 +11828,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", } } } @@ -11228,9 +11925,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -11264,9 +11959,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -11304,9 +11997,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -11340,9 +12031,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -11358,9 +12047,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 } @@ -11387,9 +12074,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", @@ -11420,6 +12105,142 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardNetwor } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_extended_authorization` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + IfAvailable, + Never, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available", + UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_incremental_authorization` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + IfAvailable, + Never, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available", + UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_multicapture` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + IfAvailable, + Never, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", + UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { + fn default() -> Self { + Self::IfAvailable + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_overcapture` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + IfAvailable, + Never, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", + UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { + fn default() -> Self { + Self::IfAvailable + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCard`'s `request_three_d_secure` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -11432,9 +12253,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", } } } @@ -11469,9 +12288,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", } } @@ -11494,6 +12311,223 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardSetupF } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + #[serde(rename = "A")] + A, + #[serde(rename = "C")] + C, + #[serde(rename = "I")] + I, + #[serde(rename = "N")] + N, + #[serde(rename = "R")] + R, + #[serde(rename = "U")] + U, + #[serde(rename = "Y")] + Y, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn default() -> Self { + Self::A + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `exemption_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + LowRisk, + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { + fn default() -> Self { + Self::LowRisk + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + #[serde(rename = "0")] + V0, + #[serde(rename = "1")] + V1, + #[serde(rename = "2")] + V2, + #[serde(rename = "3")] + V3, + #[serde(rename = "4")] + V4, + #[serde(rename = "A")] + A, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn default() -> Self { + Self::V0 + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCashapp`'s `capture_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -11539,12 +12573,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", } } } @@ -11593,24 +12623,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 } @@ -11650,9 +12674,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 } @@ -11668,9 +12690,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -11718,9 +12738,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 } @@ -11866,9 +12884,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -12192,9 +13208,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -12449,9 +13463,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -12537,6 +13549,40 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsPromptpayS } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsRevolutPay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + None, + OffSession, +} + +impl UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", + UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -12550,12 +13596,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", } } } @@ -12633,9 +13675,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -12678,24 +13718,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPer } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -12716,24 +13750,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPre } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -12767,9 +13795,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 } @@ -12798,16 +13824,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 } @@ -12826,12 +13848,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", } } } @@ -12847,9 +13865,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 } @@ -12885,9 +13901,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_amount_capturable_updated.rs b/src/resources/generated/payment_intent_amount_capturable_updated.rs new file mode 100644 index 000000000..f4d81f9ac --- /dev/null +++ b/src/resources/generated/payment_intent_amount_capturable_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.amount_capturable_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentAmountCapturableUpdated { +} diff --git a/src/resources/generated/payment_intent_canceled.rs b/src/resources/generated/payment_intent_canceled.rs new file mode 100644 index 000000000..f4acf4923 --- /dev/null +++ b/src/resources/generated/payment_intent_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentCanceled { +} diff --git a/src/resources/generated/payment_intent_created.rs b/src/resources/generated/payment_intent_created.rs new file mode 100644 index 000000000..32f494a5d --- /dev/null +++ b/src/resources/generated/payment_intent_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentCreated { +} 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_intent_partially_funded.rs b/src/resources/generated/payment_intent_partially_funded.rs new file mode 100644 index 000000000..562650b2b --- /dev/null +++ b/src/resources/generated/payment_intent_partially_funded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.partially_funded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPartiallyFunded { +} diff --git a/src/resources/generated/payment_intent_payment_failed.rs b/src/resources/generated/payment_intent_payment_failed.rs new file mode 100644 index 000000000..30cc56529 --- /dev/null +++ b/src/resources/generated/payment_intent_payment_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.payment_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentFailed { +} diff --git a/src/resources/generated/payment_intent_processing.rs b/src/resources/generated/payment_intent_processing.rs new file mode 100644 index 000000000..b0f402fd3 --- /dev/null +++ b/src/resources/generated/payment_intent_processing.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.processing". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentProcessing { +} diff --git a/src/resources/generated/payment_intent_requires_action.rs b/src/resources/generated/payment_intent_requires_action.rs new file mode 100644 index 000000000..9c5cc9684 --- /dev/null +++ b/src/resources/generated/payment_intent_requires_action.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.requires_action". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentRequiresAction { +} diff --git a/src/resources/generated/payment_intent_succeeded.rs b/src/resources/generated/payment_intent_succeeded.rs new file mode 100644 index 000000000..53b389ee4 --- /dev/null +++ b/src/resources/generated/payment_intent_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_intent.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentSucceeded { +} diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index d477cefdc..1070e494b 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PaymentLinkId; +use crate::ids::{PaymentLinkId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable}; -use crate::resources::{ - Account, Application, CheckoutSessionItem, Currency, InvoiceSettingRenderingOptions, - ShippingRate, TaxId, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, Currency, InvoiceSettingRenderingOptions, ShippingRate, TaxId}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentLink". /// @@ -119,10 +115,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 { @@ -135,11 +133,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) } } @@ -156,6 +150,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, @@ -169,24 +164,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, @@ -198,7 +197,8 @@ pub struct PaymentLinksResourceConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFields { - /// Configuration for `type=dropdown` fields. + + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, /// String of your choice that your integration can use to reconcile this field. @@ -208,7 +208,7 @@ pub struct PaymentLinksResourceCustomFields { pub label: PaymentLinksResourceCustomFieldsLabel, - /// Configuration for `type=numeric` fields. + #[serde(skip_serializing_if = "Option::is_none")] pub numeric: Option, /// Whether the customer is required to complete the field before completing the Checkout Session. @@ -216,7 +216,7 @@ pub struct PaymentLinksResourceCustomFields { /// Defaults to `false`. pub optional: bool, - /// Configuration for `type=text` fields. + #[serde(skip_serializing_if = "Option::is_none")] pub text: Option, /// The type of the field. @@ -226,6 +226,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. @@ -234,6 +235,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. @@ -247,6 +249,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. @@ -259,6 +262,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, @@ -268,6 +272,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, @@ -277,6 +282,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, @@ -289,12 +295,14 @@ pub struct PaymentLinksResourceCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomTextPosition { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceInvoiceCreation { + /// Enable creating an invoice on successful payment. pub enabled: bool, @@ -306,6 +314,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>>, @@ -331,6 +340,7 @@ pub struct PaymentLinksResourceInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -340,21 +350,43 @@ 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, + /// An arbitrary string attached to the object. + /// + /// Often useful for displaying to users. + pub description: Option, + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + pub metadata: Metadata, + /// Indicates that you intend to make future payments with the payment method collected during checkout. pub setup_future_usage: Option, + + /// Extra information about the payment. + /// + /// This will appear on your customer's statement when this payment succeeds in creating a charge. + pub statement_descriptor: Option, + + /// Provides information about the charge that customers see on their statements. + /// + /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. + /// Maximum 22 characters for the concatenated descriptor. + pub statement_descriptor_suffix: Option, } #[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`. @@ -363,6 +395,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, @@ -372,23 +405,29 @@ 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. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. + pub metadata: Metadata, + /// Integer representing the number of trial period days before the customer is charged for the first time. pub trial_period_days: Option, } #[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. @@ -401,6 +440,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, @@ -568,6 +608,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, @@ -611,12 +652,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. @@ -677,6 +718,10 @@ pub struct UpdatePaymentLink<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_intent_data: Option, + /// Specify whether Checkout should collect a payment method. /// /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). @@ -692,6 +737,12 @@ pub struct UpdatePaymentLink<'a> { /// Configuration for collecting the customer's shipping address. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address_collection: Option, + + /// When creating a subscription, the specified configuration data will be used. + /// + /// There must be at least one line item with a recurring price to use `subscription_data`. + #[serde(skip_serializing_if = "Option::is_none")] + pub subscription_data: Option, } impl<'a> UpdatePaymentLink<'a> { @@ -709,15 +760,18 @@ impl<'a> UpdatePaymentLink<'a> { invoice_creation: Default::default(), line_items: Default::default(), metadata: Default::default(), + payment_intent_data: Default::default(), payment_method_collection: Default::default(), payment_method_types: Default::default(), shipping_address_collection: Default::default(), + subscription_data: Default::default(), } } } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletion { + /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] pub hosted_confirmation: Option, @@ -735,12 +789,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. @@ -756,6 +812,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, @@ -789,6 +846,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, @@ -804,6 +862,7 @@ pub struct CreatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -814,6 +873,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, @@ -827,10 +887,24 @@ 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, + /// An arbitrary string attached to the object. + /// + /// Often useful for displaying to users. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + /// + /// Unlike object-level metadata, this field is declarative. + /// Updates will clear prior values. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, + /// Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. /// /// When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. @@ -844,16 +918,31 @@ pub struct CreatePaymentLinkPaymentIntentData { /// To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. #[serde(skip_serializing_if = "Option::is_none")] pub setup_future_usage: Option, + + /// Extra information about the payment. + /// + /// This will appear on your customer's statement when this payment succeeds in creating a charge. + #[serde(skip_serializing_if = "Option::is_none")] + pub statement_descriptor: Option, + + /// Provides information about the charge that customers see on their statements. + /// + /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. + /// Maximum 22 characters for the concatenated descriptor. + #[serde(skip_serializing_if = "Option::is_none")] + pub statement_descriptor_suffix: Option, } #[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. /// @@ -863,6 +952,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, @@ -870,12 +960,20 @@ 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. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. + /// + /// Unlike object-level metadata, this field is declarative. + /// Updates will clear prior values. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, + /// Integer representing the number of trial period days before the customer is charged for the first time. /// /// Has to be at least 1. @@ -885,12 +983,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, @@ -905,6 +1005,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, @@ -922,12 +1023,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, @@ -961,6 +1064,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, @@ -976,6 +1080,7 @@ pub struct UpdatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -986,6 +1091,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, @@ -998,8 +1104,39 @@ pub struct UpdatePaymentLinkLineItems { pub quantity: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentLinkPaymentIntentData { + + /// An arbitrary string attached to the object. + /// + /// Often useful for displaying to users. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + /// + /// Unlike object-level metadata, this field is declarative. + /// Updates will clear prior values. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, + + /// Extra information about the payment. + /// + /// This will appear on your customer's statement when this payment succeeds in creating a charge. + #[serde(skip_serializing_if = "Option::is_none")] + pub statement_descriptor: Option, + + /// Provides information about the charge that customers see on their statements. + /// + /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. + /// Maximum 22 characters for the concatenated descriptor. + #[serde(skip_serializing_if = "Option::is_none")] + pub statement_descriptor_suffix: Option, +} + #[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. /// @@ -1007,8 +1144,20 @@ pub struct UpdatePaymentLinkShippingAddressCollection { pub allowed_countries: Vec, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentLinkSubscriptionData { + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. + /// + /// Unlike object-level metadata, this field is declarative. + /// Updates will clear prior values. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, +} + #[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, @@ -1016,6 +1165,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. @@ -1024,6 +1174,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. @@ -1032,6 +1183,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. @@ -1044,6 +1196,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, @@ -1055,6 +1208,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, @@ -1066,24 +1220,28 @@ pub struct CreatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1117,6 +1275,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, @@ -1137,6 +1296,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, @@ -1144,6 +1304,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. @@ -1152,6 +1313,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. @@ -1160,6 +1322,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. @@ -1172,6 +1335,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, @@ -1183,6 +1347,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, @@ -1194,24 +1359,28 @@ pub struct UpdatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1245,6 +1414,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, @@ -1265,6 +1435,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. @@ -1278,6 +1449,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. @@ -1291,18 +1463,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. @@ -1316,6 +1489,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. @@ -1329,14 +1503,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. @@ -1532,16 +1706,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 } @@ -3776,16 +3946,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_link_created.rs b/src/resources/generated/payment_link_created.rs new file mode 100644 index 000000000..841590083 --- /dev/null +++ b/src/resources/generated/payment_link_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_link.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentLinkCreated { +} diff --git a/src/resources/generated/payment_link_updated.rs b/src/resources/generated/payment_link_updated.rs new file mode 100644 index 000000000..4e78d6bb3 --- /dev/null +++ b/src/resources/generated/payment_link_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_link.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentLinkUpdated { +} diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 8311a0628..f6322deee 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". /// @@ -127,6 +123,9 @@ pub struct PaymentMethod { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -151,12 +150,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 +169,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 +192,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 +217,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 +241,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 +257,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`. @@ -335,6 +338,7 @@ pub struct CardDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Networks { + /// All available networks for the card. pub available: Vec, @@ -344,6 +348,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 +361,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`. @@ -420,6 +426,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 +460,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 +504,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 +537,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 +546,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 +560,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 +573,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`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -573,6 +594,7 @@ pub struct PaymentMethodIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -642,12 +664,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,10 +683,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKonbini {} +pub struct PaymentMethodKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodLink { + /// Account owner's email address. pub email: Option, @@ -672,41 +698,50 @@ 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. /// They cannot be set or mutated. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_email: Option, /// PayPal account PayerID. /// /// This identifier uniquely identifies the PayPal customer. - #[serde(skip_serializing_if = "Option::is_none")] pub payer_id: Option, } #[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 PaymentMethodRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodSepaDebit { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -730,12 +765,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, @@ -748,7 +785,6 @@ pub struct PaymentMethodUsBankAccount { pub bank_name: Option, /// The ID of the Financial Connections Account used to create the payment method. - #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections_account: Option, /// Uniquely identifies this particular bank account. @@ -766,18 +802,19 @@ pub struct PaymentMethodUsBankAccount { pub routing_number: Option, /// Contains information about the future reusability of this PaymentMethod. - #[serde(skip_serializing_if = "Option::is_none")] pub status_details: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodUsBankAccountStatusDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub blocked: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodUsBankAccountBlocked { + /// The ACH network code that resulted in this block. pub network_code: Option, @@ -786,13 +823,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>, @@ -802,12 +842,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, @@ -818,6 +860,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, @@ -960,6 +1003,10 @@ pub struct CreatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -1025,6 +1072,7 @@ impl<'a> CreatePaymentMethod<'a> { pix: Default::default(), promptpay: Default::default(), radar_options: Default::default(), + revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), type_: Default::default(), @@ -1038,6 +1086,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, @@ -1090,12 +1139,12 @@ 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> { + /// 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, @@ -1140,6 +1189,7 @@ impl<'a> UpdatePaymentMethod<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1151,16 +1201,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, @@ -1170,6 +1224,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, @@ -1182,25 +1237,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, @@ -1208,6 +1269,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, @@ -1217,77 +1279,98 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentMethodSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1312,16 +1395,20 @@ pub struct CreatePaymentMethodUsBankAccount { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodWechatPay {} +pub struct CreatePaymentMethodWechatPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodZip {} +pub struct CreatePaymentMethodZip { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodLink {} +pub struct UpdatePaymentMethodLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodUsBankAccount { + /// Bank account type. #[serde(skip_serializing_if = "Option::is_none")] pub account_holder_type: Option, @@ -1329,6 +1416,7 @@ pub struct UpdatePaymentMethodUsBankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1420,9 +1508,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", @@ -1432,25 +1518,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", @@ -1882,9 +1958,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", @@ -1894,25 +1968,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", @@ -2201,12 +2265,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", } } @@ -2341,6 +2401,7 @@ pub enum PaymentMethodType { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -2379,6 +2440,7 @@ impl PaymentMethodType { PaymentMethodType::Paypal => "paypal", PaymentMethodType::Pix => "pix", PaymentMethodType::Promptpay => "promptpay", + PaymentMethodType::RevolutPay => "revolut_pay", PaymentMethodType::SepaDebit => "sepa_debit", PaymentMethodType::Sofort => "sofort", PaymentMethodType::UsBankAccount => "us_bank_account", @@ -2435,6 +2497,7 @@ pub enum PaymentMethodTypeFilter { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -2471,6 +2534,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Paypal => "paypal", PaymentMethodTypeFilter::Pix => "pix", PaymentMethodTypeFilter::Promptpay => "promptpay", + PaymentMethodTypeFilter::RevolutPay => "revolut_pay", PaymentMethodTypeFilter::SepaDebit => "sepa_debit", PaymentMethodTypeFilter::Sofort => "sofort", PaymentMethodTypeFilter::UsBankAccount => "us_bank_account", @@ -2648,12 +2712,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", } @@ -2797,8 +2857,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_attached.rs b/src/resources/generated/payment_method_attached.rs new file mode 100644 index 000000000..c26a39ffd --- /dev/null +++ b/src/resources/generated/payment_method_attached.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method.attached". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAttached { +} diff --git a/src/resources/generated/payment_method_automatically_updated.rs b/src/resources/generated/payment_method_automatically_updated.rs new file mode 100644 index 000000000..0b015404c --- /dev/null +++ b/src/resources/generated/payment_method_automatically_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method.automatically_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAutomaticallyUpdated { +} 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_config_biz_payment_method_configuration_details.rs b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs index 0a18c7e4e..e6a7c52e1 100644 --- a/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs +++ b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodConfigBizPaymentMethodConfigurationDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfigBizPaymentMethodConfigurationDetails { + /// ID of the parent payment method configuration used. pub parent: Option, } diff --git a/src/resources/generated/payment_method_configuration.rs b/src/resources/generated/payment_method_configuration.rs index a0a1859dc..9c6a460a3 100644 --- a/src/resources/generated/payment_method_configuration.rs +++ b/src/resources/generated/payment_method_configuration.rs @@ -8,6 +8,8 @@ use crate::params::{Expand, List, Object, Paginable}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodConfigResourcePaymentMethodConfiguration". +/// +/// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfiguration { /// Unique identifier for the object. @@ -31,7 +33,7 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub apple_pay: Option, - /// The Connect application associated with this configuration. + /// For child configs, the Connect application associated with the configuration. pub application: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -79,7 +81,7 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub ideal: Option, - /// The default configuration is used whenever no payment method configuration is specified. + /// The default configuration is used whenever a payment method configuration is not specified. pub is_default: bool, #[serde(skip_serializing_if = "Option::is_none")] @@ -100,7 +102,7 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub multibanco: Option, - /// Configuration name. + /// The configuration's name. pub name: String, #[serde(skip_serializing_if = "Option::is_none")] @@ -112,7 +114,7 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub p24: Option, - /// The configuration's parent configuration. + /// For child configs, the configuration's parent configuration. pub parent: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -191,9 +193,9 @@ pub struct PaymentMethodConfigResourcePaymentMethodProperties { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfigResourceDisplayPreference { - /// For child configurations, whether or not the account's preference will be observed. + /// For child configs, whether or not the account's preference will be observed. /// - /// If `false`, the parent configuration's preference is used. + /// If `false`, the parent configuration's default is used. pub overridable: Option, /// The account's display preference. @@ -343,7 +345,7 @@ pub struct CreatePaymentMethodConfiguration<'a> { /// JCB is a credit card company based in Japan. /// - /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in the US, Canada, Australia, New Zealand, UK, and Ireland. + /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. /// Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. #[serde(skip_serializing_if = "Option::is_none")] pub jcb: Option, @@ -650,7 +652,7 @@ pub struct UpdatePaymentMethodConfiguration<'a> { /// JCB is a credit card company based in Japan. /// - /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in the US, Canada, Australia, New Zealand, UK, and Ireland. + /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. /// Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. #[serde(skip_serializing_if = "Option::is_none")] pub jcb: Option, diff --git a/src/resources/generated/payment_method_detached.rs b/src/resources/generated/payment_method_detached.rs new file mode 100644 index 000000000..fbc66662c --- /dev/null +++ b/src/resources/generated/payment_method_detached.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method.detached". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetached { +} diff --git a/src/resources/generated/payment_method_details_card_checks.rs b/src/resources/generated/payment_method_details_card_checks.rs deleted file mode 100644 index d01d16696..000000000 --- a/src/resources/generated/payment_method_details_card_checks.rs +++ /dev/null @@ -1,18 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -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, - - /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub address_postal_code_check: Option, - - /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub cvc_check: Option, -} 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/payment_method_updated.rs b/src/resources/generated/payment_method_updated.rs new file mode 100644 index 000000000..392a759aa --- /dev/null +++ b/src/resources/generated/payment_method_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUpdated { +} diff --git a/src/resources/generated/payout.rs b/src/resources/generated/payout.rs index edb2aa978..4c85db322 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". /// @@ -17,15 +16,15 @@ pub struct Payout { /// Unique identifier for the object. pub id: PayoutId, - /// Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. + /// The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. pub amount: i64, - /// Date the payout is expected to arrive in the bank. + /// Date that you can expect the payout to arrive in the bank. /// - /// This factors in delays like weekends or bank holidays. + /// This factors in delays to account for weekends or bank holidays. pub arrival_date: Timestamp, - /// Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). + /// Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). pub automatic: bool, /// ID of the balance transaction that describes the impact of this payout on your account balance. @@ -46,18 +45,18 @@ pub struct Payout { /// Often useful for displaying to users. pub description: Option, - /// ID of the bank account or card the payout was sent to. + /// ID of the bank account or card the payout is sent to. pub destination: Option>, - /// If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. + /// If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. pub failure_balance_transaction: Option>, - /// Error code explaining reason for payout failure if available. + /// Error code that provides a reason for a payout failure, if available. /// - /// See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. + /// View our [list of failure codes](https://stripe.com/docs/api#payout_failures). pub failure_code: Option, - /// Message to user further explaining reason for payout failure if available. + /// Message that provides the reason for a payout failure, if available. pub failure_message: Option, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -71,31 +70,29 @@ pub struct Payout { /// The method used to send this payout, which can be `standard` or `instant`. /// /// `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.). + /// Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). pub method: String, /// If the payout reverses another, this is the ID of the original payout. pub original_payout: Option>, - /// If `completed`, the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) may be used to list all Balance Transactions that were paid out in this payout. + /// If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. pub reconciliation_status: PayoutReconciliationStatus, - /// If the payout was reversed, this is the ID of the payout that reverses this payout. + /// If the payout reverses, this is the ID of the payout that reverses this payout. pub reversed_by: Option>, - /// The source balance this payout came from. - /// - /// One of `card`, `fpx`, or `bank_account`. + /// The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. pub source_type: String, - /// Extra information about a payout to be displayed on the user's bank statement. + /// Extra information about a payout that displays on the user's bank statement. pub statement_descriptor: Option, /// Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. /// - /// A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. - /// The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). - /// Some failed payouts may initially show as `paid` but then change to `failed`. + /// A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. + /// The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). + /// Some payouts that fail might initially show as `paid`, then change to `failed`. pub status: String, /// Can be `bank_account` or `card`. @@ -104,16 +101,19 @@ pub struct Payout { } impl Payout { - /// Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. + + /// Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to 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) - } + /// The payouts return in sorted order, with the most recently created payouts appearing first. +pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { + client.get_query("/payouts", ¶ms) +} - /// To send funds to your own bank account, you create a new payout object. + + /// To send funds to your own bank account, create a new payout object. /// - /// Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error. If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode. If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. + /// Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. + /// If it doesn’t, you receive an “Insufficient Funds” error. If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. /// The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. pub fn create(client: &Client, params: CreatePayout<'_>) -> Response { client.post_form("/payouts", ¶ms) @@ -121,15 +121,16 @@ impl Payout { /// Retrieves the details of an existing payout. /// - /// Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information. + /// Supply the unique payout ID from either a payout creation request or the payout list. + /// Stripe returns the corresponding payout information. pub fn retrieve(client: &Client, id: &PayoutId, expand: &[&str]) -> Response { client.get_query(&format!("/payouts/{}", id), &Expand { expand }) } - /// Updates the specified payout by setting the values of the parameters passed. + /// Updates the specified payout by setting the values of the parameters you pass. /// - /// Any parameters not provided will be left unchanged. - /// This request accepts only the metadata as arguments. + /// We don’t change parameters that you don’t provide. + /// This request only accepts the metadata as arguments. pub fn update(client: &Client, id: &PayoutId, params: UpdatePayout<'_>) -> Response { client.post_form(&format!("/payouts/{}", id), ¶ms) } @@ -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, @@ -164,7 +166,7 @@ pub struct CreatePayout<'a> { /// The ID of a bank account or a card to send the payout to. /// - /// If no destination is supplied, the default external account for the specified currency will be used. + /// If you don't provide a destination, we use the default external account for the specified currency. #[serde(skip_serializing_if = "Option::is_none")] pub destination: Option, @@ -180,27 +182,26 @@ pub struct CreatePayout<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// The method used to send this payout, which can be `standard` or `instant`. + /// The method used to send this payout, which is `standard` or `instant`. /// - /// `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.). + /// We support `instant` for payouts to debit cards and bank accounts in certain countries. + /// Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). #[serde(skip_serializing_if = "Option::is_none")] pub method: Option, /// The balance type of your Stripe balance to draw this payout from. /// /// Balances for different payment sources are kept separately. - /// You can find the amounts with the balances API. + /// You can find the amounts with the Balances API. /// One of `bank_account`, `card`, or `fpx`. #[serde(skip_serializing_if = "Option::is_none")] pub source_type: Option, - /// A string to be displayed on the recipient's bank or card statement. + /// A string that displays on the recipient's bank or card statement (up to 22 characters). /// - /// This may be at most 22 characters. - /// Attempting to use a `statement_descriptor` longer than 22 characters will return an error. - /// Note: Most banks will truncate this information and/or display it inconsistently. - /// Some may not display it at all. + /// A `statement_descriptor` that's longer than 22 characters return an error. + /// Most banks truncate this information and display it inconsistently. + /// Some banks might not display it at all. #[serde(skip_serializing_if = "Option::is_none")] pub statement_descriptor: Option<&'a str>, } @@ -224,6 +225,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 +282,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 +303,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/payout_canceled.rs b/src/resources/generated/payout_canceled.rs new file mode 100644 index 000000000..5b2b5880b --- /dev/null +++ b/src/resources/generated/payout_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutCanceled { +} diff --git a/src/resources/generated/payout_created.rs b/src/resources/generated/payout_created.rs new file mode 100644 index 000000000..e7d949101 --- /dev/null +++ b/src/resources/generated/payout_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutCreated { +} diff --git a/src/resources/generated/payout_failed.rs b/src/resources/generated/payout_failed.rs new file mode 100644 index 000000000..6f87dfbba --- /dev/null +++ b/src/resources/generated/payout_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutFailed { +} diff --git a/src/resources/generated/payout_paid.rs b/src/resources/generated/payout_paid.rs new file mode 100644 index 000000000..f8184664b --- /dev/null +++ b/src/resources/generated/payout_paid.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.paid". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutPaid { +} diff --git a/src/resources/generated/payout_reconciliation_completed.rs b/src/resources/generated/payout_reconciliation_completed.rs new file mode 100644 index 000000000..9668c307d --- /dev/null +++ b/src/resources/generated/payout_reconciliation_completed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.reconciliation_completed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutReconciliationCompleted { +} diff --git a/src/resources/generated/payout_updated.rs b/src/resources/generated/payout_updated.rs new file mode 100644 index 000000000..0ff3db8ec --- /dev/null +++ b/src/resources/generated/payout_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payout.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PayoutUpdated { +} diff --git a/src/resources/generated/person.rs b/src/resources/generated/person.rs index 31b1d83f4..9b547dc95 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". /// @@ -20,6 +19,9 @@ pub struct Person { #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub additional_tos_acceptances: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -149,6 +151,7 @@ impl Object for Person { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LegalEntityDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -161,6 +164,7 @@ pub struct LegalEntityDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerification { + /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] pub additional_document: Option, @@ -188,6 +192,7 @@ pub struct PersonVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerificationDocument { + /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. pub back: Option>, @@ -205,8 +210,28 @@ pub struct PersonVerificationDocument { pub front: Option>, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonAdditionalTosAcceptances { + + pub account: PersonAdditionalTosAcceptance, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonAdditionalTosAcceptance { + + /// The Unix timestamp marking when the legal guardian accepted the service agreement. + pub date: Option, + + /// The IP address from which the legal guardian accepted the service agreement. + pub ip: Option, + + /// The user agent of the browser from which the legal guardian accepted the service agreement. + pub user_agent: Option, +} + #[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>, @@ -238,6 +263,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, @@ -247,6 +273,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -259,6 +286,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. @@ -267,6 +295,9 @@ pub struct PersonRelationship { /// Whether the person has significant responsibility to control, manage, or direct the organization. pub executive: Option, + /// Whether the person is the legal guardian of the account's representative. + pub legal_guardian: Option, + /// Whether the person is an owner of the account’s legal entity. pub owner: Option, @@ -286,6 +317,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>, @@ -319,11 +351,45 @@ pub struct PersonRequirements { #[serde(rename_all = "snake_case")] pub enum AccountRequirementsErrorCode { InvalidAddressCityStatePostalCode, + InvalidAddressHighwayContractBox, + InvalidAddressPrivateMailbox, + InvalidBusinessProfileName, + InvalidBusinessProfileNameDenylisted, + InvalidCompanyNameDenylisted, + InvalidDobAgeOverMaximum, #[serde(rename = "invalid_dob_age_under_18")] InvalidDobAgeUnder18, + InvalidDobAgeUnderMinimum, + InvalidProductDescriptionLength, + InvalidProductDescriptionUrlMatch, InvalidRepresentativeCountry, + InvalidStatementDescriptorBusinessMismatch, + InvalidStatementDescriptorDenylisted, + InvalidStatementDescriptorLength, + InvalidStatementDescriptorPrefixDenylisted, + InvalidStatementDescriptorPrefixMismatch, InvalidStreetAddress, + InvalidTaxId, + InvalidTaxIdFormat, InvalidTosAcceptance, + InvalidUrlDenylisted, + InvalidUrlFormat, + InvalidUrlLength, + InvalidUrlWebPresenceDetected, + InvalidUrlWebsiteBusinessInformationMismatch, + InvalidUrlWebsiteEmpty, + InvalidUrlWebsiteInaccessible, + InvalidUrlWebsiteInaccessibleGeoblocked, + InvalidUrlWebsiteInaccessiblePasswordProtected, + InvalidUrlWebsiteIncomplete, + InvalidUrlWebsiteIncompleteCancellationPolicy, + InvalidUrlWebsiteIncompleteCustomerServiceDetails, + InvalidUrlWebsiteIncompleteLegalRestrictions, + InvalidUrlWebsiteIncompleteRefundPolicy, + InvalidUrlWebsiteIncompleteReturnPolicy, + InvalidUrlWebsiteIncompleteTermsAndConditions, + InvalidUrlWebsiteIncompleteUnderConstruction, + InvalidUrlWebsiteOther, InvalidValueOther, VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, @@ -378,10 +444,44 @@ impl AccountRequirementsErrorCode { pub fn as_str(self) -> &'static str { match self { AccountRequirementsErrorCode::InvalidAddressCityStatePostalCode => "invalid_address_city_state_postal_code", + AccountRequirementsErrorCode::InvalidAddressHighwayContractBox => "invalid_address_highway_contract_box", + AccountRequirementsErrorCode::InvalidAddressPrivateMailbox => "invalid_address_private_mailbox", + AccountRequirementsErrorCode::InvalidBusinessProfileName => "invalid_business_profile_name", + AccountRequirementsErrorCode::InvalidBusinessProfileNameDenylisted => "invalid_business_profile_name_denylisted", + AccountRequirementsErrorCode::InvalidCompanyNameDenylisted => "invalid_company_name_denylisted", + AccountRequirementsErrorCode::InvalidDobAgeOverMaximum => "invalid_dob_age_over_maximum", AccountRequirementsErrorCode::InvalidDobAgeUnder18 => "invalid_dob_age_under_18", + AccountRequirementsErrorCode::InvalidDobAgeUnderMinimum => "invalid_dob_age_under_minimum", + AccountRequirementsErrorCode::InvalidProductDescriptionLength => "invalid_product_description_length", + AccountRequirementsErrorCode::InvalidProductDescriptionUrlMatch => "invalid_product_description_url_match", AccountRequirementsErrorCode::InvalidRepresentativeCountry => "invalid_representative_country", + AccountRequirementsErrorCode::InvalidStatementDescriptorBusinessMismatch => "invalid_statement_descriptor_business_mismatch", + AccountRequirementsErrorCode::InvalidStatementDescriptorDenylisted => "invalid_statement_descriptor_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorLength => "invalid_statement_descriptor_length", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixDenylisted => "invalid_statement_descriptor_prefix_denylisted", + AccountRequirementsErrorCode::InvalidStatementDescriptorPrefixMismatch => "invalid_statement_descriptor_prefix_mismatch", AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", + AccountRequirementsErrorCode::InvalidTaxId => "invalid_tax_id", + AccountRequirementsErrorCode::InvalidTaxIdFormat => "invalid_tax_id_format", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", + AccountRequirementsErrorCode::InvalidUrlDenylisted => "invalid_url_denylisted", + AccountRequirementsErrorCode::InvalidUrlFormat => "invalid_url_format", + AccountRequirementsErrorCode::InvalidUrlLength => "invalid_url_length", + AccountRequirementsErrorCode::InvalidUrlWebPresenceDetected => "invalid_url_web_presence_detected", + AccountRequirementsErrorCode::InvalidUrlWebsiteBusinessInformationMismatch => "invalid_url_website_business_information_mismatch", + AccountRequirementsErrorCode::InvalidUrlWebsiteEmpty => "invalid_url_website_empty", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessible => "invalid_url_website_inaccessible", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessibleGeoblocked => "invalid_url_website_inaccessible_geoblocked", + AccountRequirementsErrorCode::InvalidUrlWebsiteInaccessiblePasswordProtected => "invalid_url_website_inaccessible_password_protected", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncomplete => "invalid_url_website_incomplete", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCancellationPolicy => "invalid_url_website_incomplete_cancellation_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteCustomerServiceDetails => "invalid_url_website_incomplete_customer_service_details", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteLegalRestrictions => "invalid_url_website_incomplete_legal_restrictions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteRefundPolicy => "invalid_url_website_incomplete_refund_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteReturnPolicy => "invalid_url_website_incomplete_return_policy", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteTermsAndConditions => "invalid_url_website_incomplete_terms_and_conditions", + AccountRequirementsErrorCode::InvalidUrlWebsiteIncompleteUnderConstruction => "invalid_url_website_incomplete_under_construction", + AccountRequirementsErrorCode::InvalidUrlWebsiteOther => "invalid_url_website_other", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", diff --git a/src/resources/generated/person_created.rs b/src/resources/generated/person_created.rs new file mode 100644 index 000000000..33282d27b --- /dev/null +++ b/src/resources/generated/person_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "person.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonCreated { +} diff --git a/src/resources/generated/person_deleted.rs b/src/resources/generated/person_deleted.rs new file mode 100644 index 000000000..ed6f8da36 --- /dev/null +++ b/src/resources/generated/person_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "person.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonDeleted { +} diff --git a/src/resources/generated/person_updated.rs b/src/resources/generated/person_updated.rs new file mode 100644 index 000000000..7ba255011 --- /dev/null +++ b/src/resources/generated/person_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "person.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonUpdated { +} 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 495df6630..634f0c16f 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/plan_created.rs b/src/resources/generated/plan_created.rs new file mode 100644 index 000000000..6c517b096 --- /dev/null +++ b/src/resources/generated/plan_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "plan.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PlanCreated { +} diff --git a/src/resources/generated/plan_deleted.rs b/src/resources/generated/plan_deleted.rs new file mode 100644 index 000000000..b1e888a1d --- /dev/null +++ b/src/resources/generated/plan_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "plan.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PlanDeleted { +} diff --git a/src/resources/generated/plan_updated.rs b/src/resources/generated/plan_updated.rs new file mode 100644 index 000000000..0a99e2b71 --- /dev/null +++ b/src/resources/generated/plan_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "plan.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PlanUpdated { +} 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 58214d451..11686a62c 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,14 @@ pub struct Price { } impl Price { - /// Returns a list of your prices. - pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { - client.get_query("/prices", ¶ms) - } + + /// Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). + /// + /// For the list of inactive prices, set `active` to false. +pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { + client.get_query("/prices", ¶ms) +} + /// Creates a new price for an existing product. /// @@ -170,6 +170,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 +201,7 @@ pub struct CurrencyOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PriceTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -218,6 +220,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 +251,7 @@ pub struct Recurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -258,6 +262,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 +399,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 +476,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`. @@ -540,6 +546,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, @@ -572,6 +579,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, @@ -592,6 +600,7 @@ pub struct CreatePriceCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceProductData { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -637,6 +646,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. @@ -672,6 +682,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, @@ -701,6 +712,7 @@ pub struct CreatePriceTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -710,6 +722,7 @@ pub struct CreatePriceTransformQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListPricesRecurring { + /// Filter by billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -725,6 +738,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, @@ -757,6 +771,7 @@ pub struct UpdatePriceCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCurrencyOptionsCustomUnitAmount { + /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -777,6 +792,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, @@ -806,6 +822,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, @@ -826,6 +843,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/price_created.rs b/src/resources/generated/price_created.rs new file mode 100644 index 000000000..9ddccd2d2 --- /dev/null +++ b/src/resources/generated/price_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "price.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PriceCreated { +} diff --git a/src/resources/generated/price_deleted.rs b/src/resources/generated/price_deleted.rs new file mode 100644 index 000000000..4eb76c1bf --- /dev/null +++ b/src/resources/generated/price_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "price.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PriceDeleted { +} diff --git a/src/resources/generated/price_updated.rs b/src/resources/generated/price_updated.rs new file mode 100644 index 000000000..71eb34643 --- /dev/null +++ b/src/resources/generated/price_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "price.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PriceUpdated { +} diff --git a/src/resources/generated/product.rs b/src/resources/generated/product.rs index c51e5bcf0..bd886fb44 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". /// @@ -111,12 +107,14 @@ pub struct Product { } impl Product { + /// Returns a list of your products. /// /// The products are returned sorted by creation date, with the most recently created products appearing first. - pub fn list(client: &Client, params: &ListProducts<'_>) -> Response> { - client.get_query("/products", ¶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 { @@ -158,6 +156,7 @@ impl Object for Product { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PackageDimensions { + /// Height, in inches. pub height: f64, @@ -173,15 +172,18 @@ pub struct PackageDimensions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ProductFeature { + /// The feature's name. /// /// Up to 80 characters long. - pub name: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, } /// The parameters for `Product::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateProduct<'a> { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -297,6 +299,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, @@ -368,12 +371,12 @@ impl<'a> ListProducts<'a> { impl Paginable for ListProducts<'_> { type O = Product; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Product::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateProduct<'a> { + /// Whether the product is available for purchase. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -470,6 +473,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). @@ -508,6 +512,7 @@ pub struct CreateProductDefaultPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductFeatures { + /// The feature's name. /// /// Up to 80 characters long. @@ -516,6 +521,7 @@ pub struct CreateProductFeatures { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateProductFeatures { + /// The feature's name. /// /// Up to 80 characters long. @@ -524,6 +530,7 @@ pub struct UpdateProductFeatures { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataCurrencyOptions { + /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] pub custom_unit_amount: Option, @@ -556,6 +563,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -571,6 +579,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, @@ -591,6 +600,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptionsCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataCurrencyOptionsTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, diff --git a/src/resources/generated/product_created.rs b/src/resources/generated/product_created.rs new file mode 100644 index 000000000..35f03bb5f --- /dev/null +++ b/src/resources/generated/product_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "product.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ProductCreated { +} diff --git a/src/resources/generated/product_deleted.rs b/src/resources/generated/product_deleted.rs new file mode 100644 index 000000000..d05ad9294 --- /dev/null +++ b/src/resources/generated/product_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "product.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ProductDeleted { +} diff --git a/src/resources/generated/product_updated.rs b/src/resources/generated/product_updated.rs new file mode 100644 index 000000000..af895c381 --- /dev/null +++ b/src/resources/generated/product_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "product.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ProductUpdated { +} diff --git a/src/resources/generated/promotion_code.rs b/src/resources/generated/promotion_code.rs index c6b3b5b5f..c5be23df1 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/promotion_code_created.rs b/src/resources/generated/promotion_code_created.rs new file mode 100644 index 000000000..3a9c60b6b --- /dev/null +++ b/src/resources/generated/promotion_code_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "promotion_code.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PromotionCodeCreated { +} diff --git a/src/resources/generated/promotion_code_updated.rs b/src/resources/generated/promotion_code_updated.rs new file mode 100644 index 000000000..b766f8f7e --- /dev/null +++ b/src/resources/generated/promotion_code_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "promotion_code.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PromotionCodeUpdated { +} diff --git a/src/resources/generated/quote.rs b/src/resources/generated/quote.rs index 071a6f02b..b73b25dbf 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,9 +247,10 @@ 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. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, /// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. @@ -254,12 +259,21 @@ pub struct QuotesResourceSubscriptionDataSubscriptionData { /// Measured in seconds since the Unix epoch. pub effective_date: Option, + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. + /// + /// If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. + /// If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. + /// Unlike object-level metadata, this field is declarative. + /// Updates will clear prior values. + pub metadata: Option, + /// Integer representing the number of trial period days before the customer is charged for the first time. pub trial_period_days: Option, } #[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 +291,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 +310,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 +366,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/quote_accepted.rs b/src/resources/generated/quote_accepted.rs new file mode 100644 index 000000000..6f2c80150 --- /dev/null +++ b/src/resources/generated/quote_accepted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "quote.accepted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct QuoteAccepted { +} diff --git a/src/resources/generated/quote_canceled.rs b/src/resources/generated/quote_canceled.rs new file mode 100644 index 000000000..d54dffaa0 --- /dev/null +++ b/src/resources/generated/quote_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "quote.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct QuoteCanceled { +} diff --git a/src/resources/generated/quote_created.rs b/src/resources/generated/quote_created.rs new file mode 100644 index 000000000..15bb1f97c --- /dev/null +++ b/src/resources/generated/quote_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "quote.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct QuoteCreated { +} diff --git a/src/resources/generated/quote_finalized.rs b/src/resources/generated/quote_finalized.rs new file mode 100644 index 000000000..609d20fda --- /dev/null +++ b/src/resources/generated/quote_finalized.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "quote.finalized". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct QuoteFinalized { +} 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_early_fraud_warning_created.rs b/src/resources/generated/radar_early_fraud_warning_created.rs new file mode 100644 index 000000000..1bc27ebba --- /dev/null +++ b/src/resources/generated/radar_early_fraud_warning_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "radar.early_fraud_warning.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RadarEarlyFraudWarningCreated { +} diff --git a/src/resources/generated/radar_early_fraud_warning_updated.rs b/src/resources/generated/radar_early_fraud_warning_updated.rs new file mode 100644 index 000000000..441053feb --- /dev/null +++ b/src/resources/generated/radar_early_fraud_warning_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "radar.early_fraud_warning.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RadarEarlyFraudWarningUpdated { +} 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 f58537cef..787b6a819 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". /// @@ -23,7 +22,7 @@ pub struct Refund { /// Balance transaction that describes the impact on your account balance. pub balance_transaction: Option>, - /// ID of the charge that was refunded. + /// ID of the charge that's refunded. pub charge: Option>, /// Time at which the object was created. @@ -38,22 +37,21 @@ pub struct Refund { /// An arbitrary string attached to the object. /// - /// Often useful for displaying to users. - /// (Available on non-card refunds only). + /// You can use this for displaying to users (available on non-card refunds only). #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - /// If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + /// After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. #[serde(skip_serializing_if = "Option::is_none")] pub failure_balance_transaction: Option>, - /// If the refund failed, the reason for refund failure if known. + /// Provides the reason for the refund failure. /// - /// Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request` or `unknown`. + /// Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. #[serde(skip_serializing_if = "Option::is_none")] pub failure_reason: Option, - /// For payment methods without native refund support (e.g., Konbini, PromptPay), email for the customer to receive refund instructions. + /// For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. #[serde(skip_serializing_if = "Option::is_none")] pub instructions_email: Option, @@ -65,44 +63,53 @@ pub struct Refund { #[serde(skip_serializing_if = "Option::is_none")] pub next_action: Option, - /// ID of the PaymentIntent that was refunded. + /// ID of the PaymentIntent that's refunded. pub payment_intent: Option>, - /// Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + /// Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). pub reason: Option, /// This is the transaction number that appears on email receipts sent for this refund. pub receipt_number: Option, - /// The transfer reversal that is associated with the refund. + /// The transfer reversal that's associated with the refund. /// /// Only present if the charge came from another Stripe account. - /// See the Connect documentation for details. pub source_transfer_reversal: Option>, /// Status of the refund. /// - /// For credit card refunds, this can be `pending`, `succeeded`, or `failed`. - /// For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. - /// Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. + /// This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. + /// Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). pub status: Option, - /// If the accompanying transfer was reversed, the transfer reversal object. + /// This refers to the transfer reversal object if the accompanying transfer reverses. /// - /// Only applicable if the charge was created using the destination parameter. + /// This is only applicable if the charge was created using the destination parameter. pub transfer_reversal: Option>, } impl Refund { - /// Returns a list of all refunds you’ve previously created. + + /// Returns a list of all refunds you 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) - } + /// We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. +pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { + client.get_query("/refunds", ¶ms) +} - /// Create a refund. + + /// When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + /// + /// Creating a new refund will refund a charge that has previously been created but not yet refunded. + /// Funds will be refunded to the credit or debit card that was originally charged. + /// + /// You can optionally refund only part of a charge. + /// You can do so multiple times, until the entire charge has been refunded. + /// + /// Once entirely refunded, a charge can’t be refunded again. + /// This method will raise an error when called on an already-refunded charge, + /// or when trying to refund more money than is left on a charge. pub fn create(client: &Client, params: CreateRefund<'_>) -> Response { client.post_form("/refunds", ¶ms) } @@ -112,9 +119,9 @@ impl Refund { client.get_query(&format!("/refunds/{}", id), &Expand { expand }) } - /// Updates the specified refund by setting the values of the parameters passed. + /// Updates the refund that you specify by setting the values of the passed parameters. /// - /// Any parameters not provided will be left unchanged. This request only accepts `metadata` as an argument. + /// Any parameters that you don’t provide remain unchanged. This request only accepts `metadata` as an argument. pub fn update(client: &Client, id: &RefundId, params: UpdateRefund<'_>) -> Response { client.post_form(&format!("/refunds/{}", id), ¶ms) } @@ -132,6 +139,7 @@ impl Object for Refund { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { + /// Contains the refund details. pub display_details: Option, @@ -142,6 +150,7 @@ pub struct RefundNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextActionDisplayDetails { + pub email_sent: EmailSent, /// The expiry timestamp. @@ -150,6 +159,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,10 +170,11 @@ 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, + /// The identifier of the charge to refund. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, @@ -197,15 +208,28 @@ pub struct CreateRefund<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub origin: Option, + /// The identifier of the PaymentIntent to refund. #[serde(skip_serializing_if = "Option::is_none")] pub payment_intent: Option, + /// String indicating the reason for the refund. + /// + /// If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. + /// If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, + /// Boolean indicating whether the application fee should be refunded when refunding this charge. + /// + /// If a full charge refund is given, the full application fee will be refunded. + /// Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. + /// An application fee can be refunded only by the application that created the charge. #[serde(skip_serializing_if = "Option::is_none")] pub refund_application_fee: Option, + /// Boolean indicating whether the transfer should be reversed when refunding this charge. + /// + /// The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. #[serde(skip_serializing_if = "Option::is_none")] pub reverse_transfer: Option, } @@ -232,6 +256,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 +309,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 +330,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/refund_created.rs b/src/resources/generated/refund_created.rs new file mode 100644 index 000000000..125e714da --- /dev/null +++ b/src/resources/generated/refund_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "refund.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RefundCreated { +} diff --git a/src/resources/generated/refund_updated.rs b/src/resources/generated/refund_updated.rs new file mode 100644 index 000000000..13fbae5f1 --- /dev/null +++ b/src/resources/generated/refund_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "refund.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RefundUpdated { +} diff --git a/src/resources/generated/reporting_report_run_failed.rs b/src/resources/generated/reporting_report_run_failed.rs new file mode 100644 index 000000000..aaa5dd412 --- /dev/null +++ b/src/resources/generated/reporting_report_run_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "reporting.report_run.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ReportingReportRunFailed { +} diff --git a/src/resources/generated/reporting_report_run_succeeded.rs b/src/resources/generated/reporting_report_run_succeeded.rs new file mode 100644 index 000000000..2e62a2fee --- /dev/null +++ b/src/resources/generated/reporting_report_run_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "reporting.report_run.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ReportingReportRunSucceeded { +} diff --git a/src/resources/generated/reporting_report_type_updated.rs b/src/resources/generated/reporting_report_type_updated.rs new file mode 100644 index 000000000..662b670ff --- /dev/null +++ b/src/resources/generated/reporting_report_type_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "reporting.report_type.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ReportingReportTypeUpdated { +} 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/review_closed.rs b/src/resources/generated/review_closed.rs new file mode 100644 index 000000000..454024d95 --- /dev/null +++ b/src/resources/generated/review_closed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "review.closed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ReviewClosed { +} diff --git a/src/resources/generated/review_opened.rs b/src/resources/generated/review_opened.rs new file mode 100644 index 000000000..cd1d18998 --- /dev/null +++ b/src/resources/generated/review_opened.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "review.opened". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ReviewOpened { +} 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 a9b4ca38c..81867cbf4 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, -}; +use crate::resources::{Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, 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) - } + + /// Returns a list of SetupAttempts that associate with a provided SetupIntent. +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, @@ -145,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, @@ -185,17 +187,19 @@ pub struct SetupAttemptPaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBoleto {} +pub struct SetupAttemptPaymentMethodDetailsBoleto { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. pub brand: Option, /// Check results by Card networks on Card address and CVC at the time of authorization. - pub checks: Option, + pub checks: Option, /// Two-letter ISO code representing the country of the card. /// @@ -253,14 +257,29 @@ pub struct SetupAttemptPaymentMethodDetailsCard { pub wallet: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupAttemptPaymentMethodDetailsCardChecks { + + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_line1_check: Option, + + /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_postal_code_check: Option, + + /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub cvc_check: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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, @@ -276,10 +295,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardWallet { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsCashapp {} +pub struct SetupAttemptPaymentMethodDetailsCashapp { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsIdeal { + /// The customer's bank. /// /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -305,19 +326,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, @@ -348,14 +374,21 @@ 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, + /// The Electronic Commerce Indicator (ECI). + /// + /// A protocol-level field indicating what degree of authentication was performed. + pub electronic_commerce_indicator: Option, + /// Indicates the outcome of 3D Secure authentication. pub result: Option, @@ -363,6 +396,10 @@ pub struct ThreeDSecureDetails { /// on the `result`. pub result_reason: Option, + /// The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + /// (dsTransId) for this payment. + pub transaction_id: Option, + /// The version of 3D Secure that was used. pub version: Option, } @@ -370,9 +407,10 @@ pub struct ThreeDSecureDetails { /// The parameters for `SetupAttempt::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSetupAttempts<'a> { + /// A filter on the list, based on the object `created` field. /// - /// The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + /// The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -420,9 +458,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")] @@ -741,6 +778,51 @@ impl std::default::Default for ThreeDSecureDetailsAuthenticationFlow { } } +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl ThreeDSecureDetailsElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsElectronicCommerceIndicator::V01 => "01", + ThreeDSecureDetailsElectronicCommerceIndicator::V02 => "02", + ThreeDSecureDetailsElectronicCommerceIndicator::V05 => "05", + ThreeDSecureDetailsElectronicCommerceIndicator::V06 => "06", + ThreeDSecureDetailsElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for ThreeDSecureDetailsElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + /// 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")] diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index bcd2ec8be..b4e0c59f2 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, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, - Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, SetupAttempt, -}; +use crate::resources::{Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, SetupAttempt}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SetupIntent". /// @@ -97,11 +92,9 @@ pub struct SetupIntent { pub payment_method: Option>, /// Information about the payment method configuration used for this Setup Intent. - #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, - /// Payment-method-specific configuration for this SetupIntent. + /// Payment method-specific configuration for this SetupIntent. pub payment_method_options: Option, /// The list of payment method types (e.g. @@ -125,15 +118,17 @@ 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. /// - /// After the SetupIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) - /// to collect any required permissions to charge the payment method later. + /// After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) + /// it to collect any required permissions to charge the payment method later. pub fn create(client: &Client, params: CreateSetupIntent<'_>) -> Response { client.post_form("/setup_intents", ¶ms) } @@ -148,11 +143,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) } } @@ -169,6 +160,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. @@ -183,9 +175,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, @@ -206,6 +198,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, @@ -215,6 +208,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, @@ -229,6 +223,7 @@ pub struct SetupIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -250,6 +245,7 @@ pub struct SetupIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsAcssDebit { + /// Currency supported by the bank account. pub currency: Option, @@ -263,6 +259,7 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebit { #[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, @@ -283,6 +280,7 @@ pub struct SetupIntentPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -329,18 +327,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, @@ -355,16 +354,15 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit { pub interval_description: Option, /// Payment schedule for the mandate. - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. - pub transaction_type: - Option, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsPaypal { + /// The PayPal Billing Agreement ID (BAID). /// /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -373,15 +371,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, @@ -393,6 +394,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. @@ -401,14 +403,14 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub attach_to_self: Option, - /// When enabled, this SetupIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this SetupIntent's other parameters. + /// When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. #[serde(skip_serializing_if = "Option::is_none")] pub automatic_payment_methods: Option, /// Set to `true` to attempt to confirm this SetupIntent immediately. /// /// This parameter defaults to `false`. - /// If the payment method attached is a card, a return_url may be provided in case additional authentication is required. + /// If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. #[serde(skip_serializing_if = "Option::is_none")] pub confirm: Option, @@ -439,7 +441,7 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub flow_directions: Option>, - /// This hash contains details about the Mandate to create. + /// This hash contains details about the mandate to create. /// /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). #[serde(skip_serializing_if = "Option::is_none")] @@ -453,7 +455,7 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// The Stripe account ID for which this SetupIntent is created. + /// The Stripe account ID created for this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub on_behalf_of: Option<&'a str>, @@ -461,7 +463,7 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, - /// The ID of the payment method configuration to use with this Setup Intent. + /// The ID of the payment method configuration to use with this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_configuration: Option, @@ -470,25 +472,24 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_data: Option, - /// Payment-method-specific configuration for this SetupIntent. + /// Payment method-specific configuration for this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, - /// The list of payment method types (e.g. + /// The list of payment method types (for example, card) that this SetupIntent can use. /// - /// card) that this SetupIntent is allowed to use. - /// If this is not provided, defaults to ["card"]. + /// If you don't provide this, it defaults to ["card"]. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, /// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. /// - /// If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + /// To redirect to a mobile application, you can alternatively supply an application URI scheme. /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). #[serde(skip_serializing_if = "Option::is_none")] pub return_url: Option<&'a str>, - /// If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + /// If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. #[serde(skip_serializing_if = "Option::is_none")] pub single_use: Option, @@ -525,6 +526,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. @@ -560,7 +562,7 @@ pub struct ListSetupIntents<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option, - /// Only return SetupIntents associated with the specified payment method. + /// Only return SetupIntents that associate with the specified payment method. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, @@ -589,12 +591,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. @@ -651,14 +653,13 @@ pub struct UpdateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_data: Option, - /// Payment-method-specific configuration for this SetupIntent. + /// Payment method-specific configuration for this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_options: Option, - /// The list of payment method types (e.g. + /// The list of payment method types (for example, card) that this SetupIntent can set up. /// - /// card) that this SetupIntent is allowed to set up. - /// If this is not provided, defaults to ["card"]. + /// If you don't provide this array, it defaults to ["card"]. #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, } @@ -683,6 +684,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. @@ -697,12 +699,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, @@ -825,6 +829,10 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -855,6 +863,7 @@ 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, @@ -882,6 +891,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). @@ -897,6 +907,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, @@ -1019,6 +1030,10 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub radar_options: Option, + /// If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[serde(skip_serializing_if = "Option::is_none")] pub sepa_debit: Option, @@ -1049,6 +1064,7 @@ 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, @@ -1076,6 +1092,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, @@ -1097,6 +1114,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1108,16 +1126,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, @@ -1127,6 +1149,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, @@ -1139,10 +1162,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, @@ -1161,22 +1186,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, @@ -1184,6 +1214,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, @@ -1193,81 +1224,101 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -1289,13 +1340,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). @@ -1308,12 +1362,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { /// 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 CreateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1339,12 +1393,17 @@ 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, + + /// If 3D Secure authentication was performed with a third-party provider, + /// the authentication details to use for this setup. + #[serde(skip_serializing_if = "Option::is_none")] + pub 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, @@ -1352,6 +1411,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. @@ -1361,6 +1421,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, @@ -1368,10 +1429,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")] @@ -1379,12 +1440,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, @@ -1396,16 +1457,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, @@ -1415,6 +1480,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, @@ -1427,10 +1493,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, @@ -1449,22 +1517,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, @@ -1472,6 +1545,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, @@ -1481,81 +1555,101 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataRevolutPay { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -1577,13 +1671,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). @@ -1596,12 +1693,12 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { /// 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 UpdateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1627,12 +1724,17 @@ 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, + + /// If 3D Secure authentication was performed with a third-party provider, + /// the authentication details to use for this setup. + #[serde(skip_serializing_if = "Option::is_none")] + pub 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, @@ -1640,6 +1742,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. @@ -1649,6 +1752,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, @@ -1656,10 +1760,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")] @@ -1667,15 +1771,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, @@ -1685,6 +1790,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, @@ -1712,6 +1818,7 @@ pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1724,6 +1831,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. @@ -1732,8 +1840,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. /// @@ -1743,17 +1850,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, @@ -1805,28 +1911,70 @@ 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 CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { + + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. + #[serde(skip_serializing_if = "Option::is_none")] + pub ares_trans_status: Option, + + /// The cryptogram, also known as the "authentication value" (AAV, CAVV or + /// AEVV). + /// + /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.). + #[serde(skip_serializing_if = "Option::is_none")] + pub cryptogram: Option, + + /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + /// provider and indicates what degree of authentication was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub electronic_commerce_indicator: Option, + + /// Network specific 3DS fields. + /// + /// Network specific arguments require an explicit card brand choice. + /// The parameter `payment_method_options.card.network`` must be populated accordingly. + #[serde(skip_serializing_if = "Option::is_none")] + pub network_options: Option, + + /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + /// AReq sent to the card Issuer's ACS. + /// + /// A string containing 2 digits from 01-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub requestor_challenge_indicator: Option, + + /// For 3D Secure 1, the XID. + /// + /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID). + #[serde(skip_serializing_if = "Option::is_none")] + pub transaction_id: Option, + + /// The version of 3D Secure that was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: - Option>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -1837,6 +1985,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>, @@ -1844,6 +1993,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, @@ -1871,6 +2021,7 @@ pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1883,6 +2034,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. @@ -1891,8 +2043,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. /// @@ -1902,17 +2053,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, @@ -1964,28 +2114,70 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { + + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. + #[serde(skip_serializing_if = "Option::is_none")] + pub ares_trans_status: Option, + + /// The cryptogram, also known as the "authentication value" (AAV, CAVV or + /// AEVV). + /// + /// This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure providers will return the base64-encoded version, which is what you should specify here.). + #[serde(skip_serializing_if = "Option::is_none")] + pub cryptogram: Option, + + /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + /// provider and indicates what degree of authentication was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub electronic_commerce_indicator: Option, + + /// Network specific 3DS fields. + /// + /// Network specific arguments require an explicit card brand choice. + /// The parameter `payment_method_options.card.network`` must be populated accordingly. + #[serde(skip_serializing_if = "Option::is_none")] + pub network_options: Option, + + /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + /// AReq sent to the card Issuer's ACS. + /// + /// A string containing 2 digits from 01-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub requestor_challenge_indicator: Option, + + /// For 3D Secure 1, the XID. + /// + /// For 3D Secure 2, the Directory Server Transaction ID (dsTransID). + #[serde(skip_serializing_if = "Option::is_none")] + pub transaction_id: Option, + + /// The version of 3D Secure that was performed. + #[serde(skip_serializing_if = "Option::is_none")] + pub version: 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>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -1996,11 +2188,72 @@ 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>, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + + /// Cartes Bancaires-specific 3DS fields. + #[serde(skip_serializing_if = "Option::is_none")] + pub cartes_bancaires: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + + /// Cartes Bancaires-specific 3DS fields. + #[serde(skip_serializing_if = "Option::is_none")] + pub cartes_bancaires: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + + /// The cryptogram calculation algorithm used by the card Issuer's ACS + /// to calculate the Authentication cryptogram. + /// + /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. + pub cb_avalgo: CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + + /// The exemption indicator returned from Cartes Bancaires in the ARes. + /// message extension: CB-EXEMPTION; string (4 characters) + /// This is a 3 byte bitmap (low significant byte first and most significant + /// bit first) that has been Base64 encoded. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_exemption: Option, + + /// The risk score returned from Cartes Bancaires in the ARes. + /// message extension: CB-SCORE; numeric value 0-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_score: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + + /// The cryptogram calculation algorithm used by the card Issuer's ACS + /// to calculate the Authentication cryptogram. + /// + /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. + pub cb_avalgo: UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + + /// The exemption indicator returned from Cartes Bancaires in the ARes. + /// message extension: CB-EXEMPTION; string (4 characters) + /// This is a 3 byte bitmap (low significant byte first and most significant + /// bit first) that has been Base64 encoded. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_exemption: Option, + + /// The risk score returned from Cartes Bancaires in the ARes. + /// message extension: CB-SCORE; numeric value 0-99. + #[serde(skip_serializing_if = "Option::is_none")] + pub cb_score: Option, +} + /// An enum representing the possible values of an `CreateSetupIntentAutomaticPaymentMethods`'s `allow_redirects` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2140,55 +2393,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", @@ -2428,9 +2655,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", @@ -2441,9 +2666,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", } @@ -2544,6 +2767,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -2579,6 +2803,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::Paypal => "paypal", CreateSetupIntentPaymentMethodDataType::Pix => "pix", CreateSetupIntentPaymentMethodDataType::Promptpay => "promptpay", + CreateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay", CreateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreateSetupIntentPaymentMethodDataType::Sofort => "sofort", CreateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", @@ -2617,9 +2842,7 @@ impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -2703,9 +2926,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 } @@ -2736,16 +2957,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 } @@ -2774,16 +2991,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 } @@ -2801,13 +3014,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", } } } @@ -2929,9 +3138,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 } @@ -3023,6 +3230,189 @@ impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardRequestT } } +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + #[serde(rename = "A")] + A, + #[serde(rename = "C")] + C, + #[serde(rename = "I")] + I, + #[serde(rename = "N")] + N, + #[serde(rename = "R")] + R, + #[serde(rename = "U")] + U, + #[serde(rename = "Y")] + Y, +} + +impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn default() -> Self { + Self::A + } +} + +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + #[serde(rename = "0")] + V0, + #[serde(rename = "1")] + V1, + #[serde(rename = "2")] + V2, + #[serde(rename = "3")] + V3, + #[serde(rename = "4")] + V4, + #[serde(rename = "A")] + A, +} + +impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn default() -> Self { + Self::V0 + } +} + +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + #[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 CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0", + CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3044,24 +3434,18 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermi } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -3088,16 +3472,12 @@ impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialC } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -3115,9 +3495,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", } } } @@ -3151,15 +3529,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", } } } @@ -3175,9 +3547,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 } @@ -3299,9 +3669,7 @@ impl SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -3337,9 +3705,7 @@ impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3525,6 +3891,7 @@ impl std::default::Default for SetupIntentPaymentMethodOptionsCardNetwork { pub enum SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, ChallengeOnly, } @@ -3533,9 +3900,8 @@ impl SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", - SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => { - "challenge_only" - } + SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", + SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => "challenge_only", } } } @@ -3569,9 +3935,7 @@ impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor { pub fn as_str(self) -> &'static str { match self { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice", - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => { - "subscription" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => "subscription", } } } @@ -3605,15 +3969,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", } } } @@ -3629,9 +3987,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 } @@ -3648,12 +4004,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", } } } @@ -3669,9 +4021,7 @@ impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebi self.as_str().fmt(f) } } -impl std::default::Default - for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType -{ +impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { fn default() -> Self { Self::Business } @@ -3689,13 +4039,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", } } } @@ -3830,55 +4176,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", @@ -4118,9 +4438,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", @@ -4131,9 +4449,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", } @@ -4234,6 +4550,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Paypal, Pix, Promptpay, + RevolutPay, SepaDebit, Sofort, UsBankAccount, @@ -4269,6 +4586,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::Paypal => "paypal", UpdateSetupIntentPaymentMethodDataType::Pix => "pix", UpdateSetupIntentPaymentMethodDataType::Promptpay => "promptpay", + UpdateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay", UpdateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdateSetupIntentPaymentMethodDataType::Sofort => "sofort", UpdateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", @@ -4307,9 +4625,7 @@ impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -4393,9 +4709,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 } @@ -4426,16 +4740,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 } @@ -4464,16 +4774,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 } @@ -4491,13 +4797,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", } } } @@ -4619,9 +4921,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 } @@ -4713,6 +5013,189 @@ impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardRequestT } } +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `ares_trans_status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + #[serde(rename = "A")] + A, + #[serde(rename = "C")] + C, + #[serde(rename = "I")] + I, + #[serde(rename = "N")] + N, + #[serde(rename = "R")] + R, + #[serde(rename = "U")] + U, + #[serde(rename = "Y")] + Y, +} + +impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::A => "A", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::C => "C", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::I => "I", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::N => "N", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::R => "R", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::U => "U", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus::Y => "Y", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { + fn default() -> Self { + Self::A + } +} + +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `electronic_commerce_indicator` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + #[serde(rename = "01")] + V01, + #[serde(rename = "02")] + V02, + #[serde(rename = "05")] + V05, + #[serde(rename = "06")] + V06, + #[serde(rename = "07")] + V07, +} + +impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V01 => "01", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V02 => "02", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V05 => "05", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V06 => "06", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator::V07 => "07", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { + fn default() -> Self { + Self::V01 + } +} + +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + #[serde(rename = "0")] + V0, + #[serde(rename = "1")] + V1, + #[serde(rename = "2")] + V2, + #[serde(rename = "3")] + V3, + #[serde(rename = "4")] + V4, + #[serde(rename = "A")] + A, +} + +impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V0 => "0", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V1 => "1", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V2 => "2", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V3 => "3", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::V4 => "4", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo::A => "A", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { + fn default() -> Self { + Self::V0 + } +} + +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + #[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 UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V1_0_2 => "1.0.2", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_1_0 => "2.1.0", + UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4734,24 +5217,18 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermi } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPermissions { fn default() -> Self { Self::Balances } @@ -4778,16 +5255,12 @@ impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialC } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { fn default() -> Self { Self::Balances } @@ -4805,9 +5278,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", } } } @@ -4841,15 +5312,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", } } } @@ -4865,9 +5330,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/setup_intent_canceled.rs b/src/resources/generated/setup_intent_canceled.rs new file mode 100644 index 000000000..e14944e70 --- /dev/null +++ b/src/resources/generated/setup_intent_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "setup_intent.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentCanceled { +} diff --git a/src/resources/generated/setup_intent_created.rs b/src/resources/generated/setup_intent_created.rs new file mode 100644 index 000000000..0be62648d --- /dev/null +++ b/src/resources/generated/setup_intent_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "setup_intent.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentCreated { +} diff --git a/src/resources/generated/setup_intent_requires_action.rs b/src/resources/generated/setup_intent_requires_action.rs new file mode 100644 index 000000000..ee9bf2e55 --- /dev/null +++ b/src/resources/generated/setup_intent_requires_action.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "setup_intent.requires_action". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentRequiresAction { +} diff --git a/src/resources/generated/setup_intent_setup_failed.rs b/src/resources/generated/setup_intent_setup_failed.rs new file mode 100644 index 000000000..1a74f4495 --- /dev/null +++ b/src/resources/generated/setup_intent_setup_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "setup_intent.setup_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentSetupFailed { +} diff --git a/src/resources/generated/setup_intent_succeeded.rs b/src/resources/generated/setup_intent_succeeded.rs new file mode 100644 index 000000000..edcb5a1ee --- /dev/null +++ b/src/resources/generated/setup_intent_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "setup_intent.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SetupIntentSucceeded { +} 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/sigma_scheduled_query_run_created.rs b/src/resources/generated/sigma_scheduled_query_run_created.rs new file mode 100644 index 000000000..184c31996 --- /dev/null +++ b/src/resources/generated/sigma_scheduled_query_run_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "sigma.scheduled_query_run.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SigmaScheduledQueryRunCreated { +} diff --git a/src/resources/generated/source.rs b/src/resources/generated/source.rs index 612b2f5a5..124b32168 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/source_canceled.rs b/src/resources/generated/source_canceled.rs new file mode 100644 index 000000000..baadce21b --- /dev/null +++ b/src/resources/generated/source_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceCanceled { +} diff --git a/src/resources/generated/source_chargeable.rs b/src/resources/generated/source_chargeable.rs new file mode 100644 index 000000000..964cd0027 --- /dev/null +++ b/src/resources/generated/source_chargeable.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.chargeable". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceChargeable { +} diff --git a/src/resources/generated/source_failed.rs b/src/resources/generated/source_failed.rs new file mode 100644 index 000000000..0d0f0608b --- /dev/null +++ b/src/resources/generated/source_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceFailed { +} diff --git a/src/resources/generated/source_refund_attributes_required.rs b/src/resources/generated/source_refund_attributes_required.rs new file mode 100644 index 000000000..5e39dcebf --- /dev/null +++ b/src/resources/generated/source_refund_attributes_required.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.refund_attributes_required". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceRefundAttributesRequired { +} diff --git a/src/resources/generated/source_transaction_created.rs b/src/resources/generated/source_transaction_created.rs new file mode 100644 index 000000000..8c9d947c4 --- /dev/null +++ b/src/resources/generated/source_transaction_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.transaction.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceTransactionCreated { +} diff --git a/src/resources/generated/source_transaction_updated.rs b/src/resources/generated/source_transaction_updated.rs new file mode 100644 index 000000000..b84350796 --- /dev/null +++ b/src/resources/generated/source_transaction_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "source.transaction.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SourceTransactionUpdated { +} diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index 771129d25..b552ecc4a 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". /// @@ -114,7 +104,7 @@ pub struct Subscription { /// The subscription's description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, /// Describes the current discount applied to this subscription, if there is one. @@ -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,23 +213,27 @@ impl Subscription { } /// Retrieves the subscription with the given ID. - pub fn retrieve( - client: &Client, - id: &SubscriptionId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &SubscriptionId, expand: &[&str]) -> Response { client.get_query(&format!("/subscriptions/{}", id), &Expand { expand }) } - /// Updates an existing subscription on a customer to match the specified parameters. + /// Updates an existing subscription to match the specified parameters. + /// When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + /// To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint. /// - /// 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 { + /// By default, we prorate subscription changes. + /// + /// For example, if a customer signs up on May 1 for a $100 price, they’ll be billed $100 immediately. + /// If on May 15 they switch to a $200 price, then on June 1 they’ll be billed $250 ($200 for a renewal of her subscription, plus a $50 prorating adjustment for half of the previous month’s $100 difference). + /// Similarly, a downgrade generates a credit that is applied to the next invoice. + /// We also prorate when you make quantity changes. Switching prices does not normally change the billing date or generate an immediate charge unless:
  • The billing interval is changed (for example, from monthly to yearly).
  • The subscription moves from free to paid, or paid to free.
  • A trial starts or ends.
In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. If you want to charge for an upgrade immediately, pass `proration_behavior` as `always_invoice` to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. + /// If you pass `create_prorations`, the prorations are created but not automatically invoiced. + /// If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). If you don’t want to prorate, set the `proration_behavior` option to `none`. + /// With this option, the customer is billed $100 on May 1 and $200 on June 1. + /// Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. + /// We still reset the billing date and bill immediately for the new subscription. Updating the quantity on a subscription many times in an hour may result in [rate limiting](https://stripe.com/docs/rate-limits). + /// If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](https://stripe.com/docs/billing/subscriptions/usage-based) instead. + pub fn update(client: &Client, id: &SubscriptionId, params: UpdateSubscription<'_>) -> Response { client.post_form(&format!("/subscriptions/{}", id), ¶ms) } @@ -266,6 +262,7 @@ impl Object for Subscription { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CancellationDetails { + /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. pub comment: Option, @@ -278,12 +275,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 +297,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 +309,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 +321,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 +348,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 +367,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 +383,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 +408,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 +422,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. @@ -520,7 +527,7 @@ pub struct CreateSubscription<'a> { /// The subscription's description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<&'a str>, @@ -663,6 +670,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 +765,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. @@ -856,7 +864,7 @@ pub struct UpdateSubscription<'a> { /// The subscription's description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -1000,6 +1008,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 +1032,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 +1080,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 +1096,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 +1117,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 +1131,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 canceled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -1147,6 +1164,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 +1221,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 +1234,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 +1250,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 +1271,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 +1285,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 +1314,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 +1327,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 +1364,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 +1397,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 +1412,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 +1425,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 +1469,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 +1487,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 +1520,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 +1557,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 +1575,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 +1610,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")] @@ -1630,15 +1649,15 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType, - >, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1648,8 +1667,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")] @@ -1687,8 +1705,8 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer -{ +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -1696,8 +1714,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`. @@ -1789,8 +1807,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, } @@ -1804,24 +1821,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 } @@ -1846,24 +1857,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 } @@ -1890,24 +1895,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 } @@ -1930,24 +1929,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 } @@ -1974,24 +1967,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", } @@ -2038,16 +2021,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 } @@ -2056,8 +2035,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, @@ -2095,14 +2073,11 @@ impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOpt /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, } -impl - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", @@ -2146,24 +2121,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 } @@ -2202,9 +2171,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", @@ -2213,9 +2180,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", @@ -2225,9 +2190,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", @@ -2265,9 +2228,7 @@ impl CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2302,9 +2263,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", } } @@ -2830,9 +2789,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", @@ -2841,9 +2798,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", @@ -2853,14 +2808,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", } } @@ -2895,9 +2846,7 @@ impl SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::Off => "off", - SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2932,9 +2881,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", } } @@ -3042,8 +2989,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, } @@ -3057,24 +3003,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 } @@ -3099,24 +3039,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 } @@ -3143,24 +3077,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 } @@ -3183,24 +3111,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 } @@ -3227,24 +3149,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", } @@ -3291,16 +3203,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 } @@ -3309,8 +3217,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, @@ -3348,14 +3255,11 @@ impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOpt /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, } -impl - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", @@ -3399,24 +3303,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 } @@ -3455,9 +3353,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", @@ -3466,9 +3362,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", @@ -3478,9 +3372,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", @@ -3518,9 +3410,7 @@ impl UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3555,9 +3445,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 9a61c08b1..a05a6aa9a 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 8da4729d7..c408e9214 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, @@ -193,7 +178,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { /// Subscription description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, /// The end of this phase of the subscription schedule. @@ -233,6 +218,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] 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 InvoiceSettingSubscriptionSchedulePhaseSetting { #[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. @@ -320,7 +310,7 @@ pub struct SubscriptionScheduleDefaultSettings { /// Subscription description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, /// The subscription schedule's default invoice settings. @@ -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. @@ -603,7 +597,7 @@ pub struct CreateSubscriptionSchedulePhases { /// Subscription description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -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. @@ -706,7 +701,7 @@ pub struct SubscriptionScheduleDefaultSettingsParams { /// Subscription description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -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. @@ -789,7 +785,7 @@ pub struct UpdateSubscriptionSchedulePhases { /// Subscription description, meant to be displayable to the customer. /// - /// Use this field to optionally store an explanation of the subscription. + /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -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/subscription_schedule_aborted.rs b/src/resources/generated/subscription_schedule_aborted.rs new file mode 100644 index 000000000..43bce4681 --- /dev/null +++ b/src/resources/generated/subscription_schedule_aborted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.aborted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleAborted { +} diff --git a/src/resources/generated/subscription_schedule_canceled.rs b/src/resources/generated/subscription_schedule_canceled.rs new file mode 100644 index 000000000..3854a27e2 --- /dev/null +++ b/src/resources/generated/subscription_schedule_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleCanceled { +} diff --git a/src/resources/generated/subscription_schedule_completed.rs b/src/resources/generated/subscription_schedule_completed.rs new file mode 100644 index 000000000..0714375fb --- /dev/null +++ b/src/resources/generated/subscription_schedule_completed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.completed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleCompleted { +} diff --git a/src/resources/generated/subscription_schedule_created.rs b/src/resources/generated/subscription_schedule_created.rs new file mode 100644 index 000000000..4e2463a9e --- /dev/null +++ b/src/resources/generated/subscription_schedule_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleCreated { +} diff --git a/src/resources/generated/subscription_schedule_expiring.rs b/src/resources/generated/subscription_schedule_expiring.rs new file mode 100644 index 000000000..b03b76a23 --- /dev/null +++ b/src/resources/generated/subscription_schedule_expiring.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.expiring". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleExpiring { +} diff --git a/src/resources/generated/subscription_schedule_released.rs b/src/resources/generated/subscription_schedule_released.rs new file mode 100644 index 000000000..c17ffd3f0 --- /dev/null +++ b/src/resources/generated/subscription_schedule_released.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.released". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleReleased { +} diff --git a/src/resources/generated/subscription_schedule_updated.rs b/src/resources/generated/subscription_schedule_updated.rs new file mode 100644 index 000000000..e3c689158 --- /dev/null +++ b/src/resources/generated/subscription_schedule_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "subscription_schedule.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionScheduleUpdated { +} 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 69b45dfa4..36bac31b8 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 046e4308f..009a9b838 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". /// @@ -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/tax_rate_created.rs b/src/resources/generated/tax_rate_created.rs new file mode 100644 index 000000000..591d87426 --- /dev/null +++ b/src/resources/generated/tax_rate_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "tax_rate.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxRateCreated { +} diff --git a/src/resources/generated/tax_rate_updated.rs b/src/resources/generated/tax_rate_updated.rs new file mode 100644 index 000000000..dc592e4e6 --- /dev/null +++ b/src/resources/generated/tax_rate_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "tax_rate.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxRateUpdated { +} diff --git a/src/resources/generated/tax_registration.rs b/src/resources/generated/tax_registration.rs new file mode 100644 index 000000000..9200736f3 --- /dev/null +++ b/src/resources/generated/tax_registration.rs @@ -0,0 +1,535 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{TaxRegistrationId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "TaxProductRegistrationsResourceTaxRegistration". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxRegistration { + /// Unique identifier for the object. + pub id: TaxRegistrationId, + + /// Time at which the registration becomes active. + /// + /// Measured in seconds since the Unix epoch. + pub active_from: Timestamp, + + /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + pub country: String, + + pub country_options: TaxProductRegistrationsResourceCountryOptions, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// If set, the registration stops being active at this time. + /// + /// If not set, the registration will be active indefinitely. + /// Measured in seconds since the Unix epoch. + pub expires_at: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The status of the registration. + /// + /// This field is present for convenience and can be deduced from `active_from` and `expires_at`. + pub status: TaxRegistrationStatus, +} + +impl Object for TaxRegistration { + type Id = TaxRegistrationId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "tax.registration" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptions { + + #[serde(skip_serializing_if = "Option::is_none")] + pub ae: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub at: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub au: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub be: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bg: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ca: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ch: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cl: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub co: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cy: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cz: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub de: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub dk: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ee: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub es: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub fi: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub fr: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub gb: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub gr: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub hr: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub hu: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ie: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub is: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub it: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub jp: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub kr: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub lt: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub lu: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub lv: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mt: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mx: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub my: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub nl: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub no: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub nz: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub pl: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub pt: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ro: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sa: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub se: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sg: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub si: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sk: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub th: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub tr: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub vn: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub za: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsCanada { + + #[serde(skip_serializing_if = "Option::is_none")] + pub province_standard: Option, + + /// Type of registration in Canada. + #[serde(rename = "type")] + pub type_: TaxProductRegistrationsResourceCountryOptionsCanadaType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsCaProvinceStandard { + + /// Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + pub province: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsDefault { + + /// Type of registration in `country`. + #[serde(rename = "type")] + pub type_: TaxProductRegistrationsResourceCountryOptionsDefaultType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsEurope { + + #[serde(skip_serializing_if = "Option::is_none")] + pub standard: Option, + + /// Type of registration in an EU country. + #[serde(rename = "type")] + pub type_: TaxProductRegistrationsResourceCountryOptionsEuropeType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsEuStandard { + + /// Place of supply scheme used in an EU standard registration. + pub place_of_supply_scheme: TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsSimplified { + + /// Type of registration in `country`. + #[serde(rename = "type")] + pub type_: TaxProductRegistrationsResourceCountryOptionsSimplifiedType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsUnitedStates { + + #[serde(skip_serializing_if = "Option::is_none")] + pub local_amusement_tax: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub local_lease_tax: Option, + + /// Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + pub state: String, + + /// Type of registration in the US. + #[serde(rename = "type")] + pub type_: TaxProductRegistrationsResourceCountryOptionsUnitedStatesType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTax { + + /// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + pub jurisdiction: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTax { + + /// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + pub jurisdiction: String, +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsCanada`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsCanadaType { + ProvinceStandard, + Simplified, + Standard, +} + +impl TaxProductRegistrationsResourceCountryOptionsCanadaType { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsCanadaType::ProvinceStandard => "province_standard", + TaxProductRegistrationsResourceCountryOptionsCanadaType::Simplified => "simplified", + TaxProductRegistrationsResourceCountryOptionsCanadaType::Standard => "standard", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsCanadaType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsCanadaType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsCanadaType { + fn default() -> Self { + Self::ProvinceStandard + } +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsDefault`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsDefaultType { + Standard, +} + +impl TaxProductRegistrationsResourceCountryOptionsDefaultType { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsDefaultType::Standard => "standard", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsDefaultType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsDefaultType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsDefaultType { + fn default() -> Self { + Self::Standard + } +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsEuStandard`'s `place_of_supply_scheme` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme { + SmallSeller, + Standard, +} + +impl TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme::SmallSeller => "small_seller", + TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme::Standard => "standard", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsEuStandardPlaceOfSupplyScheme { + fn default() -> Self { + Self::SmallSeller + } +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsEurope`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsEuropeType { + Ioss, + OssNonUnion, + OssUnion, + Standard, +} + +impl TaxProductRegistrationsResourceCountryOptionsEuropeType { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsEuropeType::Ioss => "ioss", + TaxProductRegistrationsResourceCountryOptionsEuropeType::OssNonUnion => "oss_non_union", + TaxProductRegistrationsResourceCountryOptionsEuropeType::OssUnion => "oss_union", + TaxProductRegistrationsResourceCountryOptionsEuropeType::Standard => "standard", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsEuropeType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsEuropeType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsEuropeType { + fn default() -> Self { + Self::Ioss + } +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsSimplified`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsSimplifiedType { + Simplified, +} + +impl TaxProductRegistrationsResourceCountryOptionsSimplifiedType { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsSimplifiedType::Simplified => "simplified", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsSimplifiedType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsSimplifiedType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsSimplifiedType { + fn default() -> Self { + Self::Simplified + } +} + +/// An enum representing the possible values of an `TaxProductRegistrationsResourceCountryOptionsUnitedStates`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxProductRegistrationsResourceCountryOptionsUnitedStatesType { + LocalAmusementTax, + LocalLeaseTax, + StateCommunicationsTax, + StateSalesTax, +} + +impl TaxProductRegistrationsResourceCountryOptionsUnitedStatesType { + pub fn as_str(self) -> &'static str { + match self { + TaxProductRegistrationsResourceCountryOptionsUnitedStatesType::LocalAmusementTax => "local_amusement_tax", + TaxProductRegistrationsResourceCountryOptionsUnitedStatesType::LocalLeaseTax => "local_lease_tax", + TaxProductRegistrationsResourceCountryOptionsUnitedStatesType::StateCommunicationsTax => "state_communications_tax", + TaxProductRegistrationsResourceCountryOptionsUnitedStatesType::StateSalesTax => "state_sales_tax", + } + } +} + +impl AsRef for TaxProductRegistrationsResourceCountryOptionsUnitedStatesType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxProductRegistrationsResourceCountryOptionsUnitedStatesType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxProductRegistrationsResourceCountryOptionsUnitedStatesType { + fn default() -> Self { + Self::LocalAmusementTax + } +} + +/// An enum representing the possible values of an `TaxRegistration`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxRegistrationStatus { + Active, + Expired, + Scheduled, +} + +impl TaxRegistrationStatus { + pub fn as_str(self) -> &'static str { + match self { + TaxRegistrationStatus::Active => "active", + TaxRegistrationStatus::Expired => "expired", + TaxRegistrationStatus::Scheduled => "scheduled", + } + } +} + +impl AsRef for TaxRegistrationStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxRegistrationStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxRegistrationStatus { + fn default() -> Self { + Self::Active + } +} diff --git a/src/resources/generated/tax_settings_updated.rs b/src/resources/generated/tax_settings_updated.rs new file mode 100644 index 000000000..f238e8e69 --- /dev/null +++ b/src/resources/generated/tax_settings_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "tax.settings.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxSettingsUpdated { +} diff --git a/src/resources/generated/terminal_configuration.rs b/src/resources/generated/terminal_configuration.rs index 4d38d9a1f..7b7158874 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". /// @@ -31,6 +30,9 @@ pub struct TerminalConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub livemode: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub offline: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub tipping: Option, @@ -50,13 +52,24 @@ 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>, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalConfigurationConfigurationResourceOfflineConfig { + + /// Determines whether to allow transactions to be collected while reader is offline. + /// + /// Defaults to false. + pub enabled: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceTipping { + #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -102,6 +115,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 0c2fa311f..9b07f0566 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 3a7d54c12..14820d80f 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,6 +124,7 @@ pub struct TerminalReaderReaderResourceProcessConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessSetupIntentAction { + /// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. /// /// Only present if it was possible to generate a card PaymentMethod. @@ -136,10 +139,12 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentAction { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct TerminalReaderReaderResourceProcessSetupConfig {} +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, @@ -184,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, @@ -194,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). @@ -215,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). @@ -229,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). @@ -328,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", } @@ -371,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/terminal_reader_action_failed.rs b/src/resources/generated/terminal_reader_action_failed.rs new file mode 100644 index 000000000..4d14fed20 --- /dev/null +++ b/src/resources/generated/terminal_reader_action_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "terminal.reader.action_failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderActionFailed { +} diff --git a/src/resources/generated/terminal_reader_action_succeeded.rs b/src/resources/generated/terminal_reader_action_succeeded.rs new file mode 100644 index 000000000..58a1d6fcf --- /dev/null +++ b/src/resources/generated/terminal_reader_action_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "terminal.reader.action_succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderActionSucceeded { +} 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/test_helpers_test_clock_advancing.rs b/src/resources/generated/test_helpers_test_clock_advancing.rs new file mode 100644 index 000000000..237f564d9 --- /dev/null +++ b/src/resources/generated/test_helpers_test_clock_advancing.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "test_helpers.test_clock.advancing". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TestHelpersTestClockAdvancing { +} diff --git a/src/resources/generated/test_helpers_test_clock_created.rs b/src/resources/generated/test_helpers_test_clock_created.rs new file mode 100644 index 000000000..0d2ba74d7 --- /dev/null +++ b/src/resources/generated/test_helpers_test_clock_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "test_helpers.test_clock.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TestHelpersTestClockCreated { +} diff --git a/src/resources/generated/test_helpers_test_clock_deleted.rs b/src/resources/generated/test_helpers_test_clock_deleted.rs new file mode 100644 index 000000000..bdd7157f9 --- /dev/null +++ b/src/resources/generated/test_helpers_test_clock_deleted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "test_helpers.test_clock.deleted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TestHelpersTestClockDeleted { +} diff --git a/src/resources/generated/test_helpers_test_clock_internal_failure.rs b/src/resources/generated/test_helpers_test_clock_internal_failure.rs new file mode 100644 index 000000000..f328e69c8 --- /dev/null +++ b/src/resources/generated/test_helpers_test_clock_internal_failure.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "test_helpers.test_clock.internal_failure". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TestHelpersTestClockInternalFailure { +} diff --git a/src/resources/generated/test_helpers_test_clock_ready.rs b/src/resources/generated/test_helpers_test_clock_ready.rs new file mode 100644 index 000000000..1f23d2ff4 --- /dev/null +++ b/src/resources/generated/test_helpers_test_clock_ready.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "test_helpers.test_clock.ready". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TestHelpersTestClockReady { +} diff --git a/src/resources/generated/token.rs b/src/resources/generated/token.rs index 45cae1c0f..3f607fddf 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". /// @@ -23,7 +22,7 @@ pub struct Token { #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, - /// IP address of the client that generated the token. + /// IP address of the client that generates the token. pub client_ip: Option, /// Time at which the object was created. @@ -38,15 +37,17 @@ pub struct Token { #[serde(rename = "type")] pub type_: TokenType, - /// Whether this token has already been used (tokens can be used only once). + /// Determines if you have already used this token (you can only use tokens once). pub used: bool, } 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. + /// You can use this token with any API method in place of a bank account dictionary. /// - /// This token can be used only once, by attaching it to a [Custom account](https://stripe.com/docs/api#accounts). + /// You can only use this token once. + /// To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts). pub fn create(client: &Client, params: CreateToken<'_>) -> Response { client.post_form("/tokens", ¶ms) } @@ -70,7 +71,8 @@ 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. + + /// Information for the account this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -81,14 +83,14 @@ pub struct CreateToken<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, - /// The customer (owned by the application's account) for which to create a token. + /// Create a token for the customer, which is owned by the application's account. /// - /// This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). - /// For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + /// You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). + /// Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, - /// The updated CVC value this token will represent. + /// The updated CVC value this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub cvc_update: Option, @@ -96,11 +98,11 @@ pub struct CreateToken<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// Information for the person this token will represent. + /// Information for the person this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub person: Option, - /// The PII this token will represent. + /// The PII this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub pii: Option, } @@ -121,6 +123,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, @@ -142,12 +145,18 @@ pub struct CreateTokenAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenCvcUpdate { + /// The CVC value, in string form. pub cvc: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPerson { + + /// Details on the legal guardian's acceptance of the required Stripe agreements. + #[serde(skip_serializing_if = "Option::is_none")] + pub additional_tos_acceptances: Option, + /// The person's address. #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -265,13 +274,23 @@ 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, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateTokenPersonAdditionalTosAcceptances { + + /// Details on the legal guardian's acceptance of the main Stripe service agreement. + #[serde(skip_serializing_if = "Option::is_none")] + pub account: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -284,6 +303,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, @@ -299,6 +319,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, @@ -326,6 +347,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. @@ -336,6 +358,10 @@ pub struct CreateTokenPersonRelationship { #[serde(skip_serializing_if = "Option::is_none")] pub executive: Option, + /// Whether the person is the legal guardian of the account's representative. + #[serde(skip_serializing_if = "Option::is_none")] + pub legal_guardian: Option, + /// Whether the person is an owner of the account’s legal entity. #[serde(skip_serializing_if = "Option::is_none")] pub owner: Option, @@ -359,6 +385,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, @@ -368,8 +395,25 @@ pub struct PersonVerificationParams { pub document: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateTokenPersonAdditionalTosAcceptancesAccount { + + /// The Unix timestamp marking when the account representative accepted the service agreement. + #[serde(skip_serializing_if = "Option::is_none")] + pub date: Option, + + /// The IP address from which the account representative accepted the service agreement. + #[serde(skip_serializing_if = "Option::is_none")] + pub ip: Option, + + /// The user agent of the browser from which the account representative accepted the service agreement. + #[serde(skip_serializing_if = "Option::is_none")] + pub user_agent: Option, +} + #[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>, @@ -377,6 +421,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>, @@ -384,6 +429,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>, @@ -391,6 +437,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. @@ -449,8 +496,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..fdb813a4c 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". /// @@ -60,9 +59,9 @@ pub struct Topup { /// This can be useful for storing additional information about the object in a structured format. pub metadata: Metadata, - /// For most Stripe users, the source of every top-up is a bank account. + /// The source field is deprecated. /// - /// This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. + /// It might not always be present in the API response. pub source: Option, /// Extra information about a top-up. @@ -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/topup_canceled.rs b/src/resources/generated/topup_canceled.rs new file mode 100644 index 000000000..58e41154a --- /dev/null +++ b/src/resources/generated/topup_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "topup.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TopupCanceled { +} diff --git a/src/resources/generated/topup_created.rs b/src/resources/generated/topup_created.rs new file mode 100644 index 000000000..245db49ff --- /dev/null +++ b/src/resources/generated/topup_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "topup.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TopupCreated { +} diff --git a/src/resources/generated/topup_failed.rs b/src/resources/generated/topup_failed.rs new file mode 100644 index 000000000..17b7680c7 --- /dev/null +++ b/src/resources/generated/topup_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "topup.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TopupFailed { +} diff --git a/src/resources/generated/topup_reversed.rs b/src/resources/generated/topup_reversed.rs new file mode 100644 index 000000000..41ed8dd98 --- /dev/null +++ b/src/resources/generated/topup_reversed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "topup.reversed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TopupReversed { +} diff --git a/src/resources/generated/topup_succeeded.rs b/src/resources/generated/topup_succeeded.rs new file mode 100644 index 000000000..c0dc6df8f --- /dev/null +++ b/src/resources/generated/topup_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "topup.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TopupSucceeded { +} 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_created.rs b/src/resources/generated/transfer_created.rs new file mode 100644 index 000000000..4ae6898d5 --- /dev/null +++ b/src/resources/generated/transfer_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "transfer.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TransferCreated { +} diff --git a/src/resources/generated/transfer_reversal.rs b/src/resources/generated/transfer_reversal.rs index 342970dbc..c26608e8c 100644 --- a/src/resources/generated/transfer_reversal.rs +++ b/src/resources/generated/transfer_reversal.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TransferReversalId; +use crate::ids::{TransferReversalId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{BalanceTransaction, Currency, Refund, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TransferReversal". /// diff --git a/src/resources/generated/transfer_reversed.rs b/src/resources/generated/transfer_reversed.rs new file mode 100644 index 000000000..5a12386db --- /dev/null +++ b/src/resources/generated/transfer_reversed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "transfer.reversed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TransferReversed { +} diff --git a/src/resources/generated/transfer_updated.rs b/src/resources/generated/transfer_updated.rs new file mode 100644 index 000000000..bf2bf62da --- /dev/null +++ b/src/resources/generated/transfer_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "transfer.updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TransferUpdated { +} diff --git a/src/resources/generated/treasury_credit_reversal_created.rs b/src/resources/generated/treasury_credit_reversal_created.rs new file mode 100644 index 000000000..79a73b063 --- /dev/null +++ b/src/resources/generated/treasury_credit_reversal_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.credit_reversal.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryCreditReversalCreated { +} diff --git a/src/resources/generated/treasury_credit_reversal_posted.rs b/src/resources/generated/treasury_credit_reversal_posted.rs new file mode 100644 index 000000000..39f626237 --- /dev/null +++ b/src/resources/generated/treasury_credit_reversal_posted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.credit_reversal.posted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryCreditReversalPosted { +} diff --git a/src/resources/generated/treasury_debit_reversal_completed.rs b/src/resources/generated/treasury_debit_reversal_completed.rs new file mode 100644 index 000000000..3e39b0d17 --- /dev/null +++ b/src/resources/generated/treasury_debit_reversal_completed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.debit_reversal.completed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryDebitReversalCompleted { +} diff --git a/src/resources/generated/treasury_debit_reversal_created.rs b/src/resources/generated/treasury_debit_reversal_created.rs new file mode 100644 index 000000000..32742fbe1 --- /dev/null +++ b/src/resources/generated/treasury_debit_reversal_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.debit_reversal.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryDebitReversalCreated { +} diff --git a/src/resources/generated/treasury_debit_reversal_initial_credit_granted.rs b/src/resources/generated/treasury_debit_reversal_initial_credit_granted.rs new file mode 100644 index 000000000..5b4d510a8 --- /dev/null +++ b/src/resources/generated/treasury_debit_reversal_initial_credit_granted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.debit_reversal.initial_credit_granted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryDebitReversalInitialCreditGranted { +} diff --git a/src/resources/generated/treasury_financial_account_closed.rs b/src/resources/generated/treasury_financial_account_closed.rs new file mode 100644 index 000000000..19d51e2f1 --- /dev/null +++ b/src/resources/generated/treasury_financial_account_closed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.financial_account.closed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryFinancialAccountClosed { +} diff --git a/src/resources/generated/treasury_financial_account_created.rs b/src/resources/generated/treasury_financial_account_created.rs new file mode 100644 index 000000000..ba60b0868 --- /dev/null +++ b/src/resources/generated/treasury_financial_account_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.financial_account.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryFinancialAccountCreated { +} diff --git a/src/resources/generated/treasury_financial_account_features_status_updated.rs b/src/resources/generated/treasury_financial_account_features_status_updated.rs new file mode 100644 index 000000000..5820ec134 --- /dev/null +++ b/src/resources/generated/treasury_financial_account_features_status_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.financial_account.features_status_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryFinancialAccountFeaturesStatusUpdated { +} diff --git a/src/resources/generated/treasury_inbound_transfer_canceled.rs b/src/resources/generated/treasury_inbound_transfer_canceled.rs new file mode 100644 index 000000000..e31160200 --- /dev/null +++ b/src/resources/generated/treasury_inbound_transfer_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.inbound_transfer.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryInboundTransferCanceled { +} diff --git a/src/resources/generated/treasury_inbound_transfer_created.rs b/src/resources/generated/treasury_inbound_transfer_created.rs new file mode 100644 index 000000000..779fd4630 --- /dev/null +++ b/src/resources/generated/treasury_inbound_transfer_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.inbound_transfer.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryInboundTransferCreated { +} diff --git a/src/resources/generated/treasury_inbound_transfer_failed.rs b/src/resources/generated/treasury_inbound_transfer_failed.rs new file mode 100644 index 000000000..f61307820 --- /dev/null +++ b/src/resources/generated/treasury_inbound_transfer_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.inbound_transfer.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryInboundTransferFailed { +} diff --git a/src/resources/generated/treasury_inbound_transfer_succeeded.rs b/src/resources/generated/treasury_inbound_transfer_succeeded.rs new file mode 100644 index 000000000..6ec140991 --- /dev/null +++ b/src/resources/generated/treasury_inbound_transfer_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.inbound_transfer.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryInboundTransferSucceeded { +} diff --git a/src/resources/generated/treasury_outbound_payment.rs b/src/resources/generated/treasury_outbound_payment.rs index 944a4a368..5e9a7826f 100644 --- a/src/resources/generated/treasury_outbound_payment.rs +++ b/src/resources/generated/treasury_outbound_payment.rs @@ -161,7 +161,7 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails /// This will be used to help determine if the OutboundPayment is authorized or should be blocked. pub ip_address: Option, - /// `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. + /// `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. /// /// Otherwise, `false`. pub present: bool, diff --git a/src/resources/generated/treasury_outbound_payment_canceled.rs b/src/resources/generated/treasury_outbound_payment_canceled.rs new file mode 100644 index 000000000..a905f322d --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentCanceled { +} diff --git a/src/resources/generated/treasury_outbound_payment_created.rs b/src/resources/generated/treasury_outbound_payment_created.rs new file mode 100644 index 000000000..7fd1ab305 --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentCreated { +} diff --git a/src/resources/generated/treasury_outbound_payment_expected_arrival_date_updated.rs b/src/resources/generated/treasury_outbound_payment_expected_arrival_date_updated.rs new file mode 100644 index 000000000..f1c5c5af1 --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_expected_arrival_date_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.expected_arrival_date_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentExpectedArrivalDateUpdated { +} diff --git a/src/resources/generated/treasury_outbound_payment_failed.rs b/src/resources/generated/treasury_outbound_payment_failed.rs new file mode 100644 index 000000000..4457d3663 --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentFailed { +} diff --git a/src/resources/generated/treasury_outbound_payment_posted.rs b/src/resources/generated/treasury_outbound_payment_posted.rs new file mode 100644 index 000000000..bc35e58bb --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_posted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.posted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentPosted { +} diff --git a/src/resources/generated/treasury_outbound_payment_returned.rs b/src/resources/generated/treasury_outbound_payment_returned.rs new file mode 100644 index 000000000..aa442e6cb --- /dev/null +++ b/src/resources/generated/treasury_outbound_payment_returned.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_payment.returned". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundPaymentReturned { +} diff --git a/src/resources/generated/treasury_outbound_transfer_canceled.rs b/src/resources/generated/treasury_outbound_transfer_canceled.rs new file mode 100644 index 000000000..a541af78c --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_canceled.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.canceled". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferCanceled { +} diff --git a/src/resources/generated/treasury_outbound_transfer_created.rs b/src/resources/generated/treasury_outbound_transfer_created.rs new file mode 100644 index 000000000..902b376c1 --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferCreated { +} diff --git a/src/resources/generated/treasury_outbound_transfer_expected_arrival_date_updated.rs b/src/resources/generated/treasury_outbound_transfer_expected_arrival_date_updated.rs new file mode 100644 index 000000000..ebfefc92b --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_expected_arrival_date_updated.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.expected_arrival_date_updated". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferExpectedArrivalDateUpdated { +} diff --git a/src/resources/generated/treasury_outbound_transfer_failed.rs b/src/resources/generated/treasury_outbound_transfer_failed.rs new file mode 100644 index 000000000..8bb7c1176 --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferFailed { +} diff --git a/src/resources/generated/treasury_outbound_transfer_posted.rs b/src/resources/generated/treasury_outbound_transfer_posted.rs new file mode 100644 index 000000000..ce55d1610 --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_posted.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.posted". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferPosted { +} diff --git a/src/resources/generated/treasury_outbound_transfer_returned.rs b/src/resources/generated/treasury_outbound_transfer_returned.rs new file mode 100644 index 000000000..4e13f2a07 --- /dev/null +++ b/src/resources/generated/treasury_outbound_transfer_returned.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.outbound_transfer.returned". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryOutboundTransferReturned { +} diff --git a/src/resources/generated/treasury_received_credit_created.rs b/src/resources/generated/treasury_received_credit_created.rs new file mode 100644 index 000000000..2e98e2795 --- /dev/null +++ b/src/resources/generated/treasury_received_credit_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.received_credit.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryReceivedCreditCreated { +} diff --git a/src/resources/generated/treasury_received_credit_failed.rs b/src/resources/generated/treasury_received_credit_failed.rs new file mode 100644 index 000000000..e1ced5303 --- /dev/null +++ b/src/resources/generated/treasury_received_credit_failed.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.received_credit.failed". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryReceivedCreditFailed { +} diff --git a/src/resources/generated/treasury_received_credit_succeeded.rs b/src/resources/generated/treasury_received_credit_succeeded.rs new file mode 100644 index 000000000..81d017d17 --- /dev/null +++ b/src/resources/generated/treasury_received_credit_succeeded.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.received_credit.succeeded". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryReceivedCreditSucceeded { +} diff --git a/src/resources/generated/treasury_received_debit_created.rs b/src/resources/generated/treasury_received_debit_created.rs new file mode 100644 index 000000000..f44b24713 --- /dev/null +++ b/src/resources/generated/treasury_received_debit_created.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "treasury.received_debit.created". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TreasuryReceivedDebitCreated { +} 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 2d5a335b9..f596d8f95 100644 --- a/src/resources/generated/version.rs +++ b/src/resources/generated/version.rs @@ -1,3 +1,3 @@ use crate::ApiVersion; -pub const VERSION: ApiVersion = ApiVersion::V2023_08_16; +pub const VERSION: ApiVersion = ApiVersion::V2023_10_16; \ No newline at end of file diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index 0bc31e036..cb04d8147 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, @@ -339,6 +331,20 @@ pub enum EventFilter { CheckoutSessionCompleted, #[serde(rename = "checkout.session.expired")] CheckoutSessionExpired, + #[serde(rename = "climate.order.canceled")] + ClimateOrderCanceled, + #[serde(rename = "climate.order.created")] + ClimateOrderCreated, + #[serde(rename = "climate.order.delayed")] + ClimateOrderDelayed, + #[serde(rename = "climate.order.delivered")] + ClimateOrderDelivered, + #[serde(rename = "climate.order.product_substituted")] + ClimateOrderProductSubstituted, + #[serde(rename = "climate.product.created")] + ClimateProductCreated, + #[serde(rename = "climate.product.pricing_updated")] + ClimateProductPricingUpdated, #[serde(rename = "coupon.created")] CouponCreated, #[serde(rename = "coupon.deleted")] @@ -473,14 +479,16 @@ pub enum EventFilter { IssuingDisputeSubmitted, #[serde(rename = "issuing_dispute.updated")] IssuingDisputeUpdated, + #[serde(rename = "issuing_token.created")] + IssuingTokenCreated, + #[serde(rename = "issuing_token.updated")] + IssuingTokenUpdated, #[serde(rename = "issuing_transaction.created")] IssuingTransactionCreated, #[serde(rename = "issuing_transaction.updated")] IssuingTransactionUpdated, #[serde(rename = "mandate.updated")] MandateUpdated, - #[serde(rename = "order.created")] - OrderCreated, #[serde(rename = "payment_intent.amount_capturable_updated")] PaymentIntentAmountCapturableUpdated, #[serde(rename = "payment_intent.canceled")] @@ -561,12 +569,6 @@ pub enum EventFilter { RadarEarlyFraudWarningCreated, #[serde(rename = "radar.early_fraud_warning.updated")] RadarEarlyFraudWarningUpdated, - #[serde(rename = "recipient.created")] - RecipientCreated, - #[serde(rename = "recipient.deleted")] - RecipientDeleted, - #[serde(rename = "recipient.updated")] - RecipientUpdated, #[serde(rename = "refund.created")] RefundCreated, #[serde(rename = "refund.updated")] @@ -593,12 +595,6 @@ pub enum EventFilter { SetupIntentSucceeded, #[serde(rename = "sigma.scheduled_query_run.created")] SigmaScheduledQueryRunCreated, - #[serde(rename = "sku.created")] - SkuCreated, - #[serde(rename = "sku.deleted")] - SkuDeleted, - #[serde(rename = "sku.updated")] - SkuUpdated, #[serde(rename = "source.canceled")] SourceCanceled, #[serde(rename = "source.chargeable")] @@ -735,12 +731,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", @@ -757,14 +749,17 @@ impl EventFilter { EventFilter::ChargeRefunded => "charge.refunded", EventFilter::ChargeSucceeded => "charge.succeeded", EventFilter::ChargeUpdated => "charge.updated", - EventFilter::CheckoutSessionAsyncPaymentFailed => { - "checkout.session.async_payment_failed" - } - EventFilter::CheckoutSessionAsyncPaymentSucceeded => { - "checkout.session.async_payment_succeeded" - } + EventFilter::CheckoutSessionAsyncPaymentFailed => "checkout.session.async_payment_failed", + EventFilter::CheckoutSessionAsyncPaymentSucceeded => "checkout.session.async_payment_succeeded", EventFilter::CheckoutSessionCompleted => "checkout.session.completed", EventFilter::CheckoutSessionExpired => "checkout.session.expired", + EventFilter::ClimateOrderCanceled => "climate.order.canceled", + EventFilter::ClimateOrderCreated => "climate.order.created", + EventFilter::ClimateOrderDelayed => "climate.order.delayed", + EventFilter::ClimateOrderDelivered => "climate.order.delivered", + EventFilter::ClimateOrderProductSubstituted => "climate.order.product_substituted", + EventFilter::ClimateProductCreated => "climate.product.created", + EventFilter::ClimateProductPricingUpdated => "climate.product.pricing_updated", EventFilter::CouponCreated => "coupon.created", EventFilter::CouponDeleted => "coupon.deleted", EventFilter::CouponUpdated => "coupon.updated", @@ -783,12 +778,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", @@ -796,43 +787,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", @@ -860,13 +827,12 @@ impl EventFilter { EventFilter::IssuingDisputeFundsReinstated => "issuing_dispute.funds_reinstated", EventFilter::IssuingDisputeSubmitted => "issuing_dispute.submitted", EventFilter::IssuingDisputeUpdated => "issuing_dispute.updated", + EventFilter::IssuingTokenCreated => "issuing_token.created", + EventFilter::IssuingTokenUpdated => "issuing_token.updated", EventFilter::IssuingTransactionCreated => "issuing_transaction.created", EventFilter::IssuingTransactionUpdated => "issuing_transaction.updated", EventFilter::MandateUpdated => "mandate.updated", - EventFilter::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", @@ -877,9 +843,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", @@ -908,9 +872,6 @@ impl EventFilter { EventFilter::QuoteFinalized => "quote.finalized", EventFilter::RadarEarlyFraudWarningCreated => "radar.early_fraud_warning.created", EventFilter::RadarEarlyFraudWarningUpdated => "radar.early_fraud_warning.updated", - EventFilter::RecipientCreated => "recipient.created", - EventFilter::RecipientDeleted => "recipient.deleted", - EventFilter::RecipientUpdated => "recipient.updated", EventFilter::RefundCreated => "refund.created", EventFilter::RefundUpdated => "refund.updated", EventFilter::ReportingReportRunFailed => "reporting.report_run.failed", @@ -924,9 +885,6 @@ impl EventFilter { EventFilter::SetupIntentSetupFailed => "setup_intent.setup_failed", EventFilter::SetupIntentSucceeded => "setup_intent.succeeded", EventFilter::SigmaScheduledQueryRunCreated => "sigma.scheduled_query_run.created", - EventFilter::SkuCreated => "sku.created", - EventFilter::SkuDeleted => "sku.deleted", - EventFilter::SkuUpdated => "sku.updated", EventFilter::SourceCanceled => "source.canceled", EventFilter::SourceChargeable => "source.chargeable", EventFilter::SourceFailed => "source.failed", @@ -949,9 +907,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", @@ -965,31 +921,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",