From 32e802ef4d36f8ab495e7c2b6abba29450eb999f Mon Sep 17 00:00:00 2001 From: arlyon Date: Wed, 10 Jan 2024 15:34:15 +0000 Subject: [PATCH] feat: generate latest changes from OpenApi spec --- openapi/version.json | 2 +- src/resources.rs | 1 + src/resources/generated.rs | 1 + src/resources/generated/account_session.rs | 71 ++++++-- src/resources/generated/checkout_session.rs | 123 +++++++++++++ src/resources/generated/customer.rs | 2 +- .../financial_connections_account.rs | 101 +++++++++++ ...ections_account_refreshed_transactions.rs} | 4 +- .../financial_connections_session.rs | 4 + .../financial_connections_transaction.rs | 112 ++++++++++++ src/resources/generated/invoice.rs | 10 ++ ..._payment_method_options_us_bank_account.rs | 4 + .../generated/issuing_authorization.rs | 2 + src/resources/generated/issuing_cardholder.rs | 8 +- .../linked_account_options_us_bank_account.rs | 2 + src/resources/generated/mandate.rs | 38 +++- src/resources/generated/payment_intent.rs | 121 ++++++++++++- src/resources/generated/payment_link.rs | 124 ++++++++++++- .../generated/payment_method_configuration.rs | 136 ++++++++++++-- ...options_us_bank_account_mandate_options.rs | 45 +++++ src/resources/generated/quote.rs | 3 +- src/resources/generated/refund.rs | 167 ++++++++++++++++++ src/resources/generated/setup_intent.rs | 118 ++++++++++++- src/resources/generated/subscription.rs | 86 ++++++++- .../generated/subscription_schedule.rs | 12 +- src/resources/generated/webhook_endpoint.rs | 5 + 26 files changed, 1240 insertions(+), 62 deletions(-) rename src/resources/generated/{connect_embedded_base_features.rs => financial_connections_account_refreshed_transactions.rs} (58%) create mode 100644 src/resources/generated/financial_connections_transaction.rs create mode 100644 src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs diff --git a/openapi/version.json b/openapi/version.json index 370745136..e083cd5b6 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v706" + "version": "v751" } \ No newline at end of file diff --git a/src/resources.rs b/src/resources.rs index 030883f49..816af0845 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -136,6 +136,7 @@ pub use { payment_method_details_card_wallet_apple_pay::*, payment_method_details_card_wallet_google_pay::*, payment_method_options_customer_balance_eu_bank_account::*, + payment_method_options_us_bank_account_mandate_options::*, payment_method_config_biz_payment_method_configuration_details::*, payout::*, platform_tax_fee::*, diff --git a/src/resources/generated.rs b/src/resources/generated.rs index 510ff6149..5b9f298c5 100644 --- a/src/resources/generated.rs +++ b/src/resources/generated.rs @@ -34,6 +34,7 @@ pub mod core { pub mod payment_method_details_card_wallet_apple_pay; pub mod payment_method_details_card_wallet_google_pay; pub mod payment_method_options_customer_balance_eu_bank_account; + pub mod payment_method_options_us_bank_account_mandate_options; pub mod payout; pub mod platform_tax_fee; pub mod price; diff --git a/src/resources/generated/account_session.rs b/src/resources/generated/account_session.rs index 81fd874f4..f80d3ed9c 100644 --- a/src/resources/generated/account_session.rs +++ b/src/resources/generated/account_session.rs @@ -5,7 +5,6 @@ use crate::client::{Client, Response}; use crate::ids::{AccountId}; use crate::params::{Expand, Object, Timestamp}; -use crate::resources::{ConnectEmbeddedBaseFeatures}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession". @@ -54,33 +53,24 @@ pub struct ConnectEmbeddedAccountSessionCreateComponents { pub account_onboarding: ConnectEmbeddedBaseConfigClaim, - #[serde(skip_serializing_if = "Option::is_none")] - pub payment_details: Option, + pub payment_details: ConnectEmbeddedPaymentsConfig, - #[serde(skip_serializing_if = "Option::is_none")] - pub payments: Option, + pub payments: ConnectEmbeddedPaymentsConfig, - #[serde(skip_serializing_if = "Option::is_none")] - pub payouts: Option, + pub payouts: ConnectEmbeddedPayoutsConfig, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedBaseConfig { +pub struct ConnectEmbeddedBaseConfigClaim { /// Whether the embedded component is enabled. pub enabled: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option, + pub features: ConnectEmbeddedBaseFeatures, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedBaseConfigClaim { - - /// Whether the embedded component is enabled. - pub enabled: bool, - - pub features: ConnectEmbeddedBaseFeatures, +pub struct ConnectEmbeddedBaseFeatures { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -89,8 +79,7 @@ pub struct ConnectEmbeddedPaymentsConfig { /// Whether the embedded component is enabled. pub enabled: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub features: Option, + pub features: ConnectEmbeddedPaymentsFeatures, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -112,6 +101,34 @@ pub struct ConnectEmbeddedPaymentsFeatures { pub refund_management: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedPayoutsConfig { + + /// Whether the embedded component is enabled. + pub enabled: bool, + + pub features: ConnectEmbeddedPayoutsFeatures, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ConnectEmbeddedPayoutsFeatures { + + /// Whether to allow payout schedule to be changed. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + pub edit_payout_schedule: bool, + + /// Whether to allow creation of instant payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + pub instant_payouts: bool, + + /// Whether to allow creation of standard payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + pub standard_payouts: bool, +} + /// The parameters for `AccountSession::create`. #[derive(Clone, Debug, Serialize)] pub struct CreateAccountSession<'a> { @@ -253,4 +270,22 @@ pub struct CreateAccountSessionComponentsPaymentsFeatures { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountSessionComponentsPayoutsFeatures { + + /// Whether to allow payout schedule to be changed. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub edit_payout_schedule: Option, + + /// Whether to allow creation of instant payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub instant_payouts: Option, + + /// Whether to allow creation of standard payouts. + /// + /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. + #[serde(skip_serializing_if = "Option::is_none")] + pub standard_payouts: Option, } diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index af66305f3..649e3cadc 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -200,6 +200,8 @@ pub struct CheckoutSession { /// relevant text on the page, such as the submit button. /// /// `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode. + /// Possible values are `auto`, `pay`, `book`, `donate`. + /// If blank or `auto`, `pay` is used. pub submit_type: Option, /// The ID of the subscription for Checkout Sessions in `subscription` mode. @@ -804,6 +806,10 @@ 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, + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -921,6 +927,9 @@ 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, + /// Custom text that should be displayed alongside shipping address collection. pub shipping_address: Option, @@ -1005,6 +1014,14 @@ pub struct InvoiceSettingCustomField { pub value: String, } +#[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. + pub position: PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentPagesCheckoutSessionPhoneNumberCollection { /// Indicates whether phone number collection is enabled for the session. @@ -1321,6 +1338,8 @@ pub struct CreateCheckoutSession<'a> { /// relevant text on the page, such as the submit button. /// /// `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode. + /// Possible values are `auto`, `pay`, `book`, `donate`. + /// If blank or `auto`, `pay` is used. #[serde(skip_serializing_if = "Option::is_none")] pub submit_type: Option, @@ -1486,6 +1505,13 @@ 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, + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -1534,6 +1560,10 @@ 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, + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -1976,6 +2006,15 @@ pub struct CreateCheckoutSessionAfterExpirationRecovery { pub enabled: bool, } +#[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. + /// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + pub position: CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionCustomFieldsDropdown { /// The options available for the customer to select. @@ -2018,6 +2057,12 @@ pub struct CreateCheckoutSessionCustomFieldsText { pub minimum_length: Option, } +#[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. @@ -4579,6 +4624,48 @@ impl std::default::Default for CheckoutUsBankAccountPaymentMethodOptionsVerifica } } +/// An enum representing the possible values of an `CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement`'s `position` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { + Auto, + Hidden, +} + +impl CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Auto => { + "auto" + } + CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { + "hidden" + } + } + } +} + +impl AsRef for CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 +{ + fn default() -> Self { + Self::Auto + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionConsentCollection`'s `promotions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -6373,12 +6460,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -8015,6 +8104,40 @@ impl std::default::Default for PaymentPagesCheckoutSessionCustomerDetailsTaxExem } } +/// An enum representing the possible values of an `PaymentPagesCheckoutSessionPaymentMethodReuseAgreement`'s `position` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition { + Auto, + Hidden, +} + +impl PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition { + pub fn as_str(self) -> &'static str { + match self { + PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition::Auto => "auto", + PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition::Hidden => "hidden", + } + } +} + +impl AsRef for PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentPagesCheckoutSessionPaymentMethodReuseAgreementPosition { + fn default() -> Self { + Self::Auto + } +} + /// An enum representing the possible values of an `PaymentPagesCheckoutSessionShippingAddressCollection`'s `allowed_countries` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/customer.rs b/src/resources/generated/customer.rs index 173cf8793..a437b1a84 100644 --- a/src/resources/generated/customer.rs +++ b/src/resources/generated/customer.rs @@ -644,7 +644,7 @@ pub struct CreateCustomerTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerInvoiceSettings { - /// Default custom fields to be displayed on invoices for this customer. + /// 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. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/resources/generated/financial_connections_account.rs b/src/resources/generated/financial_connections_account.rs index 84e86242b..a7a2f7ed7 100644 --- a/src/resources/generated/financial_connections_account.rs +++ b/src/resources/generated/financial_connections_account.rs @@ -76,8 +76,14 @@ pub struct FinancialConnectionsAccount { /// If `category` is `investment` or `other`, this will be `other`. pub subcategory: FinancialConnectionsAccountSubcategory, + /// The list of data refresh subscriptions requested on this account. + pub subscriptions: Option>, + /// The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. pub supported_payment_method_types: Vec, + + /// The state of the most recent attempt to refresh the account transactions. + pub transaction_refresh: Option, } impl Object for FinancialConnectionsAccount { @@ -154,6 +160,12 @@ pub struct BankConnectionsResourceBalanceRefresh { /// Measured in seconds since the Unix epoch. pub last_attempted_at: Timestamp, + /// Time at which the next balance refresh can be initiated. + /// + /// This value will be `null` when `status` is `pending`. + /// Measured in seconds since the Unix epoch. + pub next_refresh_available_at: Option, + /// The status of the last refresh attempt. pub status: BankConnectionsResourceBalanceRefreshStatus, } @@ -170,6 +182,27 @@ pub struct BankConnectionsResourceOwnershipRefresh { pub status: BankConnectionsResourceOwnershipRefreshStatus, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BankConnectionsResourceTransactionRefresh { + + /// Unique identifier for the object. + pub id: String, + + /// The time at which the last refresh attempt was initiated. + /// + /// Measured in seconds since the Unix epoch. + pub last_attempted_at: Timestamp, + + /// Time at which the next transaction refresh can be initiated. + /// + /// This value will be `null` when `status` is `pending`. + /// Measured in seconds since the Unix epoch. + pub next_refresh_available_at: Option, + + /// The status of the last refresh attempt. + pub status: BankConnectionsResourceTransactionRefreshStatus, +} + /// An enum representing the possible values of an `BankConnectionsResourceBalanceRefresh`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -276,6 +309,42 @@ impl std::default::Default for BankConnectionsResourceOwnershipRefreshStatus { } } +/// An enum representing the possible values of an `BankConnectionsResourceTransactionRefresh`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum BankConnectionsResourceTransactionRefreshStatus { + Failed, + Pending, + Succeeded, +} + +impl BankConnectionsResourceTransactionRefreshStatus { + pub fn as_str(self) -> &'static str { + match self { + BankConnectionsResourceTransactionRefreshStatus::Failed => "failed", + BankConnectionsResourceTransactionRefreshStatus::Pending => "pending", + BankConnectionsResourceTransactionRefreshStatus::Succeeded => "succeeded", + } + } +} + +impl AsRef for BankConnectionsResourceTransactionRefreshStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for BankConnectionsResourceTransactionRefreshStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for BankConnectionsResourceTransactionRefreshStatus { + fn default() -> Self { + Self::Failed + } +} + /// An enum representing the possible values of an `FinancialConnectionsAccount`'s `category` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -430,6 +499,38 @@ impl std::default::Default for FinancialConnectionsAccountSubcategory { } } +/// An enum representing the possible values of an `FinancialConnectionsAccount`'s `subscriptions` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum FinancialConnectionsAccountSubscriptions { + Transactions, +} + +impl FinancialConnectionsAccountSubscriptions { + pub fn as_str(self) -> &'static str { + match self { + FinancialConnectionsAccountSubscriptions::Transactions => "transactions", + } + } +} + +impl AsRef for FinancialConnectionsAccountSubscriptions { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for FinancialConnectionsAccountSubscriptions { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for FinancialConnectionsAccountSubscriptions { + fn default() -> Self { + Self::Transactions + } +} + /// An enum representing the possible values of an `FinancialConnectionsAccount`'s `supported_payment_method_types` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/connect_embedded_base_features.rs b/src/resources/generated/financial_connections_account_refreshed_transactions.rs similarity index 58% rename from src/resources/generated/connect_embedded_base_features.rs rename to src/resources/generated/financial_connections_account_refreshed_transactions.rs index d9e036334..be6efbe2a 100644 --- a/src/resources/generated/connect_embedded_base_features.rs +++ b/src/resources/generated/financial_connections_account_refreshed_transactions.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; -/// The resource representing a Stripe "ConnectEmbeddedBaseFeatures". +/// The resource representing a Stripe "financial_connections.account.refreshed_transactions". #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ConnectEmbeddedBaseFeatures { +pub struct FinancialConnectionsAccountRefreshedTransactions { } diff --git a/src/resources/generated/financial_connections_session.rs b/src/resources/generated/financial_connections_session.rs index c32276e9b..85036b049 100644 --- a/src/resources/generated/financial_connections_session.rs +++ b/src/resources/generated/financial_connections_session.rs @@ -220,6 +220,7 @@ impl std::default::Default for CreateFinancialConnectionsSessionPermissions { pub enum CreateFinancialConnectionsSessionPrefetch { Balances, Ownership, + Transactions, } impl CreateFinancialConnectionsSessionPrefetch { @@ -227,6 +228,7 @@ impl CreateFinancialConnectionsSessionPrefetch { match self { CreateFinancialConnectionsSessionPrefetch::Balances => "balances", CreateFinancialConnectionsSessionPrefetch::Ownership => "ownership", + CreateFinancialConnectionsSessionPrefetch::Transactions => "transactions", } } } @@ -292,6 +294,7 @@ impl std::default::Default for FinancialConnectionsSessionPermissions { pub enum FinancialConnectionsSessionPrefetch { Balances, Ownership, + Transactions, } impl FinancialConnectionsSessionPrefetch { @@ -299,6 +302,7 @@ impl FinancialConnectionsSessionPrefetch { match self { FinancialConnectionsSessionPrefetch::Balances => "balances", FinancialConnectionsSessionPrefetch::Ownership => "ownership", + FinancialConnectionsSessionPrefetch::Transactions => "transactions", } } } diff --git a/src/resources/generated/financial_connections_transaction.rs b/src/resources/generated/financial_connections_transaction.rs new file mode 100644 index 000000000..ec33ab2e0 --- /dev/null +++ b/src/resources/generated/financial_connections_transaction.rs @@ -0,0 +1,112 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +use crate::ids::{FinancialConnectionsTransactionId}; +use crate::params::{Object, Timestamp}; +use crate::resources::{Currency}; +use serde::{Deserialize, Serialize}; + +/// The resource representing a Stripe "BankConnectionsResourceTransaction". +/// +/// For more details see +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct FinancialConnectionsTransaction { + /// Unique identifier for the object. + pub id: FinancialConnectionsTransactionId, + + /// The ID of the Financial Connections Account this transaction belongs to. + pub account: String, + + /// The amount of this transaction, in cents (or local equivalent). + pub amount: i64, + + /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + /// + /// Must be a [supported currency](https://stripe.com/docs/currencies). + pub currency: Currency, + + /// The description of this transaction. + pub description: 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 status of the transaction. + pub status: FinancialConnectionsTransactionStatus, + + pub status_transitions: BankConnectionsResourceTransactionResourceStatusTransitions, + + /// Time at which the transaction was transacted. + /// + /// Measured in seconds since the Unix epoch. + pub transacted_at: Timestamp, + + /// The token of the transaction refresh that last updated or created this transaction. + pub transaction_refresh: String, + + /// Time at which the object was last updated. + /// + /// Measured in seconds since the Unix epoch. + pub updated: Timestamp, +} + +impl Object for FinancialConnectionsTransaction { + type Id = FinancialConnectionsTransactionId; + fn id(&self) -> Self::Id { + self.id.clone() + } + fn object(&self) -> &'static str { + "financial_connections.transaction" + } +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct BankConnectionsResourceTransactionResourceStatusTransitions { + + /// Time at which this transaction posted. + /// + /// Measured in seconds since the Unix epoch. + pub posted_at: Option, + + /// Time at which this transaction was voided. + /// + /// Measured in seconds since the Unix epoch. + pub void_at: Option, +} + +/// An enum representing the possible values of an `FinancialConnectionsTransaction`'s `status` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum FinancialConnectionsTransactionStatus { + Pending, + Posted, + Void, +} + +impl FinancialConnectionsTransactionStatus { + pub fn as_str(self) -> &'static str { + match self { + FinancialConnectionsTransactionStatus::Pending => "pending", + FinancialConnectionsTransactionStatus::Posted => "posted", + FinancialConnectionsTransactionStatus::Void => "void", + } + } +} + +impl AsRef for FinancialConnectionsTransactionStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for FinancialConnectionsTransactionStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for FinancialConnectionsTransactionStatus { + fn default() -> Self { + Self::Pending + } +} diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index a6b00815c..dd7af7c20 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -1821,12 +1821,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -1910,12 +1912,14 @@ pub enum CreateInvoicePaymentSettingsPaymentMethodTypes { Card, Cashapp, CustomerBalance, + Eps, Fpx, Giropay, Grabpay, Ideal, Konbini, Link, + P24, Paynow, Paypal, Promptpay, @@ -1941,12 +1945,14 @@ impl CreateInvoicePaymentSettingsPaymentMethodTypes { CreateInvoicePaymentSettingsPaymentMethodTypes::Card => "card", CreateInvoicePaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", CreateInvoicePaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", + CreateInvoicePaymentSettingsPaymentMethodTypes::Eps => "eps", CreateInvoicePaymentSettingsPaymentMethodTypes::Fpx => "fpx", CreateInvoicePaymentSettingsPaymentMethodTypes::Giropay => "giropay", CreateInvoicePaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", CreateInvoicePaymentSettingsPaymentMethodTypes::Ideal => "ideal", CreateInvoicePaymentSettingsPaymentMethodTypes::Konbini => "konbini", CreateInvoicePaymentSettingsPaymentMethodTypes::Link => "link", + CreateInvoicePaymentSettingsPaymentMethodTypes::P24 => "p24", CreateInvoicePaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateInvoicePaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateInvoicePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", @@ -2526,12 +2532,14 @@ pub enum InvoicesPaymentSettingsPaymentMethodTypes { Card, Cashapp, CustomerBalance, + Eps, Fpx, Giropay, Grabpay, Ideal, Konbini, Link, + P24, Paynow, Paypal, Promptpay, @@ -2555,12 +2563,14 @@ impl InvoicesPaymentSettingsPaymentMethodTypes { InvoicesPaymentSettingsPaymentMethodTypes::Card => "card", InvoicesPaymentSettingsPaymentMethodTypes::Cashapp => "cashapp", InvoicesPaymentSettingsPaymentMethodTypes::CustomerBalance => "customer_balance", + InvoicesPaymentSettingsPaymentMethodTypes::Eps => "eps", InvoicesPaymentSettingsPaymentMethodTypes::Fpx => "fpx", InvoicesPaymentSettingsPaymentMethodTypes::Giropay => "giropay", InvoicesPaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", InvoicesPaymentSettingsPaymentMethodTypes::Ideal => "ideal", InvoicesPaymentSettingsPaymentMethodTypes::Konbini => "konbini", InvoicesPaymentSettingsPaymentMethodTypes::Link => "link", + InvoicesPaymentSettingsPaymentMethodTypes::P24 => "p24", InvoicesPaymentSettingsPaymentMethodTypes::Paynow => "paynow", InvoicesPaymentSettingsPaymentMethodTypes::Paypal => "paypal", InvoicesPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", diff --git a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs index e742f3468..5f47067a2 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 @@ -71,6 +71,7 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { Balances, + Transactions, } impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { @@ -79,6 +80,9 @@ impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => { "balances" } + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Transactions => { + "transactions" + } } } } diff --git a/src/resources/generated/issuing_authorization.rs b/src/resources/generated/issuing_authorization.rs index c211aa745..38250fa0a 100644 --- a/src/resources/generated/issuing_authorization.rs +++ b/src/resources/generated/issuing_authorization.rs @@ -329,6 +329,7 @@ impl std::default::Default for IssuingAuthorizationAuthenticationExemptionClaime pub enum IssuingAuthorizationAuthenticationExemptionType { LowValueTransaction, TransactionRiskAnalysis, + Unknown, } impl IssuingAuthorizationAuthenticationExemptionType { @@ -340,6 +341,7 @@ impl IssuingAuthorizationAuthenticationExemptionType { IssuingAuthorizationAuthenticationExemptionType::TransactionRiskAnalysis => { "transaction_risk_analysis" } + IssuingAuthorizationAuthenticationExemptionType::Unknown => "unknown", } } } diff --git a/src/resources/generated/issuing_cardholder.rs b/src/resources/generated/issuing_cardholder.rs index 3cc4cf0b0..2f92216b9 100644 --- a/src/resources/generated/issuing_cardholder.rs +++ b/src/resources/generated/issuing_cardholder.rs @@ -142,7 +142,9 @@ pub struct IssuingCardholderIndividual { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderCardIssuing { - /// Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + /// 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. pub user_terms_acceptance: Option, } @@ -186,13 +188,9 @@ pub struct IssuingCardholderSpendingLimit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct IssuingCardholderUserTermsAcceptance { /// The Unix timestamp marking when the cardholder accepted the Authorized User Terms. - /// - /// Required for Celtic Spend Card users. pub date: Option, /// The IP address from which the cardholder accepted the Authorized User Terms. - /// - /// Required for Celtic Spend Card users. pub ip: Option, /// The user agent of the browser from which the cardholder accepted the Authorized User Terms. diff --git a/src/resources/generated/linked_account_options_us_bank_account.rs b/src/resources/generated/linked_account_options_us_bank_account.rs index 1ed512a17..890bc2468 100644 --- a/src/resources/generated/linked_account_options_us_bank_account.rs +++ b/src/resources/generated/linked_account_options_us_bank_account.rs @@ -66,12 +66,14 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPermissions { #[serde(rename_all = "snake_case")] pub enum LinkedAccountOptionsUsBankAccountPrefetch { Balances, + Transactions, } impl LinkedAccountOptionsUsBankAccountPrefetch { pub fn as_str(self) -> &'static str { match self { LinkedAccountOptionsUsBankAccountPrefetch::Balances => "balances", + LinkedAccountOptionsUsBankAccountPrefetch::Transactions => "transactions", } } } diff --git a/src/resources/generated/mandate.rs b/src/resources/generated/mandate.rs index dd93ad279..9fae48f1d 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -200,7 +200,11 @@ pub struct MandateSingleUse { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateUsBankAccount {} +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 {} @@ -459,3 +463,35 @@ impl std::default::Default for MandateType { Self::MultiUse } } + +/// An enum representing the possible values of an `MandateUsBankAccount`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum MandateUsBankAccountCollectionMethod { + Paper, +} + +impl MandateUsBankAccountCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + MandateUsBankAccountCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef for MandateUsBankAccountCollectionMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for MandateUsBankAccountCollectionMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for MandateUsBankAccountCollectionMethod { + fn default() -> Self { + Self::Paper + } +} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index 9fbff520b..75826b92a 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -15,7 +15,7 @@ use crate::resources::{ PaymentIntentOffSession, PaymentMethod, PaymentMethodConfigBizPaymentMethodConfigurationDetails, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodOptionsCustomerBalanceEuBankAccount, - PaymentSource, Review, Shipping, + PaymentMethodOptionsUsBankAccountMandateOptions, PaymentSource, Review, Shipping, }; /// The resource representing a Stripe "PaymentIntent". @@ -73,6 +73,7 @@ pub struct PaymentIntent { /// Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. pub client_secret: Option, + /// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. pub confirmation_method: PaymentIntentConfirmationMethod, /// Time at which the object was created. @@ -1007,6 +1008,9 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Preferred transaction settlement speed. #[serde(skip_serializing_if = "Option::is_none")] pub preferred_settlement_speed: @@ -1540,6 +1544,7 @@ pub struct CreatePaymentIntent<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub confirm: Option, + /// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. #[serde(skip_serializing_if = "Option::is_none")] pub confirmation_method: Option, @@ -3452,6 +3457,10 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { pub financial_connections: Option, + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Additional fields for network related functions. #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, @@ -4335,6 +4344,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { pub financial_connections: Option, + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Additional fields for network related functions. #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, @@ -4656,6 +4669,14 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti pub return_url: Option, } +#[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, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks { /// Triggers validations to run across the selected networks. @@ -4890,6 +4911,14 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti pub return_url: Option, } +#[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, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks { /// Triggers validations to run across the selected networks. @@ -6594,6 +6623,7 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsCardReques pub enum CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, } impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -6603,6 +6633,9 @@ impl CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { "automatic" } + CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { + "challenge" + } } } } @@ -8150,12 +8183,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -8183,6 +8218,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + Paper, +} + +impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 +{ + fn default() -> Self { + Self::Paper + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -9105,6 +9178,7 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsCardRequestOverc pub enum PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, } impl PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -9112,6 +9186,7 @@ impl PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -12447,6 +12522,7 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsCardReques pub enum UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, } impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -12456,6 +12532,9 @@ impl UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure { UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => { "automatic" } + UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => { + "challenge" + } } } } @@ -14003,12 +14082,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -14036,6 +14117,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + Paper, +} + +impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 +{ + fn default() -> Self { + Self::Paper + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index be370b037..f0f75562a 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -63,7 +63,6 @@ pub struct PaymentLink { pub customer_creation: PaymentLinkCustomerCreation, /// The custom message to be displayed to a customer when a payment link is no longer active. - #[serde(skip_serializing_if = "Option::is_none")] pub inactive_message: Option, /// Configuration for creating invoice for payment mode payment links. @@ -100,7 +99,6 @@ pub struct PaymentLink { pub phone_number_collection: PaymentLinksResourcePhoneNumberCollection, /// Settings that restrict the usage of a payment link. - #[serde(skip_serializing_if = "Option::is_none")] pub restrictions: Option, /// Configuration for collecting the customer's shipping address. @@ -195,6 +193,9 @@ pub struct PaymentLinksResourceCompletionBehaviorRedirect { #[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, + /// If set to `auto`, enables the collection of customer consent for promotional communications. pub promotions: Option, @@ -285,6 +286,9 @@ 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, + /// Custom text that should be displayed alongside shipping address collection. pub shipping_address: Option, @@ -379,6 +383,14 @@ pub struct PaymentLinksResourcePaymentIntentData { pub transfer_group: Option, } +#[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. + pub position: PaymentLinksResourcePaymentMethodReuseAgreementPosition, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourcePhoneNumberCollection { /// If `true`, a phone number will be collected during checkout. @@ -825,6 +837,13 @@ 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, + /// If set to `auto`, enables the collection of customer consent for promotional communications. /// /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. @@ -873,6 +892,10 @@ 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, + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -1094,6 +1117,10 @@ 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, + /// Custom text that should be displayed alongside shipping address collection. #[serde(skip_serializing_if = "Option::is_none")] pub shipping_address: Option, @@ -1210,6 +1237,15 @@ pub struct CreatePaymentLinkAfterCompletionRedirect { pub url: String, } +#[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. + /// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + pub position: CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentLinkCustomFieldsDropdown { /// The options available for the customer to select. @@ -1252,6 +1288,12 @@ pub struct CreatePaymentLinkCustomFieldsText { pub minimum_length: Option, } +#[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. @@ -1392,6 +1434,12 @@ pub struct UpdatePaymentLinkCustomFieldsText { pub minimum_length: Option, } +#[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. @@ -1599,6 +1647,44 @@ impl std::default::Default for CreatePaymentLinkAfterCompletionType { } } +/// An enum representing the possible values of an `CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement`'s `position` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { + Auto, + Hidden, +} + +impl CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto", + CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => { + "hidden" + } + } + } +} + +impl AsRef for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition +{ + fn default() -> Self { + Self::Auto + } +} + /// An enum representing the possible values of an `CreatePaymentLinkConsentCollection`'s `promotions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3176,6 +3262,40 @@ impl std::default::Default for PaymentLinksResourcePaymentIntentDataSetupFutureU } } +/// An enum representing the possible values of an `PaymentLinksResourcePaymentMethodReuseAgreement`'s `position` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentLinksResourcePaymentMethodReuseAgreementPosition { + Auto, + Hidden, +} + +impl PaymentLinksResourcePaymentMethodReuseAgreementPosition { + pub fn as_str(self) -> &'static str { + match self { + PaymentLinksResourcePaymentMethodReuseAgreementPosition::Auto => "auto", + PaymentLinksResourcePaymentMethodReuseAgreementPosition::Hidden => "hidden", + } + } +} + +impl AsRef for PaymentLinksResourcePaymentMethodReuseAgreementPosition { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentLinksResourcePaymentMethodReuseAgreementPosition { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentLinksResourcePaymentMethodReuseAgreementPosition { + fn default() -> Self { + Self::Auto + } +} + /// An enum representing the possible values of an `PaymentLinksResourceShippingAddressCollection`'s `allowed_countries` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/payment_method_configuration.rs b/src/resources/generated/payment_method_configuration.rs index 9c6a460a3..82c877991 100644 --- a/src/resources/generated/payment_method_configuration.rs +++ b/src/resources/generated/payment_method_configuration.rs @@ -75,9 +75,6 @@ pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] pub grabpay: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub id_bank_transfer: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub ideal: Option, @@ -99,15 +96,9 @@ pub struct PaymentMethodConfiguration { /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. pub livemode: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub multibanco: Option, - /// The configuration's name. pub name: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub netbanking: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub oxxo: Option, @@ -117,9 +108,6 @@ pub struct PaymentMethodConfiguration { /// For child configs, the configuration's parent configuration. pub parent: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pay_by_bank: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub paynow: Option, @@ -130,13 +118,13 @@ pub struct PaymentMethodConfiguration { pub promptpay: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub sepa_debit: Option, + pub revolut_pay: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub sofort: Option, + pub sepa_debit: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub upi: Option, + pub sofort: Option, #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -412,6 +400,12 @@ pub struct CreatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + /// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. + /// + /// Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. /// /// SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. @@ -474,6 +468,7 @@ impl<'a> CreatePaymentMethodConfiguration<'a> { paynow: Default::default(), paypal: Default::default(), promptpay: Default::default(), + revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), us_bank_account: Default::default(), @@ -713,6 +708,12 @@ pub struct UpdatePaymentMethodConfiguration<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub promptpay: Option, + /// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. + /// + /// Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + #[serde(skip_serializing_if = "Option::is_none")] + pub revolut_pay: Option, + /// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. /// /// SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. @@ -775,6 +776,7 @@ impl<'a> UpdatePaymentMethodConfiguration<'a> { paynow: Default::default(), paypal: Default::default(), promptpay: Default::default(), + revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), us_bank_account: Default::default(), @@ -1007,6 +1009,14 @@ pub struct CreatePaymentMethodConfigurationPromptpay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationRevolutPay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationSepaDebit { @@ -1263,6 +1273,14 @@ pub struct UpdatePaymentMethodConfigurationPromptpay { pub display_preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationRevolutPay { + + /// Whether or not the payment method should be displayed. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationSepaDebit { @@ -1519,6 +1537,14 @@ pub struct CreatePaymentMethodConfigurationPromptpayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodConfigurationRevolutPayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodConfigurationSepaDebitDisplayPreference { @@ -1775,6 +1801,14 @@ pub struct UpdatePaymentMethodConfigurationPromptpayDisplayPreference { pub preference: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentMethodConfigurationRevolutPayDisplayPreference { + + /// The account's preference for whether or not to display this payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub preference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodConfigurationSepaDebitDisplayPreference { @@ -2815,6 +2849,42 @@ impl std::default::Default for CreatePaymentMethodConfigurationPromptpayDisplayP } } +/// An enum representing the possible values of an `CreatePaymentMethodConfigurationRevolutPayDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + None, + Off, + On, +} + +impl CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::None => "none", + CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::Off => "off", + CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentMethodConfigurationSepaDebitDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4037,6 +4107,42 @@ impl std::default::Default for UpdatePaymentMethodConfigurationPromptpayDisplayP } } +/// An enum representing the possible values of an `UpdatePaymentMethodConfigurationRevolutPayDisplayPreference`'s `preference` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + None, + Off, + On, +} + +impl UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::None => "none", + UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::Off => "off", + UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference::On => "on", + } + } +} + +impl AsRef for UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentMethodConfigurationRevolutPayDisplayPreferencePreference { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentMethodConfigurationSepaDebitDisplayPreference`'s `preference` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] 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 new file mode 100644 index 000000000..f255d7400 --- /dev/null +++ b/src/resources/generated/payment_method_options_us_bank_account_mandate_options.rs @@ -0,0 +1,45 @@ +// ====================================== +// This file was automatically generated. +// ====================================== + +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, +} + +/// An enum representing the possible values of an `PaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + Paper, +} + +impl PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + fn default() -> Self { + Self::Paper + } +} diff --git a/src/resources/generated/quote.rs b/src/resources/generated/quote.rs index 8c25f92a2..ce5e8f2fb 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -96,8 +96,7 @@ pub struct Quote { /// The invoice that was created from this quote. pub invoice: Option>, - /// All invoices will be billed using the specified settings. - pub invoice_settings: Option, + pub invoice_settings: InvoiceSettingQuoteSetting, /// A list of items the customer is being quoted for. #[serde(default)] diff --git a/src/resources/generated/refund.rs b/src/resources/generated/refund.rs index 828447f6e..4cf17066d 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -42,6 +42,9 @@ pub struct Refund { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub destination_details: Option, + /// After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. #[serde(skip_serializing_if = "Option::is_none")] pub failure_balance_transaction: Option>, @@ -136,6 +139,134 @@ impl Object for Refund { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RefundDestinationDetails { + #[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_bank_transfer: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub blik: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub br_bank_transfer: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub card: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub cashapp: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub customer_cash_balance: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub eps: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub eu_bank_transfer: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub gb_bank_transfer: 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 jp_bank_transfer: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub klarna: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub mx_bank_transfer: 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 revolut: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub sofort: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub th_bank_transfer: Option, + + /// The type of transaction-specific details of the payment method used in the refund (e.g., `card`). + /// + /// An additional hash is included on `destination_details` with a name matching this value. + /// It contains information specific to the refund transaction. + #[serde(rename = "type")] + pub type_: String, + + #[serde(skip_serializing_if = "Option::is_none")] + pub us_bank_transfer: 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 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, + + /// Status of the reference number on the refund. + /// + /// This can be `pending`, `available` or `unavailable`. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference_status: Option, + + /// Type of the reference number assigned to the refund. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference_type: Option, + + /// The type of refund. + /// + /// This can be `refund`, `reversal`, or `pending`. + #[serde(rename = "type")] + pub type_: RefundDestinationDetailsCardType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct RefundDestinationDetailsGeneric { + /// The reference assigned to the refund. + pub reference: Option, + + /// Status of the reference on the refund. + /// + /// This can be `pending`, `available` or `unavailable`. + pub reference_status: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct RefundNextAction { /// Contains the refund details. @@ -328,6 +459,42 @@ impl<'a> UpdateRefund<'a> { } } +/// An enum representing the possible values of an `RefundDestinationDetailsCard`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum RefundDestinationDetailsCardType { + Pending, + Refund, + Reversal, +} + +impl RefundDestinationDetailsCardType { + pub fn as_str(self) -> &'static str { + match self { + RefundDestinationDetailsCardType::Pending => "pending", + RefundDestinationDetailsCardType::Refund => "refund", + RefundDestinationDetailsCardType::Reversal => "reversal", + } + } +} + +impl AsRef for RefundDestinationDetailsCardType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for RefundDestinationDetailsCardType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for RefundDestinationDetailsCardType { + fn default() -> Self { + Self::Pending + } +} + /// An enum representing the possible values of an `CreateRefund`'s `origin` 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 ad182681c..83a0e980a 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -10,7 +10,8 @@ use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Range use crate::resources::{ Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, - PaymentMethodConfigBizPaymentMethodConfigurationDetails, SetupAttempt, + PaymentMethodConfigBizPaymentMethodConfigurationDetails, + PaymentMethodOptionsUsBankAccountMandateOptions, SetupAttempt, }; /// The resource representing a Stripe "SetupIntent". @@ -383,6 +384,9 @@ pub struct SetupIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Bank account verification method. #[serde(skip_serializing_if = "Option::is_none")] pub verification_method: Option, @@ -1384,6 +1388,10 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount { pub financial_connections: Option, + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Additional fields for network related functions. #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, @@ -1679,6 +1687,10 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount { pub financial_connections: Option, + /// Additional fields for Mandate creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub mandate_options: Option, + /// Additional fields for network related functions. #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, @@ -1899,6 +1911,14 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection pub return_url: Option, } +#[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, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { /// Triggers validations to run across the selected networks. @@ -2104,6 +2124,14 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection pub return_url: Option, } +#[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, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks { /// Triggers validations to run across the selected networks. @@ -3167,6 +3195,7 @@ impl std::default::Default for CreateSetupIntentPaymentMethodOptionsCardNetwork pub enum CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, } impl CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -3174,6 +3203,7 @@ impl CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + CreateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -3442,12 +3472,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -3473,6 +3505,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + Paper, +} + +impl CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef + for CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 +{ + fn default() -> Self { + Self::Paper + } +} + /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3896,7 +3966,6 @@ pub enum SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, Challenge, - ChallengeOnly, } impl SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -3905,9 +3974,6 @@ impl SetupIntentPaymentMethodOptionsCardRequestThreeDSecure { SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", - SetupIntentPaymentMethodOptionsCardRequestThreeDSecure::ChallengeOnly => { - "challenge_only" - } } } } @@ -5059,6 +5125,7 @@ impl std::default::Default for UpdateSetupIntentPaymentMethodOptionsCardNetwork pub enum UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { Any, Automatic, + Challenge, } impl UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { @@ -5066,6 +5133,7 @@ impl UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure { match self { UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Any => "any", UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Automatic => "automatic", + UpdateSetupIntentPaymentMethodOptionsCardRequestThreeDSecure::Challenge => "challenge", } } } @@ -5334,12 +5402,14 @@ impl std::default::Default #[serde(rename_all = "snake_case")] pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { pub fn as_str(self) -> &'static str { match self { UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -5365,6 +5435,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions`'s `collection_method` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + Paper, +} + +impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper", + } + } +} + +impl AsRef + for UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +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 +{ + fn default() -> Self { + Self::Paper + } +} + /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index ac6a761e4..334c15520 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -37,11 +37,16 @@ pub struct Subscription { pub automatic_tax: SubscriptionAutomaticTax, - /// 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 reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. /// + /// It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. /// The timestamp is in UTC format. pub billing_cycle_anchor: Timestamp, + /// The fixed values used to calculate the `billing_cycle_anchor`. + #[serde(skip_serializing_if = "Option::is_none")] + pub billing_cycle_anchor_config: Option, + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. pub billing_thresholds: Option, @@ -309,6 +314,24 @@ pub struct SubscriptionPendingInvoiceItemInterval { pub interval_count: u64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionsResourceBillingCycleAnchorConfig { + /// The day of the month of the billing_cycle_anchor. + pub day_of_month: i64, + + /// The hour of the day of the billing_cycle_anchor. + pub hour: Option, + + /// The minute of the hour of the billing_cycle_anchor. + pub minute: Option, + + /// The month to start full cycle billing periods. + pub month: Option, + + /// The second of the minute of the billing_cycle_anchor. + pub second: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsResourcePauseCollection { /// The payment collection behavior for this subscription while paused. @@ -445,13 +468,19 @@ pub struct CreateSubscription<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub backdate_start_date: Option, - /// A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). + /// A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). /// - /// This is used to determine 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. + /// The anchor is the reference point that aligns future billing cycle dates. + /// It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. #[serde(skip_serializing_if = "Option::is_none")] pub billing_cycle_anchor: Option, + /// Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. + /// + /// When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. + #[serde(skip_serializing_if = "Option::is_none")] + pub billing_cycle_anchor_config: Option, + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// /// Pass an empty string to remove previously-defined thresholds. @@ -631,6 +660,7 @@ impl<'a> CreateSubscription<'a> { automatic_tax: Default::default(), backdate_start_date: Default::default(), billing_cycle_anchor: Default::default(), + billing_cycle_anchor_config: Default::default(), billing_thresholds: Default::default(), cancel_at: Default::default(), cancel_at_period_end: Default::default(), @@ -1029,6 +1059,38 @@ pub struct CreateSubscriptionAutomaticTax { pub enabled: bool, } +#[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. + pub day_of_month: i64, + + /// The hour of the day the billing_cycle_anchor should be. + /// + /// Ranges from 0 to 23. + #[serde(skip_serializing_if = "Option::is_none")] + pub hour: Option, + + /// The minute of the hour the billing_cycle_anchor should be. + /// + /// Ranges from 0 to 59. + #[serde(skip_serializing_if = "Option::is_none")] + pub minute: Option, + + /// The month to start full cycle billing periods. + /// + /// Ranges from 1 to 12. + #[serde(skip_serializing_if = "Option::is_none")] + pub month: Option, + + /// The second of the minute the billing_cycle_anchor should be. + /// + /// Ranges from 0 to 59. + #[serde(skip_serializing_if = "Option::is_none")] + pub second: Option, +} + #[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. @@ -2100,6 +2162,7 @@ impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOpt pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl @@ -2108,6 +2171,7 @@ impl pub fn as_str(self) -> &'static str { match self { CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -2185,12 +2249,14 @@ pub enum CreateSubscriptionPaymentSettingsPaymentMethodTypes { Card, Cashapp, CustomerBalance, + Eps, Fpx, Giropay, Grabpay, Ideal, Konbini, Link, + P24, Paynow, Paypal, Promptpay, @@ -2218,12 +2284,14 @@ impl CreateSubscriptionPaymentSettingsPaymentMethodTypes { CreateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { "customer_balance" } + CreateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Ideal => "ideal", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Konbini => "konbini", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Link => "link", + CreateSubscriptionPaymentSettingsPaymentMethodTypes::P24 => "p24", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", CreateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", @@ -2813,12 +2881,14 @@ pub enum SubscriptionsResourcePaymentSettingsPaymentMethodTypes { Card, Cashapp, CustomerBalance, + Eps, Fpx, Giropay, Grabpay, Ideal, Konbini, Link, + P24, Paynow, Paypal, Promptpay, @@ -2846,12 +2916,14 @@ impl SubscriptionsResourcePaymentSettingsPaymentMethodTypes { SubscriptionsResourcePaymentSettingsPaymentMethodTypes::CustomerBalance => { "customer_balance" } + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Eps => "eps", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Fpx => "fpx", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Giropay => "giropay", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Ideal => "ideal", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Konbini => "konbini", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Link => "link", + SubscriptionsResourcePaymentSettingsPaymentMethodTypes::P24 => "p24", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paynow => "paynow", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Paypal => "paypal", SubscriptionsResourcePaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", @@ -3315,6 +3387,7 @@ impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOpt pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { Balances, + Transactions, } impl @@ -3323,6 +3396,7 @@ impl pub fn as_str(self) -> &'static str { match self { UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Transactions => "transactions", } } } @@ -3400,12 +3474,14 @@ pub enum UpdateSubscriptionPaymentSettingsPaymentMethodTypes { Card, Cashapp, CustomerBalance, + Eps, Fpx, Giropay, Grabpay, Ideal, Konbini, Link, + P24, Paynow, Paypal, Promptpay, @@ -3433,12 +3509,14 @@ impl UpdateSubscriptionPaymentSettingsPaymentMethodTypes { UpdateSubscriptionPaymentSettingsPaymentMethodTypes::CustomerBalance => { "customer_balance" } + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Eps => "eps", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Fpx => "fpx", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Giropay => "giropay", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Grabpay => "grabpay", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Ideal => "ideal", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Konbini => "konbini", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Link => "link", + UpdateSubscriptionPaymentSettingsPaymentMethodTypes::P24 => "p24", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paynow => "paynow", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Paypal => "paypal", UpdateSubscriptionPaymentSettingsPaymentMethodTypes::Promptpay => "promptpay", diff --git a/src/resources/generated/subscription_schedule.rs b/src/resources/generated/subscription_schedule.rs index ef33ac7a7..5700fa137 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -50,7 +50,8 @@ pub struct SubscriptionSchedule { /// Behavior of the subscription schedule and underlying subscription when it ends. /// /// Possible values are `release` or `cancel` with the default being `release`. - /// `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + /// `release` will end the subscription schedule and keep the underlying subscription running. + /// `cancel` will end the subscription schedule and cancel the underlying subscription. pub end_behavior: SubscriptionScheduleEndBehavior, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -323,8 +324,7 @@ pub struct SubscriptionScheduleDefaultSettings { /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. pub description: Option, - /// The subscription schedule's default invoice settings. - pub invoice_settings: Option, + pub invoice_settings: SubscriptionScheduleInvoiceSettings, /// The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. /// @@ -355,7 +355,8 @@ pub struct CreateSubscriptionSchedule<'a> { /// Behavior of the subscription schedule and underlying subscription when it ends. /// /// Possible values are `release` or `cancel` with the default being `release`. - /// `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + /// `release` will end the subscription schedule and keep the underlying subscription running. + /// `cancel` will end the subscription schedule and cancel the underlying subscription. #[serde(skip_serializing_if = "Option::is_none")] pub end_behavior: Option, @@ -493,7 +494,8 @@ pub struct UpdateSubscriptionSchedule<'a> { /// Behavior of the subscription schedule and underlying subscription when it ends. /// /// Possible values are `release` or `cancel` with the default being `release`. - /// `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + /// `release` will end the subscription schedule and keep the underlying subscription running. + /// `cancel` will end the subscription schedule and cancel the underlying subscription. #[serde(skip_serializing_if = "Option::is_none")] pub end_behavior: Option, diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index bd5d4ea12..0cccadfda 100644 --- a/src/resources/generated/webhook_endpoint.rs +++ b/src/resources/generated/webhook_endpoint.rs @@ -421,6 +421,8 @@ pub enum EventFilter { FinancialConnectionsAccountReactivated, #[serde(rename = "financial_connections.account.refreshed_balance")] FinancialConnectionsAccountRefreshedBalance, + #[serde(rename = "financial_connections.account.refreshed_transactions")] + FinancialConnectionsAccountRefreshedTransactions, #[serde(rename = "identity.verification_session.canceled")] IdentityVerificationSessionCanceled, #[serde(rename = "identity.verification_session.created")] @@ -826,6 +828,9 @@ impl EventFilter { EventFilter::FinancialConnectionsAccountRefreshedBalance => { "financial_connections.account.refreshed_balance" } + EventFilter::FinancialConnectionsAccountRefreshedTransactions => { + "financial_connections.account.refreshed_transactions" + } EventFilter::IdentityVerificationSessionCanceled => { "identity.verification_session.canceled" }