diff --git a/openapi/version.json b/openapi/version.json index 5e803d3a0..af4afeedc 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v814" + "version": "v915" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index 54178eda9..0f842192f 100644 --- a/src/resources/generated/account.rs +++ b/src/resources/generated/account.rs @@ -2,17 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::AccountId; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, TaxId, - VerificationDocumentParams, -}; +use crate::ids::{AccountId}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, TaxId, VerificationDocumentParams}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Account". /// @@ -118,12 +112,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). @@ -174,6 +170,7 @@ impl Object for Account { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BusinessProfile { + /// The applicant's gross annual revenue for its preceding fiscal year. pub annual_revenue: Option, @@ -217,6 +214,7 @@ pub struct BusinessProfile { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountAnnualRevenue { + /// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: Option, @@ -234,6 +232,7 @@ pub struct AccountAnnualRevenue { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountCapabilities { + /// The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit_payments: Option, @@ -246,6 +245,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -330,6 +333,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + /// The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -389,6 +396,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>, @@ -428,6 +436,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, @@ -439,6 +448,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>, @@ -480,6 +490,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, @@ -489,6 +500,7 @@ pub struct AccountRequirementsAlternative { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountRequirementsError { + /// The code for the type of error. pub code: AccountRequirementsErrorCode, @@ -501,6 +513,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, @@ -530,6 +543,7 @@ pub struct AccountSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountBacsDebitPaymentsSettings { + /// The Bacs Direct Debit display name for this account. /// /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. @@ -548,6 +562,7 @@ pub struct AccountBacsDebitPaymentsSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BrandingSettings { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. /// /// Must be square and at least 128px x 128px. @@ -567,12 +582,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, @@ -597,6 +614,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. @@ -610,6 +628,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. @@ -623,6 +642,7 @@ pub struct DeclineChargeOn { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountInvoicesSettings { + /// The list of default Account Tax IDs to automatically include on invoices. /// /// Account Tax IDs get added when an invoice is finalized. @@ -631,6 +651,7 @@ pub struct AccountInvoicesSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentsSettings { + /// The default text that appears on credit card statements when a charge is made. /// /// This field prefixes any dynamic `statement_descriptor` specified on the charge. @@ -657,6 +678,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. @@ -673,6 +695,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, @@ -680,6 +703,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, @@ -699,12 +723,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, @@ -718,6 +744,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. @@ -733,6 +760,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, @@ -746,6 +774,7 @@ pub struct CardIssuingAccountTermsOfService { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Company { + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, @@ -829,11 +858,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>, @@ -851,6 +882,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, @@ -863,6 +895,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, @@ -888,6 +921,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>, @@ -1012,6 +1046,8 @@ impl<'a> CreateAccount<'a> { /// The parameters for `Account::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListAccounts<'a> { + + /// Only return connected accounts that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1054,12 +1090,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>, @@ -1166,6 +1202,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, @@ -1185,6 +1222,7 @@ pub struct AcceptTos { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParams { + /// Settings specific to Bacs Direct Debit. #[serde(skip_serializing_if = "Option::is_none")] pub bacs_debit_payments: Option, @@ -1216,6 +1254,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
, @@ -1309,6 +1348,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, @@ -1321,6 +1361,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The amazon_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The au_becs_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -1405,6 +1449,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The mobilepay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + /// The oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1464,12 +1512,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")] @@ -1477,8 +1525,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")] @@ -1486,8 +1533,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")] @@ -1500,6 +1546,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
, @@ -1607,6 +1654,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, @@ -1619,6 +1667,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub afterpay_clearpay_payments: Option, + /// The amazon_pay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub amazon_pay_payments: Option, + /// The au_becs_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub au_becs_debit_payments: Option, @@ -1703,6 +1755,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub link_payments: Option, + /// The mobilepay_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay_payments: Option, + /// The oxxo_payments capability. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo_payments: Option, @@ -1762,12 +1818,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")] @@ -1775,8 +1831,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")] @@ -1784,8 +1839,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")] @@ -1798,6 +1852,7 @@ pub struct UpdateAccountDocuments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsBacsDebitPayments { + /// The Bacs Direct Debit Display Name for this account. /// /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. @@ -1811,6 +1866,7 @@ pub struct AccountSettingsParamsBacsDebitPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AccountSettingsParamsCardIssuing { + /// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance). #[serde(skip_serializing_if = "Option::is_none")] pub tos_acceptance: Option, @@ -1818,6 +1874,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, @@ -1825,6 +1882,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. @@ -1848,6 +1906,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, @@ -1876,6 +1935,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, @@ -1891,6 +1951,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, @@ -1898,6 +1959,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. @@ -1908,6 +1970,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. @@ -1918,6 +1981,18 @@ pub struct CreateAccountCapabilitiesAffirmPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesAfterpayClearpayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesAmazonPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -1928,6 +2003,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. @@ -1938,6 +2014,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. @@ -1948,6 +2025,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. @@ -1958,6 +2036,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. @@ -1968,6 +2047,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. @@ -1978,6 +2058,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. @@ -1988,6 +2069,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. @@ -1998,6 +2080,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. @@ -2008,6 +2091,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. @@ -2018,6 +2102,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. @@ -2028,6 +2113,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. @@ -2038,6 +2124,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. @@ -2048,6 +2135,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. @@ -2058,6 +2146,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. @@ -2068,6 +2157,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. @@ -2078,6 +2168,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. @@ -2088,6 +2179,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. @@ -2098,6 +2190,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. @@ -2108,6 +2201,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. @@ -2118,6 +2212,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. @@ -2128,6 +2223,18 @@ pub struct CreateAccountCapabilitiesLegacyPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesLinkPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesMobilepayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2138,6 +2245,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. @@ -2148,6 +2256,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. @@ -2158,6 +2267,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. @@ -2168,6 +2278,7 @@ pub struct CreateAccountCapabilitiesPaynowPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesPromptpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2178,6 +2289,7 @@ pub struct CreateAccountCapabilitiesPromptpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesRevolutPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2188,6 +2300,7 @@ pub struct CreateAccountCapabilitiesRevolutPayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesSepaDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2198,6 +2311,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. @@ -2208,6 +2322,7 @@ pub struct CreateAccountCapabilitiesSofortPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2218,6 +2333,7 @@ pub struct CreateAccountCapabilitiesSwishPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesTaxReportingUs1099K { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2228,6 +2344,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. @@ -2238,6 +2355,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. @@ -2248,6 +2366,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. @@ -2258,6 +2377,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. @@ -2268,6 +2388,7 @@ pub struct CreateAccountCapabilitiesUsBankAccountAchPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesZipPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2278,6 +2399,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>, @@ -2285,6 +2407,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>, @@ -2292,6 +2415,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>, @@ -2299,6 +2423,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>, @@ -2306,6 +2431,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>, @@ -2313,6 +2439,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>, @@ -2320,6 +2447,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>, @@ -2327,6 +2455,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. @@ -2344,6 +2473,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). @@ -2365,6 +2495,7 @@ pub struct PayoutSettingsParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -2377,6 +2508,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, @@ -2404,6 +2536,7 @@ pub struct PersonParamsRegisteredAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonParamsRelationship { + /// Whether the person is a director of the account's legal entity. /// /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -2429,6 +2562,7 @@ pub struct PersonParamsRelationship { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAcssDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2439,6 +2573,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. @@ -2449,6 +2584,18 @@ pub struct UpdateAccountCapabilitiesAffirmPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAfterpayClearpayPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesAmazonPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2459,6 +2606,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. @@ -2469,6 +2617,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. @@ -2479,6 +2628,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. @@ -2489,6 +2639,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. @@ -2499,6 +2650,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. @@ -2509,6 +2661,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. @@ -2519,6 +2672,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. @@ -2529,6 +2683,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. @@ -2539,6 +2694,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. @@ -2549,6 +2705,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. @@ -2559,6 +2716,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. @@ -2569,6 +2727,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. @@ -2579,6 +2738,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. @@ -2589,6 +2749,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. @@ -2599,6 +2760,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. @@ -2609,6 +2771,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. @@ -2619,6 +2782,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. @@ -2629,6 +2793,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. @@ -2639,6 +2804,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. @@ -2649,6 +2815,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. @@ -2659,6 +2826,18 @@ pub struct UpdateAccountCapabilitiesLegacyPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesLinkPayments { + + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesMobilepayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2669,6 +2848,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. @@ -2679,6 +2859,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. @@ -2689,6 +2870,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. @@ -2699,6 +2881,7 @@ pub struct UpdateAccountCapabilitiesPaynowPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesPromptpayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2709,6 +2892,7 @@ pub struct UpdateAccountCapabilitiesPromptpayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesRevolutPayPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2719,6 +2903,7 @@ pub struct UpdateAccountCapabilitiesRevolutPayPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesSepaDebitPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2729,6 +2914,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. @@ -2739,6 +2925,7 @@ pub struct UpdateAccountCapabilitiesSofortPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2749,6 +2936,7 @@ pub struct UpdateAccountCapabilitiesSwishPayments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTaxReportingUs1099K { + /// Passing true requests the capability for the account, if it is not already requested. /// /// A requested capability may not immediately become active. @@ -2759,6 +2947,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. @@ -2769,6 +2958,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. @@ -2779,6 +2969,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. @@ -2789,6 +2980,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. @@ -2799,6 +2991,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. @@ -2809,6 +3002,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>, @@ -2816,6 +3010,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>, @@ -2823,6 +3018,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>, @@ -2830,6 +3026,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>, @@ -2837,6 +3034,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>, @@ -2844,6 +3042,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>, @@ -2851,6 +3050,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>, @@ -2858,6 +3058,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, @@ -2873,6 +3074,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, @@ -2888,6 +3090,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. @@ -2903,6 +3106,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. @@ -3079,6 +3283,42 @@ impl std::default::Default for AccountCapabilitiesAfterpayClearpayPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `amazon_pay_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesAmazonPayPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesAmazonPayPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesAmazonPayPayments::Active => "active", + AccountCapabilitiesAmazonPayPayments::Inactive => "inactive", + AccountCapabilitiesAmazonPayPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesAmazonPayPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesAmazonPayPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesAmazonPayPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `bacs_debit_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3655,6 +3895,42 @@ impl std::default::Default for AccountCapabilitiesLinkPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `mobilepay_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesMobilepayPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesMobilepayPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesMobilepayPayments::Active => "active", + AccountCapabilitiesMobilepayPayments::Inactive => "inactive", + AccountCapabilitiesMobilepayPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesMobilepayPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesMobilepayPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesMobilepayPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `oxxo_payments` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4136,6 +4412,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -4228,6 +4505,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", @@ -4413,9 +4691,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", @@ -4491,9 +4767,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_link.rs b/src/resources/generated/account_link.rs index 487d6b4bb..70a1321e0 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, @@ -94,6 +96,7 @@ impl<'a> CreateAccountLink<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountLinkCollectionOptions { + /// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). /// /// If you don't specify `collection_options`, the default value is `currently_due`. diff --git a/src/resources/generated/account_session.rs b/src/resources/generated/account_session.rs index f80d3ed9c..a77de9cd6 100644 --- a/src/resources/generated/account_session.rs +++ b/src/resources/generated/account_session.rs @@ -51,7 +51,9 @@ impl Object for AccountSession { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectEmbeddedAccountSessionCreateComponents { - pub account_onboarding: ConnectEmbeddedBaseConfigClaim, + pub account_onboarding: ConnectEmbeddedAccountConfig, + + pub documents: ConnectEmbeddedBaseConfigClaim, pub payment_details: ConnectEmbeddedPaymentsConfig, @@ -60,6 +62,19 @@ pub struct ConnectEmbeddedAccountSessionCreateComponents { pub payouts: ConnectEmbeddedPayoutsConfig, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedAccountConfig { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + pub features: ConnectEmbeddedAccountFeatures, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedAccountFeatures { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectEmbeddedBaseConfigClaim { @@ -90,6 +105,12 @@ pub struct ConnectEmbeddedPaymentsFeatures { /// This is `true` by default. pub capture_payments: bool, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_on_behalf_of_charge_management: Option, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. @@ -163,6 +184,10 @@ pub struct CreateAccountSessionComponents { #[serde(skip_serializing_if = "Option::is_none")] pub account_onboarding: Option, + /// Configuration for the documents embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub documents: Option, + /// Configuration for the payment details embedded component. #[serde(skip_serializing_if = "Option::is_none")] pub payment_details: Option, @@ -187,6 +212,17 @@ pub struct CreateAccountSessionComponentsAccountOnboarding { pub features: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsDocuments { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + /// The list of features enabled in the embedded component. + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponentsPaymentDetails { @@ -224,6 +260,10 @@ pub struct CreateAccountSessionComponentsPayouts { pub struct CreateAccountSessionComponentsAccountOnboardingFeatures { } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountSessionComponentsDocumentsFeatures { +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponentsPaymentDetailsFeatures { @@ -233,6 +273,12 @@ pub struct CreateAccountSessionComponentsPaymentDetailsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub capture_payments: Option, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_on_behalf_of_charge_management: Option, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. @@ -255,6 +301,12 @@ pub struct CreateAccountSessionComponentsPaymentsFeatures { #[serde(skip_serializing_if = "Option::is_none")] pub capture_payments: Option, + /// Whether to allow connected accounts to manage destination charges that are created on behalf of them. + /// + /// This is `false` by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_on_behalf_of_charge_management: Option, + /// Whether to allow responding to disputes, including submitting evidence and accepting disputes. /// /// This is `true` by default. diff --git a/src/resources/generated/address.rs b/src/resources/generated/address.rs index 0bb574529..1b04d46d3 100644 --- a/src/resources/generated/address.rs +++ b/src/resources/generated/address.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Address". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Address { + /// City, district, suburb, town, or village. pub city: Option, diff --git a/src/resources/generated/api_errors.rs b/src/resources/generated/api_errors.rs index ba4195c7b..d52bb7069 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, @@ -118,6 +118,10 @@ pub enum ApiErrorsCode { ExpiredCard, FinancialConnectionsAccountInactive, FinancialConnectionsNoSuccessfulTransactionRefresh, + ForwardingApiInactive, + ForwardingApiInvalidParameter, + ForwardingApiUpstreamConnectionError, + ForwardingApiUpstreamConnectionTimeout, IdempotencyKeyInUse, IncorrectAddress, IncorrectCvc, @@ -240,9 +244,7 @@ impl ApiErrorsCode { match self { ApiErrorsCode::AccountClosed => "account_closed", ApiErrorsCode::AccountCountryInvalidAddress => "account_country_invalid_address", - ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => { - "account_error_country_change_requires_additional_steps" - } + ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => "account_error_country_change_requires_additional_steps", ApiErrorsCode::AccountInformationMismatch => "account_information_mismatch", ApiErrorsCode::AccountInvalid => "account_invalid", ApiErrorsCode::AccountNumberInvalid => "account_number_invalid", @@ -264,9 +266,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", @@ -288,12 +288,12 @@ impl ApiErrorsCode { ApiErrorsCode::DebitNotAuthorized => "debit_not_authorized", ApiErrorsCode::EmailInvalid => "email_invalid", ApiErrorsCode::ExpiredCard => "expired_card", - ApiErrorsCode::FinancialConnectionsAccountInactive => { - "financial_connections_account_inactive" - } - ApiErrorsCode::FinancialConnectionsNoSuccessfulTransactionRefresh => { - "financial_connections_no_successful_transaction_refresh" - } + ApiErrorsCode::FinancialConnectionsAccountInactive => "financial_connections_account_inactive", + ApiErrorsCode::FinancialConnectionsNoSuccessfulTransactionRefresh => "financial_connections_no_successful_transaction_refresh", + ApiErrorsCode::ForwardingApiInactive => "forwarding_api_inactive", + ApiErrorsCode::ForwardingApiInvalidParameter => "forwarding_api_invalid_parameter", + ApiErrorsCode::ForwardingApiUpstreamConnectionError => "forwarding_api_upstream_connection_error", + ApiErrorsCode::ForwardingApiUpstreamConnectionTimeout => "forwarding_api_upstream_connection_timeout", ApiErrorsCode::IdempotencyKeyInUse => "idempotency_key_in_use", ApiErrorsCode::IncorrectAddress => "incorrect_address", ApiErrorsCode::IncorrectCvc => "incorrect_cvc", @@ -320,9 +320,7 @@ impl ApiErrorsCode { ApiErrorsCode::InvoiceNoSubscriptionLineItems => "invoice_no_subscription_line_items", ApiErrorsCode::InvoiceNotEditable => "invoice_not_editable", ApiErrorsCode::InvoiceOnBehalfOfNotEditable => "invoice_on_behalf_of_not_editable", - ApiErrorsCode::InvoicePaymentIntentRequiresAction => { - "invoice_payment_intent_requires_action" - } + ApiErrorsCode::InvoicePaymentIntentRequiresAction => "invoice_payment_intent_requires_action", ApiErrorsCode::InvoiceUpcomingNone => "invoice_upcoming_none", ApiErrorsCode::LivemodeMismatch => "livemode_mismatch", ApiErrorsCode::LockTimeout => "lock_timeout", @@ -339,56 +337,28 @@ impl ApiErrorsCode { ApiErrorsCode::ParameterUnknown => "parameter_unknown", ApiErrorsCode::ParametersExclusive => "parameters_exclusive", ApiErrorsCode::PaymentIntentActionRequired => "payment_intent_action_required", - ApiErrorsCode::PaymentIntentAuthenticationFailure => { - "payment_intent_authentication_failure" - } - ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => { - "payment_intent_incompatible_payment_method" - } + ApiErrorsCode::PaymentIntentAuthenticationFailure => "payment_intent_authentication_failure", + ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => "payment_intent_incompatible_payment_method", ApiErrorsCode::PaymentIntentInvalidParameter => "payment_intent_invalid_parameter", - ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => { - "payment_intent_konbini_rejected_confirmation_number" - } + ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => "payment_intent_konbini_rejected_confirmation_number", ApiErrorsCode::PaymentIntentMandateInvalid => "payment_intent_mandate_invalid", - ApiErrorsCode::PaymentIntentPaymentAttemptExpired => { - "payment_intent_payment_attempt_expired" - } - ApiErrorsCode::PaymentIntentPaymentAttemptFailed => { - "payment_intent_payment_attempt_failed" - } + ApiErrorsCode::PaymentIntentPaymentAttemptExpired => "payment_intent_payment_attempt_expired", + ApiErrorsCode::PaymentIntentPaymentAttemptFailed => "payment_intent_payment_attempt_failed", ApiErrorsCode::PaymentIntentUnexpectedState => "payment_intent_unexpected_state", - ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => { - "payment_method_bank_account_already_verified" - } + ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => "payment_method_bank_account_already_verified", ApiErrorsCode::PaymentMethodBankAccountBlocked => "payment_method_bank_account_blocked", - ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => { - "payment_method_billing_details_address_missing" - } - ApiErrorsCode::PaymentMethodConfigurationFailures => { - "payment_method_configuration_failures" - } + ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => "payment_method_billing_details_address_missing", + ApiErrorsCode::PaymentMethodConfigurationFailures => "payment_method_configuration_failures", ApiErrorsCode::PaymentMethodCurrencyMismatch => "payment_method_currency_mismatch", ApiErrorsCode::PaymentMethodCustomerDecline => "payment_method_customer_decline", ApiErrorsCode::PaymentMethodInvalidParameter => "payment_method_invalid_parameter", - ApiErrorsCode::PaymentMethodInvalidParameterTestmode => { - "payment_method_invalid_parameter_testmode" - } + ApiErrorsCode::PaymentMethodInvalidParameterTestmode => "payment_method_invalid_parameter_testmode", ApiErrorsCode::PaymentMethodMicrodepositFailed => "payment_method_microdeposit_failed", - ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => { - "payment_method_microdeposit_verification_amounts_invalid" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => { - "payment_method_microdeposit_verification_amounts_mismatch" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => { - "payment_method_microdeposit_verification_attempts_exceeded" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => { - "payment_method_microdeposit_verification_descriptor_code_mismatch" - } - ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => { - "payment_method_microdeposit_verification_timeout" - } + ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => "payment_method_microdeposit_verification_amounts_invalid", + ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => "payment_method_microdeposit_verification_amounts_mismatch", + ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => "payment_method_microdeposit_verification_attempts_exceeded", + ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => "payment_method_microdeposit_verification_descriptor_code_mismatch", + ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => "payment_method_microdeposit_verification_timeout", ApiErrorsCode::PaymentMethodNotAvailable => "payment_method_not_available", ApiErrorsCode::PaymentMethodProviderDecline => "payment_method_provider_decline", ApiErrorsCode::PaymentMethodProviderTimeout => "payment_method_provider_timeout", @@ -403,9 +373,7 @@ impl ApiErrorsCode { ApiErrorsCode::PostalCodeInvalid => "postal_code_invalid", ApiErrorsCode::ProcessingError => "processing_error", ApiErrorsCode::ProductInactive => "product_inactive", - ApiErrorsCode::ProgressiveOnboardingLimitExceeded => { - "progressive_onboarding_limit_exceeded" - } + ApiErrorsCode::ProgressiveOnboardingLimitExceeded => "progressive_onboarding_limit_exceeded", ApiErrorsCode::RateLimit => "rate_limit", ApiErrorsCode::ReferToCustomer => "refer_to_customer", ApiErrorsCode::RefundDisputedPayment => "refund_disputed_payment", @@ -416,9 +384,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", @@ -430,9 +396,7 @@ impl ApiErrorsCode { ApiErrorsCode::StripeTaxInactive => "stripe_tax_inactive", ApiErrorsCode::TaxIdInvalid => "tax_id_invalid", ApiErrorsCode::TaxesCalculationFailed => "taxes_calculation_failed", - ApiErrorsCode::TerminalLocationCountryUnsupported => { - "terminal_location_country_unsupported" - } + ApiErrorsCode::TerminalLocationCountryUnsupported => "terminal_location_country_unsupported", ApiErrorsCode::TerminalReaderBusy => "terminal_reader_busy", ApiErrorsCode::TerminalReaderHardwareFault => "terminal_reader_hardware_fault", ApiErrorsCode::TerminalReaderOffline => "terminal_reader_offline", @@ -442,9 +406,7 @@ impl ApiErrorsCode { ApiErrorsCode::TokenAlreadyUsed => "token_already_used", ApiErrorsCode::TokenCardNetworkInvalid => "token_card_network_invalid", ApiErrorsCode::TokenInUse => "token_in_use", - ApiErrorsCode::TransferSourceBalanceParametersMismatch => { - "transfer_source_balance_parameters_mismatch" - } + ApiErrorsCode::TransferSourceBalanceParametersMismatch => "transfer_source_balance_parameters_mismatch", ApiErrorsCode::TransfersNotAllowed => "transfers_not_allowed", ApiErrorsCode::UrlInvalid => "url_invalid", } diff --git a/src/resources/generated/application.rs b/src/resources/generated/application.rs index 1ce12ce2c..763fd898b 100644 --- a/src/resources/generated/application.rs +++ b/src/resources/generated/application.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{ApplicationId}; +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::ids::ApplicationId; -use crate::params::Object; - /// The resource representing a Stripe "Application". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Application { diff --git a/src/resources/generated/application_fee.rs b/src/resources/generated/application_fee.rs index 507ba112d..63aba6b18 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,10 +90,12 @@ impl Object for ApplicationFee { /// The parameters for `ApplicationFee::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListApplicationFees<'a> { + /// Only return application fees for the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, + /// Only return applications fees that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -145,6 +139,5 @@ impl<'a> ListApplicationFees<'a> { impl Paginable for ListApplicationFees<'_> { type O = ApplicationFee; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} \ No newline at end of file diff --git a/src/resources/generated/balance.rs b/src/resources/generated/balance.rs index fa9738044..37b863781 100644 --- a/src/resources/generated/balance.rs +++ b/src/resources/generated/balance.rs @@ -2,16 +2,16 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::params::Object; +use crate::params::{Object}; use crate::resources::{BalanceAmountBySourceType, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Balance". /// /// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Balance { + /// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). /// /// You can find the available balance for each currency and payment type in the `source_types` property. @@ -49,6 +49,7 @@ impl Object for Balance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmount { + /// Balance amount. pub amount: i64, @@ -63,6 +64,7 @@ pub struct BalanceAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmountNet { + /// Balance amount. pub amount: i64, @@ -77,6 +79,7 @@ pub struct BalanceAmountNet { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceDetail { + /// Funds that are available for use. pub available: Vec, } diff --git a/src/resources/generated/balance_amount_by_source_type.rs b/src/resources/generated/balance_amount_by_source_type.rs index c83859bf5..cb5f1e0ea 100644 --- a/src/resources/generated/balance_amount_by_source_type.rs +++ b/src/resources/generated/balance_amount_by_source_type.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BalanceAmountBySourceType". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BalanceAmountBySourceType { + /// Amount for bank account. #[serde(skip_serializing_if = "Option::is_none")] pub bank_account: Option, diff --git a/src/resources/generated/balance_transaction.rs b/src/resources/generated/balance_transaction.rs index 17b9c5274..5dede0421 100644 --- a/src/resources/generated/balance_transaction.rs +++ b/src/resources/generated/balance_transaction.rs @@ -2,14 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{BalanceTransactionId, PayoutId, SourceId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - BalanceTransactionSourceUnion, BalanceTransactionStatus, Currency, FeeType, -}; +use crate::resources::{BalanceTransactionSourceUnion, BalanceTransactionStatus, Currency, FeeType}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BalanceTransaction". /// @@ -81,24 +78,19 @@ pub struct BalanceTransaction { } impl BalanceTransaction { + /// Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). /// /// The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. - pub fn list( - client: &Client, - params: &ListBalanceTransactions<'_>, - ) -> Response> { - client.get_query("/balance_transactions", ¶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 }) } } @@ -115,6 +107,7 @@ impl Object for BalanceTransaction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Fee { + /// Amount of the fee, in cents. pub amount: i64, @@ -131,7 +124,7 @@ pub struct Fee { /// Often useful for displaying to users. pub description: Option, - /// Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. + /// Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. #[serde(rename = "type")] pub type_: FeeType, } @@ -139,6 +132,8 @@ pub struct Fee { /// The parameters for `BalanceTransaction::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListBalanceTransactions<'a> { + + /// Only return transactions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -207,9 +202,8 @@ impl<'a> ListBalanceTransactions<'a> { impl Paginable for ListBalanceTransactions<'_> { type O = BalanceTransaction; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `BalanceTransaction`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -279,9 +273,7 @@ impl BalanceTransactionType { BalanceTransactionType::Payment => "payment", BalanceTransactionType::PaymentFailureRefund => "payment_failure_refund", BalanceTransactionType::PaymentNetworkReserveHold => "payment_network_reserve_hold", - BalanceTransactionType::PaymentNetworkReserveRelease => { - "payment_network_reserve_release" - } + BalanceTransactionType::PaymentNetworkReserveRelease => "payment_network_reserve_release", BalanceTransactionType::PaymentRefund => "payment_refund", BalanceTransactionType::PaymentReversal => "payment_reversal", BalanceTransactionType::PaymentUnreconciled => "payment_unreconciled", diff --git a/src/resources/generated/bank_account.rs b/src/resources/generated/bank_account.rs index 5a845ec68..3c2150c73 100644 --- a/src/resources/generated/bank_account.rs +++ b/src/resources/generated/bank_account.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::BankAccountId; +use crate::ids::{BankAccountId}; use crate::params::{Expandable, Metadata, Object}; use crate::resources::{Account, BankAccountStatus, Currency, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "BankAccount". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -100,8 +99,8 @@ pub struct BankAccount { /// If customer bank account verification has succeeded, the bank account status will be `verified`. /// If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. /// If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. For external accounts, possible values are `new`, `errored` and `verification_failed`. - /// If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. - /// In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. + /// If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. + /// In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. /// Other validations aren't run against external accounts because they're only used for payouts. /// This means the other statuses don't apply. #[serde(skip_serializing_if = "Option::is_none")] @@ -120,6 +119,7 @@ impl Object for BankAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ExternalAccountRequirements { + /// Fields that need to be collected to keep the external account enabled. /// /// If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. @@ -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, @@ -237,6 +238,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -329,6 +331,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", diff --git a/src/resources/generated/billing_details.rs b/src/resources/generated/billing_details.rs index 76f9626cb..cd089bc0d 100644 --- a/src/resources/generated/billing_details.rs +++ b/src/resources/generated/billing_details.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::resources::{Address}; use serde::{Deserialize, Serialize}; -use crate::resources::Address; - /// The resource representing a Stripe "billing_details". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct BillingDetails { + /// Billing address. pub address: Option
, diff --git a/src/resources/generated/billing_meter.rs b/src/resources/generated/billing_meter.rs new file mode 100644 index 000000000..a05010d28 --- /dev/null +++ b/src/resources/generated/billing_meter.rs @@ -0,0 +1,227 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{BillingMeterId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeter". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeter { + /// Unique identifier for the object. + pub id: BillingMeterId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + pub customer_mapping: BillingMeterResourceCustomerMappingSettings, + + pub default_aggregation: BillingMeterResourceAggregationSettings, + + /// The meter's name. + pub display_name: String, + + /// The name of the usage event to record usage for. + /// + /// Corresponds with the `event_name` field on usage events. + pub event_name: String, + + /// The time window to pre-aggregate usage events for, if any. + pub event_time_window: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The meter's status. + pub status: BillingMeterStatus, + + pub status_transitions: BillingMeterResourceBillingMeterStatusTransitions, + + /// Time at which the object was last updated. + /// + /// Measured in seconds since the Unix epoch. + pub updated: Timestamp, + + pub value_settings: BillingMeterResourceBillingMeterValue, +} + +impl Object for BillingMeter { + type Id = BillingMeterId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "billing.meter" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceAggregationSettings { + + /// Specifies how events are aggregated. + pub formula: BillingMeterResourceAggregationSettingsFormula, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceBillingMeterStatusTransitions { + + /// The time the meter was deactivated, if any. + /// + /// Measured in seconds since Unix epoch. + pub deactivated_at: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceBillingMeterValue { + + /// The key in the usage event payload to use as the value for this meter. + pub event_payload_key: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterResourceCustomerMappingSettings { + + /// The key in the usage event payload to use for mapping the event to a customer. + pub event_payload_key: String, + + /// The method for mapping a meter event to a customer. + #[serde(rename = "type")] + pub type_: BillingMeterResourceCustomerMappingSettingsType, +} + +/// An enum representing the possible values of an `BillingMeter`'s `event_time_window` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterEventTimeWindow { + Day, + Hour, +} + +impl BillingMeterEventTimeWindow { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterEventTimeWindow::Day => "day", + BillingMeterEventTimeWindow::Hour => "hour", + } + } +} + +impl AsRef for BillingMeterEventTimeWindow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterEventTimeWindow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterEventTimeWindow { + fn default() -> Self { + Self::Day + } +} + +/// An enum representing the possible values of an `BillingMeterResourceAggregationSettings`'s `formula` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterResourceAggregationSettingsFormula { + Count, + Sum, +} + +impl BillingMeterResourceAggregationSettingsFormula { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterResourceAggregationSettingsFormula::Count => "count", + BillingMeterResourceAggregationSettingsFormula::Sum => "sum", + } + } +} + +impl AsRef for BillingMeterResourceAggregationSettingsFormula { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterResourceAggregationSettingsFormula { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterResourceAggregationSettingsFormula { + fn default() -> Self { + Self::Count + } +} + +/// An enum representing the possible values of an `BillingMeterResourceCustomerMappingSettings`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterResourceCustomerMappingSettingsType { + ById, +} + +impl BillingMeterResourceCustomerMappingSettingsType { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterResourceCustomerMappingSettingsType::ById => "by_id", + } + } +} + +impl AsRef for BillingMeterResourceCustomerMappingSettingsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterResourceCustomerMappingSettingsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterResourceCustomerMappingSettingsType { + fn default() -> Self { + Self::ById + } +} + +/// An enum representing the possible values of an `BillingMeter`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterStatus { + Active, + Inactive, +} + +impl BillingMeterStatus { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterStatus::Active => "active", + BillingMeterStatus::Inactive => "inactive", + } + } +} + +impl AsRef for BillingMeterStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterStatus { + fn default() -> Self { + Self::Active + } +} diff --git a/src/resources/generated/billing_meter_event.rs b/src/resources/generated/billing_meter_event.rs new file mode 100644 index 000000000..1cb0e82f5 --- /dev/null +++ b/src/resources/generated/billing_meter_event.rs @@ -0,0 +1,43 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEvent". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEvent { + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// The name of the meter event. + /// + /// Corresponds with the `event_name` field on a meter. + pub event_name: String, + + /// A unique identifier for the event. + pub identifier: String, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The payload of the event. + pub payload: String, + + /// The timestamp passed in when creating the event. + /// + /// Measured in seconds since the Unix epoch. + pub timestamp: Timestamp, +} + +impl Object for BillingMeterEvent { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "billing.meter_event" + } +} diff --git a/src/resources/generated/billing_meter_event_adjustment.rs b/src/resources/generated/billing_meter_event_adjustment.rs new file mode 100644 index 000000000..be733ad87 --- /dev/null +++ b/src/resources/generated/billing_meter_event_adjustment.rs @@ -0,0 +1,59 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEventAdjustment". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEventAdjustment { + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The meter event adjustment's status. + pub status: BillingMeterEventAdjustmentStatus, +} + +impl Object for BillingMeterEventAdjustment { + type Id = (); + fn id(&self) -> Self::Id {} + fn object(&self) -> &'static str { + "billing.meter_event_adjustment" + } +} + +/// An enum representing the possible values of an `BillingMeterEventAdjustment`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BillingMeterEventAdjustmentStatus { + Complete, + Pending, +} + +impl BillingMeterEventAdjustmentStatus { + pub fn as_str(self) -> &'static str { + match self { + BillingMeterEventAdjustmentStatus::Complete => "complete", + BillingMeterEventAdjustmentStatus::Pending => "pending", + } + } +} + +impl AsRef for BillingMeterEventAdjustmentStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BillingMeterEventAdjustmentStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BillingMeterEventAdjustmentStatus { + fn default() -> Self { + Self::Complete + } +} diff --git a/src/resources/generated/billing_meter_event_summary.rs b/src/resources/generated/billing_meter_event_summary.rs new file mode 100644 index 000000000..8542109ec --- /dev/null +++ b/src/resources/generated/billing_meter_event_summary.rs @@ -0,0 +1,41 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{BillingMeterEventSummaryId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BillingMeterEventSummary". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BillingMeterEventSummary { + /// Unique identifier for the object. + pub id: BillingMeterEventSummaryId, + + /// Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). + /// + /// The aggregation strategy is defined on meter via `default_aggregation``. + pub aggregated_value: f64, + + /// End timestamp for this usage summary (inclusive). + pub end_time: Timestamp, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The meter associated with this usage summary. + pub meter: String, + + /// Start timestamp for this usage summary (inclusive). + pub start_time: Timestamp, +} + +impl Object for BillingMeterEventSummary { + type Id = BillingMeterEventSummaryId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "billing.meter_event_summary" + } +} diff --git a/src/resources/generated/billing_portal_configuration.rs b/src/resources/generated/billing_portal_configuration.rs index 6a27997c3..413f0004f 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. @@ -175,11 +184,13 @@ pub struct PortalSubscriptionUpdate { /// Determines how to handle prorations resulting from subscription updates. /// /// Valid values are `none`, `create_prorations`, and `always_invoice`. + /// Defaults to a value of `none` if you don't set it during creation. pub proration_behavior: PortalSubscriptionUpdateProrationBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalSubscriptionUpdateProduct { + /// The list of price IDs which, when subscribed to, a subscription can be updated. pub prices: Vec, diff --git a/src/resources/generated/billing_portal_session.rs b/src/resources/generated/billing_portal_session.rs index f8cc2e323..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,6 +181,7 @@ pub struct PortalFlowsSubscriptionUpdateConfirmDiscount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsSubscriptionUpdateConfirmItem { + /// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. pub id: Option, @@ -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/capability.rs b/src/resources/generated/capability.rs index c3b906ebb..fd1c630b2 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -238,6 +238,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -330,6 +331,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index 458001f38..0607e229f 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,6 +157,9 @@ pub struct Card { #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, + /// For external accounts that are cards, possible values are `new` and `errored`. /// /// If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. @@ -181,6 +183,15 @@ impl Object for Card { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TokenCardNetworks { + + /// The preferred network for co-branded cards. + /// + /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + pub preferred: Option, +} + /// An enum representing the possible values of an `Card`'s `available_payout_methods` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/cash_balance.rs b/src/resources/generated/cash_balance.rs index d92f14760..4ba7fc469 100644 --- a/src/resources/generated/cash_balance.rs +++ b/src/resources/generated/cash_balance.rs @@ -2,15 +2,15 @@ // This file was automatically generated. // ====================================== +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::params::Object; - /// The resource representing a Stripe "cash_balance". /// /// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CashBalance { + /// A hash of all cash balances available to this customer. /// /// You cannot delete a customer with any cash balances, even if the balance is 0. @@ -36,6 +36,7 @@ impl Object for CashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceCustomerBalanceSettings { + /// The configuration for how funds that land in the customer cash balance are reconciled. pub reconciliation_mode: CustomerBalanceCustomerBalanceSettingsReconciliationMode, diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index 2a627f6d2..91b4e983d 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -2,18 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, CustomerId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, - ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, - PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardWalletApplePay, - PaymentMethodDetailsCardWalletGooglePay, PaymentSource, RadarRadarOptions, Refund, Review, - Shipping, Transfer, -}; +use crate::resources::{Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, PaymentMethodDetailsCardInstallmentsPlan, 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) +} + /// This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) /// to initiate a new payment instead. @@ -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, @@ -430,6 +431,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub multibanco: Option, @@ -490,6 +494,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. @@ -507,6 +512,7 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAchCreditTransfer { + /// Account number to transfer funds to. pub account_number: Option, @@ -522,6 +528,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`. @@ -547,6 +554,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, @@ -570,10 +578,12 @@ pub struct PaymentMethodDetailsAcssDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsAffirm {} +pub struct PaymentMethodDetailsAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsAfterpayClearpay { + /// The Afterpay order ID associated with this payment intent. pub order_id: Option, @@ -583,6 +593,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, @@ -601,6 +612,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. @@ -620,6 +632,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, @@ -650,10 +663,12 @@ pub struct PaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsBlik {} +pub struct PaymentMethodDetailsBlik { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsBoleto { + /// The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers). pub tax_id: String, } @@ -786,12 +801,14 @@ pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeat #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture { + /// Indicates whether or not multiple captures are supported. pub status: PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardChecks { + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. pub address_line1_check: Option, @@ -804,18 +821,21 @@ pub struct PaymentMethodDetailsCardChecks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardInstallments { + /// Installment plan selected for the payment. pub plan: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardNetworkToken { + /// Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. pub used: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsCardPresent { + /// The authorized amount. pub amount_authorized: Option, @@ -913,12 +933,14 @@ pub struct PaymentMethodDetailsCardPresent { #[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, @@ -937,7 +959,9 @@ pub struct PaymentMethodDetailsCardPresentReceipt { /// A code returned by the card issuer. pub authorization_response_code: Option, - /// How the cardholder verified ownership of the card. + /// Describes the method used by the cardholder to verify ownership of the card. + /// + /// One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. pub cardholder_verification_method: Option, /// EMV tag 84. @@ -954,6 +978,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, @@ -987,13 +1012,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. @@ -1020,10 +1048,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. @@ -1051,6 +1081,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, @@ -1059,10 +1090,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`. @@ -1077,6 +1110,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`. @@ -1093,6 +1127,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, @@ -1111,12 +1146,14 @@ pub struct PaymentMethodDetailsGiropay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsGrabpay { + /// Unique transaction id generated by GrabPay. pub transaction_id: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsIdeal { + /// The customer's bank. /// /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -1143,6 +1180,7 @@ pub struct PaymentMethodDetailsIdeal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsInteracPresent { + /// Card brand. /// /// Can be `interac`, `mastercard` or `visa`. @@ -1227,6 +1265,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, @@ -1245,7 +1284,9 @@ pub struct PaymentMethodDetailsInteracPresentReceipt { /// A code returned by the card issuer. pub authorization_response_code: Option, - /// How the cardholder verified ownership of the card. + /// Describes the method used by the cardholder to verify ownership of the card. + /// + /// One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. pub cardholder_verification_method: Option, /// EMV tag 84. @@ -1262,6 +1303,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, @@ -1273,25 +1315,54 @@ pub struct PaymentMethodDetailsKlarna { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsKonbini { + /// If the payment succeeded, this contains the details of the convenience store where the payment was completed. pub store: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsKonbiniStore { + /// The name of the convenience store chain where the payment was completed. pub chain: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsLink { + /// Two-letter ISO code representing the funding source country beneath the Link payment. /// You could use this attribute to get a sense of international fees. pub country: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsMobilepay { + + pub card: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InternalCard { + + /// Brand of the card used in the transaction. + pub brand: Option, + + /// Two-letter ISO code representing the country of the card. + pub country: Option, + + /// Two digit number representing the card's expiration month. + pub exp_month: Option, + + /// Two digit number representing the card's expiration year. + pub exp_year: Option, + + /// The last 4 digits of the card. + pub last4: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsMultibanco { + /// Entity number associated with this Multibanco payment. pub entity: Option, @@ -1301,12 +1372,14 @@ pub struct PaymentMethodDetailsMultibanco { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsOxxo { + /// OXXO reference number. pub number: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsP24 { + /// The customer's bank. /// /// Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. @@ -1324,12 +1397,14 @@ pub struct PaymentMethodDetailsP24 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPaynow { + /// Reference number associated with this PayNow payment. pub reference: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPaypal { + /// Owner's email. /// /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. @@ -1356,6 +1431,7 @@ pub struct PaymentMethodDetailsPaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPix { + /// Unique transaction id generated by BCB. #[serde(skip_serializing_if = "Option::is_none")] pub bank_transaction_id: Option, @@ -1363,15 +1439,18 @@ pub struct PaymentMethodDetailsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsPromptpay { + /// Bill reference generated by PromptPay. pub reference: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsRevolutPay {} +pub struct PaymentMethodDetailsRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSepaCreditTransfer { + /// Name of the bank associated with the bank account. pub bank_name: Option, @@ -1384,6 +1463,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, @@ -1409,6 +1489,7 @@ pub struct PaymentMethodDetailsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSofort { + /// Bank code of bank associated with the bank account. pub bank_code: Option, @@ -1442,10 +1523,12 @@ pub struct PaymentMethodDetailsSofort { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsStripeAccount {} +pub struct PaymentMethodDetailsStripeAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsSwish { + /// Uniquely identifies the payer's Swish account. /// /// You can use this attribute to check whether two Swish transactions were paid for by the same payer. @@ -1460,6 +1543,7 @@ pub struct PaymentMethodDetailsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsUsBankAccount { + /// Account holder type: individual or company. pub account_holder_type: Option, @@ -1479,15 +1563,24 @@ pub struct PaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// Reference number to locate ACH payments with customer's bank. + pub payment_reference: Option, + /// Routing number of the bank account. pub routing_number: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsWechat {} +pub struct PaymentMethodDetailsWechat { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsWechatPay { + /// Uniquely identifies this particular WeChat Pay account. /// /// You can use this attribute to check whether two WeChat accounts are the same. @@ -1498,10 +1591,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>, @@ -1511,6 +1606,7 @@ pub struct PaypalSellerProtection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Rule { + /// The action taken on the payment. pub action: String, @@ -1523,6 +1619,7 @@ pub struct Rule { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ThreeDSecureDetailsCharge { + /// For authenticated transactions: how the customer was authenticated by /// the issuing bank. pub authentication_flow: Option, @@ -1559,6 +1656,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). @@ -1708,6 +1806,8 @@ impl<'a> CreateCharge<'a> { /// The parameters for `Charge::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCharges<'a> { + + /// Only return charges that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1765,12 +1865,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. @@ -1841,6 +1941,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, @@ -1848,12 +1949,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. @@ -1937,8 +2040,7 @@ impl std::default::Default for FraudDetailsParamsUserReport { /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationStatus { Disabled, Enabled, } @@ -1972,8 +2074,7 @@ impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiRe /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationStatus { Available, Unavailable, } @@ -2007,8 +2108,7 @@ impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiRe /// An enum representing the possible values of an `PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus -{ +pub enum PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureStatus { Available, Unavailable, } @@ -2062,16 +2162,12 @@ impl AsRef for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulti } } -impl std::fmt::Display - for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus -{ +impl std::fmt::Display for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus -{ +impl std::default::Default for PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureStatus { fn default() -> Self { Self::Available } @@ -2165,15 +2261,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", } } } @@ -2318,9 +2408,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", @@ -2330,25 +2418,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", @@ -2642,15 +2720,9 @@ impl PaymentMethodDetailsInteracPresentReadMethod { match self { PaymentMethodDetailsInteracPresentReadMethod::ContactEmv => "contact_emv", PaymentMethodDetailsInteracPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodDetailsInteracPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } - PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeTrack2 => { - "magnetic_stripe_track2" - } + PaymentMethodDetailsInteracPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodDetailsInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", } } } diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index b0988c132..5bf999fb1 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -2,23 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, - SubscriptionId, -}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Address, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, - InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, - Subscription, TaxId, TaxRate, -}; +use crate::ids::{CheckoutSessionId, CustomerId, PaymentIntentId, PaymentLinkId, PaymentMethodConfigurationId, SubscriptionId}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Address, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, InvoiceSettingRenderingOptions, LinkedAccountOptionsUsBankAccount, PaymentIntent, PaymentLink, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodOptionsCustomerBalanceEuBankAccount, SetupIntent, Shipping, ShippingRate, Subscription, TaxId, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Session". /// @@ -43,6 +31,8 @@ pub struct CheckoutSession { pub automatic_tax: PaymentPagesCheckoutSessionAutomaticTax, /// Describes whether Checkout should collect the customer's billing address. + /// + /// Defaults to `auto`. pub billing_address_collection: Option, /// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. @@ -94,7 +84,7 @@ pub struct CheckoutSession { /// The customer details including the customer's tax exempt status and the customer's tax IDs. /// - /// Only the customer's email is present on Sessions in `setup` mode. + /// Customer's address details are not present on Sessions in `setup` mode. pub customer_details: Option, /// If provided, this value will be used when the Customer object is created. @@ -141,11 +131,12 @@ pub struct CheckoutSession { pub payment_link: Option>, /// Configure whether a Checkout Session should collect a payment method. + /// + /// Defaults to `always`. pub payment_method_collection: Option, /// Information about the payment method configuration used for this Checkout session if using dynamic payment methods. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. pub payment_method_options: Option, @@ -165,10 +156,10 @@ pub struct CheckoutSession { /// The ID of the original expired Checkout Session that triggered the recovery flow. pub recovered_from: Option, - /// Applies to Checkout Sessions with `ui_mode: embedded`. + /// This parameter applies to `ui_mode: embedded`. /// - /// By default, Stripe will always redirect to your return_url after a successful confirmation. - /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + /// Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. + /// Defaults to `always`. #[serde(skip_serializing_if = "Option::is_none")] pub redirect_on_completion: Option, @@ -218,7 +209,7 @@ pub struct CheckoutSession { /// The UI mode of the Session. /// - /// Can be `hosted` (default) or `embedded`. + /// Defaults to `hosted`. pub ui_mode: Option, /// The URL to the Checkout Session. @@ -230,13 +221,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 { @@ -256,6 +246,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, @@ -346,6 +337,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. @@ -370,6 +362,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, @@ -394,6 +387,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. @@ -405,6 +399,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. @@ -416,6 +411,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. @@ -427,6 +423,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. @@ -438,6 +435,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. @@ -449,6 +447,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. @@ -460,6 +459,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. @@ -476,9 +476,17 @@ pub struct CheckoutBoletoPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCardPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, + /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). + /// + /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + /// If not provided, this value defaults to `automatic`. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + pub request_three_d_secure: CheckoutCardPaymentMethodOptionsRequestThreeDSecure, + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -506,6 +514,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, @@ -513,6 +522,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. @@ -524,6 +534,7 @@ pub struct CheckoutCashappPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutCustomerBalancePaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -543,6 +554,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, @@ -550,8 +562,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")] @@ -560,6 +571,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. @@ -571,6 +583,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. @@ -582,6 +595,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. @@ -593,6 +607,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. @@ -604,6 +619,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. @@ -615,6 +631,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. @@ -626,6 +643,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. @@ -642,6 +660,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. @@ -653,6 +672,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. @@ -669,6 +689,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. @@ -680,6 +701,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. @@ -691,6 +713,7 @@ pub struct CheckoutPaynowPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPaypalPaymentMethodOptions { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -714,15 +737,18 @@ pub struct CheckoutPaypalPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutPixPaymentMethodOptions { + /// The number of seconds after which Pix payment will expire. pub expires_after_seconds: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CheckoutRevolutPayPaymentMethodOptions {} +pub struct CheckoutRevolutPayPaymentMethodOptions { +} #[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. @@ -734,6 +760,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. @@ -745,6 +772,7 @@ pub struct CheckoutSofortPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSwishPaymentMethodOptions { + /// The order reference that will be displayed to customers in the Swish application. /// /// Defaults to the `id` of the Payment Intent. @@ -753,6 +781,7 @@ pub struct CheckoutSwishPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -771,12 +800,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`. @@ -797,6 +828,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, @@ -812,6 +844,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, @@ -822,9 +855,9 @@ pub struct PaymentPagesCheckoutSessionConsent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionConsentCollection { + /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -838,6 +871,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, @@ -853,6 +887,7 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomFields { + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -881,6 +916,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. @@ -894,6 +930,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. @@ -906,6 +943,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, @@ -918,6 +956,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. @@ -931,6 +970,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, @@ -943,6 +983,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionCustomText { + /// Custom text that should be displayed after the payment confirmation button. pub after_submit: Option, @@ -958,12 +999,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. @@ -990,6 +1033,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, @@ -998,6 +1042,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>>, @@ -1028,6 +1073,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -1037,6 +1083,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -1045,22 +1092,24 @@ pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionPhoneNumberCollection { + /// Indicates whether phone number collection is enabled for the session. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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, @@ -1082,6 +1131,7 @@ pub struct PaymentPagesCheckoutSessionShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, @@ -1098,6 +1148,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, @@ -1107,7 +1158,8 @@ pub struct PaymentPagesCheckoutSessionShippingOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. #[serde(rename = "type")] pub type_: PaymentPagesCheckoutSessionTaxIdType, @@ -1117,12 +1169,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, @@ -1138,6 +1192,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -1147,6 +1202,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -1156,6 +1212,7 @@ pub struct LineItemsDiscountAmount { /// The parameters for `CheckoutSession::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCheckoutSession<'a> { + /// Configure actions after a Checkout Session has expired. #[serde(skip_serializing_if = "Option::is_none")] pub after_expiration: Option, @@ -1169,6 +1226,8 @@ pub struct CreateCheckoutSession<'a> { pub automatic_tax: Option, /// Specify whether Checkout should collect the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, @@ -1292,7 +1351,8 @@ pub struct CreateCheckoutSession<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -1329,8 +1389,8 @@ pub struct CreateCheckoutSession<'a> { /// This parameter applies to `ui_mode: embedded`. /// - /// By default, Stripe will always redirect to your return_url after a successful confirmation. - /// If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + /// Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. + /// Defaults to `always`. #[serde(skip_serializing_if = "Option::is_none")] pub redirect_on_completion: Option, @@ -1379,9 +1439,9 @@ pub struct CreateCheckoutSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub tax_id_collection: Option, - /// `ui_mode` can be `hosted` or `embedded`. + /// The UI mode of the Session. /// - /// The default is `hosted`. + /// Defaults to `hosted`. #[serde(skip_serializing_if = "Option::is_none")] pub ui_mode: Option, } @@ -1434,7 +1494,8 @@ impl<'a> CreateCheckoutSession<'a> { /// The parameters for `CheckoutSession::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCheckoutSessions<'a> { - /// Only return the Checkout Sessions that were created during the given date interval. + + /// Only return Checkout Sessions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1507,11 +1568,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, @@ -1519,6 +1580,7 @@ pub struct CreateCheckoutSessionAfterExpiration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAutomaticTax { + /// Set to true to enable automatic taxes. pub enabled: bool, @@ -1532,12 +1594,12 @@ pub struct CreateCheckoutSessionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionConsentCollection { + /// Determines the display of payment method reuse agreement text in the UI. /// /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -1554,6 +1616,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, @@ -1587,6 +1650,7 @@ pub struct CreateCheckoutSessionCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -1601,12 +1665,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`. /// @@ -1630,6 +1694,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, @@ -1641,6 +1706,7 @@ pub struct CreateCheckoutSessionDiscounts { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreation { + /// Set to `true` to enable invoice creation. pub enabled: bool, @@ -1651,6 +1717,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, @@ -1686,6 +1753,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. @@ -1774,6 +1842,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, @@ -1897,12 +1966,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. @@ -1924,6 +1995,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. /// @@ -1933,6 +2005,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, @@ -1944,6 +2017,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. @@ -2016,18 +2090,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`. @@ -2043,6 +2120,7 @@ pub struct CreateCheckoutSessionAfterExpirationRecovery { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -2054,6 +2132,7 @@ pub struct CreateCheckoutSessionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. @@ -2063,6 +2142,7 @@ pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -2071,6 +2151,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. @@ -2083,6 +2164,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, @@ -2094,6 +2176,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, @@ -2105,30 +2188,35 @@ pub struct CreateCheckoutSessionCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -2168,6 +2256,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. @@ -2189,6 +2278,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). @@ -2233,6 +2323,7 @@ pub struct CreateCheckoutSessionLineItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentIntentDataShipping { + /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress, @@ -2256,6 +2347,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, @@ -2270,6 +2362,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). @@ -2287,17 +2380,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. @@ -2309,18 +2401,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. @@ -2332,42 +2425,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. @@ -2385,10 +2479,19 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCard { + /// Installment options for card payments. #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, + /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). + /// + /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + /// If not provided, this value defaults to `automatic`. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_three_d_secure: Option, + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -2416,18 +2519,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, @@ -2444,12 +2548,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. @@ -2461,6 +2565,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. @@ -2472,30 +2577,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. @@ -2507,6 +2613,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. @@ -2518,6 +2625,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. @@ -2531,12 +2639,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. @@ -2548,6 +2656,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. @@ -2565,6 +2674,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. @@ -2580,6 +2690,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. @@ -2591,6 +2702,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, @@ -2620,6 +2732,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. @@ -2629,30 +2742,31 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsPix { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsRevolutPay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSepaDebit { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -2664,6 +2778,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsSwish { + /// The order reference that will be displayed to customers in the Swish application. /// /// Defaults to the `id` of the Payment Intent. @@ -2673,10 +2788,10 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -2684,17 +2799,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. @@ -2710,18 +2824,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. /// @@ -2764,6 +2877,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -2773,6 +2887,7 @@ pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -2786,12 +2901,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. @@ -2805,6 +2922,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. @@ -2818,6 +2936,7 @@ pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -2829,18 +2948,19 @@ pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataProductData { + /// The product's description, meant to be displayable to the customer. /// /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. @@ -2869,6 +2989,7 @@ pub struct CreateCheckoutSessionLineItemsPriceDataProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -2884,6 +3005,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, @@ -2910,6 +3032,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. @@ -2920,8 +3043,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. /// @@ -2931,17 +3053,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")] @@ -2968,41 +3089,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, @@ -3015,13 +3133,12 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount { /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[serde(skip_serializing_if = "Option::is_none")] - pub currency_options: Option< - CurrencyMap, - >, + pub currency_options: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -3033,13 +3150,14 @@ pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -3048,6 +3166,7 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferE #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -3057,6 +3176,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateM #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -3066,6 +3186,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, @@ -3073,9 +3194,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. @@ -3232,9 +3351,7 @@ impl CheckoutAcssDebitPaymentMethodOptionsVerificationMethod { match self { CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Automatic => "automatic", CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Instant => "instant", - CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => { - "microdeposits" - } + CheckoutAcssDebitPaymentMethodOptionsVerificationMethod::Microdeposits => "microdeposits", } } } @@ -3488,6 +3605,42 @@ impl std::default::Default for CheckoutBoletoPaymentMethodOptionsSetupFutureUsag } } +/// An enum representing the possible values of an `CheckoutCardPaymentMethodOptions`'s `request_three_d_secure` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + Any, + Automatic, + Challenge, +} + +impl CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + pub fn as_str(self) -> &'static str { + match self { + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Any => "any", + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Automatic => "automatic", + CheckoutCardPaymentMethodOptionsRequestThreeDSecure::Challenge => "challenge", + } + } +} + +impl AsRef for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CheckoutCardPaymentMethodOptionsRequestThreeDSecure { + fn default() -> Self { + Self::Any + } +} + /// An enum representing the possible values of an `CheckoutCardPaymentMethodOptions`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3589,16 +3742,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 } @@ -3618,21 +3767,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", } } } @@ -4762,12 +4901,8 @@ pub enum CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositi impl CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Auto => { - "auto" - } - CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { - "hidden" - } + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => "hidden", } } } @@ -4778,16 +4913,12 @@ impl AsRef for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgre } } -impl std::fmt::Display - for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::fmt::Display for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::default::Default for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { fn default() -> Self { Self::Auto } @@ -5083,24 +5214,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 } @@ -5193,9 +5318,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", } } @@ -5275,16 +5398,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 } @@ -5309,24 +5428,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 } @@ -5349,24 +5462,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 } @@ -5385,12 +5492,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", } } } @@ -5424,15 +5527,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", } } } @@ -5448,9 +5545,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 } @@ -5498,9 +5593,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsa impl CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage::None => "none", } } } @@ -5511,16 +5604,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 } @@ -5584,9 +5673,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 } @@ -5605,12 +5692,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", } } } @@ -5677,12 +5760,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", } } } @@ -5704,6 +5783,42 @@ impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsBoletoSe } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsCard`'s `request_three_d_secure` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + Any, + Automatic, + Challenge, +} + +impl CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", + } + } +} + +impl AsRef for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateCheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure { + fn default() -> Self { + Self::Any + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsCard`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -5715,12 +5830,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", } } } @@ -5755,12 +5866,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", } } } @@ -5809,24 +5916,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 } @@ -5861,16 +5962,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 } @@ -5886,9 +5983,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -5920,9 +6015,7 @@ pub enum CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsag impl CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { - CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => { - "none" - } + CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage::None => "none", } } } @@ -5933,16 +6026,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 } @@ -6184,9 +6273,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -6441,9 +6528,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -6477,9 +6562,7 @@ impl CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + CreateCheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -6514,12 +6597,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", } } } @@ -6594,24 +6673,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 } @@ -6634,24 +6707,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 } @@ -6670,12 +6737,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", } } } @@ -6691,9 +6754,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 } @@ -6710,12 +6771,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", } } } @@ -6726,16 +6783,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 } @@ -7669,24 +7722,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 } @@ -7715,24 +7762,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 } @@ -7757,24 +7798,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 } @@ -7792,15 +7827,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", } } } @@ -7900,9 +7929,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", } } @@ -7944,24 +7971,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 } @@ -8041,9 +8062,7 @@ impl PaymentPagesCheckoutSessionAutomaticTaxStatus { match self { PaymentPagesCheckoutSessionAutomaticTaxStatus::Complete => "complete", PaymentPagesCheckoutSessionAutomaticTaxStatus::Failed => "failed", - PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => { - "requires_location_inputs" - } + PaymentPagesCheckoutSessionAutomaticTaxStatus::RequiresLocationInputs => "requires_location_inputs", } } } @@ -9072,9 +9091,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 } @@ -9129,6 +9146,7 @@ pub enum PaymentPagesCheckoutSessionTaxIdType { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -9201,6 +9219,7 @@ impl PaymentPagesCheckoutSessionTaxIdType { PaymentPagesCheckoutSessionTaxIdType::MyItn => "my_itn", PaymentPagesCheckoutSessionTaxIdType::MySst => "my_sst", PaymentPagesCheckoutSessionTaxIdType::NoVat => "no_vat", + PaymentPagesCheckoutSessionTaxIdType::NoVoec => "no_voec", PaymentPagesCheckoutSessionTaxIdType::NzGst => "nz_gst", PaymentPagesCheckoutSessionTaxIdType::PeRuc => "pe_ruc", PaymentPagesCheckoutSessionTaxIdType::PhTin => "ph_tin", diff --git a/src/resources/generated/confirmation_token.rs b/src/resources/generated/confirmation_token.rs new file mode 100644 index 000000000..cab56dfc7 --- /dev/null +++ b/src/resources/generated/confirmation_token.rs @@ -0,0 +1,374 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::client::{Client, Response}; +use crate::ids::{ConfirmationTokenId}; +use crate::params::{Expand, Object, Timestamp}; +use crate::resources::{Address, BillingDetails, CardDetails, CardPresent, PaymentFlowsPrivatePaymentMethodsAlipay, PaymentMethodAcssDebit, PaymentMethodAffirm, PaymentMethodAfterpayClearpay, PaymentMethodAuBecsDebit, PaymentMethodBacsDebit, PaymentMethodBancontact, PaymentMethodBlik, PaymentMethodBoleto, PaymentMethodCashapp, PaymentMethodCustomerBalance, PaymentMethodEps, PaymentMethodFpx, PaymentMethodGiropay, PaymentMethodGrabpay, PaymentMethodIdeal, PaymentMethodInteracPresent, PaymentMethodKlarna, PaymentMethodKonbini, PaymentMethodLink, PaymentMethodMobilepay, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, PaymentMethodUsBankAccount, PaymentMethodWechatPay, PaymentMethodZip}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ConfirmationTokensResourceConfirmationToken". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationToken { + /// Unique identifier for the object. + pub id: ConfirmationTokenId, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + /// + /// This is set to null once this ConfirmationToken has been used. + pub expires_at: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// Data used for generating a Mandate. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_data: Option, + + /// ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + pub payment_intent: Option, + + /// Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + pub payment_method_preview: Option, + + /// Return URL used to confirm the Intent. + pub return_url: Option, + + /// Indicates that you intend to make future payments with this ConfirmationToken's payment method. + /// + /// The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + pub setup_future_usage: Option, + + /// ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + pub setup_intent: Option, + + /// Shipping information collected on this ConfirmationToken. + pub shipping: Option, + + /// Indicates whether the Stripe SDK is used to handle confirmation flow. + /// + /// Defaults to `true` on ConfirmationToken. + pub use_stripe_sdk: bool, +} + +impl ConfirmationToken { + + /// Retrieves an existing ConfirmationToken object. + pub fn retrieve(client: &Client, id: &ConfirmationTokenId, expand: &[&str]) -> Response { + client.get_query(&format!("/confirmation_tokens/{}", id), &Expand { expand }) + } +} + +impl Object for ConfirmationToken { + type Id = ConfirmationTokenId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "confirmation_token" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateData { + + pub customer_acceptance: ConfirmationTokensResourceMandateDataResourceCustomerAcceptance, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptance { + + /// If this is a Mandate accepted online, this hash contains details about the online acceptance. + pub online: Option, + + /// The type of customer acceptance information included with the Mandate. + #[serde(rename = "type")] + pub type_: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline { + + /// The IP address from which the Mandate was accepted by the customer. + pub ip_address: Option, + + /// The user agent of the browser from which the Mandate was accepted by the customer. + pub user_agent: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourcePaymentMethodPreview { + + #[serde(skip_serializing_if = "Option::is_none")] + pub acss_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub affirm: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub afterpay_clearpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub alipay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub au_becs_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub bancontact: Option, + + pub billing_details: BillingDetails, + + #[serde(skip_serializing_if = "Option::is_none")] + pub blik: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub boleto: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub card: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub card_present: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cashapp: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub customer_balance: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub eps: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub fpx: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub giropay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub grabpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub ideal: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub interac_present: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub klarna: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub konbini: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub oxxo: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub p24: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub paynow: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub paypal: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub pix: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub promptpay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sofort: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + + /// The type of the PaymentMethod. + /// + /// An additional hash is included on the PaymentMethod with a name matching this value. + /// It contains additional information specific to the PaymentMethod type. + #[serde(rename = "type")] + pub type_: ConfirmationTokensResourcePaymentMethodPreviewType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_account: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub wechat_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub zip: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConfirmationTokensResourceShipping { + + pub address: Address, + + /// Recipient name. + pub name: String, + + /// Recipient phone (including extension). + pub phone: Option, +} + +/// An enum representing the possible values of an `ConfirmationToken`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ConfirmationTokenSetupFutureUsage { + OffSession, + OnSession, +} + +impl ConfirmationTokenSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + ConfirmationTokenSetupFutureUsage::OffSession => "off_session", + ConfirmationTokenSetupFutureUsage::OnSession => "on_session", + } + } +} + +impl AsRef for ConfirmationTokenSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ConfirmationTokenSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ConfirmationTokenSetupFutureUsage { + fn default() -> Self { + Self::OffSession + } +} + +/// An enum representing the possible values of an `ConfirmationTokensResourcePaymentMethodPreview`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ConfirmationTokensResourcePaymentMethodPreviewType { + AcssDebit, + Affirm, + AfterpayClearpay, + Alipay, + AuBecsDebit, + BacsDebit, + Bancontact, + Blik, + Boleto, + Card, + CardPresent, + Cashapp, + CustomerBalance, + Eps, + Fpx, + Giropay, + Grabpay, + Ideal, + InteracPresent, + Klarna, + Konbini, + Link, + Mobilepay, + Oxxo, + P24, + Paynow, + Paypal, + Pix, + Promptpay, + RevolutPay, + SepaDebit, + Sofort, + Swish, + UsBankAccount, + WechatPay, + Zip, +} + +impl ConfirmationTokensResourcePaymentMethodPreviewType { + pub fn as_str(self) -> &'static str { + match self { + ConfirmationTokensResourcePaymentMethodPreviewType::AcssDebit => "acss_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Affirm => "affirm", + ConfirmationTokensResourcePaymentMethodPreviewType::AfterpayClearpay => "afterpay_clearpay", + ConfirmationTokensResourcePaymentMethodPreviewType::Alipay => "alipay", + ConfirmationTokensResourcePaymentMethodPreviewType::AuBecsDebit => "au_becs_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::BacsDebit => "bacs_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Bancontact => "bancontact", + ConfirmationTokensResourcePaymentMethodPreviewType::Blik => "blik", + ConfirmationTokensResourcePaymentMethodPreviewType::Boleto => "boleto", + ConfirmationTokensResourcePaymentMethodPreviewType::Card => "card", + ConfirmationTokensResourcePaymentMethodPreviewType::CardPresent => "card_present", + ConfirmationTokensResourcePaymentMethodPreviewType::Cashapp => "cashapp", + ConfirmationTokensResourcePaymentMethodPreviewType::CustomerBalance => "customer_balance", + ConfirmationTokensResourcePaymentMethodPreviewType::Eps => "eps", + ConfirmationTokensResourcePaymentMethodPreviewType::Fpx => "fpx", + ConfirmationTokensResourcePaymentMethodPreviewType::Giropay => "giropay", + ConfirmationTokensResourcePaymentMethodPreviewType::Grabpay => "grabpay", + ConfirmationTokensResourcePaymentMethodPreviewType::Ideal => "ideal", + ConfirmationTokensResourcePaymentMethodPreviewType::InteracPresent => "interac_present", + ConfirmationTokensResourcePaymentMethodPreviewType::Klarna => "klarna", + ConfirmationTokensResourcePaymentMethodPreviewType::Konbini => "konbini", + ConfirmationTokensResourcePaymentMethodPreviewType::Link => "link", + ConfirmationTokensResourcePaymentMethodPreviewType::Mobilepay => "mobilepay", + ConfirmationTokensResourcePaymentMethodPreviewType::Oxxo => "oxxo", + ConfirmationTokensResourcePaymentMethodPreviewType::P24 => "p24", + ConfirmationTokensResourcePaymentMethodPreviewType::Paynow => "paynow", + ConfirmationTokensResourcePaymentMethodPreviewType::Paypal => "paypal", + ConfirmationTokensResourcePaymentMethodPreviewType::Pix => "pix", + ConfirmationTokensResourcePaymentMethodPreviewType::Promptpay => "promptpay", + ConfirmationTokensResourcePaymentMethodPreviewType::RevolutPay => "revolut_pay", + ConfirmationTokensResourcePaymentMethodPreviewType::SepaDebit => "sepa_debit", + ConfirmationTokensResourcePaymentMethodPreviewType::Sofort => "sofort", + ConfirmationTokensResourcePaymentMethodPreviewType::Swish => "swish", + ConfirmationTokensResourcePaymentMethodPreviewType::UsBankAccount => "us_bank_account", + ConfirmationTokensResourcePaymentMethodPreviewType::WechatPay => "wechat_pay", + ConfirmationTokensResourcePaymentMethodPreviewType::Zip => "zip", + } + } +} + +impl AsRef for ConfirmationTokensResourcePaymentMethodPreviewType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ConfirmationTokensResourcePaymentMethodPreviewType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ConfirmationTokensResourcePaymentMethodPreviewType { + fn default() -> Self { + Self::AcssDebit + } +} diff --git a/src/resources/generated/connect_account_reference.rs b/src/resources/generated/connect_account_reference.rs index c54d9d7b8..d2577cd16 100644 --- a/src/resources/generated/connect_account_reference.rs +++ b/src/resources/generated/connect_account_reference.rs @@ -2,14 +2,14 @@ // This file was automatically generated. // ====================================== +use crate::params::{Expandable}; +use crate::resources::{Account}; use serde::{Deserialize, Serialize}; -use crate::params::Expandable; -use crate::resources::Account; - /// The resource representing a Stripe "ConnectAccountReference". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectAccountReference { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option>, diff --git a/src/resources/generated/connect_collection_transfer.rs b/src/resources/generated/connect_collection_transfer.rs index ab8344dac..3a1a21bf3 100644 --- a/src/resources/generated/connect_collection_transfer.rs +++ b/src/resources/generated/connect_collection_transfer.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ConnectCollectionTransferId; +use crate::ids::{ConnectCollectionTransferId}; use crate::params::{Expandable, Object}; use crate::resources::{Account, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ConnectCollectionTransfer". #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/coupon.rs b/src/resources/generated/coupon.rs index 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/credit_note.rs b/src/resources/generated/credit_note.rs index 2d3847d8a..59be54bf1 100644 --- a/src/resources/generated/credit_note.rs +++ b/src/resources/generated/credit_note.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CreditNoteId, CustomerId, InvoiceId, RefundId}; -use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - CreditNoteLineItem, Currency, Customer, CustomerBalanceTransaction, Discount, Invoice, - InvoicesShippingCost, Refund, TaxRate, -}; +use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{CreditNoteLineItem, Currency, Customer, CustomerBalanceTransaction, Discount, Invoice, InvoicesResourceShippingCost, Refund, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CreditNote". /// @@ -87,7 +83,7 @@ pub struct CreditNote { pub refund: Option>, /// The details of the cost of shipping, including the ShippingRate applied to the invoice. - pub shipping_cost: Option, + pub shipping_cost: Option, /// Status of this credit note, one of `issued` or `void`. /// @@ -121,10 +117,12 @@ pub struct CreditNote { } impl CreditNote { + /// Returns a list of credit notes. - pub fn list(client: &Client, params: &ListCreditNotes<'_>) -> Response> { - client.get_query("/credit_notes", ¶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,11 @@ impl<'a> CreateCreditNote<'a> { /// The parameters for `CreditNote::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCreditNotes<'a> { + + /// Only return credit notes that were created during the given date interval. + #[serde(skip_serializing_if = "Option::is_none")] + pub created: Option>, + /// Only return credit notes for the customer specified by this customer ID. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -313,6 +315,7 @@ pub struct ListCreditNotes<'a> { impl<'a> ListCreditNotes<'a> { pub fn new() -> Self { ListCreditNotes { + created: Default::default(), customer: Default::default(), ending_before: Default::default(), expand: Default::default(), @@ -325,12 +328,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 +363,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`. @@ -414,6 +418,7 @@ pub struct CreateCreditNoteLines { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCreditNoteShippingCost { + /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_rate: Option, @@ -421,6 +426,7 @@ pub struct CreateCreditNoteShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCreditNoteLinesTaxAmounts { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, diff --git a/src/resources/generated/credit_note_line_item.rs b/src/resources/generated/credit_note_line_item.rs index 4461be9d3..afcefb51b 100644 --- a/src/resources/generated/credit_note_line_item.rs +++ b/src/resources/generated/credit_note_line_item.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CreditNoteLineItemId; +use crate::ids::{CreditNoteLineItemId}; use crate::params::{Expandable, Object}; use crate::resources::{Discount, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CreditNoteLineItem". /// @@ -75,6 +74,7 @@ impl Object for CreditNoteLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteTaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -95,6 +95,7 @@ pub struct CreditNoteTaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, diff --git a/src/resources/generated/custom_unit_amount.rs b/src/resources/generated/custom_unit_amount.rs index d5a85c842..9fde8aacf 100644 --- a/src/resources/generated/custom_unit_amount.rs +++ b/src/resources/generated/custom_unit_amount.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomUnitAmount". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomUnitAmount { + /// The maximum unit amount the customer can specify for this item. pub maximum: Option, diff --git a/src/resources/generated/customer.rs b/src/resources/generated/customer.rs index 74290612c..aa932b00a 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". /// @@ -161,12 +155,14 @@ pub struct Customer { } impl Customer { + /// Returns a list of your customers. /// /// The customers are returned sorted by creation date, with the most recent customers appearing first. - pub fn list(client: &Client, params: &ListCustomers<'_>) -> Response> { - client.get_query("/customers", ¶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 { @@ -185,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) } @@ -214,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, @@ -226,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, @@ -238,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>, @@ -253,6 +248,7 @@ pub struct InvoiceSettingCustomerSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -263,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
, @@ -407,6 +404,8 @@ impl<'a> CreateCustomer<'a> { /// The parameters for `Customer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListCustomers<'a> { + + /// Only return customers that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -463,12 +462,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
, @@ -607,6 +606,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")] @@ -615,6 +615,7 @@ pub struct CreateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerShipping { + /// Customer shipping address. pub address: CreateCustomerShippingAddress, @@ -628,6 +629,7 @@ pub struct CreateCustomerShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerTax { + /// A recent IP address of the customer used for tax reporting and tax location inference. /// /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -644,6 +646,7 @@ pub struct CreateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettings { + /// The list of up to 4 default custom fields to be displayed on invoices for this customer. /// /// When updating, pass an empty string to remove previously-defined fields. @@ -665,7 +668,8 @@ pub struct CustomerInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdData { - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `no_voec`, `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, @@ -675,6 +679,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")] @@ -683,6 +688,7 @@ pub struct UpdateCustomerCashBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerShipping { + /// Customer shipping address. pub address: UpdateCustomerShippingAddress, @@ -696,6 +702,7 @@ pub struct UpdateCustomerShipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateCustomerTax { + /// A recent IP address of the customer used for tax reporting and tax location inference. /// /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -712,6 +719,7 @@ pub struct UpdateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCustomerCashBalanceSettings { + /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -722,6 +730,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, @@ -749,6 +758,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. @@ -762,6 +772,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`. @@ -773,6 +784,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`. @@ -783,6 +795,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, @@ -822,9 +835,7 @@ impl CreateCustomerCashBalanceSettingsReconciliationMode { match self { CreateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", CreateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + CreateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } @@ -892,9 +903,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", } } } @@ -1113,6 +1122,7 @@ pub enum TaxIdType { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -1184,6 +1194,7 @@ impl TaxIdType { TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", @@ -1240,9 +1251,7 @@ impl UpdateCustomerCashBalanceSettingsReconciliationMode { match self { UpdateCustomerCashBalanceSettingsReconciliationMode::Automatic => "automatic", UpdateCustomerCashBalanceSettingsReconciliationMode::Manual => "manual", - UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => { - "merchant_default" - } + UpdateCustomerCashBalanceSettingsReconciliationMode::MerchantDefault => "merchant_default", } } } diff --git a/src/resources/generated/customer_balance_transaction.rs b/src/resources/generated/customer_balance_transaction.rs index 8b102c8a8..9c1b0d717 100644 --- a/src/resources/generated/customer_balance_transaction.rs +++ b/src/resources/generated/customer_balance_transaction.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::CustomerBalanceTransactionId; +use crate::ids::{CustomerBalanceTransactionId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{CreditNote, Currency, Customer, Invoice}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerBalanceTransaction". /// diff --git a/src/resources/generated/discount.rs b/src/resources/generated/discount.rs index 4ab82cd45..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..74cc90960 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,8 @@ pub struct NotificationEventRequest { /// The parameters for `Event::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListEvents<'a> { + + /// Only return events that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -155,6 +159,5 @@ impl<'a> ListEvents<'a> { impl Paginable for ListEvents<'_> { type O = Event; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} \ No newline at end of file diff --git a/src/resources/generated/fee_refund.rs b/src/resources/generated/fee_refund.rs index e2b84faee..e9846b6ed 100644 --- a/src/resources/generated/fee_refund.rs +++ b/src/resources/generated/fee_refund.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ApplicationFeeRefundId; +use crate::ids::{ApplicationFeeRefundId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{ApplicationFee, BalanceTransaction, Currency}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "FeeRefund". /// diff --git a/src/resources/generated/file.rs b/src/resources/generated/file.rs index e88126ffd..05fb5a612 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,8 @@ impl Object for File { /// The parameters for `File::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFiles<'a> { + + /// Only return files that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -128,9 +131,8 @@ impl<'a> ListFiles<'a> { impl Paginable for ListFiles<'_> { type O = File; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `ListFiles`'s `purpose` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/file_link.rs b/src/resources/generated/file_link.rs index 7b30826cc..dc0828648 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,8 @@ impl<'a> CreateFileLink<'a> { /// The parameters for `FileLink::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListFileLinks<'a> { + + /// Only return links that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -174,12 +174,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_refreshed_ownership.rs b/src/resources/generated/financial_connections_account_refreshed_ownership.rs new file mode 100644 index 000000000..890f2548c --- /dev/null +++ b/src/resources/generated/financial_connections_account_refreshed_ownership.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "financial_connections.account.refreshed_ownership". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsAccountRefreshedOwnership { +} diff --git a/src/resources/generated/forwarding_request.rs b/src/resources/generated/forwarding_request.rs new file mode 100644 index 000000000..afabf30d8 --- /dev/null +++ b/src/resources/generated/forwarding_request.rs @@ -0,0 +1,184 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{ForwardingRequestId}; +use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "ForwardingRequest". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardingRequest { + /// Unique identifier for the object. + pub id: ForwardingRequestId, + + /// The Forwarding Config used when making the forwarded request. + /// + /// The config specifes the HTTP method, merchant credentials, connection settings, and supported destination URLs. + pub config: String, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// The PaymentMethod to insert into the forwarded request. + /// + /// Forwarding previously consumed PaymentMethods is allowed. + pub payment_method: String, + + /// The field kinds to be replaced in the forwarded request. + pub replacements: Vec, + + /// Context about the request from Stripe's servers to the destination endpoint. + pub request_context: Option, + + /// The request that was sent to the destination endpoint. + /// + /// We redact any sensitive fields. + pub request_details: Option, + + /// The response that the destination endpoint returned to us. + /// + /// We redact any sensitive fields. + pub response_details: Option, + + /// The destination URL for the forwarded request. + /// + /// Must be supported by the config. + pub url: Option, +} + +impl Object for ForwardingRequest { + type Id = ForwardingRequestId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "forwarding.request" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestContext { + + /// The time it took in milliseconds for the destination endpoint to respond. + pub destination_duration: i64, + + /// The IP address of the destination. + pub destination_ip_address: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestDetails { + + /// The body payload to send to the destination endpoint. + pub body: String, + + /// The headers to include in the forwarded request. + /// + /// Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + pub headers: Vec, + + /// The HTTP method used to call the destination endpoint. + pub http_method: ForwardedRequestDetailsHttpMethod, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedRequestHeader { + + /// The header name. + pub name: String, + + /// The header value. + pub value: String, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ForwardedResponseDetails { + + /// The response body from the destination endpoint to Stripe. + pub body: String, + + /// HTTP headers that the destination endpoint returned. + pub headers: Vec, + + /// The HTTP status code that the destination endpoint returned. + pub status: i64, +} + +/// An enum representing the possible values of an `ForwardedRequestDetails`'s `http_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ForwardedRequestDetailsHttpMethod { + #[serde(rename = "POST")] + Post, +} + +impl ForwardedRequestDetailsHttpMethod { + pub fn as_str(self) -> &'static str { + match self { + ForwardedRequestDetailsHttpMethod::Post => "POST", + } + } +} + +impl AsRef for ForwardedRequestDetailsHttpMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ForwardedRequestDetailsHttpMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ForwardedRequestDetailsHttpMethod { + fn default() -> Self { + Self::Post + } +} + +/// An enum representing the possible values of an `ForwardingRequest`'s `replacements` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ForwardingRequestReplacements { + CardCvc, + CardExpiry, + CardNumber, + CardholderName, +} + +impl ForwardingRequestReplacements { + pub fn as_str(self) -> &'static str { + match self { + ForwardingRequestReplacements::CardCvc => "card_cvc", + ForwardingRequestReplacements::CardExpiry => "card_expiry", + ForwardingRequestReplacements::CardNumber => "card_number", + ForwardingRequestReplacements::CardholderName => "cardholder_name", + } + } +} + +impl AsRef for ForwardingRequestReplacements { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ForwardingRequestReplacements { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ForwardingRequestReplacements { + fn default() -> Self { + Self::CardCvc + } +} diff --git a/src/resources/generated/identity_verification_report.rs b/src/resources/generated/identity_verification_report.rs index d5c99bf97..7e0457deb 100644 --- a/src/resources/generated/identity_verification_report.rs +++ b/src/resources/generated/identity_verification_report.rs @@ -15,6 +15,11 @@ pub struct IdentityVerificationReport { /// Unique identifier for the object. pub id: IdentityVerificationReportId, + /// A string to reference this user. + /// + /// This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + pub client_reference_id: Option, + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. @@ -37,8 +42,7 @@ pub struct IdentityVerificationReport { /// Type of report. #[serde(rename = "type")] - #[serde(skip_serializing_if = "Option::is_none")] - pub type_: Option, + pub type_: IdentityVerificationReportType, /// ID of the VerificationSession that created this report. pub verification_session: Option, diff --git a/src/resources/generated/identity_verification_session.rs b/src/resources/generated/identity_verification_session.rs index 187d047c2..0ca30e204 100644 --- a/src/resources/generated/identity_verification_session.rs +++ b/src/resources/generated/identity_verification_session.rs @@ -15,6 +15,11 @@ pub struct IdentityVerificationSession { /// Unique identifier for the object. pub id: IdentityVerificationSessionId, + /// A string to reference this user. + /// + /// This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + pub client_reference_id: Option, + /// The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. /// /// This client secret expires after 24 hours and can only be used once. @@ -59,7 +64,7 @@ pub struct IdentityVerificationSession { /// The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. #[serde(rename = "type")] - pub type_: Option, + pub type_: IdentityVerificationSessionType, /// The short-lived URL that you use to redirect a user to Stripe to submit their identity information. /// diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index 267496ac8..d644d5a44 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -2,22 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, InvoiceId, SubscriptionId}; -use crate::params::{ - CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; -use crate::resources::{ - Account, Address, ApiErrors, Application, Charge, ConnectAccountReference, Currency, Customer, - Discount, InvoiceLineItem, InvoicePaymentMethodOptionsAcssDebit, - InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, - InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsUsBankAccount, - InvoiceSettingRenderingOptions, InvoicesShippingCost, PaymentIntent, PaymentMethod, - PaymentSource, Quote, Shipping, Subscription, TaxId, TaxRate, TestHelpersTestClock, -}; +use crate::params::{CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Account, Address, ApiErrors, Application, Charge, ConnectAccountReference, Currency, Customer, Discount, InvoiceLineItem, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsSepaDebit, InvoicePaymentMethodOptionsUsBankAccount, InvoiceSettingRenderingOptions, InvoicesResourceShippingCost, PaymentIntent, PaymentMethod, PaymentSource, Quote, Shipping, Subscription, TaxId, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Invoice". /// @@ -28,8 +17,7 @@ pub struct Invoice { /// /// This property is always present unless the invoice is an upcoming invoice. /// See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. - #[serde(default = "InvoiceId::none")] - pub id: InvoiceId, + #[serde(default = "InvoiceId::none")] pub id: InvoiceId, /// The country of the business associated with this invoice, most often the business creating the invoice. #[serde(skip_serializing_if = "Option::is_none")] @@ -254,7 +242,7 @@ pub struct Invoice { /// /// See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. #[serde(skip_serializing_if = "Option::is_none")] - pub from_invoice: Option, + pub from_invoice: Option, /// The URL for the hosted invoice page, which allows customers to view and pay an invoice. /// @@ -362,7 +350,7 @@ pub struct Invoice { /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. #[serde(skip_serializing_if = "Option::is_none")] - pub rendering: Option, + pub rendering: Option, /// This is a legacy field that will be removed soon. /// @@ -373,7 +361,7 @@ pub struct Invoice { /// The details of the cost of shipping, including the ShippingRate applied on the invoice. #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_cost: Option, + pub shipping_cost: Option, /// Shipping details for the invoice. /// @@ -399,7 +387,7 @@ pub struct Invoice { pub status: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub status_transitions: Option, + pub status_transitions: Option, /// The subscription that this invoice was prepared for, if any. #[serde(skip_serializing_if = "Option::is_none")] @@ -469,12 +457,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. /// @@ -509,6 +499,7 @@ impl Object for Invoice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct AutomaticTax { + /// Whether Stripe automatically computes tax on this invoice. /// /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -526,6 +517,7 @@ pub struct AutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, @@ -535,6 +527,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -544,6 +537,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -564,6 +558,7 @@ pub struct TaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceThresholdReason { + /// The total invoice amount threshold boundary if it triggered the threshold invoice. pub amount_gte: Option, @@ -573,6 +568,7 @@ pub struct InvoiceThresholdReason { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItemThresholdReason { + /// The IDs of the line items that triggered the threshold invoice. pub line_item_ids: Vec, @@ -582,6 +578,7 @@ pub struct InvoiceItemThresholdReason { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. @@ -591,35 +588,9 @@ pub struct InvoiceTransferData { pub destination: Expandable, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesFromInvoice { - /// The relation between this invoice and the cloned invoice. - pub action: String, - - /// The invoice that was cloned. - pub invoice: Expandable, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesInvoiceRendering { - /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - pub amount_tax_display: Option, - - /// Invoice pdf rendering options. - pub pdf: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoiceRenderingPdf { - /// Page size of invoice pdf. - /// - /// Options include a4, letter, and auto. - /// If set to auto, page size will be switched to a4 or letter based on customer locale. - pub page_size: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesPaymentSettings { + /// ID of the mandate to be used for this invoice. /// /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -637,6 +608,7 @@ pub struct InvoicesPaymentSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesPaymentMethodOptions { + /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. pub acss_debit: Option, @@ -652,31 +624,67 @@ pub struct InvoicesPaymentMethodOptions { /// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. pub konbini: Option, + /// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + pub sepa_debit: Option, + /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. pub us_bank_account: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub installments: Option, /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceInstallmentsCard { + /// Whether Installments are enabled for this Invoice. pub enabled: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicesResourceFromInvoice { + + /// The relation between this invoice and the cloned invoice. + pub action: String, + + /// The invoice that was cloned. + pub invoice: Expandable, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicesResourceInvoiceRendering { + + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + pub amount_tax_display: Option, + + /// Invoice pdf rendering options. + pub pdf: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoiceRenderingPdf { + + /// Page size of invoice pdf. + /// + /// Options include a4, letter, and auto. + /// If set to auto, page size will be switched to a4 or letter based on customer locale. + pub page_size: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceInvoiceTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. #[serde(rename = "type")] pub type_: TaxIdType, @@ -685,7 +693,8 @@ pub struct InvoicesResourceInvoiceTaxId { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesStatusTransitions { +pub struct InvoicesResourceStatusTransitions { + /// The time that the invoice draft was finalized. pub finalized_at: Option, @@ -701,15 +710,17 @@ pub struct InvoicesStatusTransitions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionDetailsData { - /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. /// - /// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. + /// Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. pub metadata: Option, } /// The parameters for `Invoice::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateInvoice<'a> { + /// The account tax IDs associated with the invoice. /// /// Only editable when the invoice is a draft. @@ -835,6 +846,15 @@ pub struct CreateInvoice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// Set the number for this invoice. + /// + /// If no number is present then a number will be assigned automatically when the invoice is finalized. + /// In many markets, regulations require invoices to be unique, sequential and / or gapless. + /// You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. + /// If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + #[serde(skip_serializing_if = "Option::is_none")] + pub number: Option<&'a str>, + /// The account (if any) for which the funds of the invoice payment are intended. /// /// If set, the invoice will be presented with the branding and support information of the specified account. @@ -848,9 +868,6 @@ pub struct CreateInvoice<'a> { /// How to handle pending invoice items on invoice creation. /// - /// One of `include` or `exclude`. - /// `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. - /// `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. /// Defaults to `exclude` if the parameter is omitted. #[serde(skip_serializing_if = "Option::is_none")] pub pending_invoice_items_behavior: Option, @@ -919,6 +936,7 @@ impl<'a> CreateInvoice<'a> { from_invoice: Default::default(), issuer: Default::default(), metadata: Default::default(), + number: Default::default(), on_behalf_of: Default::default(), payment_settings: Default::default(), pending_invoice_items_behavior: Default::default(), @@ -936,12 +954,14 @@ impl<'a> CreateInvoice<'a> { /// The parameters for `Invoice::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListInvoices<'a> { + /// The collection method of the invoice to retrieve. /// /// Either `charge_automatically` or `send_invoice`. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, + /// Only return invoices that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -1006,11 +1026,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. @@ -1026,6 +1046,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. @@ -1039,6 +1060,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, @@ -1050,6 +1072,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. @@ -1061,6 +1084,7 @@ pub struct CreateInvoiceFromInvoice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1072,6 +1096,7 @@ pub struct CreateInvoiceIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettings { + /// ID of the mandate to be used for this invoice. /// /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -1092,6 +1117,7 @@ pub struct CreateInvoicePaymentSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceRendering { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1107,6 +1133,7 @@ pub struct CreateInvoiceRendering { #[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`. @@ -1118,6 +1145,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, @@ -1129,6 +1157,7 @@ pub struct CreateInvoiceShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingDetails { + /// Shipping address. pub address: CreateInvoiceShippingDetailsAddress, @@ -1142,6 +1171,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. @@ -1154,6 +1184,7 @@ pub struct CreateInvoiceTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1165,6 +1196,7 @@ pub struct CreateInvoiceAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { + /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -1185,6 +1217,10 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1192,6 +1228,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceRenderingPdf { + /// Page size for invoice PDF. /// /// Can be set to `a4`, `letter`, or `auto`. If set to `auto`, invoice PDF page size defaults to `a4` for customers with Japanese locale and `letter` for customers with other locales. @@ -1201,6 +1238,7 @@ pub struct CreateInvoiceRenderingPdf { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateData { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. @@ -1248,6 +1286,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, @@ -1275,27 +1314,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). @@ -1305,18 +1344,17 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCard { /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance { + /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] - pub bank_transfer: - Option, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1326,23 +1364,28 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -1358,6 +1401,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, @@ -1370,21 +1414,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")] @@ -1397,11 +1440,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. /// @@ -1428,6 +1470,7 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -1437,6 +1480,7 @@ pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -1446,6 +1490,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, @@ -1453,12 +1498,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, @@ -1472,8 +1517,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`. @@ -1669,24 +1714,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 } @@ -1717,16 +1756,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 } @@ -1759,16 +1794,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 } @@ -1784,9 +1815,7 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInt impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval { pub fn as_str(self) -> &'static str { match self { - CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => { - "month" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanInterval::Month => "month", } } } @@ -1797,16 +1826,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 } @@ -1833,16 +1858,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 } @@ -1861,12 +1882,8 @@ impl CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreateInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -1882,9 +1899,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 } @@ -1893,8 +1908,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, @@ -1912,24 +1926,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 } @@ -1952,24 +1960,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 } @@ -1994,24 +1996,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 } @@ -2052,9 +2048,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", @@ -2075,9 +2069,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", @@ -2149,9 +2141,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", } } } @@ -2223,9 +2213,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", @@ -2245,9 +2233,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 } @@ -2267,9 +2253,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", @@ -2289,9 +2273,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 } @@ -2322,16 +2304,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 } @@ -2423,9 +2401,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", @@ -2533,7 +2509,6 @@ impl std::default::Default for InvoicePaymentMethodOptionsCardRequestThreeDSecur pub enum InvoicePendingInvoiceItemsBehavior { Exclude, Include, - IncludeAndRequire, } impl InvoicePendingInvoiceItemsBehavior { @@ -2541,7 +2516,6 @@ impl InvoicePendingInvoiceItemsBehavior { match self { InvoicePendingInvoiceItemsBehavior::Exclude => "exclude", InvoicePendingInvoiceItemsBehavior::Include => "include", - InvoicePendingInvoiceItemsBehavior::IncludeAndRequire => "include_and_require", } } } @@ -2830,6 +2804,7 @@ pub enum TaxIdType { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -2902,6 +2877,7 @@ impl TaxIdType { TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", diff --git a/src/resources/generated/invoice_payment_method_options_acss_debit.rs b/src/resources/generated/invoice_payment_method_options_acss_debit.rs index b94d1fe29..221ff3858 100644 --- a/src/resources/generated/invoice_payment_method_options_acss_debit.rs +++ b/src/resources/generated/invoice_payment_method_options_acss_debit.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_acss_debit". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -17,6 +18,7 @@ pub struct InvoicePaymentMethodOptionsAcssDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. pub transaction_type: Option, } @@ -32,12 +34,8 @@ pub enum InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType { impl InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType { pub fn as_str(self) -> &'static str { match self { - InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => { - "business" - } - InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => { - "personal" - } + InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => "business", + InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => "personal", } } } @@ -73,9 +71,7 @@ impl InvoicePaymentMethodOptionsAcssDebitVerificationMethod { match self { InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } diff --git a/src/resources/generated/invoice_payment_method_options_bancontact.rs b/src/resources/generated/invoice_payment_method_options_bancontact.rs index 0790a6dd8..ba6b8996c 100644 --- a/src/resources/generated/invoice_payment_method_options_bancontact.rs +++ b/src/resources/generated/invoice_payment_method_options_bancontact.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_bancontact". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsBancontact { + /// Preferred language of the Bancontact authorization page that the customer is redirected to. pub preferred_language: InvoicePaymentMethodOptionsBancontactPreferredLanguage, } diff --git a/src/resources/generated/invoice_payment_method_options_customer_balance.rs b/src/resources/generated/invoice_payment_method_options_customer_balance.rs index f170a5e7a..ea5d98422 100644 --- a/src/resources/generated/invoice_payment_method_options_customer_balance.rs +++ b/src/resources/generated/invoice_payment_method_options_customer_balance.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_customer_balance". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -18,9 +19,9 @@ pub struct InvoicePaymentMethodOptionsCustomerBalance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransfer { + #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + pub eu_bank_transfer: Option, /// The bank transfer type that can be used for funding. /// @@ -31,6 +32,7 @@ pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransfer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -74,16 +76,12 @@ impl AsRef for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBank } } -impl std::fmt::Display - for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry -{ +impl std::fmt::Display for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry -{ +impl std::default::Default for InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferCountry { fn default() -> Self { Self::Be } diff --git a/src/resources/generated/invoice_payment_method_options_konbini.rs b/src/resources/generated/invoice_payment_method_options_konbini.rs index 87f7350d0..12630a094 100644 --- a/src/resources/generated/invoice_payment_method_options_konbini.rs +++ b/src/resources/generated/invoice_payment_method_options_konbini.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "invoice_payment_method_options_konbini". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicePaymentMethodOptionsKonbini {} +pub struct InvoicePaymentMethodOptionsKonbini { +} diff --git a/src/resources/generated/invoice_payment_method_options_sepa_debit.rs b/src/resources/generated/invoice_payment_method_options_sepa_debit.rs new file mode 100644 index 000000000..c7d2dead7 --- /dev/null +++ b/src/resources/generated/invoice_payment_method_options_sepa_debit.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "invoice_payment_method_options_sepa_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct InvoicePaymentMethodOptionsSepaDebit { +} diff --git a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs index 5f47067a2..1073536fe 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 } @@ -77,12 +76,8 @@ pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { pub fn as_str(self) -> &'static str { match self { - InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => { - "balances" - } - InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => { - "transactions" - } + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => "balances", + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => "transactions", } } } @@ -98,9 +93,7 @@ impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccount self.as_str().fmt(f) } } -impl std::default::Default - for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch -{ +impl std::default::Default for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { fn default() -> Self { Self::Balances } @@ -120,9 +113,7 @@ impl InvoicePaymentMethodOptionsUsBankAccountVerificationMethod { match self { InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Automatic => "automatic", InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Instant => "instant", - InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => { - "microdeposits" - } + InvoicePaymentMethodOptionsUsBankAccountVerificationMethod::Microdeposits => "microdeposits", } } } diff --git a/src/resources/generated/invoice_setting_rendering_options.rs b/src/resources/generated/invoice_setting_rendering_options.rs index 282332dfc..31aba1211 100644 --- a/src/resources/generated/invoice_setting_rendering_options.rs +++ b/src/resources/generated/invoice_setting_rendering_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "InvoiceSettingRenderingOptions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. pub amount_tax_display: Option, } diff --git a/src/resources/generated/invoiceitem.rs b/src/resources/generated/invoiceitem.rs index bc114979d..441707a37 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,8 @@ impl<'a> CreateInvoiceItem<'a> { /// The parameters for `InvoiceItem::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListInvoiceItems<'a> { + + /// Only return invoice items that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -388,12 +383,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 +506,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 +518,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 +548,7 @@ pub struct InvoiceItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateInvoiceItemDiscounts { + /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] pub coupon: Option, diff --git a/src/resources/generated/invoices_shipping_cost.rs b/src/resources/generated/invoices_resource_shipping_cost.rs similarity index 96% rename from src/resources/generated/invoices_shipping_cost.rs rename to src/resources/generated/invoices_resource_shipping_cost.rs index c2ab9c430..256bf07ed 100644 --- a/src/resources/generated/invoices_shipping_cost.rs +++ b/src/resources/generated/invoices_resource_shipping_cost.rs @@ -2,14 +2,14 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::params::Expandable; +use crate::params::{Expandable}; use crate::resources::{ShippingRate, TaxRate}; +use serde::{Deserialize, Serialize}; -/// The resource representing a Stripe "InvoicesShippingCost". +/// The resource representing a Stripe "InvoicesResourceShippingCost". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoicesShippingCost { +pub struct InvoicesResourceShippingCost { + /// Total shipping cost before any taxes are applied. pub amount_subtotal: i64, @@ -31,6 +31,7 @@ pub struct InvoicesShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, diff --git a/src/resources/generated/issuing_authorization.rs b/src/resources/generated/issuing_authorization.rs index 38250fa0a..e7005682b 100644 --- a/src/resources/generated/issuing_authorization.rs +++ b/src/resources/generated/issuing_authorization.rs @@ -2,15 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingAuthorizationId; +use crate::ids::{IssuingAuthorizationId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - BalanceTransaction, Currency, IssuingAuthorizationAmountDetails, IssuingAuthorizationCheck, - IssuingAuthorizationMethod, IssuingAuthorizationReason, IssuingCard, IssuingCardholder, - IssuingToken, IssuingTransaction, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorizationAmountDetails, IssuingAuthorizationCheck, IssuingAuthorizationMethod, IssuingAuthorizationReason, IssuingCard, IssuingCardholder, IssuingToken, IssuingTransaction, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingAuthorization". /// @@ -132,6 +127,7 @@ impl Object for IssuingAuthorization { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationNetworkData { + /// Identifier assigned to the acquirer by the card network. /// /// Sometimes this value is not provided by the network; in this case, the value will be `null`. @@ -148,6 +144,7 @@ pub struct IssuingAuthorizationNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationPendingRequest { + /// The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -180,6 +177,7 @@ pub struct IssuingAuthorizationPendingRequest { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationRequest { + /// The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// Stripe held this amount from your account to fund the authorization if the request was approved. @@ -239,6 +237,7 @@ pub struct IssuingAuthorizationRequest { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationTreasury { + /// The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization. pub received_credits: Vec, @@ -251,6 +250,7 @@ pub struct IssuingAuthorizationTreasury { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationVerificationData { + /// Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. pub address_line1_check: IssuingAuthorizationCheck, @@ -275,6 +275,7 @@ pub struct IssuingAuthorizationVerificationData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationAuthenticationExemption { + /// The entity that requested the exemption, either the acquiring merchant or the Issuing user. pub claimed_by: IssuingAuthorizationAuthenticationExemptionClaimedBy, @@ -285,6 +286,7 @@ pub struct IssuingAuthorizationAuthenticationExemption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorizationThreeDSecure { + /// The outcome of the 3D Secure authentication request. pub result: IssuingAuthorizationThreeDSecureResult, } @@ -335,12 +337,8 @@ pub enum IssuingAuthorizationAuthenticationExemptionType { impl IssuingAuthorizationAuthenticationExemptionType { pub fn as_str(self) -> &'static str { match self { - IssuingAuthorizationAuthenticationExemptionType::LowValueTransaction => { - "low_value_transaction" - } - IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => { - "transaction_risk_analysis" - } + IssuingAuthorizationAuthenticationExemptionType::LowValueTransaction => "low_value_transaction", + IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => "transaction_risk_analysis", IssuingAuthorizationAuthenticationExemptionType::Unknown => "unknown", } } diff --git a/src/resources/generated/issuing_card.rs b/src/resources/generated/issuing_card.rs index d05ad9820..551ad8207 100644 --- a/src/resources/generated/issuing_card.rs +++ b/src/resources/generated/issuing_card.rs @@ -2,14 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingCardId; +use crate::ids::{IssuingCardId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - Address, CardBrand, Currency, IssuingCardShippingStatus, IssuingCardShippingType, - IssuingCardType, IssuingCardholder, MerchantCategory, -}; +use crate::resources::{Address, CardBrand, Currency, IssuingCardShippingStatus, IssuingCardShippingType, IssuingCardType, IssuingCardholder, IssuingPersonalizationDesign, MerchantCategory}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingCard". /// @@ -72,6 +68,10 @@ pub struct IssuingCard { #[serde(skip_serializing_if = "Option::is_none")] pub number: Option, + /// The personalization design object belonging to this card. + #[serde(skip_serializing_if = "Option::is_none")] + pub personalization_design: Option>, + /// The latest card that replaces this card, if any. pub replaced_by: Option>, @@ -112,6 +112,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 +136,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 +183,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 +192,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 +209,7 @@ pub struct IssuingCardSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardWallets { + pub apple_pay: IssuingCardApplePay, pub google_pay: IssuingCardGooglePay, @@ -215,6 +220,7 @@ pub struct IssuingCardWallets { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardApplePay { + /// Apple Pay Eligibility. pub eligible: bool, @@ -224,6 +230,7 @@ pub struct IssuingCardApplePay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardGooglePay { + /// Google Pay Eligibility. pub eligible: bool, @@ -244,9 +251,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 +323,7 @@ impl IssuingCardGooglePayIneligibleReason { pub fn as_str(self) -> &'static str { match self { IssuingCardGooglePayIneligibleReason::MissingAgreement => "missing_agreement", - IssuingCardGooglePayIneligibleReason::MissingCardholderContact => { - "missing_cardholder_contact" - } + IssuingCardGooglePayIneligibleReason::MissingCardholderContact => "missing_cardholder_contact", IssuingCardGooglePayIneligibleReason::UnsupportedRegion => "unsupported_region", } } diff --git a/src/resources/generated/issuing_cardholder.rs b/src/resources/generated/issuing_cardholder.rs index a992b662c..eadea7688 100644 --- a/src/resources/generated/issuing_cardholder.rs +++ b/src/resources/generated/issuing_cardholder.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingCardholderId; +use crate::ids::{IssuingCardholderId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{Address, Currency, File, MerchantCategory}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingCardholder". /// @@ -85,11 +84,13 @@ impl Object for IssuingCardholder { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderAddress { + pub address: Address, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderAuthorizationControls { + /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// /// All other categories will be blocked. @@ -111,12 +112,14 @@ pub struct IssuingCardholderAuthorizationControls { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCompany { + /// Whether the company's business ID number was provided. pub tax_id_provided: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividual { + /// Information related to the card_issuing program for this cardholder. #[serde(skip_serializing_if = "Option::is_none")] pub card_issuing: Option, @@ -142,6 +145,7 @@ pub struct IssuingCardholderIndividual { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCardIssuing { + /// Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). /// /// Required for cards backed by a Celtic program. @@ -150,6 +154,7 @@ pub struct IssuingCardholderCardIssuing { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIndividualDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -162,6 +167,7 @@ pub struct IssuingCardholderIndividualDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderRequirements { + /// If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. pub disabled_reason: Option, @@ -171,6 +177,7 @@ pub struct IssuingCardholderRequirements { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderSpendingLimit { + /// Maximum amount allowed to spend per interval. /// /// This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -187,6 +194,7 @@ pub struct IssuingCardholderSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderUserTermsAcceptance { + /// The Unix timestamp marking when the cardholder accepted the Authorized User Terms. pub date: Option, @@ -199,12 +207,14 @@ pub struct IssuingCardholderUserTermsAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderVerification { + /// An identifying document, either a passport or local ID card. pub document: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderIdDocument { + /// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. pub back: Option>, @@ -269,9 +279,7 @@ impl IssuingCardholderRequirementsDisabledReason { match self { IssuingCardholderRequirementsDisabledReason::Listed => "listed", IssuingCardholderRequirementsDisabledReason::RejectedListed => "rejected.listed", - IssuingCardholderRequirementsDisabledReason::RequirementsPastDue => { - "requirements.past_due" - } + IssuingCardholderRequirementsDisabledReason::RequirementsPastDue => "requirements.past_due", IssuingCardholderRequirementsDisabledReason::UnderReview => "under_review", } } @@ -322,20 +330,14 @@ impl IssuingCardholderRequirementsPastDue { pub fn as_str(self) -> &'static str { match self { IssuingCardholderRequirementsPastDue::CompanyTaxId => "company.tax_id", - IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceDate => { - "individual.card_issuing.user_terms_acceptance.date" - } - IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceIp => { - "individual.card_issuing.user_terms_acceptance.ip" - } + IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceDate => "individual.card_issuing.user_terms_acceptance.date", + IssuingCardholderRequirementsPastDue::IndividualCardIssuingUserTermsAcceptanceIp => "individual.card_issuing.user_terms_acceptance.ip", IssuingCardholderRequirementsPastDue::IndividualDobDay => "individual.dob.day", IssuingCardholderRequirementsPastDue::IndividualDobMonth => "individual.dob.month", IssuingCardholderRequirementsPastDue::IndividualDobYear => "individual.dob.year", IssuingCardholderRequirementsPastDue::IndividualFirstName => "individual.first_name", IssuingCardholderRequirementsPastDue::IndividualLastName => "individual.last_name", - IssuingCardholderRequirementsPastDue::IndividualVerificationDocument => { - "individual.verification.document" - } + IssuingCardholderRequirementsPastDue::IndividualVerificationDocument => "individual.verification.document", } } } diff --git a/src/resources/generated/issuing_dispute.rs b/src/resources/generated/issuing_dispute.rs index 55b88e081..734f8f5d5 100644 --- a/src/resources/generated/issuing_dispute.rs +++ b/src/resources/generated/issuing_dispute.rs @@ -2,13 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingDisputeId; +use crate::ids::{IssuingDisputeId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{ - BalanceTransaction, Currency, File, IssuingDisputeStatus, IssuingTransaction, -}; +use crate::resources::{BalanceTransaction, Currency, File, IssuingDisputeStatus, IssuingTransaction}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingDispute". /// @@ -67,6 +64,7 @@ impl Object for IssuingDispute { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeEvidence { + #[serde(skip_serializing_if = "Option::is_none")] pub canceled: Option, @@ -96,6 +94,7 @@ pub struct IssuingDisputeEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeCanceledEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -129,6 +128,7 @@ pub struct IssuingDisputeCanceledEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeDuplicateEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -152,6 +152,7 @@ pub struct IssuingDisputeDuplicateEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeFraudulentEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -161,6 +162,7 @@ pub struct IssuingDisputeFraudulentEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeMerchandiseNotAsDescribedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -182,6 +184,7 @@ pub struct IssuingDisputeMerchandiseNotAsDescribedEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeNotReceivedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -200,6 +203,7 @@ pub struct IssuingDisputeNotReceivedEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeOtherEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -215,6 +219,7 @@ pub struct IssuingDisputeOtherEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeServiceNotAsDescribedEvidence { + /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. pub additional_documentation: Option>, @@ -233,6 +238,7 @@ pub struct IssuingDisputeServiceNotAsDescribedEvidence { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDisputeTreasury { + /// The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute. pub debit_reversal: Option, @@ -327,9 +333,7 @@ impl IssuingDisputeEvidenceReason { IssuingDisputeEvidenceReason::Canceled => "canceled", IssuingDisputeEvidenceReason::Duplicate => "duplicate", IssuingDisputeEvidenceReason::Fraudulent => "fraudulent", - IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => { - "merchandise_not_as_described" - } + IssuingDisputeEvidenceReason::MerchandiseNotAsDescribed => "merchandise_not_as_described", IssuingDisputeEvidenceReason::NotReceived => "not_received", IssuingDisputeEvidenceReason::Other => "other", IssuingDisputeEvidenceReason::ServiceNotAsDescribed => "service_not_as_described", @@ -365,9 +369,7 @@ pub enum IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus { impl IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus { pub fn as_str(self) -> &'static str { match self { - IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::MerchantRejected => { - "merchant_rejected" - } + IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::MerchantRejected => "merchant_rejected", IssuingDisputeMerchandiseNotAsDescribedEvidenceReturnStatus::Successful => "successful", } } diff --git a/src/resources/generated/issuing_personalization_design.rs b/src/resources/generated/issuing_personalization_design.rs new file mode 100644 index 000000000..5f16c5502 --- /dev/null +++ b/src/resources/generated/issuing_personalization_design.rs @@ -0,0 +1,232 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingPersonalizationDesignId}; +use crate::params::{Expandable, Metadata, Object, Timestamp}; +use crate::resources::{File, IssuingPhysicalBundle}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingPersonalizationDesign". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesign { + /// Unique identifier for the object. + pub id: IssuingPersonalizationDesignId, + + /// The file for the card logo to use with physical bundles that support card logos. + /// + /// Must have a `purpose` value of `issuing_logo`. + pub card_logo: Option>, + + /// Hash containing carrier text, for use with physical bundles that support carrier text. + pub carrier_text: Option, + + /// Time at which the object was created. + /// + /// Measured in seconds since the Unix epoch. + pub created: Timestamp, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// A lookup key used to retrieve personalization designs dynamically from a static string. + /// + /// This may be up to 200 characters. + pub lookup_key: Option, + + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. + /// + /// This can be useful for storing additional information about the object in a structured format. + pub metadata: Metadata, + + /// Friendly display name. + pub name: Option, + + /// The physical bundle object belonging to this personalization design. + pub physical_bundle: Expandable, + + pub preferences: IssuingPersonalizationDesignPreferences, + + pub rejection_reasons: IssuingPersonalizationDesignRejectionReasons, + + /// Whether this personalization design can be used to create cards. + pub status: IssuingPersonalizationDesignStatus, +} + +impl Object for IssuingPersonalizationDesign { + type Id = IssuingPersonalizationDesignId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.personalization_design" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignCarrierText { + + /// The footer body text of the carrier letter. + pub footer_body: Option, + + /// The footer title text of the carrier letter. + pub footer_title: Option, + + /// The header body text of the carrier letter. + pub header_body: Option, + + /// The header title text of the carrier letter. + pub header_title: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignPreferences { + + /// Whether we use this personalization design to create cards when one isn't specified. + /// + /// A connected account uses the Connect platform's default design if no personalization design is set as the default design. + pub is_default: bool, + + /// Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + pub is_platform_default: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPersonalizationDesignRejectionReasons { + + /// The reason(s) the card logo was rejected. + pub card_logo: Option>, + + /// The reason(s) the carrier text was rejected. + pub carrier_text: Option>, +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesignRejectionReasons`'s `card_logo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignRejectionReasonsCardLogo { + GeographicLocation, + Inappropriate, + NetworkName, + NonBinaryImage, + NonFiatCurrency, + Other, + OtherEntity, + PromotionalMaterial, +} + +impl IssuingPersonalizationDesignRejectionReasonsCardLogo { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignRejectionReasonsCardLogo::GeographicLocation => "geographic_location", + IssuingPersonalizationDesignRejectionReasonsCardLogo::Inappropriate => "inappropriate", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NetworkName => "network_name", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NonBinaryImage => "non_binary_image", + IssuingPersonalizationDesignRejectionReasonsCardLogo::NonFiatCurrency => "non_fiat_currency", + IssuingPersonalizationDesignRejectionReasonsCardLogo::Other => "other", + IssuingPersonalizationDesignRejectionReasonsCardLogo::OtherEntity => "other_entity", + IssuingPersonalizationDesignRejectionReasonsCardLogo::PromotionalMaterial => "promotional_material", + } + } +} + +impl AsRef for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignRejectionReasonsCardLogo { + fn default() -> Self { + Self::GeographicLocation + } +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesignRejectionReasons`'s `carrier_text` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignRejectionReasonsCarrierText { + GeographicLocation, + Inappropriate, + NetworkName, + NonFiatCurrency, + Other, + OtherEntity, + PromotionalMaterial, +} + +impl IssuingPersonalizationDesignRejectionReasonsCarrierText { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignRejectionReasonsCarrierText::GeographicLocation => "geographic_location", + IssuingPersonalizationDesignRejectionReasonsCarrierText::Inappropriate => "inappropriate", + IssuingPersonalizationDesignRejectionReasonsCarrierText::NetworkName => "network_name", + IssuingPersonalizationDesignRejectionReasonsCarrierText::NonFiatCurrency => "non_fiat_currency", + IssuingPersonalizationDesignRejectionReasonsCarrierText::Other => "other", + IssuingPersonalizationDesignRejectionReasonsCarrierText::OtherEntity => "other_entity", + IssuingPersonalizationDesignRejectionReasonsCarrierText::PromotionalMaterial => "promotional_material", + } + } +} + +impl AsRef for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignRejectionReasonsCarrierText { + fn default() -> Self { + Self::GeographicLocation + } +} + +/// An enum representing the possible values of an `IssuingPersonalizationDesign`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPersonalizationDesignStatus { + Active, + Inactive, + Rejected, + Review, +} + +impl IssuingPersonalizationDesignStatus { + pub fn as_str(self) -> &'static str { + match self { + IssuingPersonalizationDesignStatus::Active => "active", + IssuingPersonalizationDesignStatus::Inactive => "inactive", + IssuingPersonalizationDesignStatus::Rejected => "rejected", + IssuingPersonalizationDesignStatus::Review => "review", + } + } +} + +impl AsRef for IssuingPersonalizationDesignStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPersonalizationDesignStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPersonalizationDesignStatus { + fn default() -> Self { + Self::Active + } +} diff --git a/src/resources/generated/issuing_physical_bundle.rs b/src/resources/generated/issuing_physical_bundle.rs new file mode 100644 index 000000000..40e621981 --- /dev/null +++ b/src/resources/generated/issuing_physical_bundle.rs @@ -0,0 +1,233 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{IssuingPhysicalBundleId}; +use crate::params::{Object}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "IssuingPhysicalBundle". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPhysicalBundle { + /// Unique identifier for the object. + pub id: IssuingPhysicalBundleId, + + #[serde(skip_serializing_if = "Option::is_none")] + pub features: Option, + + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + pub livemode: bool, + + /// Friendly display name. + pub name: String, + + /// Whether this physical bundle can be used to create cards. + pub status: IssuingPhysicalBundleStatus, + + /// Whether this physical bundle is a standard Stripe offering or custom-made for you. + #[serde(rename = "type")] + pub type_: IssuingPhysicalBundleType, +} + +impl Object for IssuingPhysicalBundle { + type Id = IssuingPhysicalBundleId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "issuing.physical_bundle" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct IssuingPhysicalBundleFeatures { + + /// The policy for how to use card logo images in a card design with this physical bundle. + pub card_logo: IssuingPhysicalBundleFeaturesCardLogo, + + /// The policy for how to use carrier letter text in a card design with this physical bundle. + pub carrier_text: IssuingPhysicalBundleFeaturesCarrierText, + + /// The policy for how to use a second line on a card with this physical bundle. + pub second_line: IssuingPhysicalBundleFeaturesSecondLine, +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `card_logo` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesCardLogo { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesCardLogo { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesCardLogo::Optional => "optional", + IssuingPhysicalBundleFeaturesCardLogo::Required => "required", + IssuingPhysicalBundleFeaturesCardLogo::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesCardLogo { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesCardLogo { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesCardLogo { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `carrier_text` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesCarrierText { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesCarrierText { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesCarrierText::Optional => "optional", + IssuingPhysicalBundleFeaturesCarrierText::Required => "required", + IssuingPhysicalBundleFeaturesCarrierText::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesCarrierText { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesCarrierText { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesCarrierText { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundleFeatures`'s `second_line` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleFeaturesSecondLine { + Optional, + Required, + Unsupported, +} + +impl IssuingPhysicalBundleFeaturesSecondLine { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleFeaturesSecondLine::Optional => "optional", + IssuingPhysicalBundleFeaturesSecondLine::Required => "required", + IssuingPhysicalBundleFeaturesSecondLine::Unsupported => "unsupported", + } + } +} + +impl AsRef for IssuingPhysicalBundleFeaturesSecondLine { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleFeaturesSecondLine { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleFeaturesSecondLine { + fn default() -> Self { + Self::Optional + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundle`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleStatus { + Active, + Inactive, + Review, +} + +impl IssuingPhysicalBundleStatus { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleStatus::Active => "active", + IssuingPhysicalBundleStatus::Inactive => "inactive", + IssuingPhysicalBundleStatus::Review => "review", + } + } +} + +impl AsRef for IssuingPhysicalBundleStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleStatus { + fn default() -> Self { + Self::Active + } +} + +/// An enum representing the possible values of an `IssuingPhysicalBundle`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum IssuingPhysicalBundleType { + Custom, + Standard, +} + +impl IssuingPhysicalBundleType { + pub fn as_str(self) -> &'static str { + match self { + IssuingPhysicalBundleType::Custom => "custom", + IssuingPhysicalBundleType::Standard => "standard", + } + } +} + +impl AsRef for IssuingPhysicalBundleType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for IssuingPhysicalBundleType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for IssuingPhysicalBundleType { + fn default() -> Self { + Self::Custom + } +} diff --git a/src/resources/generated/issuing_token.rs b/src/resources/generated/issuing_token.rs index a39a51b1f..008c49616 100644 --- a/src/resources/generated/issuing_token.rs +++ b/src/resources/generated/issuing_token.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::IssuingTokenId; +use crate::ids::{IssuingTokenId}; use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::IssuingCard; +use crate::resources::{IssuingCard}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingNetworkToken". /// @@ -65,6 +64,7 @@ impl Object for IssuingToken { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenNetworkData { + #[serde(skip_serializing_if = "Option::is_none")] pub device: Option, @@ -86,6 +86,7 @@ pub struct IssuingNetworkTokenNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenDevice { + /// An obfuscated ID derived from the device ID. #[serde(skip_serializing_if = "Option::is_none")] pub device_fingerprint: Option, @@ -116,6 +117,7 @@ pub struct IssuingNetworkTokenDevice { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenMastercard { + /// A unique reference ID from MasterCard to represent the card account number. #[serde(skip_serializing_if = "Option::is_none")] pub card_reference_id: Option, @@ -135,6 +137,7 @@ pub struct IssuingNetworkTokenMastercard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenVisa { + /// A unique reference ID from Visa to represent the card account number. pub card_reference_id: String, @@ -153,6 +156,7 @@ pub struct IssuingNetworkTokenVisa { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenWalletProvider { + /// The wallet provider-given account ID of the digital wallet the token belongs to. #[serde(skip_serializing_if = "Option::is_none")] pub account_id: Option, @@ -199,6 +203,7 @@ pub struct IssuingNetworkTokenWalletProvider { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingNetworkTokenAddress { + /// The street address of the cardholder tokenizing the card. pub line1: String, diff --git a/src/resources/generated/issuing_transaction.rs b/src/resources/generated/issuing_transaction.rs index d22d88284..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, IssuingToken, IssuingTransactionType, MerchantData, -}; +use crate::resources::{BalanceTransaction, Currency, IssuingAuthorization, IssuingCard, IssuingCardholder, IssuingDispute, IssuingToken, IssuingTransactionType, MerchantData}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "IssuingTransaction". /// @@ -110,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, @@ -119,6 +116,7 @@ pub struct IssuingTransactionAmountDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionNetworkData { + /// A code created by Stripe which is shared with the merchant to validate the authorization. /// /// This field will be populated if the authorization message was approved. @@ -138,6 +136,7 @@ pub struct IssuingTransactionNetworkData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionPurchaseDetails { + /// Information about the flight that was purchased with this transaction. pub flight: Option, @@ -156,6 +155,7 @@ pub struct IssuingTransactionPurchaseDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransactionFlightData { + /// The time that the flight departed. pub departure_at: Option, @@ -174,6 +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, @@ -195,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`. @@ -215,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, @@ -224,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. @@ -241,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/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..bb15acd52 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)] @@ -46,6 +43,9 @@ pub struct InvoiceLineItem { /// Use `expand[]=discounts` to expand each discount. pub discounts: Option>>, + /// The ID of the invoice that contains this line item. + pub invoice: Option, + /// The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. #[serde(skip_serializing_if = "Option::is_none")] pub invoice_item: Option>, @@ -113,6 +113,7 @@ impl Object for InvoiceLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, @@ -122,6 +123,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -142,12 +144,14 @@ pub struct TaxAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceLineItemsProrationDetails { + /// For a credit proration `line_item`, the original debit line_items to which the credit proration applies. pub credited_items: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoicesResourceLineItemsCreditedItems { + /// Invoice containing the credited invoice line items. pub invoice: String, diff --git a/src/resources/generated/linked_account_options_us_bank_account.rs b/src/resources/generated/linked_account_options_us_bank_account.rs index 890bc2468..5a1b5ea0d 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 07edb8ec0..3937552a9 100644 --- a/src/resources/generated/login_link.rs +++ b/src/resources/generated/login_link.rs @@ -2,15 +2,15 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "LoginLink". /// /// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LoginLink { + /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. diff --git a/src/resources/generated/mandate.rs b/src/resources/generated/mandate.rs index ec4a08129..b9393a63b 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::MandateId; +use crate::ids::{MandateId}; use crate::params::{Expand, Expandable, Object, Timestamp}; use crate::resources::{Currency, PaymentMethod}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Mandate". /// @@ -46,6 +45,7 @@ pub struct Mandate { } impl Mandate { + /// Retrieves a Mandate object. pub fn retrieve(client: &Client, id: &MandateId, expand: &[&str]) -> Response { client.get_query(&format!("/mandates/{}", id), &Expand { expand }) @@ -64,6 +64,7 @@ impl Object for Mandate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerAcceptance { + /// The time that the customer accepts the mandate. pub accepted_at: Option, @@ -79,10 +80,12 @@ pub struct CustomerAcceptance { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateMultiUse {} +pub struct MandateMultiUse { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandatePaymentMethodDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, @@ -118,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>, @@ -140,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. @@ -148,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 +171,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. @@ -184,6 +194,7 @@ pub struct MandatePaypal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSepaDebit { + /// The unique reference of the mandate. pub reference: String, @@ -195,6 +206,7 @@ pub struct MandateSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateSingleUse { + /// The amount of the payment on a single use mandate. pub amount: i64, @@ -204,16 +216,19 @@ pub struct MandateSingleUse { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateUsBankAccount { + /// Mandate collection method. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct OfflineAcceptance {} +pub struct OfflineAcceptance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OnlineAcceptance { + /// The customer accepts the mandate from this IP address. pub ip_address: Option, diff --git a/src/resources/generated/payment_flows_private_payment_methods_alipay.rs b/src/resources/generated/payment_flows_private_payment_methods_alipay.rs new file mode 100644 index 000000000..f7c235a1f --- /dev/null +++ b/src/resources/generated/payment_flows_private_payment_methods_alipay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "PaymentFlowsPrivatePaymentMethodsAlipay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsAlipay { +} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index ea7a6c25c..b4c31271b 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -2,21 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{ - CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId, -}; +use crate::ids::{ConfirmationTokenId, CustomerId, MandateId, PaymentIntentId, PaymentMethodConfigurationId, PaymentMethodId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, - LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, - PaymentIntentOffSession, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, - PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping, -}; +use crate::resources::{Account, ApiErrors, Application, Charge, Currency, Customer, Invoice, LinkedAccountOptionsUsBankAccount, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentIntentOffSession, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentIntent". /// @@ -130,8 +120,7 @@ pub struct PaymentIntent { pub payment_method: Option>, /// Information about the payment method configuration used for this PaymentIntent. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment-method-specific configuration for this PaymentIntent. pub payment_method_options: Option, @@ -196,10 +185,12 @@ pub struct PaymentIntent { } impl PaymentIntent { + /// Returns a list of PaymentIntents. - pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { - client.get_query("/payment_intents", ¶ms) - } +pub fn list(client: &Client, params: &ListPaymentIntents<'_>) -> Response> { + client.get_query("/payment_intents", ¶ms) +} + /// Creates a PaymentIntent object. /// @@ -217,11 +208,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 +219,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 +236,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 +251,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 +266,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 +277,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, @@ -316,8 +301,7 @@ pub struct PaymentIntentNextAction { pub redirect_to_url: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub swish_handle_redirect_or_display_qr_code: - Option, + pub swish_handle_redirect_or_display_qr_code: Option, /// Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. #[serde(rename = "type")] @@ -336,8 +320,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, @@ -345,6 +328,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, @@ -360,6 +344,7 @@ pub struct PaymentIntentNextActionAlipayHandleRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionBoleto { + /// The timestamp after which the boleto expires. pub expires_at: Option, @@ -375,6 +360,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. @@ -388,6 +374,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, @@ -415,6 +402,7 @@ pub struct PaymentIntentNextActionDisplayBankTransferInstructions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferFinancialAddress { + #[serde(skip_serializing_if = "Option::is_none")] pub aba: Option, @@ -429,8 +417,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { /// The payment networks supported by this FinancialAddress. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_networks: - Option>, + pub supported_networks: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub swift: Option, @@ -445,6 +432,7 @@ pub struct FundingInstructionsBankTransferFinancialAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferAbaRecord { + /// The ABA account number. pub account_number: String, @@ -457,6 +445,7 @@ pub struct FundingInstructionsBankTransferAbaRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferIbanRecord { + /// The name of the person or business that owns the bank account. pub account_holder_name: String, @@ -472,6 +461,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, @@ -484,6 +474,7 @@ pub struct FundingInstructionsBankTransferSortCodeRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSpeiRecord { + /// The three-digit bank code. pub bank_code: String, @@ -496,6 +487,7 @@ pub struct FundingInstructionsBankTransferSpeiRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferSwiftRecord { + /// The account number. pub account_number: String, @@ -508,6 +500,7 @@ pub struct FundingInstructionsBankTransferSwiftRecord { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FundingInstructionsBankTransferZenginRecord { + /// The account holder name. pub account_holder_name: Option, @@ -534,6 +527,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, @@ -546,6 +540,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, @@ -557,6 +552,7 @@ pub struct PaymentIntentNextActionKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionKonbiniStores { + /// FamilyMart instruction details. pub familymart: Option, @@ -572,6 +568,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, @@ -582,6 +579,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, @@ -592,6 +590,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, @@ -602,6 +601,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, @@ -612,6 +612,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, @@ -627,6 +628,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, @@ -650,6 +652,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, @@ -665,6 +668,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, @@ -674,11 +678,12 @@ pub struct PaymentIntentNextActionRedirectToUrl { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode { + /// The URL to the hosted Swish instructions page, which allows customers to view the QR code. #[serde(skip_serializing_if = "Option::is_none")] pub hosted_instructions_url: Option, - /// The url for mobile redirect based auth. + /// The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). #[serde(skip_serializing_if = "Option::is_none")] pub mobile_auth_url: Option, @@ -688,6 +693,7 @@ pub struct PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionSwishQrCode { + /// The raw data string used to generate QR code, it should be used together with QR code library. #[serde(skip_serializing_if = "Option::is_none")] pub data: Option, @@ -703,6 +709,7 @@ pub struct PaymentIntentNextActionSwishQrCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionVerifyWithMicrodeposits { + /// The timestamp when the microdeposits are expected to land. pub arrival_date: Timestamp, @@ -717,6 +724,7 @@ pub struct PaymentIntentNextActionVerifyWithMicrodeposits { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionWechatPayDisplayQrCode { + /// The data being used to generate QR code. pub data: String, @@ -735,6 +743,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, @@ -759,12 +768,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, @@ -831,6 +842,9 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -873,6 +887,7 @@ pub struct PaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsAcssDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -891,6 +906,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. @@ -902,6 +918,7 @@ pub struct PaymentIntentPaymentMethodOptionsAuBecsDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsBlik { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -913,6 +930,7 @@ pub struct PaymentIntentPaymentMethodOptionsBlik { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsCard { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -933,13 +951,11 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_extended_authorization: - Option, + pub request_extended_authorization: Option, /// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_incremental_authorization: - Option, + pub request_incremental_authorization: Option, /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -953,7 +969,7 @@ pub struct PaymentIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. @@ -989,6 +1005,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. @@ -1000,6 +1017,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, @@ -1018,6 +1036,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, @@ -1028,16 +1047,31 @@ pub struct PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebit { pub interval_description: Option, /// Payment schedule for the mandate. - pub payment_schedule: - Option, + pub payment_schedule: Option, /// Transaction type of the mandate. - pub transaction_type: - Option, + pub transaction_type: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsSepaDebit { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1051,10 +1085,12 @@ pub struct PaymentIntentPaymentMethodOptionsSepaDebit { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {} +pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -1070,6 +1106,7 @@ pub struct PaymentIntentPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { + #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, @@ -1078,8 +1115,7 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { /// Preferred transaction settlement speed. #[serde(skip_serializing_if = "Option::is_none")] - pub preferred_settlement_speed: - Option, + pub preferred_settlement_speed: Option, /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -1091,12 +1127,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, @@ -1107,12 +1143,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. @@ -1124,6 +1162,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, @@ -1143,6 +1182,7 @@ pub struct PaymentMethodOptionsAffirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsAfterpayClearpay { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -1163,6 +1203,7 @@ pub struct PaymentMethodOptionsAfterpayClearpay { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsAlipay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -1174,6 +1215,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. @@ -1185,6 +1227,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, @@ -1199,6 +1242,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. @@ -1215,6 +1259,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>, @@ -1227,6 +1272,7 @@ pub struct PaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -1273,6 +1319,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, @@ -1284,6 +1331,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, @@ -1299,6 +1347,7 @@ pub struct PaymentMethodOptionsCashapp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalance { + #[serde(skip_serializing_if = "Option::is_none")] pub bank_transfer: Option, @@ -1318,6 +1367,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, @@ -1325,8 +1375,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")] @@ -1335,6 +1384,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. @@ -1346,6 +1396,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. @@ -1357,6 +1408,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. @@ -1368,6 +1420,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. @@ -1378,10 +1431,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, @@ -1400,6 +1455,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, @@ -1427,6 +1483,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. @@ -1443,6 +1500,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. @@ -1454,6 +1512,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. @@ -1465,6 +1524,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, @@ -1488,6 +1548,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, @@ -1505,6 +1566,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. @@ -1515,10 +1577,12 @@ pub struct PaymentMethodOptionsPromptpay { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOptionsRevolutPay {} +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, @@ -1533,6 +1597,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. @@ -1552,6 +1617,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. @@ -1563,6 +1629,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). @@ -1580,6 +1647,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). @@ -1602,7 +1670,7 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, - /// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. + /// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. /// /// This parameter defaults to `false`. /// When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). @@ -1613,6 +1681,12 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_method: Option, + /// ID of the ConfirmationToken used to confirm this PaymentIntent. + /// + /// If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + #[serde(skip_serializing_if = "Option::is_none")] + pub confirmation_token: Option, + /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1775,6 +1849,7 @@ impl<'a> CreatePaymentIntent<'a> { capture_method: Default::default(), confirm: Default::default(), confirmation_method: Default::default(), + confirmation_token: Default::default(), currency, customer: Default::default(), description: Default::default(), @@ -1807,6 +1882,7 @@ impl<'a> CreatePaymentIntent<'a> { /// The parameters for `PaymentIntent::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPaymentIntents<'a> { + /// A filter on the list, based on the object `created` field. /// /// The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. @@ -1857,12 +1933,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). @@ -2013,6 +2089,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. @@ -2027,12 +2104,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, @@ -2125,6 +2204,10 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2193,6 +2276,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, @@ -2281,6 +2365,10 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2336,6 +2424,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, @@ -2343,6 +2432,7 @@ pub struct CreatePaymentIntentRadarOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentShipping { + /// Shipping address. pub address: CreatePaymentIntentShippingAddress, @@ -2366,6 +2456,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. @@ -2386,6 +2477,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, @@ -2478,6 +2570,10 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2546,6 +2642,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, @@ -2634,6 +2731,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub link: Option, + /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -2689,6 +2790,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentShipping { + /// Shipping address. pub address: UpdatePaymentIntentShippingAddress, @@ -2712,6 +2814,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, @@ -2719,6 +2822,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, @@ -2740,6 +2844,7 @@ pub struct CreatePaymentIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -2751,16 +2856,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, @@ -2770,6 +2879,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, @@ -2782,10 +2892,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, @@ -2804,22 +2916,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, @@ -2827,6 +2944,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, @@ -2836,87 +2954,109 @@ pub struct CreatePaymentIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataGiropay {} +pub struct CreatePaymentIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataGrabpay {} +pub struct CreatePaymentIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataInteracPresent {} +pub struct CreatePaymentIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataKonbini {} +pub struct CreatePaymentIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataLink {} +pub struct CreatePaymentIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataOxxo {} +pub struct CreatePaymentIntentPaymentMethodDataMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPaynow {} +pub struct CreatePaymentIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPaypal {} +pub struct CreatePaymentIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPix {} +pub struct CreatePaymentIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataPromptpay {} +pub struct CreatePaymentIntentPaymentMethodDataPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataRadarOptions { + /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] pub session: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataRevolutPay {} +pub struct CreatePaymentIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodDataSwish {} +pub struct CreatePaymentIntentPaymentMethodDataSwish { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -2938,13 +3078,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, @@ -2955,20 +3098,19 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAffirm { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -2989,14 +3131,14 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAffirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3010,12 +3152,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsAlipay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -3027,34 +3169,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. /// @@ -3062,12 +3204,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. @@ -3085,6 +3227,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. @@ -3102,9 +3245,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCard { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3143,18 +3287,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_extended_authorization: - Option, + pub request_extended_authorization: Option, /// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_incremental_authorization: - Option, + pub request_incremental_authorization: Option, /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_multicapture: - Option, + pub request_multicapture: Option, /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -3164,10 +3305,9 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. /// @@ -3207,6 +3347,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardPresent { + /// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity). #[serde(skip_serializing_if = "Option::is_none")] pub request_extended_authorization: Option, @@ -3220,9 +3361,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCashapp { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3239,6 +3381,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, @@ -3255,12 +3398,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. @@ -3272,6 +3415,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. @@ -3283,6 +3427,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. @@ -3294,6 +3439,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. @@ -3305,6 +3451,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. @@ -3315,13 +3462,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsIdeal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentIntentPaymentMethodOptionsInteracPresent {} +pub struct CreatePaymentIntentPaymentMethodOptionsInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsKlarna { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3342,6 +3491,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. @@ -3377,9 +3527,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsLink { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3398,8 +3549,29 @@ pub struct CreatePaymentIntentPaymentMethodOptionsLink { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsOxxo { + /// The number of calendar days before an OXXO voucher expires. /// /// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -3417,6 +3589,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. @@ -3432,6 +3605,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. @@ -3443,6 +3617,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, @@ -3472,6 +3647,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. @@ -3495,30 +3671,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, + 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, @@ -3529,12 +3706,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, @@ -3550,6 +3727,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -3565,10 +3743,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -3580,8 +3758,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. /// @@ -3589,17 +3766,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -3615,12 +3791,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. @@ -3632,6 +3808,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, @@ -3659,6 +3836,7 @@ pub struct CreatePaymentIntentShippingAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -3670,16 +3848,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, @@ -3689,6 +3871,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, @@ -3701,10 +3884,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, @@ -3723,22 +3908,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, @@ -3746,6 +3936,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, @@ -3755,87 +3946,109 @@ pub struct UpdatePaymentIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataGiropay {} +pub struct UpdatePaymentIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataGrabpay {} +pub struct UpdatePaymentIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataInteracPresent {} +pub struct UpdatePaymentIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataKonbini {} +pub struct UpdatePaymentIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataLink {} +pub struct UpdatePaymentIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataOxxo {} +pub struct UpdatePaymentIntentPaymentMethodDataMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPaynow {} +pub struct UpdatePaymentIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPaypal {} +pub struct UpdatePaymentIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPix {} +pub struct UpdatePaymentIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataPromptpay {} +pub struct UpdatePaymentIntentPaymentMethodDataPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataRadarOptions { + /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] pub session: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataRevolutPay {} +pub struct UpdatePaymentIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdatePaymentIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodDataSwish {} +pub struct UpdatePaymentIntentPaymentMethodDataSwish { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -3857,13 +4070,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, @@ -3874,20 +4090,19 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebit { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3908,14 +4123,14 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] - pub capture_method: - Option, + pub capture_method: Option, /// An internal identifier or reference that this payment corresponds to. /// @@ -3929,12 +4144,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsAlipay { + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. @@ -3946,34 +4161,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. /// @@ -3981,12 +4196,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. @@ -4004,6 +4219,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. @@ -4021,9 +4237,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBoleto { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCard { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4062,18 +4279,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_extended_authorization: - Option, + pub request_extended_authorization: Option, /// Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_incremental_authorization: - Option, + pub request_incremental_authorization: Option, /// Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub request_multicapture: - Option, + pub request_multicapture: Option, /// Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -4083,10 +4297,9 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. /// @@ -4126,6 +4339,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresent { + /// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity). #[serde(skip_serializing_if = "Option::is_none")] pub request_extended_authorization: Option, @@ -4139,9 +4353,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardPresent { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4158,6 +4373,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, @@ -4174,12 +4390,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. @@ -4191,6 +4407,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. @@ -4202,6 +4419,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. @@ -4213,6 +4431,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. @@ -4224,6 +4443,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. @@ -4234,13 +4454,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsIdeal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentIntentPaymentMethodOptionsInteracPresent {} +pub struct UpdatePaymentIntentPaymentMethodOptionsInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4261,6 +4483,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. @@ -4296,9 +4519,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsKonbini { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsLink { + /// Controls when the funds will be captured from the customer's account. /// - /// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. /// /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. #[serde(skip_serializing_if = "Option::is_none")] @@ -4317,8 +4541,29 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsLink { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsMobilepay { + + /// Controls when the funds will be captured from the customer's account. + /// + /// If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + /// + /// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_method: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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. @@ -4336,6 +4581,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. @@ -4351,6 +4597,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. @@ -4362,6 +4609,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, @@ -4391,6 +4639,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. @@ -4414,30 +4663,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, + 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, @@ -4448,12 +4698,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, @@ -4469,6 +4719,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -4484,10 +4735,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSwish { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -4499,8 +4750,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. /// @@ -4508,17 +4758,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { /// /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. #[serde(skip_serializing_if = "Option::is_none")] - pub setup_future_usage: - Option, + pub setup_future_usage: Option, /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay { + /// The app ID registered with WeChat Pay. /// /// Only required when client is ios or android. @@ -4534,12 +4783,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. @@ -4551,6 +4800,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, @@ -4577,10 +4827,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, @@ -4590,6 +4842,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, @@ -4617,6 +4870,7 @@ pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4629,6 +4883,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. @@ -4643,17 +4898,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. @@ -4668,6 +4922,7 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4713,16 +4968,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -4733,21 +4987,18 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure /// provider and indicates what degree of authentication was performed. #[serde(skip_serializing_if = "Option::is_none")] - pub electronic_commerce_indicator: - Option, + pub electronic_commerce_indicator: Option, /// The exemption requested via 3DS and accepted by the issuer at authentication time. #[serde(skip_serializing_if = "Option::is_none")] - pub exemption_indicator: - Option, + pub exemption_indicator: Option, /// Network specific 3DS fields. /// /// Network specific arguments require an explicit card brand choice. /// The parameter `payment_method_options.card.network`` must be populated accordingly. #[serde(skip_serializing_if = "Option::is_none")] - pub network_options: - Option, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -4767,20 +5018,16 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { + /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + pub eu_bank_transfer: Option, /// List of address types that should be returned in the financial_addresses response. /// /// If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. #[serde(skip_serializing_if = "Option::is_none")] - pub requested_address_types: Option< - Vec< - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes, - >, - >, + pub requested_address_types: Option>, /// The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. #[serde(rename = "type")] @@ -4788,24 +5035,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. /// @@ -4816,22 +5061,23 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] - pub requested: - Option>, + pub requested: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, @@ -4859,6 +5105,7 @@ pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -4871,6 +5118,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. @@ -4885,17 +5133,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. @@ -4910,6 +5157,7 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -4955,16 +5203,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -4975,21 +5222,18 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure /// provider and indicates what degree of authentication was performed. #[serde(skip_serializing_if = "Option::is_none")] - pub electronic_commerce_indicator: - Option, + pub electronic_commerce_indicator: Option, /// The exemption requested via 3DS and accepted by the issuer at authentication time. #[serde(skip_serializing_if = "Option::is_none")] - pub exemption_indicator: - Option, + pub exemption_indicator: Option, /// Network specific 3DS fields. /// /// Network specific arguments require an explicit card brand choice. /// The parameter `payment_method_options.card.network`` must be populated accordingly. #[serde(skip_serializing_if = "Option::is_none")] - pub network_options: - Option, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -5009,20 +5253,16 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer { + /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] - pub eu_bank_transfer: - Option, + pub eu_bank_transfer: Option, /// List of address types that should be returned in the financial_addresses response. /// /// If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. #[serde(skip_serializing_if = "Option::is_none")] - pub requested_address_types: Option< - Vec< - UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes, - >, - >, + pub requested_address_types: Option>, /// The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. #[serde(rename = "type")] @@ -5030,24 +5270,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. /// @@ -5058,22 +5296,23 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] - pub requested: - Option>, + pub requested: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { + /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -5088,15 +5327,15 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: Option< - CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, - >, + pub cartes_bancaires: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -5105,6 +5344,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, @@ -5119,15 +5359,15 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: Option< - UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires, - >, + pub cartes_bancaires: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -5283,57 +5523,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", @@ -5576,9 +5788,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", @@ -5588,12 +5798,8 @@ impl CreatePaymentIntentPaymentMethodDataP24Bank { CreatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay", CreatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", CreatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", - CreatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => { - "santander_przelew24" - } - CreatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + CreatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", + CreatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", CreatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", CreatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank", CreatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -5689,6 +5895,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -5726,6 +5933,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::Klarna => "klarna", CreatePaymentIntentPaymentMethodDataType::Konbini => "konbini", CreatePaymentIntentPaymentMethodDataType::Link => "link", + CreatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", CreatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", CreatePaymentIntentPaymentMethodDataType::P24 => "p24", CreatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -5771,12 +5979,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", } } } @@ -5857,16 +6061,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 } @@ -5895,16 +6095,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 } @@ -5923,12 +6119,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", } } } @@ -5962,15 +6154,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", } } } @@ -6066,9 +6252,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + CreatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -6084,9 +6268,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 } @@ -6118,9 +6300,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 } @@ -6138,9 +6318,7 @@ impl CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -6175,12 +6353,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", } } } @@ -6215,12 +6389,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", } } } @@ -6292,9 +6462,7 @@ impl CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -6361,12 +6529,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", } } } @@ -6462,9 +6626,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -6498,9 +6660,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -6538,9 +6698,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -6574,9 +6732,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + CreatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -6592,9 +6748,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 } @@ -6621,9 +6775,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", @@ -6682,9 +6834,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestExt self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn default() -> Self { Self::IfAvailable } @@ -6713,16 +6863,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementa } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -6739,9 +6885,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { impl CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => { - "if_available" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", CreatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", } } @@ -6775,9 +6919,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { impl CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => { - "if_available" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", CreatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } @@ -6813,12 +6955,8 @@ impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -6853,9 +6991,7 @@ impl CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OffSession => "off_session", CreatePaymentIntentPaymentMethodOptionsCardSetupFutureUsage::OnSession => "on_session", } } @@ -6923,9 +7059,7 @@ impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecu self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -6959,24 +7093,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIn } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -6993,12 +7121,8 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicat impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => { - "low_risk" - } - CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => { - "none" - } + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", } } } @@ -7009,16 +7133,12 @@ impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemp } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn default() -> Self { Self::LowRisk } @@ -7027,8 +7147,7 @@ impl std::default::Default /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -7056,24 +7175,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -7163,12 +7276,8 @@ impl CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => { - "off_session" - } - CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => { - "on_session" - } + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OffSession => "off_session", + CreatePaymentIntentPaymentMethodOptionsCashappSetupFutureUsage::OnSession => "on_session", } } } @@ -7217,24 +7326,18 @@ impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequested } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypes { fn default() -> Self { Self::Aba } @@ -7274,9 +7377,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 } @@ -7292,9 +7393,7 @@ pub enum CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + CreatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -7342,9 +7441,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 } @@ -7490,9 +7587,7 @@ impl CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -7816,9 +7911,7 @@ impl CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -7840,6 +7933,70 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsLinkSetupF } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -8073,9 +8230,7 @@ impl CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -8173,9 +8328,7 @@ impl CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -8210,12 +8363,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", } } } @@ -8293,9 +8442,7 @@ impl CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + CreatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -8370,24 +8517,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 } @@ -8410,24 +8551,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 } @@ -8448,24 +8583,18 @@ impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectio } } -impl AsRef - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -8499,9 +8628,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 } @@ -8530,16 +8657,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 } @@ -8558,12 +8681,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", } } } @@ -8579,9 +8698,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 } @@ -8617,9 +8734,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 } @@ -8744,9 +8859,7 @@ impl FundingInstructionsBankTransferFinancialAddressSupportedNetworks { match self { FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Ach => "ach", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Bacs => "bacs", - FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => { - "domestic_wire_us" - } + FundingInstructionsBankTransferFinancialAddressSupportedNetworks::DomesticWireUs => "domestic_wire_us", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Fps => "fps", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Sepa => "sepa", FundingInstructionsBankTransferFinancialAddressSupportedNetworks::Spei => "spei", @@ -8977,21 +9090,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", } } } @@ -9025,9 +9128,7 @@ impl PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -9099,9 +9200,7 @@ impl PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + PaymentIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -9136,9 +9235,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", } } @@ -9288,9 +9385,7 @@ pub enum PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { impl PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => { - "if_available" - } + PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::IfAvailable => "if_available", PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization::Never => "never", } } @@ -9324,9 +9419,7 @@ pub enum PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { impl PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { pub fn as_str(self) -> &'static str { match self { - PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => { - "if_available" - } + PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::IfAvailable => "if_available", PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization::Never => "never", } } @@ -9343,9 +9436,7 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsCardRequestIncrement self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -9601,15 +9692,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", } } } @@ -9625,9 +9710,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 } @@ -9644,12 +9727,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", } } } @@ -9665,14 +9744,76 @@ impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDe self.as_str().fmt(f) } } -impl std::default::Default - for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType -{ +impl std::default::Default for PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitTransactionType { fn default() -> Self { Self::Business } } +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsSepaDebit`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -9752,12 +9893,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", } } } @@ -9773,9 +9910,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 } @@ -9794,12 +9929,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", } } } @@ -9833,13 +9964,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", } } } @@ -10504,14 +10631,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", } } } @@ -10527,9 +10650,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 } @@ -10549,21 +10670,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", } } } @@ -11316,57 +11427,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", @@ -11609,9 +11692,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", @@ -11621,12 +11702,8 @@ impl UpdatePaymentIntentPaymentMethodDataP24Bank { UpdatePaymentIntentPaymentMethodDataP24Bank::NoblePay => "noble_pay", UpdatePaymentIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", UpdatePaymentIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", - UpdatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => { - "santander_przelew24" - } - UpdatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + UpdatePaymentIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", + UpdatePaymentIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", UpdatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", UpdatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank", UpdatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -11722,6 +11799,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -11759,6 +11837,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::Klarna => "klarna", UpdatePaymentIntentPaymentMethodDataType::Konbini => "konbini", UpdatePaymentIntentPaymentMethodDataType::Link => "link", + UpdatePaymentIntentPaymentMethodDataType::Mobilepay => "mobilepay", UpdatePaymentIntentPaymentMethodDataType::Oxxo => "oxxo", UpdatePaymentIntentPaymentMethodDataType::P24 => "p24", UpdatePaymentIntentPaymentMethodDataType::Paynow => "paynow", @@ -11804,12 +11883,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", } } } @@ -11890,16 +11965,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 } @@ -11928,16 +11999,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 } @@ -11956,12 +12023,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", } } } @@ -11995,15 +12058,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", } } } @@ -12099,9 +12156,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { impl UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => { - "manual" - } + UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod::Manual => "manual", } } } @@ -12117,9 +12172,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 } @@ -12151,9 +12204,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 } @@ -12171,9 +12222,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage::OffSession => "off_session", } } } @@ -12208,12 +12257,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", } } } @@ -12248,12 +12293,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", } } } @@ -12325,9 +12366,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage::OffSession => "off_session", } } } @@ -12394,12 +12433,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", } } } @@ -12495,9 +12530,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { impl UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => { - "fixed_count" - } + UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlanType::FixedCount => "fixed_count", } } } @@ -12531,9 +12564,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Fixed => "fixed", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => { - "maximum" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType::Maximum => "maximum", } } } @@ -12571,9 +12602,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval { match self { UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Day => "day", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Month => "month", - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => { - "sporadic" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Sporadic => "sporadic", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Week => "week", UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsInterval::Year => "year", } @@ -12607,9 +12636,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes impl UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => { - "india" - } + UpdatePaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypes::India => "india", } } } @@ -12625,9 +12652,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 } @@ -12654,9 +12679,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", @@ -12715,9 +12738,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestExt self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization { fn default() -> Self { Self::IfAvailable } @@ -12746,16 +12767,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementa } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardRequestIncrementalAuthorization { fn default() -> Self { Self::IfAvailable } @@ -12772,9 +12789,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { impl UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => { - "if_available" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::IfAvailable => "if_available", UpdatePaymentIntentPaymentMethodOptionsCardRequestMulticapture::Never => "never", } } @@ -12808,9 +12823,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { impl UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => { - "if_available" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::IfAvailable => "if_available", UpdatePaymentIntentPaymentMethodOptionsCardRequestOvercapture::Never => "never", } } @@ -12846,12 +12859,8 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { - "automatic" - } - UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { - "challenge" - } + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -12886,9 +12895,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", } } @@ -12956,9 +12963,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecu self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -12992,24 +12997,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIn } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -13026,12 +13025,8 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicat impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => { - "low_risk" - } - UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => { - "none" - } + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::LowRisk => "low_risk", + UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator::None => "none", } } } @@ -13042,16 +13037,12 @@ impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemp } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureExemptionIndicator { fn default() -> Self { Self::LowRisk } @@ -13060,8 +13051,7 @@ impl std::default::Default /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -13089,24 +13079,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -13196,12 +13180,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", } } } @@ -13250,24 +13230,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 } @@ -13307,9 +13281,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 } @@ -13325,9 +13297,7 @@ pub enum UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { impl UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType { pub fn as_str(self) -> &'static str { match self { - UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => { - "bank_transfer" - } + UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceFundingType::BankTransfer => "bank_transfer", } } } @@ -13375,9 +13345,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 } @@ -13523,9 +13491,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsIdealSetupFutureUsage::OffSession => "off_session", } } } @@ -13849,9 +13815,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsLinkSetupFutureUsage::OffSession => "off_session", } } } @@ -13873,6 +13837,70 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsLinkSetupF } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsMobilepay`'s `capture_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + Manual, +} + +impl UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod::Manual => "manual", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsMobilepayCaptureMethod { + fn default() -> Self { + Self::Manual + } +} + +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsMobilepay`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsOxxo`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -14106,9 +14134,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsPaypalSetupFutureUsage::OffSession => "off_session", } } } @@ -14206,9 +14232,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsRevolutPaySetupFutureUsage::OffSession => "off_session", } } } @@ -14243,12 +14267,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", } } } @@ -14326,9 +14346,7 @@ impl UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::None => "none", - UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => { - "off_session" - } + UpdatePaymentIntentPaymentMethodOptionsSofortSetupFutureUsage::OffSession => "off_session", } } } @@ -14403,24 +14421,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 } @@ -14443,24 +14455,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 } @@ -14481,24 +14487,18 @@ impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectio } } -impl AsRef - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -14532,9 +14532,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 } @@ -14563,16 +14561,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 } @@ -14591,12 +14585,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", } } } @@ -14612,9 +14602,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 } @@ -14650,9 +14638,7 @@ impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountV self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } diff --git a/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs b/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs index 029b162ee..dcb4dc9cd 100644 --- a/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs +++ b/src/resources/generated/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::params::{Timestamp}; use serde::{Deserialize, Serialize}; -use crate::params::Timestamp; - /// The resource representing a Stripe "PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode { + /// The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. pub hosted_instructions_url: String, @@ -20,6 +20,7 @@ pub struct PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionCashappQrCode { + /// The date (unix timestamp) when the QR code expires. pub expires_at: Timestamp, diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index ff4b26102..329f1d7b5 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PaymentLinkId; +use crate::ids::{PaymentLinkId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable}; -use crate::resources::{ - Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, - InvoiceSettingRenderingOptions, ShippingRate, SubscriptionsTrialsResourceTrialSettings, TaxId, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, InvoiceSettingRenderingOptions, ShippingRate, SubscriptionsTrialsResourceTrialSettings, TaxId}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentLink". /// @@ -42,6 +38,8 @@ pub struct PaymentLink { pub automatic_tax: PaymentLinksResourceAutomaticTax, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. pub billing_address_collection: PaymentLinkBillingAddressCollection, /// When set, provides configuration to gather active consent from customers. @@ -89,6 +87,8 @@ pub struct PaymentLink { pub payment_intent_data: Option, /// Configuration for collecting a payment method during checkout. + /// + /// Defaults to `always`. pub payment_method_collection: PaymentLinkPaymentMethodCollection, /// The list of payment method types that customers can use. @@ -125,10 +125,12 @@ pub struct PaymentLink { } impl PaymentLink { + /// Returns a list of your payment links. - pub fn list(client: &Client, params: &ListPaymentLinks<'_>) -> Response> { - client.get_query("/payment_links", ¶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 { @@ -141,11 +143,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) } } @@ -162,6 +160,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, @@ -175,6 +174,7 @@ pub struct PaymentLinksResourceAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -187,18 +187,21 @@ pub struct PaymentLinksResourceAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletionBehaviorConfirmationPage { + /// The custom message that is displayed to the customer after the purchase is complete. pub custom_message: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletionBehaviorRedirect { + /// The URL the customer will be redirected to after the purchase is complete. pub url: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceConsentCollection { + /// Settings related to the payment method reuse text shown in the Checkout UI. pub payment_method_reuse_agreement: Option, @@ -213,6 +216,7 @@ pub struct PaymentLinksResourceConsentCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomFields { + #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -241,6 +245,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. @@ -249,6 +254,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. @@ -262,6 +268,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. @@ -274,6 +281,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, @@ -283,6 +291,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, @@ -292,6 +301,7 @@ pub struct PaymentLinksResourceCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCustomText { + /// Custom text that should be displayed after the payment confirmation button. pub after_submit: Option, @@ -307,12 +317,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, @@ -324,6 +336,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>>, @@ -354,6 +367,7 @@ pub struct PaymentLinksResourceInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingCustomField { + /// The name of the custom field. pub name: String, @@ -363,6 +377,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePaymentIntentData { + /// Indicates when the funds will be captured from the customer's account. pub capture_method: Option, @@ -396,6 +411,7 @@ pub struct PaymentLinksResourcePaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -404,17 +420,20 @@ pub struct PaymentLinksResourcePaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePhoneNumberCollection { + /// If `true`, a phone number will be collected during checkout. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceRestrictions { + pub completed_sessions: PaymentLinksResourceCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceCompletedSessions { + /// The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. pub count: u64, @@ -424,6 +443,7 @@ pub struct PaymentLinksResourceCompletedSessions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. /// /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. @@ -432,6 +452,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, @@ -441,6 +462,7 @@ pub struct PaymentLinksResourceShippingOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -460,17 +482,20 @@ pub struct PaymentLinksResourceSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceSubscriptionDataInvoiceSettings { + pub issuer: ConnectAccountReference, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceTaxIdCollection { + /// Indicates whether tax ID collection is enabled for the session. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account. /// /// By default, the entire amount is transferred to the destination. @@ -483,6 +508,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, @@ -509,6 +535,8 @@ pub struct CreatePaymentLink<'a> { pub automatic_tax: Option, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, @@ -573,7 +601,8 @@ pub struct CreatePaymentLink<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -660,6 +689,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, @@ -703,12 +733,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. @@ -728,6 +758,8 @@ pub struct UpdatePaymentLink<'a> { pub automatic_tax: Option, /// Configuration for collecting the customer's billing address. + /// + /// Defaults to `auto`. #[serde(skip_serializing_if = "Option::is_none")] pub billing_address_collection: Option, @@ -779,7 +811,8 @@ pub struct UpdatePaymentLink<'a> { /// Specify whether Checkout should collect a payment method. /// - /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in `subscription` mode. + /// Defaults to `always`. If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_collection: Option, @@ -832,6 +865,7 @@ impl<'a> UpdatePaymentLink<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletion { + /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] pub hosted_confirmation: Option, @@ -849,6 +883,7 @@ pub struct CreatePaymentLinkAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -862,12 +897,12 @@ pub struct CreatePaymentLinkAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkConsentCollection { + /// Determines the display of payment method reuse agreement text in the UI. /// /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method_reuse_agreement: - Option, + pub payment_method_reuse_agreement: Option, /// If set to `auto`, enables the collection of customer consent for promotional communications. /// @@ -884,6 +919,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, @@ -917,6 +953,7 @@ pub struct CreatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -936,6 +973,7 @@ pub struct CreatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -946,6 +984,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, @@ -959,6 +998,7 @@ pub struct CreatePaymentLinkLineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkPaymentIntentData { + /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] pub capture_method: Option, @@ -1012,18 +1052,21 @@ pub struct CreatePaymentLinkPaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkPhoneNumberCollection { + /// Set to `true` to enable phone number collection. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkRestrictions { + /// Configuration for the `completed_sessions` restriction type. pub completed_sessions: CreatePaymentLinkRestrictionsCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -1033,6 +1076,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, @@ -1040,6 +1084,7 @@ pub struct CreatePaymentLinkShippingOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -1070,12 +1115,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, @@ -1090,6 +1137,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, @@ -1107,6 +1155,7 @@ pub struct UpdatePaymentLinkAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAutomaticTax { + /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -1120,6 +1169,7 @@ pub struct UpdatePaymentLinkAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFields { + /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] pub dropdown: Option, @@ -1153,6 +1203,7 @@ pub struct UpdatePaymentLinkCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomText { + /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] pub after_submit: Option, @@ -1172,6 +1223,7 @@ pub struct UpdatePaymentLinkCustomText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreation { + /// Whether the feature is enabled. pub enabled: bool, @@ -1182,6 +1234,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, @@ -1196,6 +1249,7 @@ pub struct UpdatePaymentLinkLineItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkPaymentIntentData { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. @@ -1231,12 +1285,14 @@ pub struct UpdatePaymentLinkPaymentIntentData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkRestrictions { + /// Configuration for the `completed_sessions` restriction type. pub completed_sessions: UpdatePaymentLinkRestrictionsCompletedSessions, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkShippingAddressCollection { + /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for /// shipping locations. /// @@ -1246,6 +1302,7 @@ pub struct UpdatePaymentLinkShippingAddressCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionData { + /// All invoices will be billed using the specified settings. #[serde(skip_serializing_if = "Option::is_none")] pub invoice_settings: Option, @@ -1264,6 +1321,7 @@ pub struct UpdatePaymentLinkSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] pub custom_message: Option, @@ -1271,6 +1329,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. @@ -1279,6 +1338,7 @@ pub struct CreatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1290,6 +1350,7 @@ pub struct CreatePaymentLinkAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement { + /// Determines the position and visibility of the payment method reuse agreement in the UI. /// /// When set to `auto`, Stripe's defaults will be used. @@ -1299,6 +1360,7 @@ pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1307,6 +1369,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. @@ -1319,6 +1382,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, @@ -1330,6 +1394,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, @@ -1341,30 +1406,35 @@ pub struct CreatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1404,6 +1474,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, @@ -1424,12 +1495,14 @@ pub struct CreatePaymentLinkLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkRestrictionsCompletedSessions { + /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. pub limit: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -1439,12 +1512,14 @@ pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAfterCompletionHostedConfirmation { + /// A custom message to display to the customer after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] pub custom_message: Option, @@ -1452,6 +1527,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. @@ -1460,6 +1536,7 @@ pub struct UpdatePaymentLinkAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1471,6 +1548,7 @@ pub struct UpdatePaymentLinkAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsDropdown { + /// The options available for the customer to select. /// /// Up to 200 options allowed. @@ -1479,6 +1557,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. @@ -1491,6 +1570,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, @@ -1502,6 +1582,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, @@ -1513,30 +1594,35 @@ pub struct UpdatePaymentLinkCustomFieldsText { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextAfterSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextShippingAddress { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextSubmit { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomTextTermsOfServiceAcceptance { + /// Text may be up to 1200 characters in length. pub message: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceData { + /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>, @@ -1576,6 +1662,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, @@ -1596,12 +1683,14 @@ pub struct UpdatePaymentLinkLineItemsAdjustableQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkRestrictionsCompletedSessions { + /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. pub limit: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings { + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -1611,12 +1700,14 @@ pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1630,6 +1721,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. @@ -1643,6 +1735,7 @@ pub struct CreatePaymentLinkInvoiceCreationInvoiceDataCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1654,18 +1747,19 @@ pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1677,13 +1771,14 @@ pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkCustomFieldsDropdownOptions { + /// The label for the option, displayed to the customer. /// /// Up to 100 characters. @@ -1697,6 +1792,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. @@ -1710,6 +1806,7 @@ pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataCustomFields { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1721,18 +1818,19 @@ pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { + /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// /// One of `exclude_tax` or `include_inclusive_tax`. /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. #[serde(skip_serializing_if = "Option::is_none")] - pub amount_tax_display: - Option, + pub amount_tax_display: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1744,9 +1842,9 @@ pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - pub missing_payment_method: - UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, + pub missing_payment_method: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod, } /// An enum representing the possible values of an `CreatePaymentLinkAfterCompletion`'s `type` field. @@ -1830,9 +1928,7 @@ impl CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { pub fn as_str(self) -> &'static str { match self { CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", - CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { - "hidden" - } + CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => "hidden", } } } @@ -1848,9 +1944,7 @@ impl std::fmt::Display for CreatePaymentLinkConsentCollectionPaymentMethodReuseA self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition -{ +impl std::default::Default for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { fn default() -> Self { Self::Auto } @@ -2050,16 +2144,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 } @@ -3024,16 +3114,12 @@ impl AsRef for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMis } } -impl std::fmt::Display - for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::fmt::Display for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::default::Default for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn default() -> Self { Self::Cancel } @@ -4477,16 +4563,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 } @@ -5381,16 +5463,12 @@ impl AsRef for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMis } } -impl std::fmt::Display - for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::fmt::Display for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod -{ +impl std::default::Default for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod { fn default() -> Self { Self::Cancel } diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 3a23dc401..e12b00d50 100644 --- a/src/resources/generated/payment_method.rs +++ b/src/resources/generated/payment_method.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, PaymentMethodId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - Address, BillingDetails, Charge, Customer, PaymentMethodCardPresentNetworks, RadarRadarOptions, - SetupAttempt, -}; +use crate::resources::{BillingDetails, CardDetails, CardPresent, Customer, PaymentFlowsPrivatePaymentMethodsAlipay, PaymentMethodAcssDebit, PaymentMethodAffirm, PaymentMethodAfterpayClearpay, PaymentMethodAuBecsDebit, PaymentMethodBacsDebit, PaymentMethodBancontact, PaymentMethodBlik, PaymentMethodBoleto, PaymentMethodCashapp, PaymentMethodCustomerBalance, PaymentMethodEps, PaymentMethodFpx, PaymentMethodGiropay, PaymentMethodGrabpay, PaymentMethodIdeal, PaymentMethodInteracPresent, PaymentMethodKlarna, PaymentMethodKonbini, PaymentMethodLink, PaymentMethodMobilepay, PaymentMethodOxxo, PaymentMethodP24, PaymentMethodPaynow, PaymentMethodPaypal, PaymentMethodPix, PaymentMethodPromptpay, PaymentMethodRevolutPay, PaymentMethodSepaDebit, PaymentMethodSofort, PaymentMethodSwish, PaymentMethodUsBankAccount, PaymentMethodWechatPay, PaymentMethodZip, RadarRadarOptions}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethod". /// @@ -106,6 +102,9 @@ pub struct PaymentMethod { /// This can be useful for storing additional information about the object in a structured format. pub metadata: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -157,12 +156,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. /// @@ -174,22 +175,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) } } @@ -204,1681 +197,602 @@ impl Object for PaymentMethod { } } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentFlowsPrivatePaymentMethodsAlipay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAcssDebit { - /// Name of the bank associated with the bank account. - pub bank_name: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Institution number of the bank account. - pub institution_number: Option, - - /// Last four digits of the bank account number. - pub last4: Option, - - /// Transit number of the bank account. - pub transit_number: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAffirm {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAfterpayClearpay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodAuBecsDebit { - /// Six-digit number identifying bank and branch associated with this bank account. - pub bsb_number: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, +/// The parameters for `PaymentMethod::create`. +#[derive(Clone, Debug, Serialize, Default)] +pub struct CreatePaymentMethod<'a> { - /// Last four digits of the bank account number. - pub last4: Option, -} + /// 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, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBacsDebit { - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, + /// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub affirm: Option, - /// Last four digits of the bank account number. - pub last4: Option, + /// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub afterpay_clearpay: Option, - /// Sort code of the bank account. - /// - /// (e.g., `10-20-30`). - pub sort_code: Option, -} + /// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub alipay: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBancontact {} + /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + #[serde(skip_serializing_if = "Option::is_none")] + pub au_becs_debit: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBlik {} + /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + #[serde(skip_serializing_if = "Option::is_none")] + pub bacs_debit: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodBoleto { - /// Uniquely identifies the customer tax id (CNPJ or CPF). - pub tax_id: String, -} + /// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub bancontact: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CardDetails { - /// Card brand. - /// - /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub brand: String, + /// 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, - /// Checks on Card address and CVC if provided. - pub checks: Option, + /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub blik: Option, - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, + /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub boleto: Option, - /// A high-level description of the type of cards issued in this range. + /// If this is a `card` PaymentMethod, this hash contains the user's card details. /// - /// (For internal use only and not typically available in standard API requests.). + /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. + /// When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). + /// We strongly recommend using Stripe.js instead of interacting with this API directly. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, - - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, + pub card: 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. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + /// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub fingerprint: Option, + pub cashapp: Option, - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: String, + /// The `Customer` to whom the original PaymentMethod is attached. + #[serde(skip_serializing_if = "Option::is_none")] + pub customer: Option, - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). + /// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, + pub customer_balance: Option, - /// The name of the card's issuing bank. - /// - /// (For internal use only and not typically available in standard API requests.). + /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, + pub eps: Option, - /// The last four digits of the card. - pub last4: String, + /// Specifies which fields in the response should be expanded. + #[serde(skip_serializing_if = "Expand::is_empty")] + pub expand: &'a [&'a str], - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, + /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub fpx: Option, - /// Contains details on how this Card may be used for 3D Secure authentication. - pub three_d_secure_usage: Option, + /// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub giropay: Option, - /// If this Card is part of a card wallet, this contains the details of the card wallet. - pub wallet: Option, -} + /// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub grabpay: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct Networks { - /// All available networks for the card. - pub available: Vec, + /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub ideal: Option, - /// The preferred network for co-branded cards. - /// - /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. - pub preferred: Option, -} + /// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub interac_present: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardChecks { - /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub address_line1_check: Option, + /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub klarna: 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 this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub konbini: Option, - /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - pub cvc_check: Option, -} + /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CardPresent { - /// Card brand. + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. /// - /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. - pub brand: Option, + /// This can be useful for storing additional information about the object in a structured format. + /// Individual keys can be unset by posting an empty value to them. + /// All keys can be unset by posting an empty value to `metadata`. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, - /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. - /// - /// May include alphanumeric characters, special characters and first/last name separator (`/`). - /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. - /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - pub cardholder_name: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, + /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub oxxo: Option, - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). + /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + pub p24: Option, - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, + /// The PaymentMethod to share. + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method: Option, - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, + /// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub paynow: Option, - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - pub fingerprint: Option, + /// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub paypal: Option, - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: Option, + /// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub pix: Option, - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). + /// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, + pub promptpay: Option, - /// The name of the card's issuing bank. + /// Options to configure Radar. /// - /// (For internal use only and not typically available in standard API requests.). + /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: Option, - - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, - - /// How card details were read in this transaction. - pub read_method: Option, -} + pub radar_options: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletDetails { + /// 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 amex_express_checkout: Option, + 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 apple_pay: Option, - - /// (For tokenized numbers only.) The last four digits of the device account number. - pub dynamic_last4: Option, + pub sepa_debit: Option, + /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub google_pay: Option, + pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub link: Option, + pub swish: Option, + /// The type of the PaymentMethod. + /// + /// An additional hash is included on the PaymentMethod with a name matching this value. + /// It contains additional information specific to the PaymentMethod type. + #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] - pub masterpass: Option, + pub type_: Option, + /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub samsung_pay: Option, + pub us_bank_account: Option, - /// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. - /// - /// An additional hash is included on the Wallet subhash with a name matching this value. - /// It contains additional information specific to the card wallet type. - #[serde(rename = "type")] - pub type_: WalletDetailsType, + /// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub wechat_pay: Option, + /// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. #[serde(skip_serializing_if = "Option::is_none")] - pub visa_checkout: Option, + pub zip: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletAmexExpressCheckout {} +impl<'a> CreatePaymentMethod<'a> { + pub fn new() -> Self { + CreatePaymentMethod { + acss_debit: Default::default(), + affirm: Default::default(), + afterpay_clearpay: Default::default(), + alipay: Default::default(), + au_becs_debit: Default::default(), + bacs_debit: Default::default(), + bancontact: Default::default(), + billing_details: Default::default(), + blik: Default::default(), + boleto: Default::default(), + card: Default::default(), + cashapp: Default::default(), + customer: Default::default(), + customer_balance: Default::default(), + eps: Default::default(), + expand: Default::default(), + fpx: Default::default(), + giropay: Default::default(), + grabpay: Default::default(), + ideal: Default::default(), + interac_present: Default::default(), + klarna: Default::default(), + konbini: Default::default(), + link: Default::default(), + metadata: Default::default(), + mobilepay: Default::default(), + oxxo: Default::default(), + p24: Default::default(), + payment_method: Default::default(), + paynow: Default::default(), + paypal: Default::default(), + pix: Default::default(), + promptpay: Default::default(), + radar_options: Default::default(), + revolut_pay: Default::default(), + sepa_debit: Default::default(), + sofort: Default::default(), + swish: Default::default(), + type_: Default::default(), + us_bank_account: Default::default(), + wechat_pay: Default::default(), + zip: Default::default(), + } + } +} -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletApplePay {} +/// The parameters for `PaymentMethod::list`. +#[derive(Clone, Debug, Serialize, Default)] +pub struct ListPaymentMethods<'a> { -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletGooglePay {} + /// The ID of the customer whose PaymentMethods will be retrieved. + #[serde(skip_serializing_if = "Option::is_none")] + pub customer: Option, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardWalletLink {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletMasterpass { - /// Owner's verified billing address. + /// A cursor for use in pagination. /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub billing_address: Option
, + /// `ending_before` is an object ID that defines your place in the list. + /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + #[serde(skip_serializing_if = "Option::is_none")] + pub ending_before: Option, - /// Owner's verified email. + /// Specifies which fields in the response should be expanded. + #[serde(skip_serializing_if = "Expand::is_empty")] + pub expand: &'a [&'a str], + + /// A limit on the number of objects to be returned. /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub email: Option, + /// Limit can range between 1 and 100, and the default is 10. + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option, - /// Owner's verified full name. + /// A cursor for use in pagination. /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub name: Option, + /// `starting_after` is an object ID that defines your place in the list. + /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + #[serde(skip_serializing_if = "Option::is_none")] + pub starting_after: Option, - /// Owner's verified shipping address. + /// An optional filter on the list, based on the object `type` field. /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub shipping_address: Option
, + /// Without the filter, the list includes all current and future payment method types. + /// If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + #[serde(rename = "type")] + #[serde(skip_serializing_if = "Option::is_none")] + pub type_: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletSamsungPay {} +impl<'a> ListPaymentMethods<'a> { + pub fn new() -> Self { + ListPaymentMethods { + customer: Default::default(), + ending_before: Default::default(), + expand: Default::default(), + limit: Default::default(), + starting_after: Default::default(), + type_: Default::default(), + } + } +} +impl Paginable for ListPaymentMethods<'_> { + type O = PaymentMethod; + fn set_last(&mut self, item: Self::O) { + self.starting_after = Some(item.id()); + }} +/// The parameters for `PaymentMethod::update`. +#[derive(Clone, Debug, Serialize, Default)] +pub struct UpdatePaymentMethod<'a> { -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct WalletVisaCheckout { - /// Owner's verified billing address. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub billing_address: Option
, + /// 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, - /// Owner's verified email. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub email: Option, + /// If this is a `card` PaymentMethod, this hash contains the user's card details. + #[serde(skip_serializing_if = "Option::is_none")] + pub card: Option, - /// Owner's verified full name. - /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub name: Option, + /// Specifies which fields in the response should be expanded. + #[serde(skip_serializing_if = "Expand::is_empty")] + pub expand: &'a [&'a str], + + /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, - /// Owner's verified shipping address. + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. /// - /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub shipping_address: Option
, -} + /// This can be useful for storing additional information about the object in a structured format. + /// Individual keys can be unset by posting an empty value to them. + /// All keys can be unset by posting an empty value to `metadata`. + #[serde(skip_serializing_if = "Option::is_none")] + pub metadata: Option, -#[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, + /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_account: Option, +} - /// A public identifier for buyers using Cash App. - pub cashtag: Option, +impl<'a> UpdatePaymentMethod<'a> { + pub fn new() -> Self { + UpdatePaymentMethod { + billing_details: Default::default(), + card: Default::default(), + expand: Default::default(), + link: Default::default(), + metadata: Default::default(), + us_bank_account: Default::default(), + } + } } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCustomerBalance {} +pub struct CreatePaymentMethodAcssDebit { -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodEps { - /// The customer's bank. - /// - /// Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - pub bank: Option, -} + /// Customer's bank account number. + pub account_number: String, -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodFpx { - /// Account holder type, if provided. - /// - /// Can be one of `individual` or `company`. - pub account_holder_type: Option, + /// Institution number of the customer's bank. + pub institution_number: String, - /// The customer's bank, if provided. - /// - /// Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. - pub bank: PaymentMethodFpxBank, + /// Transit number of the customer's bank. + pub transit_number: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGiropay {} +pub struct CreatePaymentMethodAffirm { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodGrabpay {} +pub struct CreatePaymentMethodAfterpayClearpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodIdeal { - /// The customer's bank, if provided. - /// - /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - pub bank: Option, - - /// The Bank Identifier Code of the customer's bank, if the bank was provided. - pub bic: Option, +pub struct CreatePaymentMethodAlipay { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodInteracPresent { - /// Card brand. - /// - /// Can be `interac`, `mastercard` or `visa`. - pub brand: Option, - - /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. - /// - /// May include alphanumeric characters, special characters and first/last name separator (`/`). - /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. - /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - pub cardholder_name: Option, - - /// Two-letter ISO code representing the country of the card. - /// - /// You could use this attribute to get a sense of the international breakdown of cards you've collected. - pub country: Option, - - /// A high-level description of the type of cards issued in this range. - /// - /// (For internal use only and not typically available in standard API requests.). - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - - /// Two-digit number representing the card's expiration month. - pub exp_month: i64, +pub struct CreatePaymentMethodAuBecsDebit { - /// Four-digit number representing the card's expiration year. - pub exp_year: i64, + /// The account number for the bank account. + pub account_number: String, - /// Uniquely identifies this particular card number. - /// - /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. - pub fingerprint: Option, + /// Bank-State-Branch number of the bank account. + pub bsb_number: String, +} - /// Card funding type. - /// - /// Can be `credit`, `debit`, `prepaid`, or `unknown`. - pub funding: Option, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodBacsDebit { - /// Issuer identification number of the card. - /// - /// (For internal use only and not typically available in standard API requests.). + /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] - pub iin: Option, + pub account_number: Option, - /// The name of the card's issuing bank. + /// Sort code of the bank account. /// - /// (For internal use only and not typically available in standard API requests.). + /// (e.g., `10-20-30`). #[serde(skip_serializing_if = "Option::is_none")] - pub issuer: Option, - - /// The last four digits of the card. - pub last4: Option, - - /// Contains information about card networks that can be used to process the payment. - pub networks: Option, - - /// EMV tag 5F2D. - /// - /// Preferred languages specified by the integrated circuit chip. - pub preferred_locales: Option>, + pub sort_code: Option, +} - /// How card details were read in this transaction. - pub read_method: Option, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKlarna { - /// The customer's date of birth, if provided. - pub dob: Option, +pub struct CreatePaymentMethodBlik { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { - /// The day of birth, between 1 and 31. - pub day: Option, +pub struct CreatePaymentMethodBoleto { - /// The month of birth, between 1 and 12. - pub month: Option, + /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers). + pub tax_id: String, +} - /// The four-digit year of birth. - pub year: Option, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodCashapp { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodKonbini {} +pub struct CreatePaymentMethodCustomerBalance { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodLink { - /// Account owner's email address. - pub email: Option, +pub struct CreatePaymentMethodEps { - /// [Deprecated] This is a legacy parameter that no longer has any function. + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] - pub persistent_token: Option, + pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodOxxo {} +pub struct CreatePaymentMethodFpx { -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodP24 { - /// The customer's bank, if provided. - pub bank: Option, + /// Account holder type for FPX transaction. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_holder_type: Option, + + /// The customer's bank. + pub bank: CreatePaymentMethodFpxBank, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPaynow {} +pub struct CreatePaymentMethodGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPaypal { - /// Owner's email. - /// - /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. - /// They cannot be set or mutated. - pub payer_email: Option, - - /// PayPal account PayerID. - /// - /// This identifier uniquely identifies the PayPal customer. - pub payer_id: Option, +pub struct CreatePaymentMethodGrabpay { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPix {} +pub struct CreatePaymentMethodIdeal { -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodPromptpay {} + /// The customer's bank. + #[serde(skip_serializing_if = "Option::is_none")] + pub bank: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodRevolutPay {} +pub struct CreatePaymentMethodInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSepaDebit { - /// Bank code of bank associated with the bank account. - pub bank_code: Option, - - /// Branch code of bank associated with the bank account. - pub branch_code: Option, - - /// Two-letter ISO code representing the country the bank account is located in. - pub country: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Information about the object that generated this PaymentMethod. - pub generated_from: Option, +pub struct CreatePaymentMethodKlarna { - /// Last four characters of the IBAN. - pub last4: Option, + /// Customer's date of birth. + #[serde(skip_serializing_if = "Option::is_none")] + pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSofort { - /// Two-letter ISO code representing the country the bank account is located in. - pub country: Option, +pub struct CreatePaymentMethodKonbini { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodSwish {} +pub struct CreatePaymentMethodLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccount { - /// Account holder type: individual or company. - pub account_holder_type: Option, - - /// Account type: checkings or savings. - /// - /// Defaults to checking if omitted. - pub account_type: Option, - - /// The name of the bank. - pub bank_name: Option, - - /// The ID of the Financial Connections Account used to create the payment method. - pub financial_connections_account: Option, - - /// Uniquely identifies this particular bank account. - /// - /// You can use this attribute to check whether two bank accounts are the same. - pub fingerprint: Option, - - /// Last four digits of the bank account number. - pub last4: Option, - - /// Contains information about US bank account networks that can be used. - pub networks: Option, - - /// Routing number of the bank account. - pub routing_number: Option, - - /// Contains information about the future reusability of this PaymentMethod. - pub status_details: Option, +pub struct CreatePaymentMethodMobilepay { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccountStatusDetails { - #[serde(skip_serializing_if = "Option::is_none")] - pub blocked: Option, +pub struct CreatePaymentMethodOxxo { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodUsBankAccountBlocked { - /// The ACH network code that resulted in this block. - pub network_code: Option, +pub struct CreatePaymentMethodP24 { - /// The reason why this PaymentMethod's fingerprint has been blocked. - pub reason: Option, + /// The customer's bank. + #[serde(skip_serializing_if = "Option::is_none")] + pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodWechatPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodZip {} +pub struct CreatePaymentMethodPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SepaDebitGeneratedFrom { - /// The ID of the Charge that generated this PaymentMethod, if any. - pub charge: Option>, - - /// The ID of the SetupAttempt that generated this PaymentMethod, if any. - pub setup_attempt: Option>, +pub struct CreatePaymentMethodPaypal { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ThreeDSecureUsage { - /// Whether 3D Secure is supported on this card. - pub supported: bool, +pub struct CreatePaymentMethodPix { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UsBankAccountNetworks { - /// The preferred network. - pub preferred: Option, - - /// All supported networks. - pub supported: Vec, +pub struct CreatePaymentMethodPromptpay { } -/// 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, - - /// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub affirm: Option, - - /// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub afterpay_clearpay: Option, - - /// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub alipay: Option, - - /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - #[serde(skip_serializing_if = "Option::is_none")] - pub au_becs_debit: Option, - - /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - #[serde(skip_serializing_if = "Option::is_none")] - pub bacs_debit: Option, - - /// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub bancontact: Option, - - /// 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, - - /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodRadarOptions { - /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + /// 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 boleto: Option, + pub session: Option, +} - /// If this is a `card` PaymentMethod, this hash contains the user's card details. - /// - /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. - /// When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). - /// We strongly recommend using Stripe.js instead of interacting with this API directly. - #[serde(skip_serializing_if = "Option::is_none")] - pub card: Option, - - /// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub cashapp: Option, - - /// The `Customer` to whom the original PaymentMethod is attached. - #[serde(skip_serializing_if = "Option::is_none")] - pub customer: Option, - - /// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub customer_balance: Option, - - /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub eps: Option, - - /// Specifies which fields in the response should be expanded. - #[serde(skip_serializing_if = "Expand::is_empty")] - pub expand: &'a [&'a str], - - /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub fpx: Option, - - /// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub giropay: Option, - - /// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub grabpay: Option, - - /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub ideal: Option, - - /// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub interac_present: Option, - - /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub klarna: Option, - - /// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub konbini: Option, - - /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub link: Option, - - /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. - /// - /// This can be useful for storing additional information about the object in a structured format. - /// Individual keys can be unset by posting an empty value to them. - /// All keys can be unset by posting an empty value to `metadata`. - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata: Option, - - /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub oxxo: Option, - - /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub p24: Option, - - /// The PaymentMethod to share. - #[serde(skip_serializing_if = "Option::is_none")] - pub payment_method: Option, - - /// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub paynow: Option, - - /// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub paypal: Option, - - /// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub pix: Option, - - /// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub promptpay: Option, - - /// Options to configure Radar. - /// - /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - #[serde(skip_serializing_if = "Option::is_none")] - pub radar_options: Option, - - /// 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, - - /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub sofort: Option, - - /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub swish: Option, - - /// The type of the PaymentMethod. - /// - /// An additional hash is included on the PaymentMethod with a name matching this value. - /// It contains additional information specific to the PaymentMethod type. - #[serde(rename = "type")] - #[serde(skip_serializing_if = "Option::is_none")] - pub type_: Option, - - /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub us_bank_account: Option, - - /// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub wechat_pay: Option, - - /// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub zip: Option, -} - -impl<'a> CreatePaymentMethod<'a> { - pub fn new() -> Self { - CreatePaymentMethod { - acss_debit: Default::default(), - affirm: Default::default(), - afterpay_clearpay: Default::default(), - alipay: Default::default(), - au_becs_debit: Default::default(), - bacs_debit: Default::default(), - bancontact: Default::default(), - billing_details: Default::default(), - blik: Default::default(), - boleto: Default::default(), - card: Default::default(), - cashapp: Default::default(), - customer: Default::default(), - customer_balance: Default::default(), - eps: Default::default(), - expand: Default::default(), - fpx: Default::default(), - giropay: Default::default(), - grabpay: Default::default(), - ideal: Default::default(), - interac_present: Default::default(), - klarna: Default::default(), - konbini: Default::default(), - link: Default::default(), - metadata: Default::default(), - oxxo: Default::default(), - p24: Default::default(), - payment_method: Default::default(), - paynow: Default::default(), - paypal: Default::default(), - pix: Default::default(), - promptpay: Default::default(), - radar_options: Default::default(), - revolut_pay: Default::default(), - sepa_debit: Default::default(), - sofort: Default::default(), - swish: Default::default(), - type_: Default::default(), - us_bank_account: Default::default(), - wechat_pay: Default::default(), - zip: Default::default(), - } - } -} - -/// 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, - - /// A cursor for use in pagination. - /// - /// `ending_before` is an object ID that defines your place in the list. - /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. - #[serde(skip_serializing_if = "Option::is_none")] - pub ending_before: Option, - - /// Specifies which fields in the response should be expanded. - #[serde(skip_serializing_if = "Expand::is_empty")] - pub expand: &'a [&'a str], - - /// A limit on the number of objects to be returned. - /// - /// Limit can range between 1 and 100, and the default is 10. - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option, - - /// A cursor for use in pagination. - /// - /// `starting_after` is an object ID that defines your place in the list. - /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. - #[serde(skip_serializing_if = "Option::is_none")] - pub starting_after: Option, - - /// An optional filter on the list, based on the object `type` field. - /// - /// Without the filter, the list includes all current and future payment method types. - /// If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - #[serde(rename = "type")] - #[serde(skip_serializing_if = "Option::is_none")] - pub type_: Option, -} - -impl<'a> ListPaymentMethods<'a> { - pub fn new() -> Self { - ListPaymentMethods { - customer: Default::default(), - ending_before: Default::default(), - expand: Default::default(), - limit: Default::default(), - starting_after: Default::default(), - type_: Default::default(), - } - } -} -impl Paginable for ListPaymentMethods<'_> { - type O = PaymentMethod; - fn set_last(&mut self, item: Self::O) { - 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, - - /// If this is a `card` PaymentMethod, this hash contains the user's card details. - #[serde(skip_serializing_if = "Option::is_none")] - pub card: Option, - - /// Specifies which fields in the response should be expanded. - #[serde(skip_serializing_if = "Expand::is_empty")] - pub expand: &'a [&'a str], - - /// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub link: Option, - - /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. - /// - /// This can be useful for storing additional information about the object in a structured format. - /// Individual keys can be unset by posting an empty value to them. - /// All keys can be unset by posting an empty value to `metadata`. - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata: Option, - - /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub us_bank_account: Option, -} - -impl<'a> UpdatePaymentMethod<'a> { - pub fn new() -> Self { - UpdatePaymentMethod { - billing_details: Default::default(), - card: Default::default(), - expand: Default::default(), - link: Default::default(), - metadata: Default::default(), - us_bank_account: Default::default(), - } - } -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAcssDebit { - /// Customer's bank account number. - pub account_number: String, - - /// Institution number of the customer's bank. - pub institution_number: String, - - /// Transit number of the customer's bank. - pub transit_number: String, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAffirm {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAfterpayClearpay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAlipay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodAuBecsDebit { - /// The account number for the bank account. - pub account_number: String, - - /// Bank-State-Branch number of the bank account. - pub bsb_number: String, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct 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, - - /// Sort code of the bank account. - /// - /// (e.g., `10-20-30`). - #[serde(skip_serializing_if = "Option::is_none")] - pub sort_code: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodBancontact {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -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 {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -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, -} - -#[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, - - /// The customer's bank. - pub bank: CreatePaymentMethodFpxBank, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodGiropay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -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 {} - -#[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 {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodLink {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodOxxo {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodP24 { - /// The customer's bank. - #[serde(skip_serializing_if = "Option::is_none")] - pub bank: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPaynow {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPaypal {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodPix {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -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 CreatePaymentMethodSwish {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodUsBankAccount { - /// Account holder type: individual or company. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_holder_type: Option, - - /// Account number of the bank account. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_number: Option, - - /// Account type: checkings or savings. - /// - /// Defaults to checking if omitted. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_type: Option, - - /// The ID of a Financial Connections Account to use as a payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections_account: Option, - - /// Routing number of the bank account. - #[serde(skip_serializing_if = "Option::is_none")] - pub routing_number: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodWechatPay {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodZip {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodLink {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodUsBankAccount { - /// Bank account holder type. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_holder_type: Option, - - /// Bank account type. - #[serde(skip_serializing_if = "Option::is_none")] - pub account_type: Option, -} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreatePaymentMethodKlarnaDob { - /// The day of birth, between 1 and 31. - pub day: i64, - - /// The month of birth, between 1 and 12. - pub month: i64, - - /// The four-digit year of birth. - pub year: i64, -} - -/// An enum representing the possible values of an `CardPresent`'s `read_method` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CardPresentReadMethod { - ContactEmv, - ContactlessEmv, - ContactlessMagstripeMode, - MagneticStripeFallback, - MagneticStripeTrack2, -} - -impl CardPresentReadMethod { - pub fn as_str(self) -> &'static str { - match self { - CardPresentReadMethod::ContactEmv => "contact_emv", - CardPresentReadMethod::ContactlessEmv => "contactless_emv", - CardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", - CardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", - CardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", - } - } -} - -impl AsRef for CardPresentReadMethod { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CardPresentReadMethod { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CardPresentReadMethod { - fn default() -> Self { - Self::ContactEmv - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodEps`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodEpsBank { - ArzteUndApothekerBank, - AustrianAnadiBankAg, - BankAustria, - BankhausCarlSpangler, - BankhausSchelhammerUndSchatteraAg, - BawagPskAg, - BksBankAg, - BrullKallmusBankAg, - BtvVierLanderBank, - CapitalBankGraweGruppeAg, - DeutscheBankAg, - Dolomitenbank, - EasybankAg, - ErsteBankUndSparkassen, - HypoAlpeadriabankInternationalAg, - HypoBankBurgenlandAktiengesellschaft, - HypoNoeLbFurNiederosterreichUWien, - HypoOberosterreichSalzburgSteiermark, - HypoTirolBankAg, - HypoVorarlbergBankAg, - MarchfelderBank, - OberbankAg, - RaiffeisenBankengruppeOsterreich, - SchoellerbankAg, - SpardaBankWien, - VolksbankGruppe, - VolkskreditbankAg, - VrBankBraunau, -} - -impl CreatePaymentMethodEpsBank { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", - CreatePaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", - CreatePaymentMethodEpsBank::BankAustria => "bank_austria", - CreatePaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - CreatePaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } - CreatePaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", - CreatePaymentMethodEpsBank::BksBankAg => "bks_bank_ag", - CreatePaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", - CreatePaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", - CreatePaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", - CreatePaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", - 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::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::SchoellerbankAg => "schoellerbank_ag", - CreatePaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", - CreatePaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", - CreatePaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", - CreatePaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", - } - } -} - -impl AsRef for CreatePaymentMethodEpsBank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodEpsBank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodEpsBank { - fn default() -> Self { - Self::ArzteUndApothekerBank - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodFpx`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodFpxAccountHolderType { - Company, - Individual, -} - -impl CreatePaymentMethodFpxAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodFpxAccountHolderType::Company => "company", - CreatePaymentMethodFpxAccountHolderType::Individual => "individual", - } - } -} - -impl AsRef for CreatePaymentMethodFpxAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodFpxAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodFpxAccountHolderType { - fn default() -> Self { - Self::Company - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodFpx`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodFpxBank { - AffinBank, - Agrobank, - AllianceBank, - Ambank, - BankIslam, - BankMuamalat, - BankOfChina, - BankRakyat, - Bsn, - Cimb, - DeutscheBank, - HongLeongBank, - Hsbc, - Kfh, - Maybank2e, - Maybank2u, - Ocbc, - PbEnterprise, - PublicBank, - Rhb, - StandardChartered, - Uob, -} - -impl CreatePaymentMethodFpxBank { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodFpxBank::AffinBank => "affin_bank", - CreatePaymentMethodFpxBank::Agrobank => "agrobank", - CreatePaymentMethodFpxBank::AllianceBank => "alliance_bank", - CreatePaymentMethodFpxBank::Ambank => "ambank", - CreatePaymentMethodFpxBank::BankIslam => "bank_islam", - CreatePaymentMethodFpxBank::BankMuamalat => "bank_muamalat", - CreatePaymentMethodFpxBank::BankOfChina => "bank_of_china", - CreatePaymentMethodFpxBank::BankRakyat => "bank_rakyat", - CreatePaymentMethodFpxBank::Bsn => "bsn", - CreatePaymentMethodFpxBank::Cimb => "cimb", - CreatePaymentMethodFpxBank::DeutscheBank => "deutsche_bank", - CreatePaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", - CreatePaymentMethodFpxBank::Hsbc => "hsbc", - CreatePaymentMethodFpxBank::Kfh => "kfh", - CreatePaymentMethodFpxBank::Maybank2e => "maybank2e", - CreatePaymentMethodFpxBank::Maybank2u => "maybank2u", - CreatePaymentMethodFpxBank::Ocbc => "ocbc", - CreatePaymentMethodFpxBank::PbEnterprise => "pb_enterprise", - CreatePaymentMethodFpxBank::PublicBank => "public_bank", - CreatePaymentMethodFpxBank::Rhb => "rhb", - CreatePaymentMethodFpxBank::StandardChartered => "standard_chartered", - CreatePaymentMethodFpxBank::Uob => "uob", - } - } -} - -impl AsRef for CreatePaymentMethodFpxBank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodFpxBank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodFpxBank { - fn default() -> Self { - Self::AffinBank - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodIdeal`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodIdealBank { - AbnAmro, - AsnBank, - Bunq, - Handelsbanken, - Ing, - Knab, - Moneyou, - N26, - Nn, - Rabobank, - Regiobank, - Revolut, - SnsBank, - TriodosBank, - VanLanschot, - Yoursafe, -} - -impl CreatePaymentMethodIdealBank { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodIdealBank::AbnAmro => "abn_amro", - CreatePaymentMethodIdealBank::AsnBank => "asn_bank", - CreatePaymentMethodIdealBank::Bunq => "bunq", - CreatePaymentMethodIdealBank::Handelsbanken => "handelsbanken", - CreatePaymentMethodIdealBank::Ing => "ing", - CreatePaymentMethodIdealBank::Knab => "knab", - CreatePaymentMethodIdealBank::Moneyou => "moneyou", - CreatePaymentMethodIdealBank::N26 => "n26", - CreatePaymentMethodIdealBank::Nn => "nn", - CreatePaymentMethodIdealBank::Rabobank => "rabobank", - CreatePaymentMethodIdealBank::Regiobank => "regiobank", - CreatePaymentMethodIdealBank::Revolut => "revolut", - CreatePaymentMethodIdealBank::SnsBank => "sns_bank", - CreatePaymentMethodIdealBank::TriodosBank => "triodos_bank", - CreatePaymentMethodIdealBank::VanLanschot => "van_lanschot", - CreatePaymentMethodIdealBank::Yoursafe => "yoursafe", - } - } -} - -impl AsRef for CreatePaymentMethodIdealBank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodIdealBank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodIdealBank { - fn default() -> Self { - Self::AbnAmro - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodP24`'s `bank` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodP24Bank { - AliorBank, - BankMillennium, - BankNowyBfgSa, - BankPekaoSa, - BankiSpbdzielcze, - Blik, - BnpParibas, - Boz, - CitiHandlowy, - CreditAgricole, - Envelobank, - EtransferPocztowy24, - GetinBank, - Ideabank, - Ing, - Inteligo, - MbankMtransfer, - NestPrzelew, - NoblePay, - PbacZIpko, - PlusBank, - SantanderPrzelew24, - TmobileUsbugiBankowe, - ToyotaBank, - Velobank, - VolkswagenBank, -} - -impl CreatePaymentMethodP24Bank { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodP24Bank::AliorBank => "alior_bank", - CreatePaymentMethodP24Bank::BankMillennium => "bank_millennium", - CreatePaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", - CreatePaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", - CreatePaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", - CreatePaymentMethodP24Bank::Blik => "blik", - CreatePaymentMethodP24Bank::BnpParibas => "bnp_paribas", - CreatePaymentMethodP24Bank::Boz => "boz", - CreatePaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", - CreatePaymentMethodP24Bank::CreditAgricole => "credit_agricole", - CreatePaymentMethodP24Bank::Envelobank => "envelobank", - CreatePaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", - CreatePaymentMethodP24Bank::GetinBank => "getin_bank", - CreatePaymentMethodP24Bank::Ideabank => "ideabank", - CreatePaymentMethodP24Bank::Ing => "ing", - CreatePaymentMethodP24Bank::Inteligo => "inteligo", - CreatePaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", - CreatePaymentMethodP24Bank::NestPrzelew => "nest_przelew", - CreatePaymentMethodP24Bank::NoblePay => "noble_pay", - CreatePaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", - CreatePaymentMethodP24Bank::PlusBank => "plus_bank", - CreatePaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", - CreatePaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", - CreatePaymentMethodP24Bank::ToyotaBank => "toyota_bank", - CreatePaymentMethodP24Bank::Velobank => "velobank", - CreatePaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", - } - } -} - -impl AsRef for CreatePaymentMethodP24Bank { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodP24Bank { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodP24Bank { - fn default() -> Self { - Self::AliorBank - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodSofort`'s `country` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodSofortCountry { - #[serde(rename = "AT")] - At, - #[serde(rename = "BE")] - Be, - #[serde(rename = "DE")] - De, - #[serde(rename = "ES")] - Es, - #[serde(rename = "IT")] - It, - #[serde(rename = "NL")] - Nl, -} - -impl CreatePaymentMethodSofortCountry { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodSofortCountry::At => "AT", - CreatePaymentMethodSofortCountry::Be => "BE", - CreatePaymentMethodSofortCountry::De => "DE", - CreatePaymentMethodSofortCountry::Es => "ES", - CreatePaymentMethodSofortCountry::It => "IT", - CreatePaymentMethodSofortCountry::Nl => "NL", - } - } -} - -impl AsRef for CreatePaymentMethodSofortCountry { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for CreatePaymentMethodSofortCountry { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for CreatePaymentMethodSofortCountry { - fn default() -> Self { - Self::At - } -} - -/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodUsBankAccountAccountHolderType { - Company, - Individual, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodRevolutPay { } -impl CreatePaymentMethodUsBankAccountAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodUsBankAccountAccountHolderType::Company => "company", - CreatePaymentMethodUsBankAccountAccountHolderType::Individual => "individual", - } - } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodSepaDebit { + + /// IBAN of the bank account. + pub iban: String, } -impl AsRef for CreatePaymentMethodUsBankAccountAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } +#[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, } -impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodSwish { } -impl std::default::Default for CreatePaymentMethodUsBankAccountAccountHolderType { - fn default() -> Self { - Self::Company - } + +#[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, + + /// Account number of the bank account. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_number: Option, + + /// Account type: checkings or savings. + /// + /// Defaults to checking if omitted. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_type: Option, + + /// The ID of a Financial Connections Account to use as a payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub financial_connections_account: Option, + + /// Routing number of the bank account. + #[serde(skip_serializing_if = "Option::is_none")] + pub routing_number: Option, } -/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum CreatePaymentMethodUsBankAccountAccountType { - Checking, - Savings, +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodWechatPay { } -impl CreatePaymentMethodUsBankAccountAccountType { - pub fn as_str(self) -> &'static str { - match self { - CreatePaymentMethodUsBankAccountAccountType::Checking => "checking", - CreatePaymentMethodUsBankAccountAccountType::Savings => "savings", - } - } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodZip { } -impl AsRef for CreatePaymentMethodUsBankAccountAccountType { - fn as_ref(&self) -> &str { - self.as_str() - } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodLink { } -impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodUsBankAccount { + + /// Bank account holder type. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_holder_type: Option, + + /// Bank account type. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_type: Option, } -impl std::default::Default for CreatePaymentMethodUsBankAccountAccountType { - fn default() -> Self { - Self::Checking - } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodKlarnaDob { + + /// The day of birth, between 1 and 31. + pub day: i64, + + /// The month of birth, between 1 and 12. + pub month: i64, + + /// The four-digit year of birth. + pub year: i64, } -/// An enum representing the possible values of an `PaymentMethodEps`'s `bank` field. +/// An enum representing the possible values of an `CreatePaymentMethodEps`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodEpsBank { +pub enum CreatePaymentMethodEpsBank { ArzteUndApothekerBank, AustrianAnadiBankAg, BankAustria, @@ -1909,108 +823,96 @@ pub enum PaymentMethodEpsBank { VrBankBraunau, } -impl PaymentMethodEpsBank { +impl CreatePaymentMethodEpsBank { pub fn as_str(self) -> &'static str { match self { - PaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", - PaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", - PaymentMethodEpsBank::BankAustria => "bank_austria", - PaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", - PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => { - "bankhaus_schelhammer_und_schattera_ag" - } - PaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", - PaymentMethodEpsBank::BksBankAg => "bks_bank_ag", - PaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", - PaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", - PaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", - PaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", - PaymentMethodEpsBank::Dolomitenbank => "dolomitenbank", - PaymentMethodEpsBank::EasybankAg => "easybank_ag", - PaymentMethodEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", - PaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => { - "hypo_alpeadriabank_international_ag" - } - PaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => { - "hypo_bank_burgenland_aktiengesellschaft" - } - PaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => { - "hypo_noe_lb_fur_niederosterreich_u_wien" - } - PaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => { - "hypo_oberosterreich_salzburg_steiermark" - } - PaymentMethodEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", - PaymentMethodEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", - PaymentMethodEpsBank::MarchfelderBank => "marchfelder_bank", - PaymentMethodEpsBank::OberbankAg => "oberbank_ag", - PaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => { - "raiffeisen_bankengruppe_osterreich" - } - PaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", - PaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", - PaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", - PaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", - PaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", + CreatePaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", + CreatePaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", + CreatePaymentMethodEpsBank::BankAustria => "bank_austria", + CreatePaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", + CreatePaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", + CreatePaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", + CreatePaymentMethodEpsBank::BksBankAg => "bks_bank_ag", + CreatePaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", + CreatePaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", + CreatePaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", + CreatePaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", + 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::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::SchoellerbankAg => "schoellerbank_ag", + CreatePaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", + CreatePaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", + CreatePaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", + CreatePaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", } } } -impl AsRef for PaymentMethodEpsBank { +impl AsRef for CreatePaymentMethodEpsBank { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodEpsBank { +impl std::fmt::Display for CreatePaymentMethodEpsBank { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodEpsBank { +impl std::default::Default for CreatePaymentMethodEpsBank { fn default() -> Self { Self::ArzteUndApothekerBank } } -/// An enum representing the possible values of an `PaymentMethodFpx`'s `account_holder_type` field. +/// An enum representing the possible values of an `CreatePaymentMethodFpx`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodFpxAccountHolderType { +pub enum CreatePaymentMethodFpxAccountHolderType { Company, Individual, } -impl PaymentMethodFpxAccountHolderType { +impl CreatePaymentMethodFpxAccountHolderType { pub fn as_str(self) -> &'static str { match self { - PaymentMethodFpxAccountHolderType::Company => "company", - PaymentMethodFpxAccountHolderType::Individual => "individual", + CreatePaymentMethodFpxAccountHolderType::Company => "company", + CreatePaymentMethodFpxAccountHolderType::Individual => "individual", } } } -impl AsRef for PaymentMethodFpxAccountHolderType { +impl AsRef for CreatePaymentMethodFpxAccountHolderType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodFpxAccountHolderType { +impl std::fmt::Display for CreatePaymentMethodFpxAccountHolderType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodFpxAccountHolderType { +impl std::default::Default for CreatePaymentMethodFpxAccountHolderType { fn default() -> Self { Self::Company } } -/// An enum representing the possible values of an `PaymentMethodFpx`'s `bank` field. +/// An enum representing the possible values of an `CreatePaymentMethodFpx`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodFpxBank { +pub enum CreatePaymentMethodFpxBank { AffinBank, Agrobank, AllianceBank, @@ -2035,56 +937,56 @@ pub enum PaymentMethodFpxBank { Uob, } -impl PaymentMethodFpxBank { +impl CreatePaymentMethodFpxBank { pub fn as_str(self) -> &'static str { match self { - PaymentMethodFpxBank::AffinBank => "affin_bank", - PaymentMethodFpxBank::Agrobank => "agrobank", - PaymentMethodFpxBank::AllianceBank => "alliance_bank", - PaymentMethodFpxBank::Ambank => "ambank", - PaymentMethodFpxBank::BankIslam => "bank_islam", - PaymentMethodFpxBank::BankMuamalat => "bank_muamalat", - PaymentMethodFpxBank::BankOfChina => "bank_of_china", - PaymentMethodFpxBank::BankRakyat => "bank_rakyat", - PaymentMethodFpxBank::Bsn => "bsn", - PaymentMethodFpxBank::Cimb => "cimb", - PaymentMethodFpxBank::DeutscheBank => "deutsche_bank", - PaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", - PaymentMethodFpxBank::Hsbc => "hsbc", - PaymentMethodFpxBank::Kfh => "kfh", - PaymentMethodFpxBank::Maybank2e => "maybank2e", - PaymentMethodFpxBank::Maybank2u => "maybank2u", - PaymentMethodFpxBank::Ocbc => "ocbc", - PaymentMethodFpxBank::PbEnterprise => "pb_enterprise", - PaymentMethodFpxBank::PublicBank => "public_bank", - PaymentMethodFpxBank::Rhb => "rhb", - PaymentMethodFpxBank::StandardChartered => "standard_chartered", - PaymentMethodFpxBank::Uob => "uob", + CreatePaymentMethodFpxBank::AffinBank => "affin_bank", + CreatePaymentMethodFpxBank::Agrobank => "agrobank", + CreatePaymentMethodFpxBank::AllianceBank => "alliance_bank", + CreatePaymentMethodFpxBank::Ambank => "ambank", + CreatePaymentMethodFpxBank::BankIslam => "bank_islam", + CreatePaymentMethodFpxBank::BankMuamalat => "bank_muamalat", + CreatePaymentMethodFpxBank::BankOfChina => "bank_of_china", + CreatePaymentMethodFpxBank::BankRakyat => "bank_rakyat", + CreatePaymentMethodFpxBank::Bsn => "bsn", + CreatePaymentMethodFpxBank::Cimb => "cimb", + CreatePaymentMethodFpxBank::DeutscheBank => "deutsche_bank", + CreatePaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", + CreatePaymentMethodFpxBank::Hsbc => "hsbc", + CreatePaymentMethodFpxBank::Kfh => "kfh", + CreatePaymentMethodFpxBank::Maybank2e => "maybank2e", + CreatePaymentMethodFpxBank::Maybank2u => "maybank2u", + CreatePaymentMethodFpxBank::Ocbc => "ocbc", + CreatePaymentMethodFpxBank::PbEnterprise => "pb_enterprise", + CreatePaymentMethodFpxBank::PublicBank => "public_bank", + CreatePaymentMethodFpxBank::Rhb => "rhb", + CreatePaymentMethodFpxBank::StandardChartered => "standard_chartered", + CreatePaymentMethodFpxBank::Uob => "uob", } } } -impl AsRef for PaymentMethodFpxBank { +impl AsRef for CreatePaymentMethodFpxBank { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodFpxBank { +impl std::fmt::Display for CreatePaymentMethodFpxBank { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodFpxBank { +impl std::default::Default for CreatePaymentMethodFpxBank { fn default() -> Self { Self::AffinBank } } -/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bank` field. +/// An enum representing the possible values of an `CreatePaymentMethodIdeal`'s `bank` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodIdealBank { +pub enum CreatePaymentMethodIdealBank { AbnAmro, AsnBank, Bunq, @@ -2103,250 +1005,241 @@ pub enum PaymentMethodIdealBank { Yoursafe, } -impl PaymentMethodIdealBank { +impl CreatePaymentMethodIdealBank { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodIdealBank::AbnAmro => "abn_amro", + CreatePaymentMethodIdealBank::AsnBank => "asn_bank", + CreatePaymentMethodIdealBank::Bunq => "bunq", + CreatePaymentMethodIdealBank::Handelsbanken => "handelsbanken", + CreatePaymentMethodIdealBank::Ing => "ing", + CreatePaymentMethodIdealBank::Knab => "knab", + CreatePaymentMethodIdealBank::Moneyou => "moneyou", + CreatePaymentMethodIdealBank::N26 => "n26", + CreatePaymentMethodIdealBank::Nn => "nn", + CreatePaymentMethodIdealBank::Rabobank => "rabobank", + CreatePaymentMethodIdealBank::Regiobank => "regiobank", + CreatePaymentMethodIdealBank::Revolut => "revolut", + CreatePaymentMethodIdealBank::SnsBank => "sns_bank", + CreatePaymentMethodIdealBank::TriodosBank => "triodos_bank", + CreatePaymentMethodIdealBank::VanLanschot => "van_lanschot", + CreatePaymentMethodIdealBank::Yoursafe => "yoursafe", + } + } +} + +impl AsRef for CreatePaymentMethodIdealBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodIdealBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodIdealBank { + fn default() -> Self { + Self::AbnAmro + } +} + +/// An enum representing the possible values of an `CreatePaymentMethodP24`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodP24Bank { + AliorBank, + BankMillennium, + BankNowyBfgSa, + BankPekaoSa, + BankiSpbdzielcze, + Blik, + BnpParibas, + Boz, + CitiHandlowy, + CreditAgricole, + Envelobank, + EtransferPocztowy24, + GetinBank, + Ideabank, + Ing, + Inteligo, + MbankMtransfer, + NestPrzelew, + NoblePay, + PbacZIpko, + PlusBank, + SantanderPrzelew24, + TmobileUsbugiBankowe, + ToyotaBank, + Velobank, + VolkswagenBank, +} + +impl CreatePaymentMethodP24Bank { pub fn as_str(self) -> &'static str { match self { - PaymentMethodIdealBank::AbnAmro => "abn_amro", - PaymentMethodIdealBank::AsnBank => "asn_bank", - PaymentMethodIdealBank::Bunq => "bunq", - PaymentMethodIdealBank::Handelsbanken => "handelsbanken", - PaymentMethodIdealBank::Ing => "ing", - PaymentMethodIdealBank::Knab => "knab", - PaymentMethodIdealBank::Moneyou => "moneyou", - PaymentMethodIdealBank::N26 => "n26", - PaymentMethodIdealBank::Nn => "nn", - PaymentMethodIdealBank::Rabobank => "rabobank", - PaymentMethodIdealBank::Regiobank => "regiobank", - PaymentMethodIdealBank::Revolut => "revolut", - PaymentMethodIdealBank::SnsBank => "sns_bank", - PaymentMethodIdealBank::TriodosBank => "triodos_bank", - PaymentMethodIdealBank::VanLanschot => "van_lanschot", - PaymentMethodIdealBank::Yoursafe => "yoursafe", + CreatePaymentMethodP24Bank::AliorBank => "alior_bank", + CreatePaymentMethodP24Bank::BankMillennium => "bank_millennium", + CreatePaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", + CreatePaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", + CreatePaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", + CreatePaymentMethodP24Bank::Blik => "blik", + CreatePaymentMethodP24Bank::BnpParibas => "bnp_paribas", + CreatePaymentMethodP24Bank::Boz => "boz", + CreatePaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", + CreatePaymentMethodP24Bank::CreditAgricole => "credit_agricole", + CreatePaymentMethodP24Bank::Envelobank => "envelobank", + CreatePaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", + CreatePaymentMethodP24Bank::GetinBank => "getin_bank", + CreatePaymentMethodP24Bank::Ideabank => "ideabank", + CreatePaymentMethodP24Bank::Ing => "ing", + CreatePaymentMethodP24Bank::Inteligo => "inteligo", + CreatePaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", + CreatePaymentMethodP24Bank::NestPrzelew => "nest_przelew", + CreatePaymentMethodP24Bank::NoblePay => "noble_pay", + CreatePaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", + CreatePaymentMethodP24Bank::PlusBank => "plus_bank", + CreatePaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", + CreatePaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", + CreatePaymentMethodP24Bank::ToyotaBank => "toyota_bank", + CreatePaymentMethodP24Bank::Velobank => "velobank", + CreatePaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", } } } -impl AsRef for PaymentMethodIdealBank { +impl AsRef for CreatePaymentMethodP24Bank { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodIdealBank { +impl std::fmt::Display for CreatePaymentMethodP24Bank { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodIdealBank { +impl std::default::Default for CreatePaymentMethodP24Bank { fn default() -> Self { - Self::AbnAmro + Self::AliorBank } } -/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bic` field. +/// An enum representing the possible values of an `CreatePaymentMethodSofort`'s `country` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodIdealBic { - #[serde(rename = "ABNANL2A")] - Abnanl2a, - #[serde(rename = "ASNBNL21")] - Asnbnl21, - #[serde(rename = "BITSNL2A")] - Bitsnl2a, - #[serde(rename = "BUNQNL2A")] - Bunqnl2a, - #[serde(rename = "FVLBNL22")] - Fvlbnl22, - #[serde(rename = "HANDNL2A")] - Handnl2a, - #[serde(rename = "INGBNL2A")] - Ingbnl2a, - #[serde(rename = "KNABNL2H")] - Knabnl2h, - #[serde(rename = "MOYONL21")] - Moyonl21, - #[serde(rename = "NNBANL2G")] - Nnbanl2g, - #[serde(rename = "NTSBDEB1")] - Ntsbdeb1, - #[serde(rename = "RABONL2U")] - Rabonl2u, - #[serde(rename = "RBRBNL21")] - Rbrbnl21, - #[serde(rename = "REVOIE23")] - Revoie23, - #[serde(rename = "REVOLT21")] - Revolt21, - #[serde(rename = "SNSBNL2A")] - Snsbnl2a, - #[serde(rename = "TRIONL2U")] - Trionl2u, -} - -impl PaymentMethodIdealBic { +pub enum CreatePaymentMethodSofortCountry { + #[serde(rename = "AT")] + At, + #[serde(rename = "BE")] + Be, + #[serde(rename = "DE")] + De, + #[serde(rename = "ES")] + Es, + #[serde(rename = "IT")] + It, + #[serde(rename = "NL")] + Nl, +} + +impl CreatePaymentMethodSofortCountry { pub fn as_str(self) -> &'static str { match self { - PaymentMethodIdealBic::Abnanl2a => "ABNANL2A", - PaymentMethodIdealBic::Asnbnl21 => "ASNBNL21", - PaymentMethodIdealBic::Bitsnl2a => "BITSNL2A", - PaymentMethodIdealBic::Bunqnl2a => "BUNQNL2A", - PaymentMethodIdealBic::Fvlbnl22 => "FVLBNL22", - PaymentMethodIdealBic::Handnl2a => "HANDNL2A", - PaymentMethodIdealBic::Ingbnl2a => "INGBNL2A", - PaymentMethodIdealBic::Knabnl2h => "KNABNL2H", - PaymentMethodIdealBic::Moyonl21 => "MOYONL21", - PaymentMethodIdealBic::Nnbanl2g => "NNBANL2G", - PaymentMethodIdealBic::Ntsbdeb1 => "NTSBDEB1", - PaymentMethodIdealBic::Rabonl2u => "RABONL2U", - PaymentMethodIdealBic::Rbrbnl21 => "RBRBNL21", - PaymentMethodIdealBic::Revoie23 => "REVOIE23", - PaymentMethodIdealBic::Revolt21 => "REVOLT21", - PaymentMethodIdealBic::Snsbnl2a => "SNSBNL2A", - PaymentMethodIdealBic::Trionl2u => "TRIONL2U", + CreatePaymentMethodSofortCountry::At => "AT", + CreatePaymentMethodSofortCountry::Be => "BE", + CreatePaymentMethodSofortCountry::De => "DE", + CreatePaymentMethodSofortCountry::Es => "ES", + CreatePaymentMethodSofortCountry::It => "IT", + CreatePaymentMethodSofortCountry::Nl => "NL", } } } -impl AsRef for PaymentMethodIdealBic { +impl AsRef for CreatePaymentMethodSofortCountry { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodIdealBic { +impl std::fmt::Display for CreatePaymentMethodSofortCountry { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodIdealBic { +impl std::default::Default for CreatePaymentMethodSofortCountry { fn default() -> Self { - Self::Abnanl2a + Self::At } } -/// An enum representing the possible values of an `PaymentMethodInteracPresent`'s `read_method` field. +/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodInteracPresentReadMethod { - ContactEmv, - ContactlessEmv, - ContactlessMagstripeMode, - MagneticStripeFallback, - MagneticStripeTrack2, +pub enum CreatePaymentMethodUsBankAccountAccountHolderType { + Company, + Individual, } -impl PaymentMethodInteracPresentReadMethod { +impl CreatePaymentMethodUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { - PaymentMethodInteracPresentReadMethod::ContactEmv => "contact_emv", - PaymentMethodInteracPresentReadMethod::ContactlessEmv => "contactless_emv", - PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => { - "contactless_magstripe_mode" - } - PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => { - "magnetic_stripe_fallback" - } - PaymentMethodInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + CreatePaymentMethodUsBankAccountAccountHolderType::Company => "company", + CreatePaymentMethodUsBankAccountAccountHolderType::Individual => "individual", } } } -impl AsRef for PaymentMethodInteracPresentReadMethod { +impl AsRef for CreatePaymentMethodUsBankAccountAccountHolderType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodInteracPresentReadMethod { +impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountHolderType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodInteracPresentReadMethod { +impl std::default::Default for CreatePaymentMethodUsBankAccountAccountHolderType { fn default() -> Self { - Self::ContactEmv + Self::Company } } -/// An enum representing the possible values of an `PaymentMethodP24`'s `bank` field. +/// An enum representing the possible values of an `CreatePaymentMethodUsBankAccount`'s `account_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum PaymentMethodP24Bank { - AliorBank, - BankMillennium, - BankNowyBfgSa, - BankPekaoSa, - BankiSpbdzielcze, - Blik, - BnpParibas, - Boz, - CitiHandlowy, - CreditAgricole, - Envelobank, - EtransferPocztowy24, - GetinBank, - Ideabank, - Ing, - Inteligo, - MbankMtransfer, - NestPrzelew, - NoblePay, - PbacZIpko, - PlusBank, - SantanderPrzelew24, - TmobileUsbugiBankowe, - ToyotaBank, - Velobank, - VolkswagenBank, +pub enum CreatePaymentMethodUsBankAccountAccountType { + Checking, + Savings, } -impl PaymentMethodP24Bank { +impl CreatePaymentMethodUsBankAccountAccountType { pub fn as_str(self) -> &'static str { match self { - PaymentMethodP24Bank::AliorBank => "alior_bank", - PaymentMethodP24Bank::BankMillennium => "bank_millennium", - PaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", - PaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", - PaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", - PaymentMethodP24Bank::Blik => "blik", - PaymentMethodP24Bank::BnpParibas => "bnp_paribas", - PaymentMethodP24Bank::Boz => "boz", - PaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", - PaymentMethodP24Bank::CreditAgricole => "credit_agricole", - PaymentMethodP24Bank::Envelobank => "envelobank", - PaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", - PaymentMethodP24Bank::GetinBank => "getin_bank", - PaymentMethodP24Bank::Ideabank => "ideabank", - PaymentMethodP24Bank::Ing => "ing", - PaymentMethodP24Bank::Inteligo => "inteligo", - PaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", - PaymentMethodP24Bank::NestPrzelew => "nest_przelew", - PaymentMethodP24Bank::NoblePay => "noble_pay", - PaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", - PaymentMethodP24Bank::PlusBank => "plus_bank", - PaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", - PaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", - PaymentMethodP24Bank::ToyotaBank => "toyota_bank", - PaymentMethodP24Bank::Velobank => "velobank", - PaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", + CreatePaymentMethodUsBankAccountAccountType::Checking => "checking", + CreatePaymentMethodUsBankAccountAccountType::Savings => "savings", } } } -impl AsRef for PaymentMethodP24Bank { +impl AsRef for CreatePaymentMethodUsBankAccountAccountType { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display for PaymentMethodP24Bank { +impl std::fmt::Display for CreatePaymentMethodUsBankAccountAccountType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default for PaymentMethodP24Bank { +impl std::default::Default for CreatePaymentMethodUsBankAccountAccountType { fn default() -> Self { - Self::AliorBank + Self::Checking } } @@ -2376,6 +1269,7 @@ pub enum PaymentMethodType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2416,6 +1310,7 @@ impl PaymentMethodType { PaymentMethodType::Klarna => "klarna", PaymentMethodType::Konbini => "konbini", PaymentMethodType::Link => "link", + PaymentMethodType::Mobilepay => "mobilepay", PaymentMethodType::Oxxo => "oxxo", PaymentMethodType::P24 => "p24", PaymentMethodType::Paynow => "paynow", @@ -2474,6 +1369,7 @@ pub enum PaymentMethodTypeFilter { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2512,6 +1408,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Klarna => "klarna", PaymentMethodTypeFilter::Konbini => "konbini", PaymentMethodTypeFilter::Link => "link", + PaymentMethodTypeFilter::Mobilepay => "mobilepay", PaymentMethodTypeFilter::Oxxo => "oxxo", PaymentMethodTypeFilter::P24 => "p24", PaymentMethodTypeFilter::Paynow => "paynow", @@ -2546,186 +1443,6 @@ impl std::default::Default for PaymentMethodTypeFilter { } } -/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_holder_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountAccountHolderType { - Company, - Individual, -} - -impl PaymentMethodUsBankAccountAccountHolderType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountAccountHolderType::Company => "company", - PaymentMethodUsBankAccountAccountHolderType::Individual => "individual", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountAccountHolderType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountAccountHolderType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountAccountHolderType { - fn default() -> Self { - Self::Company - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountAccountType { - Checking, - Savings, -} - -impl PaymentMethodUsBankAccountAccountType { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountAccountType::Checking => "checking", - PaymentMethodUsBankAccountAccountType::Savings => "savings", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountAccountType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountAccountType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountAccountType { - fn default() -> Self { - Self::Checking - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `network_code` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountBlockedNetworkCode { - #[serde(rename = "R02")] - R02, - #[serde(rename = "R03")] - R03, - #[serde(rename = "R04")] - R04, - #[serde(rename = "R05")] - R05, - #[serde(rename = "R07")] - R07, - #[serde(rename = "R08")] - R08, - #[serde(rename = "R10")] - R10, - #[serde(rename = "R11")] - R11, - #[serde(rename = "R16")] - R16, - #[serde(rename = "R20")] - R20, - #[serde(rename = "R29")] - R29, - #[serde(rename = "R31")] - R31, -} - -impl PaymentMethodUsBankAccountBlockedNetworkCode { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountBlockedNetworkCode::R02 => "R02", - PaymentMethodUsBankAccountBlockedNetworkCode::R03 => "R03", - PaymentMethodUsBankAccountBlockedNetworkCode::R04 => "R04", - PaymentMethodUsBankAccountBlockedNetworkCode::R05 => "R05", - PaymentMethodUsBankAccountBlockedNetworkCode::R07 => "R07", - PaymentMethodUsBankAccountBlockedNetworkCode::R08 => "R08", - PaymentMethodUsBankAccountBlockedNetworkCode::R10 => "R10", - PaymentMethodUsBankAccountBlockedNetworkCode::R11 => "R11", - PaymentMethodUsBankAccountBlockedNetworkCode::R16 => "R16", - PaymentMethodUsBankAccountBlockedNetworkCode::R20 => "R20", - PaymentMethodUsBankAccountBlockedNetworkCode::R29 => "R29", - PaymentMethodUsBankAccountBlockedNetworkCode::R31 => "R31", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountBlockedNetworkCode { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountBlockedNetworkCode { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountBlockedNetworkCode { - fn default() -> Self { - Self::R02 - } -} - -/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `reason` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum PaymentMethodUsBankAccountBlockedReason { - BankAccountClosed, - BankAccountFrozen, - BankAccountInvalidDetails, - BankAccountRestricted, - BankAccountUnusable, - DebitNotAuthorized, -} - -impl PaymentMethodUsBankAccountBlockedReason { - pub fn as_str(self) -> &'static str { - match self { - PaymentMethodUsBankAccountBlockedReason::BankAccountClosed => "bank_account_closed", - PaymentMethodUsBankAccountBlockedReason::BankAccountFrozen => "bank_account_frozen", - PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => { - "bank_account_invalid_details" - } - PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => { - "bank_account_restricted" - } - PaymentMethodUsBankAccountBlockedReason::BankAccountUnusable => "bank_account_unusable", - PaymentMethodUsBankAccountBlockedReason::DebitNotAuthorized => "debit_not_authorized", - } - } -} - -impl AsRef for PaymentMethodUsBankAccountBlockedReason { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for PaymentMethodUsBankAccountBlockedReason { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for PaymentMethodUsBankAccountBlockedReason { - fn default() -> Self { - Self::BankAccountClosed - } -} - /// An enum representing the possible values of an `UpdatePaymentMethodUsBankAccount`'s `account_holder_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -2794,84 +1511,6 @@ impl std::default::Default for UpdatePaymentMethodUsBankAccountAccountType { } } -/// An enum representing the possible values of an `UsBankAccountNetworks`'s `supported` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum UsBankAccountNetworksSupported { - Ach, - UsDomesticWire, -} - -impl UsBankAccountNetworksSupported { - pub fn as_str(self) -> &'static str { - match self { - UsBankAccountNetworksSupported::Ach => "ach", - UsBankAccountNetworksSupported::UsDomesticWire => "us_domestic_wire", - } - } -} - -impl AsRef for UsBankAccountNetworksSupported { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for UsBankAccountNetworksSupported { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for UsBankAccountNetworksSupported { - fn default() -> Self { - Self::Ach - } -} - -/// An enum representing the possible values of an `WalletDetails`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum WalletDetailsType { - AmexExpressCheckout, - ApplePay, - GooglePay, - Link, - Masterpass, - SamsungPay, - VisaCheckout, -} - -impl WalletDetailsType { - pub fn as_str(self) -> &'static str { - match self { - WalletDetailsType::AmexExpressCheckout => "amex_express_checkout", - WalletDetailsType::ApplePay => "apple_pay", - WalletDetailsType::GooglePay => "google_pay", - WalletDetailsType::Link => "link", - WalletDetailsType::Masterpass => "masterpass", - WalletDetailsType::SamsungPay => "samsung_pay", - WalletDetailsType::VisaCheckout => "visa_checkout", - } - } -} - -impl AsRef for WalletDetailsType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for WalletDetailsType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for WalletDetailsType { - fn default() -> Self { - Self::AmexExpressCheckout - } -} - /// If this is a `card` PaymentMethod, this hash contains the user's card details. /// /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. @@ -2880,8 +1519,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)] @@ -2895,10 +1534,24 @@ pub struct CardDetailsParams { pub exp_month: i32, /// Four-digit number representing the card's expiration year. pub exp_year: i32, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, /// The card number, as a string without any separators. pub number: String, } +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TokenParams { /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. @@ -2914,4 +1567,18 @@ pub struct UpdateApiParam { /// Four-digit number representing the card's expiration year. #[serde(skip_serializing_if = "Option::is_none")] pub exp_year: Option, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, +} + +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, } diff --git a/src/resources/generated/payment_method_acss_debit.rs b/src/resources/generated/payment_method_acss_debit.rs new file mode 100644 index 000000000..5a2078b00 --- /dev/null +++ b/src/resources/generated/payment_method_acss_debit.rs @@ -0,0 +1,27 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_acss_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAcssDebit { + + /// Name of the bank associated with the bank account. + pub bank_name: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Institution number of the bank account. + pub institution_number: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Transit number of the bank account. + pub transit_number: Option, +} diff --git a/src/resources/generated/payment_method_affirm.rs b/src/resources/generated/payment_method_affirm.rs new file mode 100644 index 000000000..fae00953d --- /dev/null +++ b/src/resources/generated/payment_method_affirm.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_affirm". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAffirm { +} diff --git a/src/resources/generated/payment_method_afterpay_clearpay.rs b/src/resources/generated/payment_method_afterpay_clearpay.rs new file mode 100644 index 000000000..57d63c2a9 --- /dev/null +++ b/src/resources/generated/payment_method_afterpay_clearpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_afterpay_clearpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAfterpayClearpay { +} diff --git a/src/resources/generated/payment_method_au_becs_debit.rs b/src/resources/generated/payment_method_au_becs_debit.rs new file mode 100644 index 000000000..02634dc36 --- /dev/null +++ b/src/resources/generated/payment_method_au_becs_debit.rs @@ -0,0 +1,21 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_au_becs_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodAuBecsDebit { + + /// Six-digit number identifying bank and branch associated with this bank account. + pub bsb_number: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, +} diff --git a/src/resources/generated/payment_method_bacs_debit.rs b/src/resources/generated/payment_method_bacs_debit.rs new file mode 100644 index 000000000..ad95a73b5 --- /dev/null +++ b/src/resources/generated/payment_method_bacs_debit.rs @@ -0,0 +1,23 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_bacs_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBacsDebit { + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Sort code of the bank account. + /// + /// (e.g., `10-20-30`). + pub sort_code: Option, +} diff --git a/src/resources/generated/payment_method_bancontact.rs b/src/resources/generated/payment_method_bancontact.rs new file mode 100644 index 000000000..dfb2b31b2 --- /dev/null +++ b/src/resources/generated/payment_method_bancontact.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_bancontact". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBancontact { +} diff --git a/src/resources/generated/payment_method_blik.rs b/src/resources/generated/payment_method_blik.rs new file mode 100644 index 000000000..9b9486a3e --- /dev/null +++ b/src/resources/generated/payment_method_blik.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_blik". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBlik { +} diff --git a/src/resources/generated/payment_method_boleto.rs b/src/resources/generated/payment_method_boleto.rs new file mode 100644 index 000000000..1db6d9e2b --- /dev/null +++ b/src/resources/generated/payment_method_boleto.rs @@ -0,0 +1,13 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_boleto". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodBoleto { + + /// Uniquely identifies the customer tax id (CNPJ or CPF). + pub tax_id: String, +} diff --git a/src/resources/generated/payment_method_card.rs b/src/resources/generated/payment_method_card.rs new file mode 100644 index 000000000..def04a5cb --- /dev/null +++ b/src/resources/generated/payment_method_card.rs @@ -0,0 +1,264 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{Address}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_card". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CardDetails { + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: String, + + /// Checks on Card address and CVC if provided. + pub checks: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. + /// + /// Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + pub display_brand: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + #[serde(skip_serializing_if = "Option::is_none")] + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: String, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: String, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// Contains details on how this Card may be used for 3D Secure authentication. + pub three_d_secure_usage: Option, + + /// If this Card is part of a card wallet, this contains the details of the card wallet. + pub wallet: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + + /// All available networks for the card. + pub available: Vec, + + /// The preferred network for co-branded cards. + /// + /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + pub preferred: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCardChecks { + + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_line1_check: Option, + + /// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub address_postal_code_check: Option, + + /// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + pub cvc_check: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub amex_express_checkout: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub apple_pay: Option, + + /// (For tokenized numbers only.) The last four digits of the device account number. + pub dynamic_last4: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub google_pay: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub link: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub masterpass: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub samsung_pay: Option, + + /// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. + /// + /// An additional hash is included on the Wallet subhash with a name matching this value. + /// It contains additional information specific to the card wallet type. + #[serde(rename = "type")] + pub type_: WalletDetailsType, + + #[serde(skip_serializing_if = "Option::is_none")] + pub visa_checkout: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletAmexExpressCheckout { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletApplePay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletGooglePay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCardWalletLink { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletMasterpass { + + /// Owner's verified billing address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub billing_address: Option
, + + /// Owner's verified email. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub email: Option, + + /// Owner's verified full name. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub name: Option, + + /// Owner's verified shipping address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub shipping_address: Option
, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletSamsungPay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct WalletVisaCheckout { + + /// Owner's verified billing address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub billing_address: Option
, + + /// Owner's verified email. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub email: Option, + + /// Owner's verified full name. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub name: Option, + + /// Owner's verified shipping address. + /// + /// Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub shipping_address: Option
, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThreeDSecureUsage { + + /// Whether 3D Secure is supported on this card. + pub supported: bool, +} + +/// An enum representing the possible values of an `WalletDetails`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum WalletDetailsType { + AmexExpressCheckout, + ApplePay, + GooglePay, + Link, + Masterpass, + SamsungPay, + VisaCheckout, +} + +impl WalletDetailsType { + pub fn as_str(self) -> &'static str { + match self { + WalletDetailsType::AmexExpressCheckout => "amex_express_checkout", + WalletDetailsType::ApplePay => "apple_pay", + WalletDetailsType::GooglePay => "google_pay", + WalletDetailsType::Link => "link", + WalletDetailsType::Masterpass => "masterpass", + WalletDetailsType::SamsungPay => "samsung_pay", + WalletDetailsType::VisaCheckout => "visa_checkout", + } + } +} + +impl AsRef for WalletDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for WalletDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for WalletDetailsType { + fn default() -> Self { + Self::AmexExpressCheckout + } +} diff --git a/src/resources/generated/payment_method_card_present.rs b/src/resources/generated/payment_method_card_present.rs new file mode 100644 index 000000000..4e58562eb --- /dev/null +++ b/src/resources/generated/payment_method_card_present.rs @@ -0,0 +1,112 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{PaymentMethodCardPresentNetworks}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_card_present". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CardPresent { + + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: Option, + + /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. + /// + /// May include alphanumeric characters, special characters and first/last name separator (`/`). + /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. + /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + pub cardholder_name: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: Option, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// How card details were read in this transaction. + pub read_method: Option, +} + +/// An enum representing the possible values of an `CardPresent`'s `read_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CardPresentReadMethod { + ContactEmv, + ContactlessEmv, + ContactlessMagstripeMode, + MagneticStripeFallback, + MagneticStripeTrack2, +} + +impl CardPresentReadMethod { + pub fn as_str(self) -> &'static str { + match self { + CardPresentReadMethod::ContactEmv => "contact_emv", + CardPresentReadMethod::ContactlessEmv => "contactless_emv", + CardPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + CardPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + CardPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + } + } +} + +impl AsRef for CardPresentReadMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CardPresentReadMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CardPresentReadMethod { + fn default() -> Self { + Self::ContactEmv + } +} diff --git a/src/resources/generated/payment_method_card_present_networks.rs b/src/resources/generated/payment_method_card_present_networks.rs deleted file mode 100644 index edc632cd5..000000000 --- a/src/resources/generated/payment_method_card_present_networks.rs +++ /dev/null @@ -1,15 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -/// The resource representing a Stripe "payment_method_card_present_networks". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodCardPresentNetworks { - /// All available networks for the card. - pub available: Vec, - - /// The preferred network for the card. - pub preferred: Option, -} diff --git a/src/resources/generated/payment_method_cashapp.rs b/src/resources/generated/payment_method_cashapp.rs new file mode 100644 index 000000000..9d45d2d1c --- /dev/null +++ b/src/resources/generated/payment_method_cashapp.rs @@ -0,0 +1,16 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_cashapp". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCashapp { + + /// A unique and immutable identifier assigned by Cash App to every buyer. + pub buyer_id: Option, + + /// A public identifier for buyers using Cash App. + pub cashtag: Option, +} diff --git a/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs index 0a18c7e4e..e6a7c52e1 100644 --- a/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs +++ b/src/resources/generated/payment_method_config_biz_payment_method_configuration_details.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentMethodConfigBizPaymentMethodConfigurationDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodConfigBizPaymentMethodConfigurationDetails { + /// ID of the parent payment method configuration used. pub parent: Option, } diff --git a/src/resources/generated/payment_method_customer_balance.rs b/src/resources/generated/payment_method_customer_balance.rs new file mode 100644 index 000000000..66f744e3a --- /dev/null +++ b/src/resources/generated/payment_method_customer_balance.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_customer_balance". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodCustomerBalance { +} diff --git a/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs b/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs index 4785e2e29..4bdb0bff8 100644 --- a/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs +++ b/src/resources/generated/payment_method_details_card_wallet_apple_pay.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_details_card_wallet_apple_pay". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletApplePay {} +pub struct PaymentMethodDetailsCardWalletApplePay { +} diff --git a/src/resources/generated/payment_method_details_card_wallet_google_pay.rs b/src/resources/generated/payment_method_details_card_wallet_google_pay.rs index 36af4281c..7d24e3224 100644 --- a/src/resources/generated/payment_method_details_card_wallet_google_pay.rs +++ b/src/resources/generated/payment_method_details_card_wallet_google_pay.rs @@ -6,4 +6,5 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_details_card_wallet_google_pay". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct PaymentMethodDetailsCardWalletGooglePay {} +pub struct PaymentMethodDetailsCardWalletGooglePay { +} diff --git a/src/resources/generated/payment_method_eps.rs b/src/resources/generated/payment_method_eps.rs new file mode 100644 index 000000000..ee27f6074 --- /dev/null +++ b/src/resources/generated/payment_method_eps.rs @@ -0,0 +1,101 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_eps". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodEps { + + /// The customer's bank. + /// + /// Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + pub bank: Option, +} + +/// An enum representing the possible values of an `PaymentMethodEps`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodEpsBank { + ArzteUndApothekerBank, + AustrianAnadiBankAg, + BankAustria, + BankhausCarlSpangler, + BankhausSchelhammerUndSchatteraAg, + BawagPskAg, + BksBankAg, + BrullKallmusBankAg, + BtvVierLanderBank, + CapitalBankGraweGruppeAg, + DeutscheBankAg, + Dolomitenbank, + EasybankAg, + ErsteBankUndSparkassen, + HypoAlpeadriabankInternationalAg, + HypoBankBurgenlandAktiengesellschaft, + HypoNoeLbFurNiederosterreichUWien, + HypoOberosterreichSalzburgSteiermark, + HypoTirolBankAg, + HypoVorarlbergBankAg, + MarchfelderBank, + OberbankAg, + RaiffeisenBankengruppeOsterreich, + SchoellerbankAg, + SpardaBankWien, + VolksbankGruppe, + VolkskreditbankAg, + VrBankBraunau, +} + +impl PaymentMethodEpsBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodEpsBank::ArzteUndApothekerBank => "arzte_und_apotheker_bank", + PaymentMethodEpsBank::AustrianAnadiBankAg => "austrian_anadi_bank_ag", + PaymentMethodEpsBank::BankAustria => "bank_austria", + PaymentMethodEpsBank::BankhausCarlSpangler => "bankhaus_carl_spangler", + PaymentMethodEpsBank::BankhausSchelhammerUndSchatteraAg => "bankhaus_schelhammer_und_schattera_ag", + PaymentMethodEpsBank::BawagPskAg => "bawag_psk_ag", + PaymentMethodEpsBank::BksBankAg => "bks_bank_ag", + PaymentMethodEpsBank::BrullKallmusBankAg => "brull_kallmus_bank_ag", + PaymentMethodEpsBank::BtvVierLanderBank => "btv_vier_lander_bank", + PaymentMethodEpsBank::CapitalBankGraweGruppeAg => "capital_bank_grawe_gruppe_ag", + PaymentMethodEpsBank::DeutscheBankAg => "deutsche_bank_ag", + PaymentMethodEpsBank::Dolomitenbank => "dolomitenbank", + PaymentMethodEpsBank::EasybankAg => "easybank_ag", + PaymentMethodEpsBank::ErsteBankUndSparkassen => "erste_bank_und_sparkassen", + PaymentMethodEpsBank::HypoAlpeadriabankInternationalAg => "hypo_alpeadriabank_international_ag", + PaymentMethodEpsBank::HypoBankBurgenlandAktiengesellschaft => "hypo_bank_burgenland_aktiengesellschaft", + PaymentMethodEpsBank::HypoNoeLbFurNiederosterreichUWien => "hypo_noe_lb_fur_niederosterreich_u_wien", + PaymentMethodEpsBank::HypoOberosterreichSalzburgSteiermark => "hypo_oberosterreich_salzburg_steiermark", + PaymentMethodEpsBank::HypoTirolBankAg => "hypo_tirol_bank_ag", + PaymentMethodEpsBank::HypoVorarlbergBankAg => "hypo_vorarlberg_bank_ag", + PaymentMethodEpsBank::MarchfelderBank => "marchfelder_bank", + PaymentMethodEpsBank::OberbankAg => "oberbank_ag", + PaymentMethodEpsBank::RaiffeisenBankengruppeOsterreich => "raiffeisen_bankengruppe_osterreich", + PaymentMethodEpsBank::SchoellerbankAg => "schoellerbank_ag", + PaymentMethodEpsBank::SpardaBankWien => "sparda_bank_wien", + PaymentMethodEpsBank::VolksbankGruppe => "volksbank_gruppe", + PaymentMethodEpsBank::VolkskreditbankAg => "volkskreditbank_ag", + PaymentMethodEpsBank::VrBankBraunau => "vr_bank_braunau", + } + } +} + +impl AsRef for PaymentMethodEpsBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodEpsBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodEpsBank { + fn default() -> Self { + Self::ArzteUndApothekerBank + } +} diff --git a/src/resources/generated/payment_method_fpx.rs b/src/resources/generated/payment_method_fpx.rs new file mode 100644 index 000000000..e668a97d1 --- /dev/null +++ b/src/resources/generated/payment_method_fpx.rs @@ -0,0 +1,128 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_fpx". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodFpx { + + /// Account holder type, if provided. + /// + /// Can be one of `individual` or `company`. + pub account_holder_type: Option, + + /// The customer's bank, if provided. + /// + /// Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + pub bank: PaymentMethodFpxBank, +} + +/// An enum representing the possible values of an `PaymentMethodFpx`'s `account_holder_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodFpxAccountHolderType { + Company, + Individual, +} + +impl PaymentMethodFpxAccountHolderType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodFpxAccountHolderType::Company => "company", + PaymentMethodFpxAccountHolderType::Individual => "individual", + } + } +} + +impl AsRef for PaymentMethodFpxAccountHolderType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodFpxAccountHolderType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodFpxAccountHolderType { + fn default() -> Self { + Self::Company + } +} + +/// An enum representing the possible values of an `PaymentMethodFpx`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodFpxBank { + AffinBank, + Agrobank, + AllianceBank, + Ambank, + BankIslam, + BankMuamalat, + BankOfChina, + BankRakyat, + Bsn, + Cimb, + DeutscheBank, + HongLeongBank, + Hsbc, + Kfh, + Maybank2e, + Maybank2u, + Ocbc, + PbEnterprise, + PublicBank, + Rhb, + StandardChartered, + Uob, +} + +impl PaymentMethodFpxBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodFpxBank::AffinBank => "affin_bank", + PaymentMethodFpxBank::Agrobank => "agrobank", + PaymentMethodFpxBank::AllianceBank => "alliance_bank", + PaymentMethodFpxBank::Ambank => "ambank", + PaymentMethodFpxBank::BankIslam => "bank_islam", + PaymentMethodFpxBank::BankMuamalat => "bank_muamalat", + PaymentMethodFpxBank::BankOfChina => "bank_of_china", + PaymentMethodFpxBank::BankRakyat => "bank_rakyat", + PaymentMethodFpxBank::Bsn => "bsn", + PaymentMethodFpxBank::Cimb => "cimb", + PaymentMethodFpxBank::DeutscheBank => "deutsche_bank", + PaymentMethodFpxBank::HongLeongBank => "hong_leong_bank", + PaymentMethodFpxBank::Hsbc => "hsbc", + PaymentMethodFpxBank::Kfh => "kfh", + PaymentMethodFpxBank::Maybank2e => "maybank2e", + PaymentMethodFpxBank::Maybank2u => "maybank2u", + PaymentMethodFpxBank::Ocbc => "ocbc", + PaymentMethodFpxBank::PbEnterprise => "pb_enterprise", + PaymentMethodFpxBank::PublicBank => "public_bank", + PaymentMethodFpxBank::Rhb => "rhb", + PaymentMethodFpxBank::StandardChartered => "standard_chartered", + PaymentMethodFpxBank::Uob => "uob", + } + } +} + +impl AsRef for PaymentMethodFpxBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodFpxBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodFpxBank { + fn default() -> Self { + Self::AffinBank + } +} diff --git a/src/resources/generated/payment_method_giropay.rs b/src/resources/generated/payment_method_giropay.rs new file mode 100644 index 000000000..0eb04b6b2 --- /dev/null +++ b/src/resources/generated/payment_method_giropay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_giropay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodGiropay { +} diff --git a/src/resources/generated/payment_method_grabpay.rs b/src/resources/generated/payment_method_grabpay.rs new file mode 100644 index 000000000..4bbe1dde3 --- /dev/null +++ b/src/resources/generated/payment_method_grabpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_grabpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodGrabpay { +} diff --git a/src/resources/generated/payment_method_ideal.rs b/src/resources/generated/payment_method_ideal.rs new file mode 100644 index 000000000..fb4d0b2fe --- /dev/null +++ b/src/resources/generated/payment_method_ideal.rs @@ -0,0 +1,161 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_ideal". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodIdeal { + + /// The customer's bank, if provided. + /// + /// Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + pub bank: Option, + + /// The Bank Identifier Code of the customer's bank, if the bank was provided. + pub bic: Option, +} + +/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodIdealBank { + AbnAmro, + AsnBank, + Bunq, + Handelsbanken, + Ing, + Knab, + Moneyou, + N26, + Nn, + Rabobank, + Regiobank, + Revolut, + SnsBank, + TriodosBank, + VanLanschot, + Yoursafe, +} + +impl PaymentMethodIdealBank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodIdealBank::AbnAmro => "abn_amro", + PaymentMethodIdealBank::AsnBank => "asn_bank", + PaymentMethodIdealBank::Bunq => "bunq", + PaymentMethodIdealBank::Handelsbanken => "handelsbanken", + PaymentMethodIdealBank::Ing => "ing", + PaymentMethodIdealBank::Knab => "knab", + PaymentMethodIdealBank::Moneyou => "moneyou", + PaymentMethodIdealBank::N26 => "n26", + PaymentMethodIdealBank::Nn => "nn", + PaymentMethodIdealBank::Rabobank => "rabobank", + PaymentMethodIdealBank::Regiobank => "regiobank", + PaymentMethodIdealBank::Revolut => "revolut", + PaymentMethodIdealBank::SnsBank => "sns_bank", + PaymentMethodIdealBank::TriodosBank => "triodos_bank", + PaymentMethodIdealBank::VanLanschot => "van_lanschot", + PaymentMethodIdealBank::Yoursafe => "yoursafe", + } + } +} + +impl AsRef for PaymentMethodIdealBank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodIdealBank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodIdealBank { + fn default() -> Self { + Self::AbnAmro + } +} + +/// An enum representing the possible values of an `PaymentMethodIdeal`'s `bic` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodIdealBic { + #[serde(rename = "ABNANL2A")] + Abnanl2a, + #[serde(rename = "ASNBNL21")] + Asnbnl21, + #[serde(rename = "BITSNL2A")] + Bitsnl2a, + #[serde(rename = "BUNQNL2A")] + Bunqnl2a, + #[serde(rename = "FVLBNL22")] + Fvlbnl22, + #[serde(rename = "HANDNL2A")] + Handnl2a, + #[serde(rename = "INGBNL2A")] + Ingbnl2a, + #[serde(rename = "KNABNL2H")] + Knabnl2h, + #[serde(rename = "MOYONL21")] + Moyonl21, + #[serde(rename = "NNBANL2G")] + Nnbanl2g, + #[serde(rename = "NTSBDEB1")] + Ntsbdeb1, + #[serde(rename = "RABONL2U")] + Rabonl2u, + #[serde(rename = "RBRBNL21")] + Rbrbnl21, + #[serde(rename = "REVOIE23")] + Revoie23, + #[serde(rename = "REVOLT21")] + Revolt21, + #[serde(rename = "SNSBNL2A")] + Snsbnl2a, + #[serde(rename = "TRIONL2U")] + Trionl2u, +} + +impl PaymentMethodIdealBic { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodIdealBic::Abnanl2a => "ABNANL2A", + PaymentMethodIdealBic::Asnbnl21 => "ASNBNL21", + PaymentMethodIdealBic::Bitsnl2a => "BITSNL2A", + PaymentMethodIdealBic::Bunqnl2a => "BUNQNL2A", + PaymentMethodIdealBic::Fvlbnl22 => "FVLBNL22", + PaymentMethodIdealBic::Handnl2a => "HANDNL2A", + PaymentMethodIdealBic::Ingbnl2a => "INGBNL2A", + PaymentMethodIdealBic::Knabnl2h => "KNABNL2H", + PaymentMethodIdealBic::Moyonl21 => "MOYONL21", + PaymentMethodIdealBic::Nnbanl2g => "NNBANL2G", + PaymentMethodIdealBic::Ntsbdeb1 => "NTSBDEB1", + PaymentMethodIdealBic::Rabonl2u => "RABONL2U", + PaymentMethodIdealBic::Rbrbnl21 => "RBRBNL21", + PaymentMethodIdealBic::Revoie23 => "REVOIE23", + PaymentMethodIdealBic::Revolt21 => "REVOLT21", + PaymentMethodIdealBic::Snsbnl2a => "SNSBNL2A", + PaymentMethodIdealBic::Trionl2u => "TRIONL2U", + } + } +} + +impl AsRef for PaymentMethodIdealBic { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodIdealBic { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodIdealBic { + fn default() -> Self { + Self::Abnanl2a + } +} diff --git a/src/resources/generated/payment_method_interac_present.rs b/src/resources/generated/payment_method_interac_present.rs new file mode 100644 index 000000000..848b47cc5 --- /dev/null +++ b/src/resources/generated/payment_method_interac_present.rs @@ -0,0 +1,117 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::resources::{PaymentMethodCardPresentNetworks}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_interac_present". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodInteracPresent { + + /// Card brand. + /// + /// Can be `interac`, `mastercard` or `visa`. + pub brand: Option, + + /// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. + /// + /// May include alphanumeric characters, special characters and first/last name separator (`/`). + /// In some cases, the cardholder name may not be available depending on how the issuer has configured the card. + /// Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + pub cardholder_name: Option, + + /// Two-letter ISO code representing the country of the card. + /// + /// You could use this attribute to get a sense of the international breakdown of cards you've collected. + pub country: Option, + + /// A high-level description of the type of cards issued in this range. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + + /// Two-digit number representing the card's expiration month. + pub exp_month: i64, + + /// Four-digit number representing the card's expiration year. + pub exp_year: i64, + + /// Uniquely identifies this particular card number. + /// + /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. + pub fingerprint: Option, + + /// Card funding type. + /// + /// Can be `credit`, `debit`, `prepaid`, or `unknown`. + pub funding: Option, + + /// Issuer identification number of the card. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub iin: Option, + + /// The name of the card's issuing bank. + /// + /// (For internal use only and not typically available in standard API requests.). + #[serde(skip_serializing_if = "Option::is_none")] + pub issuer: Option, + + /// The last four digits of the card. + pub last4: Option, + + /// Contains information about card networks that can be used to process the payment. + pub networks: Option, + + /// EMV tag 5F2D. + /// + /// Preferred languages specified by the integrated circuit chip. + pub preferred_locales: Option>, + + /// How card details were read in this transaction. + pub read_method: Option, +} + +/// An enum representing the possible values of an `PaymentMethodInteracPresent`'s `read_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodInteracPresentReadMethod { + ContactEmv, + ContactlessEmv, + ContactlessMagstripeMode, + MagneticStripeFallback, + MagneticStripeTrack2, +} + +impl PaymentMethodInteracPresentReadMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodInteracPresentReadMethod::ContactEmv => "contact_emv", + PaymentMethodInteracPresentReadMethod::ContactlessEmv => "contactless_emv", + PaymentMethodInteracPresentReadMethod::ContactlessMagstripeMode => "contactless_magstripe_mode", + PaymentMethodInteracPresentReadMethod::MagneticStripeFallback => "magnetic_stripe_fallback", + PaymentMethodInteracPresentReadMethod::MagneticStripeTrack2 => "magnetic_stripe_track2", + } + } +} + +impl AsRef for PaymentMethodInteracPresentReadMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodInteracPresentReadMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodInteracPresentReadMethod { + fn default() -> Self { + Self::ContactEmv + } +} diff --git a/src/resources/generated/payment_method_klarna.rs b/src/resources/generated/payment_method_klarna.rs new file mode 100644 index 000000000..2199e3846 --- /dev/null +++ b/src/resources/generated/payment_method_klarna.rs @@ -0,0 +1,26 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_klarna". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodKlarna { + + /// The customer's date of birth, if provided. + pub dob: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDob { + + /// The day of birth, between 1 and 31. + pub day: Option, + + /// The month of birth, between 1 and 12. + pub month: Option, + + /// The four-digit year of birth. + pub year: Option, +} diff --git a/src/resources/generated/payment_method_konbini.rs b/src/resources/generated/payment_method_konbini.rs new file mode 100644 index 000000000..f92aec4bb --- /dev/null +++ b/src/resources/generated/payment_method_konbini.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_konbini". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodKonbini { +} diff --git a/src/resources/generated/payment_method_link.rs b/src/resources/generated/payment_method_link.rs new file mode 100644 index 000000000..944a701ed --- /dev/null +++ b/src/resources/generated/payment_method_link.rs @@ -0,0 +1,17 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_link". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodLink { + + /// Account owner's email address. + pub email: Option, + + /// [Deprecated] This is a legacy parameter that no longer has any function. + #[serde(skip_serializing_if = "Option::is_none")] + pub persistent_token: Option, +} diff --git a/src/resources/generated/payment_method_mobilepay.rs b/src/resources/generated/payment_method_mobilepay.rs new file mode 100644 index 000000000..fb23914d6 --- /dev/null +++ b/src/resources/generated/payment_method_mobilepay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_mobilepay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodMobilepay { +} diff --git a/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs b/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs index 1505af091..49eadcc15 100644 --- a/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs +++ b/src/resources/generated/payment_method_options_customer_balance_eu_bank_account.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_options_customer_balance_eu_bank_account". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsCustomerBalanceEuBankAccount { + /// The desired country code of the bank account information. /// /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. diff --git a/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs b/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs index f255d7400..6e559ecc5 100644 --- a/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs +++ b/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "payment_method_options_us_bank_account_mandate_options". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodOptionsUsBankAccountMandateOptions { + /// Mandate collection method. #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, diff --git a/src/resources/generated/payment_method_oxxo.rs b/src/resources/generated/payment_method_oxxo.rs new file mode 100644 index 000000000..be002edde --- /dev/null +++ b/src/resources/generated/payment_method_oxxo.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_oxxo". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodOxxo { +} diff --git a/src/resources/generated/payment_method_p24.rs b/src/resources/generated/payment_method_p24.rs new file mode 100644 index 000000000..20e916ae7 --- /dev/null +++ b/src/resources/generated/payment_method_p24.rs @@ -0,0 +1,95 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_p24". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodP24 { + + /// The customer's bank, if provided. + pub bank: Option, +} + +/// An enum representing the possible values of an `PaymentMethodP24`'s `bank` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodP24Bank { + AliorBank, + BankMillennium, + BankNowyBfgSa, + BankPekaoSa, + BankiSpbdzielcze, + Blik, + BnpParibas, + Boz, + CitiHandlowy, + CreditAgricole, + Envelobank, + EtransferPocztowy24, + GetinBank, + Ideabank, + Ing, + Inteligo, + MbankMtransfer, + NestPrzelew, + NoblePay, + PbacZIpko, + PlusBank, + SantanderPrzelew24, + TmobileUsbugiBankowe, + ToyotaBank, + Velobank, + VolkswagenBank, +} + +impl PaymentMethodP24Bank { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodP24Bank::AliorBank => "alior_bank", + PaymentMethodP24Bank::BankMillennium => "bank_millennium", + PaymentMethodP24Bank::BankNowyBfgSa => "bank_nowy_bfg_sa", + PaymentMethodP24Bank::BankPekaoSa => "bank_pekao_sa", + PaymentMethodP24Bank::BankiSpbdzielcze => "banki_spbdzielcze", + PaymentMethodP24Bank::Blik => "blik", + PaymentMethodP24Bank::BnpParibas => "bnp_paribas", + PaymentMethodP24Bank::Boz => "boz", + PaymentMethodP24Bank::CitiHandlowy => "citi_handlowy", + PaymentMethodP24Bank::CreditAgricole => "credit_agricole", + PaymentMethodP24Bank::Envelobank => "envelobank", + PaymentMethodP24Bank::EtransferPocztowy24 => "etransfer_pocztowy24", + PaymentMethodP24Bank::GetinBank => "getin_bank", + PaymentMethodP24Bank::Ideabank => "ideabank", + PaymentMethodP24Bank::Ing => "ing", + PaymentMethodP24Bank::Inteligo => "inteligo", + PaymentMethodP24Bank::MbankMtransfer => "mbank_mtransfer", + PaymentMethodP24Bank::NestPrzelew => "nest_przelew", + PaymentMethodP24Bank::NoblePay => "noble_pay", + PaymentMethodP24Bank::PbacZIpko => "pbac_z_ipko", + PaymentMethodP24Bank::PlusBank => "plus_bank", + PaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24", + PaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", + PaymentMethodP24Bank::ToyotaBank => "toyota_bank", + PaymentMethodP24Bank::Velobank => "velobank", + PaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank", + } + } +} + +impl AsRef for PaymentMethodP24Bank { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodP24Bank { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodP24Bank { + fn default() -> Self { + Self::AliorBank + } +} diff --git a/src/resources/generated/payment_method_paynow.rs b/src/resources/generated/payment_method_paynow.rs new file mode 100644 index 000000000..9ee5210bf --- /dev/null +++ b/src/resources/generated/payment_method_paynow.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_paynow". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPaynow { +} diff --git a/src/resources/generated/payment_method_paypal.rs b/src/resources/generated/payment_method_paypal.rs new file mode 100644 index 000000000..2b9346394 --- /dev/null +++ b/src/resources/generated/payment_method_paypal.rs @@ -0,0 +1,21 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_paypal". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPaypal { + + /// Owner's email. + /// + /// Values are provided by PayPal directly (if supported) at the time of authorization or settlement. + /// They cannot be set or mutated. + pub payer_email: Option, + + /// PayPal account PayerID. + /// + /// This identifier uniquely identifies the PayPal customer. + pub payer_id: Option, +} diff --git a/src/resources/generated/payment_method_pix.rs b/src/resources/generated/payment_method_pix.rs new file mode 100644 index 000000000..3205208b8 --- /dev/null +++ b/src/resources/generated/payment_method_pix.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_pix". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPix { +} diff --git a/src/resources/generated/payment_method_promptpay.rs b/src/resources/generated/payment_method_promptpay.rs new file mode 100644 index 000000000..4171ca54d --- /dev/null +++ b/src/resources/generated/payment_method_promptpay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_promptpay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodPromptpay { +} diff --git a/src/resources/generated/payment_method_revolut_pay.rs b/src/resources/generated/payment_method_revolut_pay.rs new file mode 100644 index 000000000..cbdebb288 --- /dev/null +++ b/src/resources/generated/payment_method_revolut_pay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_revolut_pay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodRevolutPay { +} diff --git a/src/resources/generated/payment_method_sepa_debit.rs b/src/resources/generated/payment_method_sepa_debit.rs new file mode 100644 index 000000000..be1debfeb --- /dev/null +++ b/src/resources/generated/payment_method_sepa_debit.rs @@ -0,0 +1,42 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::params::{Expandable}; +use crate::resources::{Charge, SetupAttempt}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_sepa_debit". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSepaDebit { + + /// Bank code of bank associated with the bank account. + pub bank_code: Option, + + /// Branch code of bank associated with the bank account. + pub branch_code: Option, + + /// Two-letter ISO code representing the country the bank account is located in. + pub country: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Information about the object that generated this PaymentMethod. + pub generated_from: Option, + + /// Last four characters of the IBAN. + pub last4: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SepaDebitGeneratedFrom { + + /// The ID of the Charge that generated this PaymentMethod, if any. + pub charge: Option>, + + /// The ID of the SetupAttempt that generated this PaymentMethod, if any. + pub setup_attempt: Option>, +} diff --git a/src/resources/generated/payment_method_sofort.rs b/src/resources/generated/payment_method_sofort.rs new file mode 100644 index 000000000..7c5587cac --- /dev/null +++ b/src/resources/generated/payment_method_sofort.rs @@ -0,0 +1,13 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_sofort". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSofort { + + /// Two-letter ISO code representing the country the bank account is located in. + pub country: Option, +} diff --git a/src/resources/generated/payment_method_swish.rs b/src/resources/generated/payment_method_swish.rs new file mode 100644 index 000000000..2b2b24fc0 --- /dev/null +++ b/src/resources/generated/payment_method_swish.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_swish". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSwish { +} diff --git a/src/resources/generated/payment_method_us_bank_account.rs b/src/resources/generated/payment_method_us_bank_account.rs new file mode 100644 index 000000000..7153b1ca4 --- /dev/null +++ b/src/resources/generated/payment_method_us_bank_account.rs @@ -0,0 +1,278 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_us_bank_account". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccount { + + /// Account holder type: individual or company. + pub account_holder_type: Option, + + /// Account type: checkings or savings. + /// + /// Defaults to checking if omitted. + pub account_type: Option, + + /// The name of the bank. + pub bank_name: Option, + + /// The ID of the Financial Connections Account used to create the payment method. + pub financial_connections_account: Option, + + /// Uniquely identifies this particular bank account. + /// + /// You can use this attribute to check whether two bank accounts are the same. + pub fingerprint: Option, + + /// Last four digits of the bank account number. + pub last4: Option, + + /// Contains information about US bank account networks that can be used. + pub networks: Option, + + /// Routing number of the bank account. + pub routing_number: Option, + + /// Contains information about the future reusability of this PaymentMethod. + pub status_details: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccountStatusDetails { + + #[serde(skip_serializing_if = "Option::is_none")] + pub blocked: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodUsBankAccountBlocked { + + /// The ACH network code that resulted in this block. + pub network_code: Option, + + /// The reason why this PaymentMethod's fingerprint has been blocked. + pub reason: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UsBankAccountNetworks { + + /// The preferred network. + pub preferred: Option, + + /// All supported networks. + pub supported: Vec, +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_holder_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountAccountHolderType { + Company, + Individual, +} + +impl PaymentMethodUsBankAccountAccountHolderType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountAccountHolderType::Company => "company", + PaymentMethodUsBankAccountAccountHolderType::Individual => "individual", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountAccountHolderType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountAccountHolderType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountAccountHolderType { + fn default() -> Self { + Self::Company + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccount`'s `account_type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountAccountType { + Checking, + Savings, +} + +impl PaymentMethodUsBankAccountAccountType { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountAccountType::Checking => "checking", + PaymentMethodUsBankAccountAccountType::Savings => "savings", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountAccountType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountAccountType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountAccountType { + fn default() -> Self { + Self::Checking + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `network_code` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountBlockedNetworkCode { + #[serde(rename = "R02")] + R02, + #[serde(rename = "R03")] + R03, + #[serde(rename = "R04")] + R04, + #[serde(rename = "R05")] + R05, + #[serde(rename = "R07")] + R07, + #[serde(rename = "R08")] + R08, + #[serde(rename = "R10")] + R10, + #[serde(rename = "R11")] + R11, + #[serde(rename = "R16")] + R16, + #[serde(rename = "R20")] + R20, + #[serde(rename = "R29")] + R29, + #[serde(rename = "R31")] + R31, +} + +impl PaymentMethodUsBankAccountBlockedNetworkCode { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountBlockedNetworkCode::R02 => "R02", + PaymentMethodUsBankAccountBlockedNetworkCode::R03 => "R03", + PaymentMethodUsBankAccountBlockedNetworkCode::R04 => "R04", + PaymentMethodUsBankAccountBlockedNetworkCode::R05 => "R05", + PaymentMethodUsBankAccountBlockedNetworkCode::R07 => "R07", + PaymentMethodUsBankAccountBlockedNetworkCode::R08 => "R08", + PaymentMethodUsBankAccountBlockedNetworkCode::R10 => "R10", + PaymentMethodUsBankAccountBlockedNetworkCode::R11 => "R11", + PaymentMethodUsBankAccountBlockedNetworkCode::R16 => "R16", + PaymentMethodUsBankAccountBlockedNetworkCode::R20 => "R20", + PaymentMethodUsBankAccountBlockedNetworkCode::R29 => "R29", + PaymentMethodUsBankAccountBlockedNetworkCode::R31 => "R31", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountBlockedNetworkCode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountBlockedNetworkCode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountBlockedNetworkCode { + fn default() -> Self { + Self::R02 + } +} + +/// An enum representing the possible values of an `PaymentMethodUsBankAccountBlocked`'s `reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodUsBankAccountBlockedReason { + BankAccountClosed, + BankAccountFrozen, + BankAccountInvalidDetails, + BankAccountRestricted, + BankAccountUnusable, + DebitNotAuthorized, +} + +impl PaymentMethodUsBankAccountBlockedReason { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodUsBankAccountBlockedReason::BankAccountClosed => "bank_account_closed", + PaymentMethodUsBankAccountBlockedReason::BankAccountFrozen => "bank_account_frozen", + PaymentMethodUsBankAccountBlockedReason::BankAccountInvalidDetails => "bank_account_invalid_details", + PaymentMethodUsBankAccountBlockedReason::BankAccountRestricted => "bank_account_restricted", + PaymentMethodUsBankAccountBlockedReason::BankAccountUnusable => "bank_account_unusable", + PaymentMethodUsBankAccountBlockedReason::DebitNotAuthorized => "debit_not_authorized", + } + } +} + +impl AsRef for PaymentMethodUsBankAccountBlockedReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodUsBankAccountBlockedReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodUsBankAccountBlockedReason { + fn default() -> Self { + Self::BankAccountClosed + } +} + +/// An enum representing the possible values of an `UsBankAccountNetworks`'s `supported` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UsBankAccountNetworksSupported { + Ach, + UsDomesticWire, +} + +impl UsBankAccountNetworksSupported { + pub fn as_str(self) -> &'static str { + match self { + UsBankAccountNetworksSupported::Ach => "ach", + UsBankAccountNetworksSupported::UsDomesticWire => "us_domestic_wire", + } + } +} + +impl AsRef for UsBankAccountNetworksSupported { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UsBankAccountNetworksSupported { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UsBankAccountNetworksSupported { + fn default() -> Self { + Self::Ach + } +} diff --git a/src/resources/generated/payment_method_wechat_pay.rs b/src/resources/generated/payment_method_wechat_pay.rs new file mode 100644 index 000000000..0de873239 --- /dev/null +++ b/src/resources/generated/payment_method_wechat_pay.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_wechat_pay". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodWechatPay { +} diff --git a/src/resources/generated/payment_method_zip.rs b/src/resources/generated/payment_method_zip.rs new file mode 100644 index 000000000..c37a2961b --- /dev/null +++ b/src/resources/generated/payment_method_zip.rs @@ -0,0 +1,10 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "payment_method_zip". +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodZip { +} diff --git a/src/resources/generated/payout.rs b/src/resources/generated/payout.rs index c4739e516..fe234cfaa 100644 --- a/src/resources/generated/payout.rs +++ b/src/resources/generated/payout.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PayoutId; +use crate::ids::{PayoutId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Currency, PayoutDestinationUnion}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Payout". /// @@ -102,12 +101,14 @@ pub struct Payout { } impl Payout { + /// Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. /// /// The payouts return in sorted order, with the most recently created payouts appearing first. - pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { - client.get_query("/payouts", ¶ms) - } +pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response> { + client.get_query("/payouts", ¶ms) +} + /// To send funds to your own bank account, create a new payout object. /// @@ -148,6 +149,7 @@ impl Object for Payout { /// The parameters for `Payout::create`. #[derive(Clone, Debug, Serialize)] pub struct CreatePayout<'a> { + /// A positive integer in cents representing how much to payout. pub amount: i64, @@ -223,9 +225,12 @@ impl<'a> CreatePayout<'a> { /// The parameters for `Payout::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListPayouts<'a> { + + /// Only return payouts that are expected to arrive during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub arrival_date: Option>, + /// Only return payouts that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -279,12 +284,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], @@ -300,7 +305,10 @@ pub struct UpdatePayout<'a> { impl<'a> UpdatePayout<'a> { pub fn new() -> Self { - UpdatePayout { expand: Default::default(), metadata: Default::default() } + UpdatePayout { + expand: Default::default(), + metadata: Default::default(), + } } } diff --git a/src/resources/generated/person.rs b/src/resources/generated/person.rs index 7ff2c6507..b35c29317 100644 --- a/src/resources/generated/person.rs +++ b/src/resources/generated/person.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::PersonId; +use crate::ids::{PersonId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{Address, File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Person". /// @@ -152,6 +151,7 @@ impl Object for Person { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LegalEntityDob { + /// The day of birth, between 1 and 31. pub day: Option, @@ -164,6 +164,7 @@ pub struct LegalEntityDob { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerification { + /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] pub additional_document: Option, @@ -191,6 +192,7 @@ pub struct PersonVerification { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonVerificationDocument { + /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. pub back: Option>, @@ -210,11 +212,13 @@ pub struct PersonVerificationDocument { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonAdditionalTosAcceptances { + pub account: PersonAdditionalTosAcceptance, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonAdditionalTosAcceptance { + /// The Unix timestamp marking when the legal guardian accepted the service agreement. pub date: Option, @@ -227,6 +231,7 @@ pub struct PersonAdditionalTosAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PersonFutureRequirements { + /// Fields that are due and can be satisfied by providing the corresponding alternative fields instead. pub alternatives: Option>, @@ -258,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, @@ -267,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, @@ -279,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. @@ -309,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>, @@ -422,6 +431,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedKeyedMatch, VerificationFailedNameMatch, VerificationFailedOther, + VerificationFailedRepresentativeAuthority, VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, @@ -514,6 +524,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedKeyedMatch => "verification_failed_keyed_match", AccountRequirementsErrorCode::VerificationFailedNameMatch => "verification_failed_name_match", AccountRequirementsErrorCode::VerificationFailedOther => "verification_failed_other", + AccountRequirementsErrorCode::VerificationFailedRepresentativeAuthority => "verification_failed_representative_authority", AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", diff --git a/src/resources/generated/placeholders.rs b/src/resources/generated/placeholders.rs index 0d00ead63..8f52365f5 100644 --- a/src/resources/generated/placeholders.rs +++ b/src/resources/generated/placeholders.rs @@ -1,582 +1,445 @@ -use serde::{Deserialize, Serialize}; - use crate::ids::*; use crate::params::Object; +use serde::{Deserialize, Serialize}; #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Account { - pub id: AccountId, + pub id: AccountId, } #[cfg(not(feature = "connect"))] impl Object for Account { - type Id = AccountId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "account" - } + type Id = AccountId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "account" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Application { - pub id: ApplicationId, + pub id: ApplicationId, } #[cfg(not(feature = "connect"))] impl Object for Application { - type Id = ApplicationId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "application" - } + type Id = ApplicationId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "application" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFee { - pub id: ApplicationFeeId, + pub id: ApplicationFeeId, } #[cfg(not(feature = "connect"))] impl Object for ApplicationFee { - type Id = ApplicationFeeId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "application_fee" - } + type Id = ApplicationFeeId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "application_fee" } } #[cfg(not(feature = "checkout"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutSession { - pub id: CheckoutSessionId, + pub id: CheckoutSessionId, } #[cfg(not(feature = "checkout"))] impl Object for CheckoutSession { - type Id = CheckoutSessionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "checkout_session" - } + type Id = CheckoutSessionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "checkout_session" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ConnectCollectionTransfer { - pub id: ConnectCollectionTransferId, + pub id: ConnectCollectionTransferId, } #[cfg(not(feature = "connect"))] impl Object for ConnectCollectionTransfer { - type Id = ConnectCollectionTransferId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "connect_collection_transfer" - } + type Id = ConnectCollectionTransferId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "connect_collection_transfer" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Coupon { - pub id: CouponId, + pub id: CouponId, } #[cfg(not(feature = "billing"))] impl Object for Coupon { - type Id = CouponId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "coupon" - } + type Id = CouponId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "coupon" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Discount { - pub id: DiscountId, + pub id: DiscountId, } #[cfg(not(feature = "billing"))] impl Object for Discount { - type Id = DiscountId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "discount" - } + type Id = DiscountId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "discount" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ApplicationFeeRefund { - pub id: ApplicationFeeRefundId, + pub id: ApplicationFeeRefundId, } #[cfg(not(feature = "connect"))] impl Object for ApplicationFeeRefund { - type Id = ApplicationFeeRefundId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "fee_refund" - } + type Id = ApplicationFeeRefundId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "fee_refund" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Invoice { - pub id: InvoiceId, + pub id: InvoiceId, } #[cfg(not(feature = "billing"))] impl Object for Invoice { - type Id = InvoiceId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "invoice" - } + type Id = InvoiceId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "invoice" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceItem { - pub id: InvoiceItemId, + pub id: InvoiceItemId, } #[cfg(not(feature = "billing"))] impl Object for InvoiceItem { - type Id = InvoiceItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "invoiceitem" - } + type Id = InvoiceItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "invoiceitem" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingAuthorization { - pub id: IssuingAuthorizationId, + pub id: IssuingAuthorizationId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingAuthorization { - type Id = IssuingAuthorizationId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.authorization" - } + type Id = IssuingAuthorizationId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.authorization" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCard { - pub id: IssuingCardId, + pub id: IssuingCardId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingCard { - type Id = IssuingCardId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.card" - } + type Id = IssuingCardId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.card" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholder { - pub id: IssuingCardholderId, + pub id: IssuingCardholderId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingCardholder { - type Id = IssuingCardholderId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.cardholder" - } + type Id = IssuingCardholderId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.cardholder" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingDispute { - pub id: IssuingDisputeId, + pub id: IssuingDisputeId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingDispute { - type Id = IssuingDisputeId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.dispute" - } + type Id = IssuingDisputeId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.dispute" } } #[cfg(not(feature = "issuing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingTransaction { - pub id: IssuingTransactionId, + pub id: IssuingTransactionId, } #[cfg(not(feature = "issuing"))] impl Object for IssuingTransaction { - type Id = IssuingTransactionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "issuing.transaction" - } + type Id = IssuingTransactionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "issuing.transaction" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceLineItem { - pub id: InvoiceLineItemId, + pub id: InvoiceLineItemId, } #[cfg(not(feature = "billing"))] impl Object for InvoiceLineItem { - type Id = InvoiceLineItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "line_item" - } + type Id = InvoiceLineItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "line_item" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Order { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for Order { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OrderItem { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for OrderItem { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order_item" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order_item" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct OrderReturn { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for OrderReturn { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "order_return" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "order_return" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Person { - pub id: PersonId, + pub id: PersonId, } #[cfg(not(feature = "connect"))] impl Object for Person { - type Id = PersonId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "person" - } + type Id = PersonId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "person" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Plan { - pub id: PlanId, + pub id: PlanId, } #[cfg(not(feature = "billing"))] impl Object for Plan { - type Id = PlanId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "plan" - } + type Id = PlanId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "plan" } } #[cfg(not(feature = "fraud"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Review { - pub id: ReviewId, + pub id: ReviewId, } #[cfg(not(feature = "fraud"))] impl Object for Review { - type Id = ReviewId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "review" - } + type Id = ReviewId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "review" } } #[cfg(not(feature = "sigma"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ScheduledQueryRun { - pub id: ScheduledQueryRunId, + pub id: ScheduledQueryRunId, } #[cfg(not(feature = "sigma"))] impl Object for ScheduledQueryRun { - type Id = ScheduledQueryRunId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "scheduled_query_run" - } + type Id = ScheduledQueryRunId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "scheduled_query_run" } } #[cfg(not(feature = "orders"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Sku { - pub id: (), + pub id: (), } #[cfg(not(feature = "orders"))] impl Object for Sku { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "sku" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "sku" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Subscription { - pub id: SubscriptionId, + pub id: SubscriptionId, } #[cfg(not(feature = "billing"))] impl Object for Subscription { - type Id = SubscriptionId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription" - } + type Id = SubscriptionId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItem { - pub id: SubscriptionItemId, + pub id: SubscriptionItemId, } #[cfg(not(feature = "billing"))] impl Object for SubscriptionItem { - type Id = SubscriptionItemId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription_item" - } + type Id = SubscriptionItemId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription_item" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionSchedule { - pub id: SubscriptionScheduleId, + pub id: SubscriptionScheduleId, } #[cfg(not(feature = "billing"))] impl Object for SubscriptionSchedule { - type Id = SubscriptionScheduleId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "subscription_schedule" - } + type Id = SubscriptionScheduleId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "subscription_schedule" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleRevision { - pub id: (), + pub id: (), } #[cfg(not(feature = "billing"))] impl Object for SubscriptionScheduleRevision { - type Id = (); - fn id(&self) -> Self::Id { - self.id - } - fn object(&self) -> &'static str { - "subscription_schedule_revision" - } + type Id = (); + fn id(&self) -> Self::Id { self.id } + fn object(&self) -> &'static str { "subscription_schedule_revision" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxId { - pub id: TaxIdId, + pub id: TaxIdId, } #[cfg(not(feature = "billing"))] impl Object for TaxId { - type Id = TaxIdId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "tax_id" - } + type Id = TaxIdId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "tax_id" } } #[cfg(not(feature = "billing"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxRate { - pub id: TaxRateId, + pub id: TaxRateId, } #[cfg(not(feature = "billing"))] impl Object for TaxRate { - type Id = TaxRateId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "tax_rate" - } + type Id = TaxRateId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "tax_rate" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Topup { - pub id: TopupId, + pub id: TopupId, } #[cfg(not(feature = "connect"))] impl Object for Topup { - type Id = TopupId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "topup" - } + type Id = TopupId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "topup" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Transfer { - pub id: TransferId, + pub id: TransferId, } #[cfg(not(feature = "connect"))] impl Object for Transfer { - type Id = TransferId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "transfer" - } + type Id = TransferId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "transfer" } } #[cfg(not(feature = "connect"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransferReversal { - pub id: TransferReversalId, + pub id: TransferReversalId, } #[cfg(not(feature = "connect"))] impl Object for TransferReversal { - type Id = TransferReversalId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "transfer_reversal" - } + type Id = TransferReversalId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "transfer_reversal" } } #[cfg(not(feature = "webhook-endpoints"))] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct WebhookEndpoint { - pub id: WebhookEndpointId, + pub id: WebhookEndpointId, } #[cfg(not(feature = "webhook-endpoints"))] impl Object for WebhookEndpoint { - type Id = WebhookEndpointId; - fn id(&self) -> Self::Id { - self.id.clone() - } - fn object(&self) -> &'static str { - "webhook_endpoint" - } + type Id = WebhookEndpointId; + fn id(&self) -> Self::Id { self.id.clone() } + fn object(&self) -> &'static str { "webhook_endpoint" } } diff --git a/src/resources/generated/plan.rs b/src/resources/generated/plan.rs index 495df6630..da5d30b70 100644 --- a/src/resources/generated/plan.rs +++ b/src/resources/generated/plan.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PlanId; -use crate::params::{ - Deleted, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::ids::{PlanId}; +use crate::params::{Deleted, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{CreateProduct, Currency, Product}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Plan". /// @@ -89,6 +85,10 @@ pub struct Plan { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// The meter tracking the usage of a metered price. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// A brief description of the plan, hidden from customers. #[serde(skip_serializing_if = "Option::is_none")] pub nickname: Option, @@ -132,10 +132,12 @@ pub struct Plan { } impl Plan { + /// Returns a list of your plans. - pub fn list(client: &Client, params: &ListPlans<'_>) -> Response> { - client.get_query("/plans", ¶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 +172,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 +191,7 @@ pub struct PlanTier { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformUsage { + /// Divide usage by this number. pub divide_by: i64, @@ -198,6 +202,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 +258,12 @@ impl<'a> ListPlans<'a> { impl Paginable for ListPlans<'_> { type O = Plan; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Plan::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePlan<'a> { + /// Whether the plan is currently available for new subscriptions. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, diff --git a/src/resources/generated/platform_tax_fee.rs b/src/resources/generated/platform_tax_fee.rs index 816bc53cb..fb759da70 100644 --- a/src/resources/generated/platform_tax_fee.rs +++ b/src/resources/generated/platform_tax_fee.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== +use crate::ids::{PlatformTaxFeeId}; +use crate::params::{Object}; use serde::{Deserialize, Serialize}; -use crate::ids::PlatformTaxFeeId; -use crate::params::Object; - /// The resource representing a Stripe "PlatformTax". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PlatformTaxFee { diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index eef046fe2..fd6b1232f 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::PriceId; -use crate::params::{ - CurrencyMap, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::ids::{PriceId}; +use crate::params::{CurrencyMap, Expand, Expandable, IdOrCreate, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{CreateProduct, Currency, CustomUnitAmount, Product, UpTo}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Price". /// @@ -133,12 +129,14 @@ pub struct Price { } impl Price { + /// Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). /// /// For the list of inactive prices, set `active` to false. - pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { - client.get_query("/prices", ¶ms) - } +pub fn list(client: &Client, params: &ListPrices<'_>) -> Response> { + client.get_query("/prices", ¶ms) +} + /// Creates a new price for an existing product. /// @@ -172,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, @@ -202,6 +201,7 @@ pub struct CurrencyOption { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PriceTier { + /// Price for the entire tier. pub flat_amount: Option, @@ -220,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`. /// /// Defaults to `sum`. @@ -235,6 +236,10 @@ pub struct Recurring { /// For example, `interval=month` and `interval_count=3` bills every 3 months. pub interval_count: u64, + /// The meter tracking the usage of a metered price. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). pub trial_period_days: Option, @@ -249,6 +254,7 @@ pub struct Recurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -259,6 +265,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`. @@ -395,6 +402,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, @@ -471,12 +479,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`. @@ -541,6 +549,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, @@ -573,6 +582,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, @@ -593,6 +603,7 @@ pub struct CreatePriceCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceProductData { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -638,6 +649,7 @@ pub struct CreatePriceProductData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceRecurring { + /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. /// /// Defaults to `sum`. @@ -656,6 +668,10 @@ pub struct CreatePriceRecurring { #[serde(skip_serializing_if = "Option::is_none")] pub interval_count: Option, + /// The meter tracking the usage of a metered price. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). #[serde(skip_serializing_if = "Option::is_none")] pub trial_period_days: Option, @@ -672,6 +688,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 +718,7 @@ pub struct CreatePriceTiers { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceTransformQuantity { + /// Divide usage by this number. pub divide_by: i64, @@ -710,12 +728,17 @@ pub struct CreatePriceTransformQuantity { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListPricesRecurring { + /// Filter by billing frequency. /// /// Either `day`, `week`, `month` or `year`. #[serde(skip_serializing_if = "Option::is_none")] pub interval: Option, + /// Filter by the price's meter. + #[serde(skip_serializing_if = "Option::is_none")] + pub meter: Option, + /// Filter by the usage type for this price. /// /// Can be either `metered` or `licensed`. @@ -725,6 +748,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 +781,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 +802,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 +832,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 +853,7 @@ pub struct UpdatePriceCurrencyOptionsCustomUnitAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePriceCurrencyOptionsTiers { + /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] pub flat_amount: Option, diff --git a/src/resources/generated/product.rs b/src/resources/generated/product.rs index 49a6f6e14..c82ef8dca 100644 --- a/src/resources/generated/product.rs +++ b/src/resources/generated/product.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ProductId, TaxCodeId}; -use crate::params::{ - CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, - Timestamp, -}; +use crate::params::{CurrencyMap, Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Currency, Price, TaxCode, UpTo}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Product". /// @@ -44,11 +40,11 @@ pub struct Product { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - /// A list of up to 15 features for this product. + /// A list of up to 15 marketing features for this product. /// /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option>, + pub features: Option>, /// A list of up to 8 URLs of images for this product, meant to be displayable to the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -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, @@ -172,8 +171,9 @@ pub struct PackageDimensions { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ProductFeature { - /// The feature's name. +pub struct ProductMarketingFeature { + + /// The marketing feature name. /// /// Up to 80 characters long. #[serde(skip_serializing_if = "Option::is_none")] @@ -183,6 +183,7 @@ pub struct ProductFeature { /// The parameters for `Product::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateProduct<'a> { + /// Whether the product is currently available for purchase. /// /// Defaults to `true`. @@ -205,7 +206,7 @@ pub struct CreateProduct<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A list of up to 15 features for this product. + /// A list of up to 15 marketing features for this product. /// /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). #[serde(skip_serializing_if = "Option::is_none")] @@ -298,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, @@ -369,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, @@ -393,7 +395,7 @@ pub struct UpdateProduct<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], - /// A list of up to 15 features for this product. + /// A list of up to 15 marketing features for this product. /// /// These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). #[serde(skip_serializing_if = "Option::is_none")] @@ -471,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). @@ -509,7 +512,8 @@ pub struct CreateProductDefaultPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductFeatures { - /// The feature's name. + + /// The marketing feature name. /// /// Up to 80 characters long. pub name: String, @@ -517,7 +521,8 @@ pub struct CreateProductFeatures { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateProductFeatures { - /// The feature's name. + + /// The marketing feature name. /// /// Up to 80 characters long. pub name: String, @@ -525,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, @@ -557,6 +563,7 @@ pub struct CreateProductDefaultPriceDataCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateProductDefaultPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -572,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, @@ -592,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/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/quote.rs b/src/resources/generated/quote.rs index a7b3beac3..0e69c2163 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -2,16 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, QuoteId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Timestamp}; -use crate::resources::{ - Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, - Discount, Invoice, QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, - TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency, Customer, Discount, Invoice, QuotesResourceTotalDetails, Subscription, SubscriptionSchedule, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Quote". /// @@ -144,10 +139,12 @@ pub struct Quote { } impl Quote { + /// Returns a list of your quotes. - pub fn list(client: &Client, params: &ListQuotes<'_>) -> Response> { - client.get_query("/quotes", ¶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 +164,7 @@ impl Object for Quote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingQuoteSetting { + /// Number of days within which a customer must pay invoices generated by this quote. /// /// This value will be `null` for quotes where `collection_method=charge_automatically`. @@ -177,6 +175,7 @@ pub struct InvoiceSettingQuoteSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceAutomaticTax { + /// Automatically calculate taxes. pub enabled: bool, @@ -192,6 +191,7 @@ pub struct QuotesResourceAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceComputed { + /// The definitive totals and line items the customer will be charged on a recurring basis. /// /// Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. @@ -203,6 +203,7 @@ pub struct QuotesResourceComputed { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceFromQuote { + /// Whether this quote is a revision of a different quote. pub is_revision: bool, @@ -212,6 +213,7 @@ pub struct QuotesResourceFromQuote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceRecurring { + /// Total before any discounts or taxes are applied. pub amount_subtotal: i64, @@ -233,6 +235,7 @@ pub struct QuotesResourceRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceStatusTransitions { + /// The time that the quote was accepted. /// /// Measured in seconds since Unix epoch. @@ -251,6 +254,7 @@ pub struct QuotesResourceStatusTransitions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceSubscriptionDataSubscriptionData { + /// The subscription's description, meant to be displayable to the customer. /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. @@ -276,6 +280,7 @@ pub struct QuotesResourceSubscriptionDataSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTransferData { + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. @@ -293,6 +298,7 @@ pub struct QuotesResourceTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceUpfront { + /// Total before any discounts or taxes are applied. pub amount_subtotal: i64, @@ -311,6 +317,7 @@ pub struct QuotesResourceUpfront { /// The parameters for `Quote::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListQuotes<'a> { + /// The ID of the customer whose quotes will be retrieved. #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option, @@ -366,9 +373,8 @@ impl<'a> ListQuotes<'a> { impl Paginable for ListQuotes<'_> { type O = Quote; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `Quote`'s `collection_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/quotes_resource_total_details.rs b/src/resources/generated/quotes_resource_total_details.rs index 94bf3821b..ac0b73415 100644 --- a/src/resources/generated/quotes_resource_total_details.rs +++ b/src/resources/generated/quotes_resource_total_details.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::resources::{Discount, TaxRate}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "QuotesResourceTotalDetails". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTotalDetails { + /// This is the sum of all the discounts. pub amount_discount: i64, @@ -24,6 +24,7 @@ pub struct QuotesResourceTotalDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTotalDetailsResourceBreakdown { + /// The aggregated discounts. pub discounts: Vec, @@ -33,6 +34,7 @@ pub struct QuotesResourceTotalDetailsResourceBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsDiscountAmount { + /// The amount discounted. pub amount: i64, @@ -41,6 +43,7 @@ pub struct LineItemsDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct LineItemsTaxAmount { + /// Amount of tax applied for this rate. pub amount: i64, diff --git a/src/resources/generated/radar_radar_options.rs b/src/resources/generated/radar_radar_options.rs index fe16e861e..195f268b1 100644 --- a/src/resources/generated/radar_radar_options.rs +++ b/src/resources/generated/radar_radar_options.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "RadarRadarOptions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RadarRadarOptions { + /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] pub session: Option, diff --git a/src/resources/generated/refund.rs b/src/resources/generated/refund.rs index eec7f5897..24152e9ac 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ChargeId, CustomerId, PaymentIntentId, RefundId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{BalanceTransaction, Charge, Currency, PaymentIntent, TransferReversal}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Refund". /// @@ -94,12 +93,14 @@ pub struct Refund { } impl Refund { + /// Returns a list of all refunds you created. /// /// We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. - pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { - client.get_query("/refunds", ¶ms) - } +pub fn list(client: &Client, params: &ListRefunds<'_>) -> Response> { + client.get_query("/refunds", ¶ms) +} + /// When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. /// @@ -141,6 +142,7 @@ impl Object for Refund { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetails { + #[serde(skip_serializing_if = "Option::is_none")] pub affirm: Option, @@ -234,10 +236,12 @@ pub struct RefundDestinationDetails { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct DestinationDetailsUnimplemented {} +pub struct DestinationDetailsUnimplemented { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetailsCard { + /// Value of the reference number assigned to the refund. #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option, @@ -261,6 +265,7 @@ pub struct RefundDestinationDetailsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundDestinationDetailsGeneric { + /// The reference assigned to the refund. pub reference: Option, @@ -272,6 +277,7 @@ pub struct RefundDestinationDetailsGeneric { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { + /// Contains the refund details. pub display_details: Option, @@ -282,6 +288,7 @@ pub struct RefundNextAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextActionDisplayDetails { + pub email_sent: EmailSent, /// The expiry timestamp. @@ -290,6 +297,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, @@ -300,6 +308,7 @@ pub struct EmailSent { /// The parameters for `Refund::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateRefund<'a> { + #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -385,10 +394,12 @@ impl<'a> CreateRefund<'a> { /// The parameters for `Refund::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListRefunds<'a> { + /// Only return refunds for the charge specified by this charge ID. #[serde(skip_serializing_if = "Option::is_none")] pub charge: Option, + /// Only return refunds that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -437,12 +448,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], @@ -458,7 +469,10 @@ pub struct UpdateRefund<'a> { impl<'a> UpdateRefund<'a> { pub fn new() -> Self { - UpdateRefund { expand: Default::default(), metadata: Default::default() } + UpdateRefund { + expand: Default::default(), + metadata: Default::default(), + } } } diff --git a/src/resources/generated/reserve_transaction.rs b/src/resources/generated/reserve_transaction.rs index 6b7b7da93..266855037 100644 --- a/src/resources/generated/reserve_transaction.rs +++ b/src/resources/generated/reserve_transaction.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== +use crate::ids::{ReserveTransactionId}; +use crate::params::{Object}; +use crate::resources::{Currency}; use serde::{Deserialize, Serialize}; -use crate::ids::ReserveTransactionId; -use crate::params::Object; -use crate::resources::Currency; - /// The resource representing a Stripe "ReserveTransaction". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ReserveTransaction { diff --git a/src/resources/generated/review.rs b/src/resources/generated/review.rs index 3cb8a20f3..edd6ba85e 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,8 @@ pub struct RadarReviewResourceSession { /// The parameters for `Review::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListReviews<'a> { + + /// Only return reviews that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -167,9 +172,8 @@ impl<'a> ListReviews<'a> { impl Paginable for ListReviews<'_> { type O = Review; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `Review`'s `closed_reason` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/scheduled_query_run.rs b/src/resources/generated/scheduled_query_run.rs index 0391e91d6..1d96d9a45 100644 --- a/src/resources/generated/scheduled_query_run.rs +++ b/src/resources/generated/scheduled_query_run.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::ScheduledQueryRunId; +use crate::ids::{ScheduledQueryRunId}; use crate::params::{Object, Timestamp}; -use crate::resources::File; +use crate::resources::{File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ScheduledQueryRun". /// @@ -58,6 +57,7 @@ impl Object for ScheduledQueryRun { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SigmaScheduledQueryRunError { + /// Information about the run failure. pub message: String, } diff --git a/src/resources/generated/setup_attempt.rs b/src/resources/generated/setup_attempt.rs index 3a920a65d..07708f44d 100644 --- a/src/resources/generated/setup_attempt.rs +++ b/src/resources/generated/setup_attempt.rs @@ -2,15 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{SetupAttemptId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, - PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, SetupIntent, -}; +use crate::resources::{Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, SetupIntent}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "PaymentFlowsSetupIntentSetupAttempt". /// @@ -72,10 +68,12 @@ pub struct SetupAttempt { } impl SetupAttempt { + /// Returns a list of SetupAttempts that associate with a provided SetupIntent. - pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { - client.get_query("/setup_attempts", ¶ms) - } +pub fn list(client: &Client, params: &ListSetupAttempts<'_>) -> Response> { + client.get_query("/setup_attempts", ¶ms) +} + } impl Object for SetupAttempt { @@ -90,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, @@ -144,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, @@ -184,10 +187,12 @@ pub struct SetupAttemptPaymentMethodDetailsBancontact { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBoleto {} +pub struct SetupAttemptPaymentMethodDetailsBoleto { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCard { + /// Card brand. /// /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -254,6 +259,7 @@ pub struct SetupAttemptPaymentMethodDetailsCard { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardChecks { + /// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. pub address_line1_check: Option, @@ -266,12 +272,14 @@ pub struct SetupAttemptPaymentMethodDetailsCardChecks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardPresent { + /// The ID of the Card PaymentMethod which was generated by this SetupAttempt. pub generated_card: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsCardWallet { + #[serde(skip_serializing_if = "Option::is_none")] pub apple_pay: Option, @@ -287,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`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. @@ -316,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, @@ -359,10 +374,12 @@ pub struct SetupAttemptPaymentMethodDetailsSofort { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsUsBankAccount {} +pub struct SetupAttemptPaymentMethodDetailsUsBankAccount { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ThreeDSecureDetails { + /// For authenticated transactions: how the customer was authenticated by /// the issuing bank. pub authentication_flow: Option, @@ -390,6 +407,7 @@ pub struct ThreeDSecureDetails { /// The parameters for `SetupAttempt::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSetupAttempts<'a> { + /// A filter on the list, based on the object `created` field. /// /// The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. @@ -440,9 +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")] diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index 1decdd8e6..badbdcf5a 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -2,17 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::{CustomerId, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId}; +use crate::ids::{ConfirmationTokenId, CustomerId, PaymentMethodConfigurationId, PaymentMethodId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, - Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, - PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt, -}; +use crate::resources::{Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SetupIntent". /// @@ -98,8 +92,7 @@ pub struct SetupIntent { pub payment_method: Option>, /// Information about the payment method configuration used for this Setup Intent. - pub payment_method_configuration_details: - Option, + pub payment_method_configuration_details: Option, /// Payment method-specific configuration for this SetupIntent. pub payment_method_options: Option, @@ -125,10 +118,12 @@ pub struct SetupIntent { } impl SetupIntent { + /// Returns a list of SetupIntents. - pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { - client.get_query("/setup_intents", ¶ms) - } +pub fn list(client: &Client, params: &ListSetupIntents<'_>) -> Response> { + client.get_query("/setup_intents", ¶ms) +} + /// Creates a SetupIntent object. /// @@ -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, @@ -276,12 +273,13 @@ pub struct SetupIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. pub amount: i64, @@ -328,18 +326,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, @@ -354,16 +353,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. @@ -372,15 +370,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, @@ -395,6 +396,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. @@ -414,6 +416,12 @@ pub struct CreateSetupIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub confirm: Option, + /// ID of the ConfirmationToken used to confirm this SetupIntent. + /// + /// If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + #[serde(skip_serializing_if = "Option::is_none")] + pub confirmation_token: Option, + /// ID of the Customer this SetupIntent belongs to, if one exists. /// /// If present, the SetupIntent's payment method will be attached to the Customer on successful setup. @@ -504,6 +512,7 @@ impl<'a> CreateSetupIntent<'a> { attach_to_self: Default::default(), automatic_payment_methods: Default::default(), confirm: Default::default(), + confirmation_token: Default::default(), customer: Default::default(), description: Default::default(), expand: Default::default(), @@ -526,6 +535,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. @@ -590,12 +600,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. @@ -683,6 +693,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 +708,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, @@ -795,6 +808,10 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -863,6 +880,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, @@ -890,6 +908,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). @@ -905,6 +924,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, @@ -997,6 +1017,10 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, + /// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobilepay: Option, + /// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -1065,6 +1089,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, @@ -1092,6 +1117,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, @@ -1113,6 +1139,7 @@ pub struct CreateSetupIntentMandateDataCustomerAcceptance { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1124,16 +1151,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, @@ -1143,6 +1174,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, @@ -1155,10 +1187,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, @@ -1177,22 +1211,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, @@ -1200,6 +1239,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, @@ -1209,87 +1249,109 @@ pub struct CreateSetupIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataGiropay {} +pub struct CreateSetupIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataGrabpay {} +pub struct CreateSetupIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataInteracPresent {} +pub struct CreateSetupIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataKonbini {} +pub struct CreateSetupIntentPaymentMethodDataKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataLink {} +pub struct CreateSetupIntentPaymentMethodDataMobilepay { +} #[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 {} +pub struct CreateSetupIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: CreateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodDataSwish {} +pub struct CreateSetupIntentPaymentMethodDataSwish { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataUsBankAccount { + /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] - pub account_holder_type: - Option, + pub account_holder_type: Option, /// Account number of the bank account. #[serde(skip_serializing_if = "Option::is_none")] @@ -1311,13 +1373,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). @@ -1330,12 +1395,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1358,10 +1423,9 @@ pub struct CreateSetupIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. @@ -1371,6 +1435,7 @@ pub struct CreateSetupIntentPaymentMethodOptionsCard { #[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, @@ -1378,6 +1443,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. @@ -1387,6 +1453,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, @@ -1394,10 +1461,10 @@ pub struct CreateSetupIntentPaymentMethodOptionsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -1409,12 +1476,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataAcssDebit { + /// Customer's bank account number. pub account_number: String, @@ -1426,16 +1493,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, @@ -1445,6 +1516,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, @@ -1457,10 +1529,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, @@ -1479,22 +1553,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, @@ -1502,6 +1581,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, @@ -1511,87 +1591,109 @@ pub struct UpdateSetupIntentPaymentMethodDataFpx { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGiropay {} +pub struct UpdateSetupIntentPaymentMethodDataGiropay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataGrabpay {} +pub struct UpdateSetupIntentPaymentMethodDataGrabpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataIdeal { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataInteracPresent {} +pub struct UpdateSetupIntentPaymentMethodDataInteracPresent { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarna { + /// Customer's date of birth. #[serde(skip_serializing_if = "Option::is_none")] pub dob: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataKonbini {} +pub struct UpdateSetupIntentPaymentMethodDataKonbini { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataLink {} +pub struct UpdateSetupIntentPaymentMethodDataLink { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataOxxo {} +pub struct UpdateSetupIntentPaymentMethodDataMobilepay { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataOxxo { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataP24 { + /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] pub bank: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPaynow {} +pub struct UpdateSetupIntentPaymentMethodDataPaynow { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPaypal {} +pub struct UpdateSetupIntentPaymentMethodDataPaypal { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPix {} +pub struct UpdateSetupIntentPaymentMethodDataPix { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataPromptpay {} +pub struct UpdateSetupIntentPaymentMethodDataPromptpay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataRadarOptions { + /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] pub session: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataRevolutPay {} +pub struct UpdateSetupIntentPaymentMethodDataRevolutPay { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSepaDebit { + /// IBAN of the bank account. pub iban: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataSofort { + /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdateSetupIntentPaymentMethodDataSofortCountry, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodDataSwish {} +pub struct UpdateSetupIntentPaymentMethodDataSwish { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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")] @@ -1613,13 +1715,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). @@ -1632,12 +1737,12 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCard { + /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -1660,10 +1765,9 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCard { /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. /// If not provided, this value defaults to `automatic`. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. @@ -1673,6 +1777,7 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCard { #[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, @@ -1680,6 +1785,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. @@ -1689,6 +1795,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, @@ -1696,10 +1803,10 @@ pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: - Option, + pub financial_connections: Option, /// Additional fields for Mandate creation. #[serde(skip_serializing_if = "Option::is_none")] @@ -1711,15 +1818,16 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: - Option, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentMandateDataCustomerAcceptanceOffline {} +pub struct CreateSetupIntentMandateDataCustomerAcceptanceOffline { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentMandateDataCustomerAcceptanceOnline { + /// The IP address from which the Mandate was accepted by the customer. pub ip_address: String, @@ -1729,6 +1837,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, @@ -1756,6 +1865,7 @@ pub struct CreateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1768,6 +1878,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. @@ -1776,8 +1887,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. /// @@ -1787,17 +1897,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, @@ -1849,16 +1958,15 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -1870,16 +1978,14 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure /// provider and indicates what degree of authentication was performed. #[serde(skip_serializing_if = "Option::is_none")] - pub electronic_commerce_indicator: - Option, + pub electronic_commerce_indicator: Option, /// Network specific 3DS fields. /// /// Network specific arguments require an explicit card brand choice. /// The parameter `payment_method_options.card.network`` must be populated accordingly. #[serde(skip_serializing_if = "Option::is_none")] - pub network_options: - Option, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -1900,23 +2006,22 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct CreateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: - Option>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -1927,14 +2032,15 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] pub requested: Option>, @@ -1942,6 +2048,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, @@ -1969,6 +2076,7 @@ pub struct UpdateSetupIntentPaymentMethodDataBillingDetailsAddress { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataKlarnaDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -1981,6 +2089,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. @@ -1989,8 +2098,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. /// @@ -2000,17 +2108,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, @@ -2062,16 +2169,15 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions { /// /// Possible values are `india`. #[serde(skip_serializing_if = "Option::is_none")] - pub supported_types: - Option>, + pub supported_types: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { + /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] - pub ares_trans_status: - Option, + pub ares_trans_status: Option, /// The cryptogram, also known as the "authentication value" (AAV, CAVV or /// AEVV). @@ -2083,16 +2189,14 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { /// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure /// provider and indicates what degree of authentication was performed. #[serde(skip_serializing_if = "Option::is_none")] - pub electronic_commerce_indicator: - Option, + pub electronic_commerce_indicator: Option, /// Network specific 3DS fields. /// /// Network specific arguments require an explicit card brand choice. /// The parameter `payment_method_options.card.network`` must be populated accordingly. #[serde(skip_serializing_if = "Option::is_none")] - pub network_options: - Option, + pub network_options: Option, /// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the /// AReq sent to the card Issuer's ACS. @@ -2113,23 +2217,22 @@ pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions {} +pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebitMandateOptions { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections { + /// The list of permissions to request. /// /// If this parameter is passed, the `payment_method` permission must be included. /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] - pub permissions: Option< - Vec, - >, + pub permissions: Option>, /// List of data features that you would like to retrieve upon account creation. #[serde(skip_serializing_if = "Option::is_none")] - pub prefetch: - Option>, + pub prefetch: Option>, /// For webview integrations only. /// @@ -2140,14 +2243,15 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { + /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] - pub collection_method: - Option, + pub collection_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { + /// Triggers validations to run across the selected networks. #[serde(skip_serializing_if = "Option::is_none")] pub requested: Option>, @@ -2155,28 +2259,28 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: - Option, + pub cartes_bancaires: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions { + /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] - pub cartes_bancaires: - Option, + pub cartes_bancaires: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. /// /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. - pub cb_avalgo: - CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + pub cb_avalgo: CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, /// The exemption indicator returned from Cartes Bancaires in the ARes. /// message extension: CB-EXEMPTION; string (4 characters) @@ -2193,12 +2297,12 @@ pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCa #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires { + /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. /// /// Also known as `cavvAlgorithm`. messageExtension: CB-AVALGO. - pub cb_avalgo: - UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, + pub cb_avalgo: UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo, /// The exemption indicator returned from Cartes Bancaires in the ARes. /// message extension: CB-EXEMPTION; string (4 characters) @@ -2352,55 +2456,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", @@ -2643,9 +2721,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", @@ -2656,9 +2732,7 @@ impl CreateSetupIntentPaymentMethodDataP24Bank { CreateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", CreateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", CreateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", - CreateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + CreateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", CreateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", CreateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank", CreateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -2754,6 +2828,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -2791,6 +2866,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::Klarna => "klarna", CreateSetupIntentPaymentMethodDataType::Konbini => "konbini", CreateSetupIntentPaymentMethodDataType::Link => "link", + CreateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", CreateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", CreateSetupIntentPaymentMethodDataType::P24 => "p24", CreateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -2837,9 +2913,7 @@ impl CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + CreateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -2923,9 +2997,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 } @@ -2956,16 +3028,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 } @@ -2994,16 +3062,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 } @@ -3021,13 +3085,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", } } } @@ -3149,9 +3209,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 } @@ -3290,9 +3348,7 @@ impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecure self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -3326,24 +3382,18 @@ impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndi } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -3352,8 +3402,7 @@ impl std::default::Default /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -3381,24 +3430,18 @@ impl CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBa } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -3464,24 +3507,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 } @@ -3510,16 +3547,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 } @@ -3540,24 +3573,18 @@ impl CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionM } } -impl AsRef - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -3575,9 +3602,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", } } } @@ -3611,15 +3636,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", } } } @@ -3635,9 +3654,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 } @@ -3759,9 +3776,7 @@ impl SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType { pub fn as_str(self) -> &'static str { match self { SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::Amounts => "amounts", - SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => { - "descriptor_code" - } + SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType::DescriptorCode => "descriptor_code", } } } @@ -3797,9 +3812,7 @@ impl SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod { match self { SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic", SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant", - SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => { - "microdeposits" - } + SetupIntentPaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => "microdeposits", } } } @@ -4027,9 +4040,7 @@ impl SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor { pub fn as_str(self) -> &'static str { match self { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Invoice => "invoice", - SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => { - "subscription" - } + SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitDefaultFor::Subscription => "subscription", } } } @@ -4063,15 +4074,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", } } } @@ -4087,9 +4092,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 } @@ -4106,12 +4109,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", } } } @@ -4127,9 +4126,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 } @@ -4147,13 +4144,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", } } } @@ -4288,55 +4281,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", @@ -4579,9 +4546,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", @@ -4592,9 +4557,7 @@ impl UpdateSetupIntentPaymentMethodDataP24Bank { UpdateSetupIntentPaymentMethodDataP24Bank::PbacZIpko => "pbac_z_ipko", UpdateSetupIntentPaymentMethodDataP24Bank::PlusBank => "plus_bank", UpdateSetupIntentPaymentMethodDataP24Bank::SantanderPrzelew24 => "santander_przelew24", - UpdateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => { - "tmobile_usbugi_bankowe" - } + UpdateSetupIntentPaymentMethodDataP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe", UpdateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank", UpdateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank", UpdateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank", @@ -4690,6 +4653,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { Klarna, Konbini, Link, + Mobilepay, Oxxo, P24, Paynow, @@ -4727,6 +4691,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::Klarna => "klarna", UpdateSetupIntentPaymentMethodDataType::Konbini => "konbini", UpdateSetupIntentPaymentMethodDataType::Link => "link", + UpdateSetupIntentPaymentMethodDataType::Mobilepay => "mobilepay", UpdateSetupIntentPaymentMethodDataType::Oxxo => "oxxo", UpdateSetupIntentPaymentMethodDataType::P24 => "p24", UpdateSetupIntentPaymentMethodDataType::Paynow => "paynow", @@ -4773,9 +4738,7 @@ impl UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Company => "company", - UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => { - "individual" - } + UpdateSetupIntentPaymentMethodDataUsBankAccountAccountHolderType::Individual => "individual", } } } @@ -4859,9 +4822,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 } @@ -4892,16 +4853,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 } @@ -4930,16 +4887,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 } @@ -4957,13 +4910,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", } } } @@ -5085,9 +5034,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 } @@ -5226,9 +5173,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureAresTransStatus { fn default() -> Self { Self::A } @@ -5262,24 +5207,18 @@ impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndi } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureElectronicCommerceIndicator { fn default() -> Self { Self::V01 } @@ -5288,8 +5227,7 @@ impl std::default::Default /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires`'s `cb_avalgo` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +pub enum UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { #[serde(rename = "0")] V0, #[serde(rename = "1")] @@ -5317,24 +5255,18 @@ impl UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBa } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesCbAvalgo { fn default() -> Self { Self::V0 } @@ -5400,24 +5332,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 } @@ -5446,16 +5372,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 } @@ -5476,24 +5398,18 @@ impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionM } } -impl AsRef - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn as_ref(&self) -> &str { self.as_str() } } -impl std::fmt::Display - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { fn default() -> Self { Self::Paper } @@ -5511,9 +5427,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", } } } @@ -5547,15 +5461,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", } } } @@ -5571,9 +5479,7 @@ impl std::fmt::Display for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVer self.as_str().fmt(f) } } -impl std::default::Default - for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod -{ +impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccountVerificationMethod { fn default() -> Self { Self::Automatic } diff --git a/src/resources/generated/shipping.rs b/src/resources/generated/shipping.rs index 37ec84939..a187e146f 100644 --- a/src/resources/generated/shipping.rs +++ b/src/resources/generated/shipping.rs @@ -2,13 +2,13 @@ // This file was automatically generated. // ====================================== +use crate::resources::{Address}; use serde::{Deserialize, Serialize}; -use crate::resources::Address; - /// The resource representing a Stripe "Shipping". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Shipping { + #[serde(skip_serializing_if = "Option::is_none")] pub address: Option
, diff --git a/src/resources/generated/shipping_rate.rs b/src/resources/generated/shipping_rate.rs index 62ead279e..ab9f6fd82 100644 --- a/src/resources/generated/shipping_rate.rs +++ b/src/resources/generated/shipping_rate.rs @@ -2,14 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{ShippingRateId, TaxCodeId}; -use crate::params::{ - CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; +use crate::params::{CurrencyMap, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{Currency, TaxCode}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ShippingRate". /// @@ -68,10 +65,12 @@ pub struct ShippingRate { } impl ShippingRate { + /// Returns a list of your shipping rates. - pub fn list(client: &Client, params: &ListShippingRates<'_>) -> Response> { - client.get_query("/shipping_rates", ¶ms) - } +pub fn list(client: &Client, params: &ListShippingRates<'_>) -> Response> { + client.get_query("/shipping_rates", ¶ms) +} + /// Creates a new shipping rate object. pub fn create(client: &Client, params: CreateShippingRate<'_>) -> Response { @@ -79,20 +78,12 @@ impl ShippingRate { } /// Returns the shipping rate object with the given ID. - pub fn retrieve( - client: &Client, - id: &ShippingRateId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &ShippingRateId, expand: &[&str]) -> Response { client.get_query(&format!("/shipping_rates/{}", id), &Expand { expand }) } /// Updates an existing shipping rate object. - pub fn update( - client: &Client, - id: &ShippingRateId, - params: UpdateShippingRate<'_>, - ) -> Response { + pub fn update(client: &Client, id: &ShippingRateId, params: UpdateShippingRate<'_>) -> Response { client.post_form(&format!("/shipping_rates/{}", id), ¶ms) } } @@ -109,6 +100,7 @@ impl Object for ShippingRate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -122,6 +114,7 @@ pub struct ShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateDeliveryEstimateBound { + /// A unit of time. pub unit: ShippingRateDeliveryEstimateBoundUnit, @@ -131,6 +124,7 @@ pub struct ShippingRateDeliveryEstimateBound { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -148,6 +142,7 @@ pub struct ShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ShippingRateCurrencyOption { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -160,6 +155,7 @@ pub struct ShippingRateCurrencyOption { /// The parameters for `ShippingRate::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateShippingRate<'a> { + /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// /// This will appear on CheckoutSessions. @@ -227,6 +223,7 @@ impl<'a> CreateShippingRate<'a> { /// The parameters for `ShippingRate::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListShippingRates<'a> { + /// Only return shipping rates that are active or inactive. #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, @@ -282,12 +279,12 @@ impl<'a> ListShippingRates<'a> { impl Paginable for ListShippingRates<'_> { type O = ShippingRate; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `ShippingRate::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateShippingRate<'a> { + /// Whether the shipping rate can be used for new purchases. /// /// Defaults to `true`. @@ -333,6 +330,7 @@ impl<'a> UpdateShippingRate<'a> { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimate { + /// The upper bound of the estimated range. /// /// If empty, represents no upper bound i.e., infinite. @@ -348,6 +346,7 @@ pub struct CreateShippingRateDeliveryEstimate { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateFixedAmount { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -365,6 +364,7 @@ pub struct CreateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateShippingRateFixedAmount { + /// Shipping rates defined in each available currency option. /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -374,6 +374,7 @@ pub struct UpdateShippingRateFixedAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMaximum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMaximumUnit, @@ -383,6 +384,7 @@ pub struct CreateShippingRateDeliveryEstimateMaximum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateDeliveryEstimateMinimum { + /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMinimumUnit, @@ -392,6 +394,7 @@ pub struct CreateShippingRateDeliveryEstimateMinimum { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateShippingRateFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -404,6 +407,7 @@ pub struct CreateShippingRateFixedAmountCurrencyOptions { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateShippingRateFixedAmountCurrencyOptions { + /// A non-negative integer in cents representing how much to charge. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, diff --git a/src/resources/generated/source.rs b/src/resources/generated/source.rs index 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/subscription.rs b/src/resources/generated/subscription.rs index a65328e78..67772c68f 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -2,22 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CouponId, CustomerId, PlanId, PriceId, PromotionCodeId, SubscriptionId}; -use crate::params::{ - Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, -}; -use crate::resources::{ - Account, Application, CollectionMethod, ConnectAccountReference, Currency, Customer, Discount, - Invoice, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, - InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, - InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, - SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, - SubscriptionSchedule, SubscriptionTransferData, SubscriptionsTrialsResourceTrialSettings, - TaxRate, TestHelpersTestClock, -}; +use crate::params::{Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use crate::resources::{Account, Application, CollectionMethod, ConnectAccountReference, Currency, Customer, Discount, Invoice, InvoicePaymentMethodOptionsAcssDebit, InvoicePaymentMethodOptionsBancontact, InvoicePaymentMethodOptionsCustomerBalance, InvoicePaymentMethodOptionsKonbini, InvoicePaymentMethodOptionsSepaDebit, InvoicePaymentMethodOptionsUsBankAccount, PaymentMethod, PaymentSource, Scheduled, SetupIntent, SubscriptionBillingThresholds, SubscriptionItem, SubscriptionItemBillingThresholds, SubscriptionSchedule, SubscriptionTransferData, SubscriptionsTrialsResourceTrialSettings, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Subscription". /// @@ -153,6 +142,9 @@ pub struct Subscription { pub on_behalf_of: Option>, /// If specified, payment collection for this subscription will be paused. + /// + /// Note that the subscription status will be unchanged and will not be updated to `paused`. + /// Learn more about [pausing collection](/billing/subscriptions/pause-payment). pub pause_collection: Option, /// Payment settings passed on to invoices created by the subscription. @@ -179,14 +171,17 @@ pub struct Subscription { /// The date might differ from the `created` date due to backdating. pub start_date: Timestamp, - /// Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + /// Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. /// /// For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. - /// A subscription in this state can only have metadata and default_source updated. - /// Once the first invoice is paid, the subscription moves into an `active` state. + /// A subscription in this status can only have metadata and default_source updated. + /// Once the first invoice is paid, the subscription moves into an `active` status. /// If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. - /// This is a terminal state, the open invoice will be voided and no further invoices will be generated. + /// This is a terminal status, the open invoice will be voided and no further invoices will be generated. /// A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + /// A subscription can only enter a `paused` status [when a trial ends without a payment method](/billing/subscriptions/trials#create-free-trials-without-payment). + /// A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. + /// The `paused` status is different from [pausing collection](/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. /// If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). /// Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). /// If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. @@ -211,12 +206,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. /// @@ -226,11 +223,7 @@ impl Subscription { } /// Retrieves the subscription with the given ID. - pub fn retrieve( - client: &Client, - id: &SubscriptionId, - expand: &[&str], - ) -> Response { + pub fn retrieve(client: &Client, id: &SubscriptionId, expand: &[&str]) -> Response { client.get_query(&format!("/subscriptions/{}", id), &Expand { expand }) } @@ -250,11 +243,7 @@ impl Subscription { /// Similarly, if you set `proration_behavior` to `none` when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. /// We still reset the billing date and bill immediately for the new subscription. Updating the quantity on a subscription many times in an hour may result in [rate limiting](https://stripe.com/docs/rate-limits). /// If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](https://stripe.com/docs/billing/subscriptions/usage-based) instead. - pub fn update( - client: &Client, - id: &SubscriptionId, - params: UpdateSubscription<'_>, - ) -> Response { + pub fn update(client: &Client, id: &SubscriptionId, params: UpdateSubscription<'_>) -> Response { client.post_form(&format!("/subscriptions/{}", id), ¶ms) } @@ -283,6 +272,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, @@ -295,6 +285,7 @@ pub struct CancellationDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionAutomaticTax { + /// Whether Stripe automatically computes tax on this subscription. pub enabled: bool, @@ -307,6 +298,7 @@ pub struct SubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPendingInvoiceItemInterval { + /// Specifies invoicing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -321,6 +313,7 @@ pub struct SubscriptionPendingInvoiceItemInterval { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourceBillingCycleAnchorConfig { + /// The day of the month of the billing_cycle_anchor. pub day_of_month: i64, @@ -339,6 +332,7 @@ pub struct SubscriptionsResourceBillingCycleAnchorConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePauseCollection { + /// The payment collection behavior for this subscription while paused. /// /// One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -350,6 +344,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, @@ -361,12 +356,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, @@ -382,12 +377,16 @@ pub struct SubscriptionsResourcePaymentMethodOptions { /// This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. pub us_bank_account: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionPaymentMethodOptionsCard { + #[serde(skip_serializing_if = "Option::is_none")] pub mandate_options: Option, @@ -400,12 +399,13 @@ pub struct SubscriptionPaymentMethodOptionsCard { /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceMandateOptionsCard { + /// Amount to be charged for future payments. pub amount: Option, @@ -421,6 +421,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. @@ -446,6 +447,7 @@ pub struct SubscriptionsResourcePendingUpdate { /// The parameters for `Subscription::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateSubscription<'a> { + /// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. /// /// You may pass up to 20 items. @@ -590,19 +592,18 @@ pub struct CreateSubscription<'a> { /// Only applies to subscriptions with `collection_method=charge_automatically`. /// - /// Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. + /// Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. /// - /// Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. + /// Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. /// For example, SCA regulation may require 3DS authentication to complete payment. /// See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. /// This is the default behavior. Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. - /// Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. - /// This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. - /// Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - /// If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. - /// For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. + /// Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. + /// This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + /// If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. + /// For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. /// This was the default behavior for API versions prior to 2019-03-14. - /// See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. + /// See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. #[serde(skip_serializing_if = "Option::is_none")] pub payment_behavior: Option, @@ -622,7 +623,7 @@ pub struct CreateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub promotion_code: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. /// /// If no value is passed, the default is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -705,6 +706,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, @@ -715,6 +717,7 @@ pub struct ListSubscriptions<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub collection_method: Option, + /// Only return subscriptions that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -799,12 +802,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. @@ -931,6 +934,9 @@ pub struct UpdateSubscription<'a> { pub on_behalf_of: Option, /// If specified, payment collection for this subscription will be paused. + /// + /// Note that the subscription status will be unchanged and will not be updated to `paused`. + /// Learn more about [pausing collection](/billing/subscriptions/pause-payment). #[serde(skip_serializing_if = "Option::is_none")] pub pause_collection: Option, @@ -965,7 +971,7 @@ pub struct UpdateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub promotion_code: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1047,6 +1053,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, @@ -1070,6 +1077,7 @@ pub struct AddInvoiceItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1083,6 +1091,7 @@ pub struct CreateSubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionBillingCycleAnchorConfig { + /// The day of the month the billing_cycle_anchor should be. /// /// Ranges from 1 to 31. @@ -1115,6 +1124,7 @@ pub struct CreateSubscriptionBillingCycleAnchorConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. /// /// Will be set on invoices generated by the subscription. @@ -1130,6 +1140,7 @@ pub struct CreateSubscriptionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1170,6 +1181,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, @@ -1185,12 +1197,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`. @@ -1206,6 +1218,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. @@ -1219,18 +1232,21 @@ pub struct CreateSubscriptionTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionTrialSettings { + /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreateSubscriptionTrialSettingsEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListSubscriptionsAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1244,6 +1260,7 @@ pub struct UpdateSubscriptionAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionCancellationDetails { + /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -1255,6 +1272,7 @@ pub struct UpdateSubscriptionCancellationDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. /// /// Will be set on invoices generated by the subscription. @@ -1270,6 +1288,7 @@ pub struct UpdateSubscriptionInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionItems { + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1326,6 +1345,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`. @@ -1338,6 +1358,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, @@ -1353,12 +1374,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`. @@ -1374,6 +1395,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. @@ -1387,12 +1409,14 @@ 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 CreateSubscriptionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1404,6 +1428,7 @@ pub struct CreateSubscriptionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1415,12 +1440,14 @@ pub struct CreateSubscriptionInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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, @@ -1435,13 +1462,16 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptions { /// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub customer_balance: - Option, + pub customer_balance: Option, /// This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1449,12 +1479,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). @@ -1484,6 +1516,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). @@ -1516,6 +1549,7 @@ pub struct SubscriptionItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1527,6 +1561,7 @@ pub struct UpdateSubscriptionAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1538,6 +1573,7 @@ pub struct UpdateSubscriptionInvoiceSettingsIssuer { #[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, @@ -1552,13 +1588,16 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptions { /// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] - pub customer_balance: - Option, + pub customer_balance: Option, /// This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub konbini: Option, + /// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub sepa_debit: Option, + /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1566,37 +1605,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. /// @@ -1608,18 +1647,17 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance { + /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] - pub bank_transfer: - Option, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1629,25 +1667,28 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, - >, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod, - >, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionItemPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1663,31 +1704,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. /// @@ -1699,18 +1739,17 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard { /// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). /// /// However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + /// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. #[serde(skip_serializing_if = "Option::is_none")] - pub request_three_d_secure: - Option, + pub request_three_d_secure: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance { + /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] - pub bank_transfer: - Option, + pub bank_transfer: Option, /// The funding method type to be used when there are not enough funds in the customer balance. /// @@ -1720,34 +1759,36 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini {} +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsKonbini { +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsSepaDebit { +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount { + /// Additional fields for Financial Connections Session creation. #[serde(skip_serializing_if = "Option::is_none")] - pub financial_connections: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, - >, + pub financial_connections: Option, /// Verification method for the intent. #[serde(skip_serializing_if = "Option::is_none")] - pub verification_method: Option< - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountVerificationMethod, - >, + pub verification_method: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { + /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_type: Option< - CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType, - >, + pub transaction_type: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions { + /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1757,8 +1798,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")] @@ -1797,15 +1837,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, @@ -1815,8 +1855,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")] @@ -1854,8 +1893,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`. @@ -1863,8 +1902,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`. @@ -2026,8 +2065,7 @@ impl std::default::Default for CreateSubscriptionInvoiceSettingsIssuerType { /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions`'s `transaction_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] -pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType -{ +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsTransactionType { Business, Personal, } @@ -2041,24 +2079,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 } @@ -2083,24 +2115,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 } @@ -2127,24 +2153,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 } @@ -2167,24 +2187,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 } @@ -2211,24 +2225,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", } @@ -2277,16 +2281,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 } @@ -2295,8 +2295,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, @@ -2334,15 +2333,12 @@ 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, Transactions, } -impl - CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", @@ -2387,24 +2383,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 } @@ -2445,9 +2435,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", @@ -2456,9 +2444,7 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { CreateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -2470,9 +2456,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", @@ -2510,9 +2494,7 @@ impl CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -2547,9 +2529,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", } } @@ -3079,9 +3059,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", @@ -3090,9 +3068,7 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Boleto => "boleto", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Card => "card", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Eps => "eps", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Fpx => "fpx", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -3104,14 +3080,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", } } @@ -3146,9 +3118,7 @@ impl SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::Off => "off", - SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + SubscriptionsResourcePaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3325,8 +3295,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, } @@ -3340,24 +3309,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 } @@ -3382,24 +3345,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 } @@ -3426,24 +3383,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 } @@ -3466,24 +3417,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 } @@ -3510,24 +3455,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", } @@ -3576,16 +3511,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 } @@ -3594,8 +3525,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, @@ -3633,15 +3563,12 @@ 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, Transactions, } -impl - UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch -{ +impl UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", @@ -3686,24 +3613,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 } @@ -3744,9 +3665,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", @@ -3755,9 +3674,7 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Boleto => "boleto", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Card => "card", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", - UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { - "customer_balance" - } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", @@ -3769,9 +3686,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", @@ -3809,9 +3724,7 @@ impl UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod { pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::Off => "off", - UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => { - "on_subscription" - } + UpdateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription => "on_subscription", } } } @@ -3846,9 +3759,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 dd5929829..f10549c95 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. @@ -164,7 +149,7 @@ pub struct CreateSubscriptionItem<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -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. @@ -312,7 +298,7 @@ pub struct UpdateSubscriptionItem<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub price_data: Option, - /// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + /// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. /// /// The default value is `create_prorations`. #[serde(skip_serializing_if = "Option::is_none")] @@ -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 99a9030af..ad9a3717a 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -2,17 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, SubscriptionScheduleId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; -use crate::resources::{ - Account, Application, CollectionMethod, ConnectAccountReference, Coupon, Currency, Customer, - PaymentMethod, Plan, Price, Scheduled, Subscription, SubscriptionBillingThresholds, - SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxId, TaxRate, - TestHelpersTestClock, -}; +use crate::resources::{Account, Application, CollectionMethod, ConnectAccountReference, Coupon, Currency, Customer, PaymentMethod, Plan, Price, Scheduled, Subscription, SubscriptionBillingThresholds, SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxId, TaxRate, TestHelpersTestClock}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionSchedule". /// @@ -88,41 +82,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) } } @@ -139,6 +121,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, @@ -148,6 +131,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, @@ -235,10 +219,10 @@ pub struct SubscriptionSchedulePhaseConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { + /// The account tax IDs associated with this phase of the subscription schedule. /// /// Will be set on invoices generated by this phase of the subscription schedule. - #[serde(skip_serializing_if = "Option::is_none")] pub account_tax_ids: Option>>, /// Number of days within which a customer must pay invoices generated by this subscription schedule. @@ -254,6 +238,7 @@ pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SchedulesPhaseAutomaticTax { + /// Whether Stripe automatically computes tax on invoices created during this phase. pub enabled: bool, @@ -266,6 +251,7 @@ pub struct SchedulesPhaseAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleAddInvoiceItem { + /// ID of the price used to generate the invoice item. pub price: Expandable, @@ -281,6 +267,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, @@ -308,6 +295,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. @@ -355,6 +343,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, @@ -368,6 +357,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, @@ -437,6 +427,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>, @@ -505,12 +496,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, @@ -565,6 +556,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. @@ -690,6 +682,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. @@ -751,6 +744,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. @@ -882,6 +876,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, @@ -905,6 +900,7 @@ pub struct AddInvoiceItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -918,6 +914,7 @@ pub struct CreateSubscriptionSchedulePhasesAutomaticTax { #[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. @@ -962,6 +959,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. @@ -975,6 +973,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, @@ -988,6 +987,7 @@ pub struct SubscriptionScheduleBillingThresholds { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1001,6 +1001,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1014,6 +1015,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettings { + /// The account tax IDs associated with this phase of the subscription schedule. /// /// Will be set on invoices generated by this phase of the subscription schedule. @@ -1035,6 +1037,7 @@ pub struct SubscriptionScheduleInvoiceSettings { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesAutomaticTax { + /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1048,6 +1051,7 @@ pub struct UpdateSubscriptionSchedulePhasesAutomaticTax { #[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. @@ -1092,6 +1096,7 @@ pub struct UpdateSubscriptionSchedulePhasesItems { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesTransferData { + /// A non-negative decimal between 0 and 100, with at most two decimal places. /// /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -1105,6 +1110,7 @@ pub struct UpdateSubscriptionSchedulePhasesTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1116,12 +1122,14 @@ pub struct CreateSubscriptionSchedulePhasesAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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). @@ -1154,6 +1162,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). @@ -1183,6 +1192,7 @@ pub struct InvoiceItemPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1194,6 +1204,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettingsIssuer { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1205,6 +1216,7 @@ pub struct SubscriptionScheduleInvoiceSettingsIssuer { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesAutomaticTaxLiability { + /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -1216,12 +1228,14 @@ pub struct UpdateSubscriptionSchedulePhasesAutomaticTaxLiability { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsBillingThresholds { + /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct 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). @@ -1254,6 +1268,7 @@ pub struct UpdateSubscriptionSchedulePhasesItemsPriceData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1269,6 +1284,7 @@ pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionSchedulePhasesItemsPriceDataRecurring { + /// Specifies billing frequency. /// /// Either `day`, `week`, `month` or `year`. @@ -1542,9 +1558,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", } } @@ -1579,9 +1593,7 @@ pub enum SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType { impl SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType { pub fn as_str(self) -> &'static str { match self { - SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Account => { - "account" - } + SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Account => "account", SubscriptionScheduleDefaultSettingsParamsAutomaticTaxLiabilityType::Self_ => "self", } } @@ -1616,9 +1628,7 @@ impl SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor { pub fn as_str(self) -> &'static str { match self { SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::Automatic => "automatic", - SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::PhaseStart => { - "phase_start" - } + SubscriptionScheduleDefaultSettingsParamsBillingCycleAnchor::PhaseStart => "phase_start", } } } diff --git a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs index 026391f40..fc847865e 100644 --- a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs +++ b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs @@ -7,11 +7,13 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionsTrialsResourceTrialSettings". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceTrialSettings { + pub end_behavior: SubscriptionsTrialsResourceEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceEndBehavior { + /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod, } @@ -29,9 +31,7 @@ impl SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Cancel => "cancel", - SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => { - "create_invoice" - } + SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice", SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Pause => "pause", } } diff --git a/src/resources/generated/tax_calculation.rs b/src/resources/generated/tax_calculation.rs index 6f98acdc0..2f5e2795b 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 the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -85,6 +85,7 @@ pub struct TaxProductResourceTaxBreakdown { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxCalculationShippingCost { + /// The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. @@ -113,6 +114,7 @@ pub struct TaxProductResourceTaxCalculationShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, @@ -137,6 +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 2ced34f23..446ea4023 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 the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). 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 acf08422e..53dfbba09 100644 --- a/src/resources/generated/tax_id.rs +++ b/src/resources/generated/tax_id.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TaxIdId; +use crate::ids::{TaxIdId}; use crate::params::{Deleted, Expand, Expandable, List, Object, Paginable, Timestamp}; use crate::resources::{Account, Application, Customer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "tax_id". /// @@ -43,7 +42,7 @@ pub struct TaxId { #[serde(skip_serializing_if = "Option::is_none")] pub owner: Option, - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `no_voec`, `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`. /// /// Note that some legacy tax IDs have type `unknown`. #[serde(rename = "type")] @@ -60,10 +59,12 @@ pub struct TaxId { } impl TaxId { + /// Returns a list of tax IDs. - pub fn list(client: &Client, params: &ListTaxIds<'_>) -> Response> { - client.get_query("/tax_ids", ¶ms) - } +pub fn list(client: &Client, params: &ListTaxIds<'_>) -> Response> { + client.get_query("/tax_ids", ¶ms) +} + /// Creates a new account or customer `tax_id` object. pub fn create(client: &Client, params: CreateTaxId<'_>) -> Response { @@ -93,6 +94,7 @@ impl Object for TaxId { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIDsOwner { + /// The account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option>, @@ -112,6 +114,7 @@ pub struct TaxIDsOwner { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdVerification { + /// Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. pub status: TaxIdVerificationStatus, @@ -125,6 +128,7 @@ pub struct TaxIdVerification { /// The parameters for `TaxId::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTaxId<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -135,7 +139,7 @@ pub struct CreateTaxId<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub owner: Option, - /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `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`, `no_voec`, `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_: TaxIdTypeFilter, @@ -145,13 +149,19 @@ pub struct CreateTaxId<'a> { impl<'a> CreateTaxId<'a> { pub fn new(type_: TaxIdTypeFilter, value: &'a str) -> Self { - CreateTaxId { expand: Default::default(), owner: Default::default(), type_, value } + CreateTaxId { + expand: Default::default(), + owner: Default::default(), + type_, + value, + } } } /// The parameters for `TaxId::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTaxIds<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -197,11 +207,11 @@ impl<'a> ListTaxIds<'a> { impl Paginable for ListTaxIds<'_> { type O = TaxId; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTaxIdOwner { + /// Account the tax ID belongs to. /// /// Required when `type=account`. @@ -221,6 +231,7 @@ pub struct CreateTaxIdOwner { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ListTaxIdsOwner { + /// Account the tax ID belongs to. /// /// Required when `type=account`. @@ -404,6 +415,7 @@ pub enum TaxIdType { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -476,6 +488,7 @@ impl TaxIdType { TaxIdType::MyItn => "my_itn", TaxIdType::MySst => "my_sst", TaxIdType::NoVat => "no_vat", + TaxIdType::NoVoec => "no_voec", TaxIdType::NzGst => "nz_gst", TaxIdType::PeRuc => "pe_ruc", TaxIdType::PhTin => "ph_tin", @@ -568,6 +581,7 @@ pub enum TaxIdTypeFilter { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -639,6 +653,7 @@ impl TaxIdTypeFilter { TaxIdTypeFilter::MyItn => "my_itn", TaxIdTypeFilter::MySst => "my_sst", TaxIdTypeFilter::NoVat => "no_vat", + TaxIdTypeFilter::NoVoec => "no_voec", TaxIdTypeFilter::NzGst => "nz_gst", TaxIdTypeFilter::PeRuc => "pe_ruc", TaxIdTypeFilter::PhTin => "ph_tin", diff --git a/src/resources/generated/tax_product_resource_customer_details.rs b/src/resources/generated/tax_product_resource_customer_details.rs index e44865f70..fbafad5e1 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,7 +26,8 @@ pub struct TaxProductResourceCustomerDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceCustomerDetailsResourceTaxId { - /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`. + + /// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, 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, @@ -139,6 +142,7 @@ pub enum TaxProductResourceCustomerDetailsResourceTaxIdType { MyItn, MySst, NoVat, + NoVoec, NzGst, PeRuc, PhTin, @@ -211,6 +215,7 @@ impl TaxProductResourceCustomerDetailsResourceTaxIdType { TaxProductResourceCustomerDetailsResourceTaxIdType::MyItn => "my_itn", TaxProductResourceCustomerDetailsResourceTaxIdType::MySst => "my_sst", TaxProductResourceCustomerDetailsResourceTaxIdType::NoVat => "no_vat", + TaxProductResourceCustomerDetailsResourceTaxIdType::NoVoec => "no_voec", TaxProductResourceCustomerDetailsResourceTaxIdType::NzGst => "nz_gst", TaxProductResourceCustomerDetailsResourceTaxIdType::PeRuc => "pe_ruc", TaxProductResourceCustomerDetailsResourceTaxIdType::PhTin => "ph_tin", @@ -266,9 +271,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 9000974df..7b9b7e9f7 100644 --- a/src/resources/generated/tax_rate.rs +++ b/src/resources/generated/tax_rate.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TaxRateId; +use crate::ids::{TaxRateId}; use crate::params::{Expand, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TaxRate". /// @@ -79,12 +78,14 @@ pub struct TaxRate { } impl TaxRate { + /// Returns a list of your tax rates. /// /// Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. - pub fn list(client: &Client, params: &ListTaxRates<'_>) -> Response> { - client.get_query("/tax_rates", ¶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 { @@ -115,6 +116,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. @@ -191,6 +193,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, @@ -244,12 +247,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. @@ -373,7 +376,6 @@ pub enum TaxRateTaxType { Qst, Rst, SalesTax, - ServiceTax, Vat, } @@ -391,7 +393,6 @@ impl TaxRateTaxType { TaxRateTaxType::Qst => "qst", TaxRateTaxType::Rst => "rst", TaxRateTaxType::SalesTax => "sales_tax", - TaxRateTaxType::ServiceTax => "service_tax", TaxRateTaxType::Vat => "vat", } } diff --git a/src/resources/generated/terminal_configuration.rs b/src/resources/generated/terminal_configuration.rs index bdf26ba45..5266fbe8a 100644 --- a/src/resources/generated/terminal_configuration.rs +++ b/src/resources/generated/terminal_configuration.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalConfigurationId; +use crate::ids::{TerminalConfigurationId}; use crate::params::{Expand, Expandable, List, Object, Paginable}; -use crate::resources::File; +use crate::resources::{File}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalConfigurationConfiguration". /// @@ -32,6 +31,10 @@ pub struct TerminalConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub livemode: Option, + /// String indicating the name of the Configuration object, set by the user. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub offline: Option, @@ -43,19 +46,15 @@ pub struct TerminalConfiguration { } impl TerminalConfiguration { + /// Returns a list of `Configuration` objects. - pub fn list( - client: &Client, - params: &ListTerminalConfigurations<'_>, - ) -> Response> { - client.get_query("/terminal/configurations", ¶ms) - } +pub fn list(client: &Client, params: &ListTerminalConfigurations<'_>) -> Response> { + client.get_query("/terminal/configurations", ¶ms) +} + /// Creates a new `Configuration` object. - pub fn create( - client: &Client, - params: CreateTerminalConfiguration<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalConfiguration<'_>) -> Response { client.post_form("/terminal/configurations", ¶ms) } } @@ -72,6 +71,7 @@ impl Object for TerminalConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option>, @@ -79,6 +79,7 @@ pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceOfflineConfig { + /// Determines whether to allow transactions to be collected while reader is offline. /// /// Defaults to false. @@ -87,6 +88,7 @@ pub struct TerminalConfigurationConfigurationResourceOfflineConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConfigurationConfigurationResourceTipping { + #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -132,6 +134,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>, @@ -148,6 +151,7 @@ pub struct TerminalConfigurationConfigurationResourceCurrencySpecificConfig { /// The parameters for `TerminalConfiguration::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateTerminalConfiguration<'a> { + /// An object containing device type specific settings for BBPOS WisePOS E readers. #[serde(skip_serializing_if = "Option::is_none")] pub bbpos_wisepos_e: Option, @@ -156,6 +160,10 @@ pub struct CreateTerminalConfiguration<'a> { #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], + /// Name of the configuration. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option<&'a str>, + /// Configurations for collecting transactions offline. #[serde(skip_serializing_if = "Option::is_none")] pub offline: Option, @@ -174,6 +182,7 @@ impl<'a> CreateTerminalConfiguration<'a> { CreateTerminalConfiguration { bbpos_wisepos_e: Default::default(), expand: Default::default(), + name: Default::default(), offline: Default::default(), tipping: Default::default(), verifone_p400: Default::default(), @@ -184,6 +193,7 @@ impl<'a> CreateTerminalConfiguration<'a> { /// The parameters for `TerminalConfiguration::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalConfigurations<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -227,11 +237,11 @@ impl<'a> ListTerminalConfigurations<'a> { impl Paginable for ListTerminalConfigurations<'_> { type O = TerminalConfiguration; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationBbposWiseposE { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option, @@ -239,6 +249,7 @@ pub struct CreateTerminalConfigurationBbposWiseposE { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationOffline { + /// Determines whether to allow transactions to be collected while reader is offline. /// /// Defaults to false. @@ -247,6 +258,7 @@ pub struct CreateTerminalConfigurationOffline { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTipping { + /// Tipping configuration for AUD. #[serde(skip_serializing_if = "Option::is_none")] pub aud: Option, @@ -306,6 +318,7 @@ pub struct CreateTerminalConfigurationTipping { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationVerifoneP400 { + /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] pub splashscreen: Option, @@ -313,6 +326,7 @@ pub struct CreateTerminalConfigurationVerifoneP400 { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingAud { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -328,6 +342,7 @@ pub struct CreateTerminalConfigurationTippingAud { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingCad { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -343,6 +358,7 @@ pub struct CreateTerminalConfigurationTippingCad { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingChf { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -358,6 +374,7 @@ pub struct CreateTerminalConfigurationTippingChf { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingCzk { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -373,6 +390,7 @@ pub struct CreateTerminalConfigurationTippingCzk { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingDkk { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -388,6 +406,7 @@ pub struct CreateTerminalConfigurationTippingDkk { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingEur { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -403,6 +422,7 @@ pub struct CreateTerminalConfigurationTippingEur { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingGbp { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -418,6 +438,7 @@ pub struct CreateTerminalConfigurationTippingGbp { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingHkd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -433,6 +454,7 @@ pub struct CreateTerminalConfigurationTippingHkd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingMyr { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -448,6 +470,7 @@ pub struct CreateTerminalConfigurationTippingMyr { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingNok { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -463,6 +486,7 @@ pub struct CreateTerminalConfigurationTippingNok { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingNzd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -478,6 +502,7 @@ pub struct CreateTerminalConfigurationTippingNzd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingSek { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -493,6 +518,7 @@ pub struct CreateTerminalConfigurationTippingSek { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingSgd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, @@ -508,6 +534,7 @@ pub struct CreateTerminalConfigurationTippingSgd { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalConfigurationTippingUsd { + /// Fixed amounts displayed when collecting a tip. #[serde(skip_serializing_if = "Option::is_none")] pub fixed_amounts: Option>, diff --git a/src/resources/generated/terminal_connection_token.rs b/src/resources/generated/terminal_connection_token.rs index 3d3eff1f3..54d2feb14 100644 --- a/src/resources/generated/terminal_connection_token.rs +++ b/src/resources/generated/terminal_connection_token.rs @@ -2,16 +2,16 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::params::{Expand, Object}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalConnectionToken". /// /// For more details see #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalConnectionToken { + /// The id of the location that this connection token is scoped to. /// /// Note that location scoping only applies to internet-connected readers. @@ -24,13 +24,11 @@ pub struct TerminalConnectionToken { } impl TerminalConnectionToken { + /// To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. /// /// On your backend, add an endpoint that creates and returns a connection token. - pub fn create( - client: &Client, - params: CreateTerminalConnectionToken<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalConnectionToken<'_>) -> Response { client.post_form("/terminal/connection_tokens", ¶ms) } } @@ -46,6 +44,7 @@ impl Object for TerminalConnectionToken { /// The parameters for `TerminalConnectionToken::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateTerminalConnectionToken<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -61,6 +60,9 @@ pub struct CreateTerminalConnectionToken<'a> { impl<'a> CreateTerminalConnectionToken<'a> { pub fn new() -> Self { - CreateTerminalConnectionToken { expand: Default::default(), location: Default::default() } + CreateTerminalConnectionToken { + expand: Default::default(), + location: Default::default(), + } } } diff --git a/src/resources/generated/terminal_location.rs b/src/resources/generated/terminal_location.rs index e8c28dd23..4dde88e6b 100644 --- a/src/resources/generated/terminal_location.rs +++ b/src/resources/generated/terminal_location.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalLocationId; +use crate::ids::{TerminalLocationId}; use crate::params::{Expand, List, Metadata, Object, Paginable}; -use crate::resources::Address; +use crate::resources::{Address}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalLocationLocation". /// @@ -44,20 +43,16 @@ pub struct TerminalLocation { } impl TerminalLocation { + /// Returns a list of `Location` objects. - pub fn list( - client: &Client, - params: &ListTerminalLocations<'_>, - ) -> Response> { - client.get_query("/terminal/locations", ¶ms) - } +pub fn list(client: &Client, params: &ListTerminalLocations<'_>) -> Response> { + client.get_query("/terminal/locations", ¶ms) +} + /// Creates a new `Location` object. /// For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. - pub fn create( - client: &Client, - params: CreateTerminalLocation<'_>, - ) -> Response { + pub fn create(client: &Client, params: CreateTerminalLocation<'_>) -> Response { client.post_form("/terminal/locations", ¶ms) } } @@ -75,6 +70,7 @@ impl Object for TerminalLocation { /// The parameters for `TerminalLocation::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTerminalLocation<'a> { + /// The full address of the location. pub address: CreateTerminalLocationAddress, @@ -113,6 +109,7 @@ impl<'a> CreateTerminalLocation<'a> { /// The parameters for `TerminalLocation::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalLocations<'a> { + /// A cursor for use in pagination. /// /// `ending_before` is an object ID that defines your place in the list. @@ -151,11 +148,11 @@ impl<'a> ListTerminalLocations<'a> { impl Paginable for ListTerminalLocations<'_> { type O = TerminalLocation; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTerminalLocationAddress { + /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] pub city: Option, diff --git a/src/resources/generated/terminal_reader.rs b/src/resources/generated/terminal_reader.rs index c3454ca8c..dd7f7cca4 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; -use crate::ids::TerminalReaderId; +use crate::ids::{TerminalReaderId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable}; use crate::resources::{Charge, Currency, PaymentIntent, Refund, SetupIntent, TerminalLocation}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TerminalReaderReader". /// @@ -65,13 +64,12 @@ pub struct TerminalReader { } impl TerminalReader { + /// Returns a list of `Reader` objects. - pub fn list( - client: &Client, - params: &ListTerminalReaders<'_>, - ) -> Response> { - client.get_query("/terminal/readers", ¶ms) - } +pub fn list(client: &Client, params: &ListTerminalReaders<'_>) -> Response> { + client.get_query("/terminal/readers", ¶ms) +} + /// Creates a new `Reader` object. pub fn create(client: &Client, params: CreateTerminalReader<'_>) -> Response { @@ -91,6 +89,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, @@ -119,6 +118,7 @@ pub struct TerminalReaderReaderResourceReaderAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { + /// Most recent PaymentIntent processed by the reader. pub payment_intent: Expandable, @@ -128,6 +128,11 @@ pub struct TerminalReaderReaderResourceProcessPaymentIntentAction { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceProcessConfig { + + /// Enable customer initiated cancellation when processing this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, + /// Override showing a tipping selection screen on this transaction. #[serde(skip_serializing_if = "Option::is_none")] pub skip_tipping: Option, @@ -138,6 +143,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. @@ -152,10 +158,16 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentAction { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct TerminalReaderReaderResourceProcessSetupConfig {} +pub struct TerminalReaderReaderResourceProcessSetupConfig { + + /// Enable customer initiated cancellation when processing this SetupIntent. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, +} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceRefundPaymentAction { + /// The amount being refunded. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -190,6 +202,9 @@ pub struct TerminalReaderReaderResourceRefundPaymentAction { #[serde(skip_serializing_if = "Option::is_none")] pub refund_application_fee: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub refund_payment_config: Option, + /// Boolean indicating whether the transfer should be reversed when refunding this charge. /// /// The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). @@ -198,8 +213,17 @@ pub struct TerminalReaderReaderResourceRefundPaymentAction { pub reverse_transfer: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderReaderResourceRefundPaymentConfig { + + /// Enable customer initiated cancellation when refunding this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub enable_customer_cancellation: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceSetReaderDisplayAction { + /// Cart object to be displayed by the reader. pub cart: Option, @@ -210,6 +234,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). @@ -231,6 +256,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). @@ -245,6 +271,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). @@ -255,6 +282,7 @@ pub struct TerminalReaderReaderResourceTippingConfig { /// The parameters for `TerminalReader::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateTerminalReader<'a> { + /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -296,6 +324,7 @@ impl<'a> CreateTerminalReader<'a> { /// The parameters for `TerminalReader::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTerminalReaders<'a> { + /// Filters readers by device type. #[serde(skip_serializing_if = "Option::is_none")] pub device_type: Option, @@ -354,9 +383,8 @@ impl<'a> ListTerminalReaders<'a> { impl Paginable for ListTerminalReaders<'_> { type O = TerminalReader; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// An enum representing the possible values of an `TerminalReader`'s `device_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -449,12 +477,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", } @@ -492,9 +516,7 @@ impl TerminalReaderReaderResourceRefundPaymentActionReason { match self { TerminalReaderReaderResourceRefundPaymentActionReason::Duplicate => "duplicate", TerminalReaderReaderResourceRefundPaymentActionReason::Fraudulent => "fraudulent", - TerminalReaderReaderResourceRefundPaymentActionReason::RequestedByCustomer => { - "requested_by_customer" - } + TerminalReaderReaderResourceRefundPaymentActionReason::RequestedByCustomer => "requested_by_customer", } } } diff --git a/src/resources/generated/test_helpers_test_clock.rs b/src/resources/generated/test_helpers_test_clock.rs index da2f8bbf6..41c6cbdac 100644 --- a/src/resources/generated/test_helpers_test_clock.rs +++ b/src/resources/generated/test_helpers_test_clock.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TestHelpersTestClockId; +use crate::ids::{TestHelpersTestClockId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TestClock". #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/token.rs b/src/resources/generated/token.rs index fd6001383..a1775f967 100644 --- a/src/resources/generated/token.rs +++ b/src/resources/generated/token.rs @@ -2,12 +2,11 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - use crate::client::{Client, Response}; use crate::ids::{CustomerId, TokenId}; use crate::params::{Expand, Metadata, Object, Timestamp}; use crate::resources::{Address, BankAccount, Card, CompanyParams, PersonParams, TokenType}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "Token". /// @@ -43,6 +42,7 @@ pub struct Token { } impl Token { + /// Creates a single-use token that represents a bank account’s details. /// You can use this token with any API method in place of a bank account dictionary. /// @@ -71,6 +71,7 @@ impl Object for Token { /// The parameters for `Token::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateToken<'a> { + /// Information for the account this token represents. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -122,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, @@ -143,12 +145,14 @@ pub struct CreateTokenAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenCvcUpdate { + /// The CVC value, in string form. pub cvc: String, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPerson { + /// Details on the legal guardian's acceptance of the required Stripe agreements. #[serde(skip_serializing_if = "Option::is_none")] pub additional_tos_acceptances: Option, @@ -270,6 +274,7 @@ pub struct CreateTokenPerson { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPii { + /// The `id_number` for the PII, in string form. #[serde(skip_serializing_if = "Option::is_none")] pub id_number: Option, @@ -277,6 +282,7 @@ pub struct CreateTokenPii { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonAdditionalTosAcceptances { + /// Details on the legal guardian's acceptance of the main Stripe service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, @@ -284,6 +290,7 @@ pub struct CreateTokenPersonAdditionalTosAcceptances { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDob { + /// The day of birth, between 1 and 31. pub day: i64, @@ -296,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, @@ -311,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, @@ -338,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. @@ -375,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, @@ -386,6 +397,7 @@ pub struct PersonVerificationParams { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonAdditionalTosAcceptancesAccount { + /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option, @@ -401,6 +413,7 @@ pub struct CreateTokenPersonAdditionalTosAcceptancesAccount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateTokenPersonDocumentsCompanyAuthorization { + /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] pub files: Option>, @@ -408,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>, @@ -415,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>, @@ -422,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. @@ -480,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)] @@ -521,6 +537,20 @@ pub struct CreditCardSpecs { /// Cardholder's full name. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Contains information about card networks used to process the payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub networks: Option, /// The card number, as a string without any separators. pub number: String, } + +/// Contains information about card networks used to process the payment. +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Networks { + /// The customer's preferred card network for co-branded cards. + /// + /// Supports `cartes_bancaires`, `mastercard`, or `visa`. + /// Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred: Option, +} diff --git a/src/resources/generated/topup.rs b/src/resources/generated/topup.rs index 75d9946a4..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". /// @@ -79,10 +78,12 @@ pub struct Topup { } impl Topup { + /// Returns a list of top-ups. - pub fn list(client: &Client, params: &ListTopups<'_>) -> Response> { - client.get_query("/topups", ¶ms) - } +pub fn list(client: &Client, params: &ListTopups<'_>) -> Response> { + client.get_query("/topups", ¶ms) +} + /// Retrieves the details of a top-up that has previously been created. /// @@ -112,6 +113,7 @@ impl Object for Topup { /// The parameters for `Topup::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTopups<'a> { + /// A positive integer representing how much to transfer. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option>, @@ -169,12 +171,12 @@ impl<'a> ListTopups<'a> { impl Paginable for ListTopups<'_> { type O = Topup; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Topup::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateTopup<'a> { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. diff --git a/src/resources/generated/transfer.rs b/src/resources/generated/transfer.rs index 2bfad37c1..61609644b 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,8 @@ impl<'a> CreateTransfer<'a> { /// The parameters for `Transfer::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListTransfers<'a> { + + /// Only return transfers that were created during the given date interval. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -248,12 +248,12 @@ impl<'a> ListTransfers<'a> { impl Paginable for ListTransfers<'_> { type O = Transfer; fn set_last(&mut self, item: Self::O) { - self.starting_after = Some(item.id()); - } -} + self.starting_after = Some(item.id()); + }} /// The parameters for `Transfer::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdateTransfer<'a> { + /// An arbitrary string attached to the object. /// /// Often useful for displaying to users. diff --git a/src/resources/generated/transfer_reversal.rs b/src/resources/generated/transfer_reversal.rs index 342970dbc..c26608e8c 100644 --- a/src/resources/generated/transfer_reversal.rs +++ b/src/resources/generated/transfer_reversal.rs @@ -2,11 +2,10 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::TransferReversalId; +use crate::ids::{TransferReversalId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; use crate::resources::{BalanceTransaction, Currency, Refund, Transfer}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TransferReversal". /// diff --git a/src/resources/generated/treasury_inbound_transfer.rs b/src/resources/generated/treasury_inbound_transfer.rs index d8c2013bc..4092eaaec 100644 --- a/src/resources/generated/treasury_inbound_transfer.rs +++ b/src/resources/generated/treasury_inbound_transfer.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryInboundTransferId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryInboundTransfersResourceInboundTransfer". @@ -127,7 +127,13 @@ pub struct InboundTransfersPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to debit funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: InboundTransfersPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. diff --git a/src/resources/generated/treasury_outbound_payment.rs b/src/resources/generated/treasury_outbound_payment.rs index 5e9a7826f..375bd6339 100644 --- a/src/resources/generated/treasury_outbound_payment.rs +++ b/src/resources/generated/treasury_outbound_payment.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryOutboundPaymentId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryOutboundPaymentsResourceOutboundPayment". @@ -144,7 +144,13 @@ pub struct OutboundPaymentsPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to send funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: OutboundPaymentsPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. diff --git a/src/resources/generated/treasury_outbound_transfer.rs b/src/resources/generated/treasury_outbound_transfer.rs index 1db7b7dde..9a12702b8 100644 --- a/src/resources/generated/treasury_outbound_transfer.rs +++ b/src/resources/generated/treasury_outbound_transfer.rs @@ -4,7 +4,7 @@ use crate::ids::{TreasuryOutboundTransferId}; use crate::params::{Expandable, Metadata, Object, Timestamp}; -use crate::resources::{Currency, TreasurySharedResourceBillingDetails, TreasuryTransaction}; +use crate::resources::{Currency, Mandate, TreasurySharedResourceBillingDetails, TreasuryTransaction}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "TreasuryOutboundTransfersResourceOutboundTransfer". @@ -122,7 +122,13 @@ pub struct OutboundTransfersPaymentMethodDetailsUsBankAccount { /// Last four digits of the bank account number. pub last4: Option, - /// The US bank account network used to send funds. + /// ID of the mandate used to make this payment. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate: Option>, + + /// The network rails used. + /// + /// See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. pub network: OutboundTransfersPaymentMethodDetailsUsBankAccountNetwork, /// Routing number of the bank account. diff --git a/src/resources/generated/treasury_received_debit.rs b/src/resources/generated/treasury_received_debit.rs index 3ef80636a..5b4d092af 100644 --- a/src/resources/generated/treasury_received_debit.rs +++ b/src/resources/generated/treasury_received_debit.rs @@ -90,6 +90,9 @@ pub struct TreasuryReceivedDebitsResourceLinkedFlows { /// Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. pub issuing_transaction: Option, + + /// Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + pub payout: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] diff --git a/src/resources/generated/usage_record.rs b/src/resources/generated/usage_record.rs index 47d7bd4b8..ebce5a802 100644 --- a/src/resources/generated/usage_record.rs +++ b/src/resources/generated/usage_record.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::UsageRecordId; +use crate::ids::{UsageRecordId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "UsageRecord". /// diff --git a/src/resources/generated/usage_record_summary.rs b/src/resources/generated/usage_record_summary.rs index db45835c7..b165ea715 100644 --- a/src/resources/generated/usage_record_summary.rs +++ b/src/resources/generated/usage_record_summary.rs @@ -2,10 +2,9 @@ // This file was automatically generated. // ====================================== -use serde::{Deserialize, Serialize}; - -use crate::ids::UsageRecordSummaryId; +use crate::ids::{UsageRecordSummaryId}; use crate::params::{Object, Timestamp}; +use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "UsageRecordSummary". #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -40,6 +39,7 @@ impl Object for UsageRecordSummary { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Period { + /// The end date of this usage period. /// /// All usage up to and including this point in time is included. diff --git a/src/resources/generated/version.rs b/src/resources/generated/version.rs index 3cdd9f3fe..9822cdb4d 100644 --- a/src/resources/generated/version.rs +++ b/src/resources/generated/version.rs @@ -1,3 +1,3 @@ use crate::ApiVersion; -pub const VERSION: ApiVersion = ApiVersion::V2023_10_16; +pub const VERSION: ApiVersion = ApiVersion::V2024_04_03; \ No newline at end of file diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index 0cccadfda..34c61b127 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, @@ -421,6 +413,8 @@ pub enum EventFilter { FinancialConnectionsAccountReactivated, #[serde(rename = "financial_connections.account.refreshed_balance")] FinancialConnectionsAccountRefreshedBalance, + #[serde(rename = "financial_connections.account.refreshed_ownership")] + FinancialConnectionsAccountRefreshedOwnership, #[serde(rename = "financial_connections.account.refreshed_transactions")] FinancialConnectionsAccountRefreshedTransactions, #[serde(rename = "identity.verification_session.canceled")] @@ -741,12 +735,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", @@ -763,12 +753,8 @@ impl EventFilter { EventFilter::ChargeRefunded => "charge.refunded", EventFilter::ChargeSucceeded => "charge.succeeded", EventFilter::ChargeUpdated => "charge.updated", - EventFilter::CheckoutSessionAsyncPaymentFailed => { - "checkout.session.async_payment_failed" - } - EventFilter::CheckoutSessionAsyncPaymentSucceeded => { - "checkout.session.async_payment_succeeded" - } + EventFilter::CheckoutSessionAsyncPaymentFailed => "checkout.session.async_payment_failed", + EventFilter::CheckoutSessionAsyncPaymentSucceeded => "checkout.session.async_payment_succeeded", EventFilter::CheckoutSessionCompleted => "checkout.session.completed", EventFilter::CheckoutSessionExpired => "checkout.session.expired", EventFilter::ClimateOrderCanceled => "climate.order.canceled", @@ -796,12 +782,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", @@ -809,46 +791,21 @@ 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::FinancialConnectionsAccountRefreshedTransactions => { - "financial_connections.account.refreshed_transactions" - } - EventFilter::IdentityVerificationSessionCanceled => { - "identity.verification_session.canceled" - } - EventFilter::IdentityVerificationSessionCreated => { - "identity.verification_session.created" - } - EventFilter::IdentityVerificationSessionProcessing => { - "identity.verification_session.processing" - } - EventFilter::IdentityVerificationSessionRedacted => { - "identity.verification_session.redacted" - } - EventFilter::IdentityVerificationSessionRequiresInput => { - "identity.verification_session.requires_input" - } - EventFilter::IdentityVerificationSessionVerified => { - "identity.verification_session.verified" - } + EventFilter::FinancialConnectionsAccountCreated => "financial_connections.account.created", + EventFilter::FinancialConnectionsAccountDeactivated => "financial_connections.account.deactivated", + EventFilter::FinancialConnectionsAccountDisconnected => "financial_connections.account.disconnected", + EventFilter::FinancialConnectionsAccountReactivated => "financial_connections.account.reactivated", + EventFilter::FinancialConnectionsAccountRefreshedBalance => "financial_connections.account.refreshed_balance", + EventFilter::FinancialConnectionsAccountRefreshedOwnership => "financial_connections.account.refreshed_ownership", + EventFilter::FinancialConnectionsAccountRefreshedTransactions => "financial_connections.account.refreshed_transactions", + EventFilter::IdentityVerificationSessionCanceled => "identity.verification_session.canceled", + EventFilter::IdentityVerificationSessionCreated => "identity.verification_session.created", + EventFilter::IdentityVerificationSessionProcessing => "identity.verification_session.processing", + EventFilter::IdentityVerificationSessionRedacted => "identity.verification_session.redacted", + EventFilter::IdentityVerificationSessionRequiresInput => "identity.verification_session.requires_input", + EventFilter::IdentityVerificationSessionVerified => "identity.verification_session.verified", EventFilter::InvoiceCreated => "invoice.created", EventFilter::InvoiceDeleted => "invoice.deleted", EventFilter::InvoiceFinalizationFailed => "invoice.finalization_failed", @@ -881,9 +838,7 @@ impl EventFilter { EventFilter::IssuingTransactionCreated => "issuing_transaction.created", EventFilter::IssuingTransactionUpdated => "issuing_transaction.updated", EventFilter::MandateUpdated => "mandate.updated", - EventFilter::PaymentIntentAmountCapturableUpdated => { - "payment_intent.amount_capturable_updated" - } + EventFilter::PaymentIntentAmountCapturableUpdated => "payment_intent.amount_capturable_updated", EventFilter::PaymentIntentCanceled => "payment_intent.canceled", EventFilter::PaymentIntentCreated => "payment_intent.created", EventFilter::PaymentIntentPartiallyFunded => "payment_intent.partially_funded", @@ -894,9 +849,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", @@ -960,9 +913,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", @@ -976,31 +927,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",