diff --git a/API_VERSION b/API_VERSION new file mode 100644 index 000000000..1116f63c2 --- /dev/null +++ b/API_VERSION @@ -0,0 +1 @@ +2025-06-30.basil \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f32c9c7d8..e5d13194d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,31 @@ # Changelog +## 15.3.0 - 2025-07-01 +* [#1618](https://github.com/stripe/stripe-ruby/pull/1618) Update generated code + * Add support for `migrate` method on resource `Subscription` + * Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal::Reader` + * Add support for `crypto_payments` on `Account::Capability`, `Account::CreateParams::Capability`, and `Account::UpdateParams::Capability` + * Add support for `proof_of_address` on `Account::CreateParams::Document` and `Account::UpdateParams::Document` + * Add support for `monthly_payout_days` and `weekly_payout_days` on `Account::CreateParams::Setting::Payout::Schedule`, `Account::Setting::Payout::Schedule`, and `Account::UpdateParams::Setting::Payout::Schedule` + * Change `Account::Setting::Invoice.hosted_payment_method_save` to be required + * Add support for `crypto` on `Charge::PaymentMethodDetail`, `ConfirmationToken::CreateParams::PaymentMethodDatum`, `ConfirmationToken::PaymentMethodPreview`, `PaymentIntent::ConfirmParams::PaymentMethodDatum`, `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodDatum`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, `PaymentIntent::UpdateParams::PaymentMethodDatum`, `PaymentIntent::UpdateParams::PaymentMethodOption`, `PaymentMethod::CreateParams`, `PaymentMethod`, `SetupIntent::ConfirmParams::PaymentMethodDatum`, `SetupIntent::CreateParams::PaymentMethodDatum`, and `SetupIntent::UpdateParams::PaymentMethodDatum` + * Change type of `Charge::PaymentMethodDetail::Card::Installment::Plan.type`, `ConfirmationToken::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `ConfirmationToken::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::CreateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::UpdateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::AvailablePlan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::Plan.type`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Card::Installment::Plan.type` from `literal('fixed_count')` to `enum('bonus'|'fixed_count'|'revolving')` + * Add support for `subscriptions` on `Checkout::Session::CreateParams::PaymentMethodOption::Klarna`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna` + * Add support for `billing_mode` on `Checkout::Session::CreateParams::SubscriptionDatum`, `Invoice::CreatePreviewParams::ScheduleDetail`, `Invoice::CreatePreviewParams::SubscriptionDetail`, `Quote::CreateParams::SubscriptionDatum`, `Quote::SubscriptionDatum`, `Subscription::CreateParams`, `SubscriptionSchedule::CreateParams`, `SubscriptionSchedule`, and `Subscription` + * Change type of `Dispute.enhanced_eligibility_types` from `literal('visa_compelling_evidence_3')` to `enum('visa_compelling_evidence_3'|'visa_compliance')` + * Add support for `related_person` on `Identity::VerificationSession::CreateParams` and `Identity::VerificationSession` + * Add support for `matching` on `Identity::VerificationSession::Option` + * Add support for `klarna` on `Mandate::PaymentMethodDetail`, `SetupIntent::ConfirmParams::PaymentMethodOption`, `SetupIntent::CreateParams::PaymentMethodOption`, `SetupIntent::PaymentMethodOption`, and `SetupIntent::UpdateParams::PaymentMethodOption` + * Add support for `on_demand` on `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna` + * Change type of `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::PaymentMethodOption::Klarna.setup_future_usage`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna.setup_future_usage` from `literal('none')` to `enum('none'|'off_session'|'on_session')` + * Add support for `ua` on `Tax::Registration::CountryOption` and `Tax::Registration::CreateParams::CountryOption` + * Change type of `Terminal::Location::UpdateParams.display_name` from `string` to `emptyable(string)` + * Add support for `collect_payment_method` and `confirm_payment_intent` on `Terminal::Reader::Action` + * Add support for `status` on `Treasury::FinancialAccount::ListParams` +* [#1615](https://github.com/stripe/stripe-ruby/pull/1615) Update README to mention that APIResource.request was removed +* [#1619](https://github.com/stripe/stripe-ruby/pull/1619) Updated StripeClient snippets in README +* [#1621](https://github.com/stripe/stripe-ruby/pull/1621) Disable flaky test in jruby/truffleruby +* [#1620](https://github.com/stripe/stripe-ruby/pull/1620) Fix `raw_request` example in README + ## 15.2.1 - 2025-06-04 * [#1617](https://github.com/stripe/stripe-ruby/pull/1617) Fix `nil` requestor in `Webhook.construct_event` to allow for event data refresh * Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3108db19f..d8931ef8a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1773 \ No newline at end of file +v1819 \ No newline at end of file diff --git a/README.md b/README.md index 227341537..f97603b04 100644 --- a/README.md +++ b/README.md @@ -347,7 +347,7 @@ If you: - would like to send a request to an undocumented API (for example you are in a private beta) - prefer to bypass the method definitions in the library and specify your request details directly, -- used the method `Stripe::APIResource.request(...)` to specify your own requests, which will soon be broken +- used the method `Stripe::APIResource.request(...)` to specify your own requests, which was removed in v13+ you can now use the `raw_request` method on `StripeClient`. diff --git a/VERSION b/VERSION index 2054e837b..5ff58dbcd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.2.1 +15.3.0 diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb index 2ce2b878d..049ee43f7 100644 --- a/lib/stripe/api_version.rb +++ b/lib/stripe/api_version.rb @@ -3,6 +3,7 @@ module Stripe module ApiVersion - CURRENT = "2025-05-28.basil" + CURRENT = "2025-06-30.basil" + CURRENT_MAJOR = "basil" end end diff --git a/lib/stripe/events/v2_core_event_destination_ping_event.rb b/lib/stripe/events/v2_core_event_destination_ping_event.rb index 8f7d91863..84068c181 100644 --- a/lib/stripe/events/v2_core_event_destination_ping_event.rb +++ b/lib/stripe/events/v2_core_event_destination_ping_event.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true module Stripe - # A ping event used to test the connection to an event destination. + # A ping event used to test the connection to an EventDestination. class V2CoreEventDestinationPingEvent < Stripe::V2::Event def self.lookup_type "v2.core.event_destination.ping" diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index f7217cfec..61c62c835 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -124,6 +124,8 @@ class Capabilities < Stripe::StripeObject attr_reader :cartes_bancaires_payments # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. attr_reader :cashapp_payments + # The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + attr_reader :crypto_payments # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. attr_reader :eps_payments # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. @@ -531,8 +533,12 @@ class Schedule < Stripe::StripeObject attr_reader :interval # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. attr_reader :monthly_anchor + # The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + attr_reader :monthly_payout_days # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. attr_reader :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + attr_reader :weekly_payout_days end # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. attr_reader :debit_negative_balances @@ -887,6 +893,15 @@ def initialize(requested: nil) end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + @requested = requested + end + end + class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. attr_accessor :requested @@ -1296,6 +1311,8 @@ def initialize(requested: nil) attr_accessor :cartes_bancaires_payments # The cashapp_payments capability. attr_accessor :cashapp_payments + # The crypto_payments capability. + attr_accessor :crypto_payments # The eps_payments capability. attr_accessor :eps_payments # The fpx_payments capability. @@ -1398,6 +1415,7 @@ def initialize( card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -1457,6 +1475,7 @@ def initialize( @card_payments = card_payments @cartes_bancaires_payments = cartes_bancaires_payments @cashapp_payments = cashapp_payments + @crypto_payments = crypto_payments @eps_payments = eps_payments @fpx_payments = fpx_payments @gb_bank_transfer_payments = gb_bank_transfer_payments @@ -1899,6 +1918,15 @@ def initialize(files: nil) end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + @files = files + end + end + class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. attr_accessor :files @@ -1928,6 +1956,8 @@ def initialize(files: nil) attr_accessor :company_registration_verification # One or more documents that demonstrate proof of a company's tax ID. attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. attr_accessor :proof_of_registration # One or more documents that demonstrate proof of ultimate beneficial ownership. @@ -1940,6 +1970,7 @@ def initialize( company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ) @@ -1949,6 +1980,7 @@ def initialize( @company_ministerial_decree = company_ministerial_decree @company_registration_verification = company_registration_verification @company_tax_id_verification = company_tax_id_verification + @proof_of_address = proof_of_address @proof_of_registration = proof_of_registration @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership end @@ -2394,14 +2426,27 @@ class Schedule < Stripe::RequestParams attr_accessor :interval # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) attr_accessor :weekly_anchor - - def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + attr_accessor :weekly_payout_days + + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil + ) @delay_days = delay_days @interval = interval @monthly_anchor = monthly_anchor + @monthly_payout_days = monthly_payout_days @weekly_anchor = weekly_anchor + @weekly_payout_days = weekly_payout_days end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). @@ -2899,6 +2944,15 @@ def initialize(requested: nil) end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + @requested = requested + end + end + class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. attr_accessor :requested @@ -3308,6 +3362,8 @@ def initialize(requested: nil) attr_accessor :cartes_bancaires_payments # The cashapp_payments capability. attr_accessor :cashapp_payments + # The crypto_payments capability. + attr_accessor :crypto_payments # The eps_payments capability. attr_accessor :eps_payments # The fpx_payments capability. @@ -3410,6 +3466,7 @@ def initialize( card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -3469,6 +3526,7 @@ def initialize( @card_payments = card_payments @cartes_bancaires_payments = cartes_bancaires_payments @cashapp_payments = cashapp_payments + @crypto_payments = crypto_payments @eps_payments = eps_payments @fpx_payments = fpx_payments @gb_bank_transfer_payments = gb_bank_transfer_payments @@ -3792,7 +3850,7 @@ def initialize(document: nil) attr_accessor :ownership_exemption_reason # The company's phone number (used for verification). attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. attr_accessor :registration_date # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). attr_accessor :registration_number @@ -3955,6 +4013,15 @@ def initialize(files: nil) end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + @files = files + end + end + class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. attr_accessor :files @@ -3984,6 +4051,8 @@ def initialize(files: nil) attr_accessor :company_registration_verification # One or more documents that demonstrate proof of a company's tax ID. attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. attr_accessor :proof_of_registration # One or more documents that demonstrate proof of ultimate beneficial ownership. @@ -3996,6 +4065,7 @@ def initialize( company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ) @@ -4005,6 +4075,7 @@ def initialize( @company_ministerial_decree = company_ministerial_decree @company_registration_verification = company_registration_verification @company_tax_id_verification = company_tax_id_verification + @proof_of_address = proof_of_address @proof_of_registration = proof_of_registration @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership end @@ -4447,14 +4518,27 @@ class Schedule < Stripe::RequestParams attr_accessor :interval # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) attr_accessor :weekly_anchor - - def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + attr_accessor :weekly_payout_days + + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil + ) @delay_days = delay_days @interval = interval @monthly_anchor = monthly_anchor + @monthly_payout_days = monthly_payout_days @weekly_anchor = weekly_anchor + @weekly_payout_days = weekly_payout_days end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index 5c996d42a..874f10417 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -20,9 +20,9 @@ def self.object_name class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection end # Whether the embedded component is enabled. @@ -33,9 +33,9 @@ class Features < Stripe::StripeObject class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection end # Whether the embedded component is enabled. @@ -46,15 +46,15 @@ class Features < Stripe::StripeObject class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :standard_payouts end # Whether the embedded component is enabled. @@ -67,11 +67,11 @@ class DisputesList < Stripe::StripeObject class Features < Stripe::StripeObject # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_reader :refund_management end # Whether the embedded component is enabled. @@ -90,9 +90,9 @@ class Features < Stripe::StripeObject; end class FinancialAccount < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection # Whether to allow sending money. attr_reader :send_money @@ -141,7 +141,7 @@ class Features < Stripe::StripeObject attr_reader :card_spend_dispute_management # Whether to allow cardholder management features. attr_reader :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication # Whether to allow spend control management features. attr_reader :spend_control_management @@ -154,9 +154,9 @@ class Features < Stripe::StripeObject class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection end # Whether the embedded component is enabled. @@ -169,11 +169,11 @@ class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_reader :refund_management end # Whether the embedded component is enabled. @@ -184,11 +184,11 @@ class Features < Stripe::StripeObject class PaymentDisputes < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_reader :refund_management end # Whether the embedded component is enabled. @@ -201,11 +201,11 @@ class Payments < Stripe::StripeObject class Features < Stripe::StripeObject # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_reader :refund_management end # Whether the embedded component is enabled. @@ -216,15 +216,15 @@ class Features < Stripe::StripeObject class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_reader :standard_payouts end # Whether the embedded component is enabled. @@ -296,9 +296,9 @@ class CreateParams < Stripe::RequestParams class Components < Stripe::RequestParams class AccountManagement < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -322,9 +322,9 @@ def initialize(enabled: nil, features: nil) class AccountOnboarding < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -348,15 +348,15 @@ def initialize(enabled: nil, features: nil) class Balances < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :standard_payouts def initialize( @@ -388,11 +388,11 @@ class DisputesList < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -433,9 +433,9 @@ def initialize(enabled: nil, features: nil) class FinancialAccount < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection # Whether to allow sending money. attr_accessor :send_money @@ -527,7 +527,7 @@ class Features < Stripe::RequestParams attr_accessor :card_spend_dispute_management # Whether to allow cardholder management features. attr_accessor :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication # Whether to allow spend control management features. attr_accessor :spend_control_management @@ -559,9 +559,9 @@ def initialize(enabled: nil, features: nil) class NotificationBanner < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -587,11 +587,11 @@ class PaymentDetails < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -619,11 +619,11 @@ def initialize(enabled: nil, features: nil) class PaymentDisputes < Stripe::RequestParams class Features < Stripe::RequestParams - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -651,11 +651,11 @@ class Payments < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -683,15 +683,15 @@ def initialize(enabled: nil, features: nil) class Payouts < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :standard_payouts def initialize( @@ -757,39 +757,39 @@ def initialize(enabled: nil, features: nil) @features = features end end - # Configuration for the account management embedded component. + # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component. attr_accessor :account_management - # Configuration for the account onboarding embedded component. + # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component. attr_accessor :account_onboarding - # Configuration for the balances embedded component. + # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component. attr_accessor :balances - # Configuration for the disputes list embedded component. + # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component. attr_accessor :disputes_list - # Configuration for the documents embedded component. + # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component. attr_accessor :documents - # Configuration for the financial account embedded component. + # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component. attr_accessor :financial_account - # Configuration for the financial account transactions embedded component. + # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component. attr_accessor :financial_account_transactions - # Configuration for the issuing card embedded component. + # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component. attr_accessor :issuing_card - # Configuration for the issuing cards list embedded component. + # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component. attr_accessor :issuing_cards_list - # Configuration for the notification banner embedded component. + # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component. attr_accessor :notification_banner - # Configuration for the payment details embedded component. + # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component. attr_accessor :payment_details - # Configuration for the payment disputes embedded component. + # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component. attr_accessor :payment_disputes - # Configuration for the payments embedded component. + # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component. attr_accessor :payments - # Configuration for the payouts embedded component. + # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component. attr_accessor :payouts - # Configuration for the payouts list embedded component. + # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component. attr_accessor :payouts_list - # Configuration for the tax registrations embedded component. + # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component. attr_accessor :tax_registrations - # Configuration for the tax settings embedded component. + # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component. attr_accessor :tax_settings def initialize( diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb index f00cef962..8051c763e 100644 --- a/lib/stripe/resources/billing_portal/session.rb +++ b/lib/stripe/resources/billing_portal/session.rb @@ -82,7 +82,7 @@ class Item < Stripe::StripeObject # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. attr_reader :quantity end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. attr_reader :discounts # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. attr_reader :items @@ -202,7 +202,7 @@ def initialize(id: nil, price: nil, quantity: nil) @quantity = quantity end end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. attr_accessor :discounts # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. attr_accessor :items diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index b5b8c4e4c..91690696c 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -290,7 +290,7 @@ class Plan < Stripe::StripeObject # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. # One of `month`. attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_reader :type end # Installment plan selected for the payment. @@ -474,7 +474,7 @@ class ShippingAddress < Stripe::StripeObject attr_reader :iin # Attribute for field incremental_authorization attr_reader :incremental_authorization - # Installment details for this payment (Mexico only). + # Installment details for this payment. # # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). attr_reader :installments @@ -515,9 +515,9 @@ class Offline < Stripe::StripeObject class Receipt < Stripe::StripeObject # The type of account being debited or credited attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. attr_reader :application_preferred_name # Identifier for this transaction. attr_reader :authorization_code @@ -525,11 +525,11 @@ class Receipt < Stripe::StripeObject attr_reader :authorization_response_code # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. attr_reader :transaction_status_information end @@ -581,7 +581,7 @@ class Wallet < Stripe::StripeObject attr_reader :offline # Defines whether the authorized amount can be over-captured or not attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -598,6 +598,17 @@ class Cashapp < Stripe::StripeObject attr_reader :cashtag end + class Crypto < Stripe::StripeObject + # The wallet address of the customer. + attr_reader :buyer_address + # The blockchain network that the transaction was sent on. + attr_reader :network + # The token currency that the transaction was sent with. + attr_reader :token_currency + # The blockchain transaction hash of the crypto payment. + attr_reader :transaction_hash + end + class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject @@ -637,7 +648,7 @@ class Grabpay < Stripe::StripeObject end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. attr_reader :bank # The Bank Identifier Code of the customer's bank. attr_reader :bic @@ -656,9 +667,9 @@ class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject # The type of account being debited or credited attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. attr_reader :application_preferred_name # Identifier for this transaction. attr_reader :authorization_code @@ -666,11 +677,11 @@ class Receipt < Stripe::StripeObject attr_reader :authorization_response_code # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. attr_reader :transaction_status_information end # Card brand. Can be `interac`, `mastercard` or `visa`. @@ -705,7 +716,7 @@ class Receipt < Stripe::StripeObject attr_reader :network # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. attr_reader :network_transaction_id - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -1025,6 +1036,8 @@ class Zip < Stripe::StripeObject; end attr_reader :card_present # Attribute for field cashapp attr_reader :cashapp + # Attribute for field crypto + attr_reader :crypto # Attribute for field customer_balance attr_reader :customer_balance # Attribute for field eps diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index 16fb86f32..ddac4077a 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -2179,6 +2179,43 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -2187,9 +2224,12 @@ class Klarna < Stripe::RequestParams # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_accessor :setup_future_usage + # Subscription details if the Checkout Session sets up a future subscription. + attr_accessor :subscriptions - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, subscriptions: nil) @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -2872,6 +2912,15 @@ def initialize(shipping_rate: nil, shipping_rate_data: nil) end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -2924,6 +2973,8 @@ def initialize(end_behavior: nil) attr_accessor :application_fee_percent # A future timestamp to anchor the subscription's billing cycle for new subscriptions. attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated # from the subscription. @@ -2942,12 +2993,9 @@ def initialize(end_behavior: nil) attr_accessor :proration_behavior # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. attr_accessor :transfer_data - # Unix timestamp representing the end of the trial period the customer - # will get before being charged for the first time. Has to be at least - # 48 hours in the future. + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. attr_accessor :trial_end - # Integer representing the number of trial period days before the - # customer is charged for the first time. Has to be at least 1. + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. attr_accessor :trial_period_days # Settings related to subscription trials. attr_accessor :trial_settings @@ -2955,6 +3003,7 @@ def initialize(end_behavior: nil) def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -2968,6 +3017,7 @@ def initialize( ) @application_fee_percent = application_fee_percent @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings @@ -3071,7 +3121,7 @@ def initialize(link: nil) attr_accessor :expires_at # Generate a post-purchase Invoice for one-time payments. attr_accessor :invoice_creation - # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. # # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. # diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb index 8123fc1aa..d75a38e31 100644 --- a/lib/stripe/resources/confirmation_token.rb +++ b/lib/stripe/resources/confirmation_token.rb @@ -41,7 +41,7 @@ class Plan < Stripe::StripeObject # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. # One of `month`. attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_reader :type end # Attribute for field plan @@ -154,9 +154,9 @@ class Offline < Stripe::StripeObject class Receipt < Stripe::StripeObject # The type of account being debited or credited attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. attr_reader :application_preferred_name # Identifier for this transaction. attr_reader :authorization_code @@ -164,11 +164,11 @@ class Receipt < Stripe::StripeObject attr_reader :authorization_response_code # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. attr_reader :transaction_status_information end @@ -220,7 +220,7 @@ class Wallet < Stripe::StripeObject attr_reader :offline # Defines whether the authorized amount can be over-captured or not attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -447,7 +447,7 @@ class Wallet < Stripe::StripeObject attr_reader :networks # Details about payment methods collected offline. attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -462,6 +462,7 @@ class Cashapp < Stripe::StripeObject attr_reader :cashtag end + class Crypto < Stripe::StripeObject; end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject @@ -480,7 +481,7 @@ class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. attr_reader :bank # The Bank Identifier Code of the customer's bank, if the bank was provided. attr_reader :bic @@ -519,7 +520,7 @@ class Networks < Stripe::StripeObject attr_reader :last4 # Contains information about card networks that can be used to process the payment. attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -711,6 +712,8 @@ class Zip < Stripe::StripeObject; end attr_reader :card_present # Attribute for field cashapp attr_reader :cashapp + # Attribute for field crypto + attr_reader :crypto # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. attr_reader :customer # Attribute for field customer_balance @@ -921,6 +924,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -1139,6 +1143,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -1230,6 +1236,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -1283,6 +1290,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -1332,7 +1340,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index ef466e13e..b4006f58d 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -214,7 +214,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -226,7 +226,7 @@ def initialize(shipping_rate: nil) attr_accessor :expand # ID of the invoice. attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -240,7 +240,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost def initialize( @@ -369,7 +369,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -381,7 +381,7 @@ def initialize(shipping_rate: nil) attr_accessor :expand # ID of the invoice. attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -395,7 +395,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost def initialize( @@ -509,7 +509,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -525,7 +525,7 @@ def initialize(shipping_rate: nil) attr_accessor :invoice # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. attr_accessor :limit - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -539,7 +539,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. attr_accessor :starting_after diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index be8dd3c90..a973825a0 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -30,7 +30,7 @@ class Features < Stripe::StripeObject attr_reader :payment_method_allow_redisplay_filters # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. attr_reader :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. attr_reader :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. # @@ -82,7 +82,7 @@ class Features < Stripe::RequestParams attr_accessor :payment_method_allow_redisplay_filters # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. attr_accessor :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. attr_accessor :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. # diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index 99f4571fc..723584c34 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -111,7 +111,7 @@ def initialize( end # The connected account that originates the event. attr_reader :account - # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + # The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. attr_reader :api_version # Authentication context needed to fetch the event or related object. attr_reader :context diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index 013eafac6..9faa80fcf 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -50,6 +50,13 @@ class Email < Stripe::StripeObject class IdNumber < Stripe::StripeObject; end + class Matching < Stripe::StripeObject + # Strictness of the DOB matching policy to apply. + attr_reader :dob + # Strictness of the name matching policy to apply. + attr_reader :name + end + class Phone < Stripe::StripeObject # Request one time password verification of `provided_details.phone`. attr_reader :require_verification @@ -60,6 +67,8 @@ class Phone < Stripe::StripeObject attr_reader :email # Attribute for field id_number attr_reader :id_number + # Attribute for field matching + attr_reader :matching # Attribute for field phone attr_reader :phone end @@ -76,6 +85,13 @@ class Redaction < Stripe::StripeObject attr_reader :status end + class RelatedPerson < Stripe::StripeObject + # Token referencing the associated Account of the related Person resource. + attr_reader :account + # Token referencing the related Person resource. + attr_reader :person + end + class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject # City, district, suburb, town, or village. @@ -223,6 +239,18 @@ def initialize(email: nil, phone: nil) @phone = phone end end + + class RelatedPerson < Stripe::RequestParams + # A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + attr_accessor :account + # A token referencing a Person resource that this verification is being used to verify. + attr_accessor :person + + def initialize(account: nil, person: nil) + @account = account + @person = person + end + end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_accessor :client_reference_id # Specifies which fields in the response should be expanded. @@ -235,6 +263,8 @@ def initialize(email: nil, phone: nil) attr_accessor :provided_details # Customer ID attr_accessor :related_customer + # Tokens referencing a Person resource and it's associated account. + attr_accessor :related_person # The URL that the user will be redirected to upon completing the verification flow. attr_accessor :return_url # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. @@ -249,6 +279,7 @@ def initialize( options: nil, provided_details: nil, related_customer: nil, + related_person: nil, return_url: nil, type: nil, verification_flow: nil @@ -259,6 +290,7 @@ def initialize( @options = options @provided_details = provided_details @related_customer = related_customer + @related_person = related_person @return_url = return_url @type = type @verification_flow = verification_flow @@ -371,6 +403,8 @@ def initialize(expand: nil) attr_reader :redaction # Customer ID attr_reader :related_customer + # Attribute for field related_person + attr_reader :related_person # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). attr_reader :status # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index c0039c71e..218b7c6a8 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -559,7 +559,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -1206,7 +1206,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -2546,6 +2546,15 @@ def initialize(account: nil, type: nil) end class ScheduleDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -2899,6 +2908,8 @@ def initialize( @trial_end = trial_end end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # 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. attr_accessor :end_behavior # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -2906,7 +2917,8 @@ def initialize( # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. attr_accessor :proration_behavior - def initialize(end_behavior: nil, phases: nil, proration_behavior: nil) + def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil) + @billing_mode = billing_mode @end_behavior = end_behavior @phases = phases @proration_behavior = proration_behavior @@ -2914,6 +2926,15 @@ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil) end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -3031,9 +3052,11 @@ def initialize( end # For new subscriptions, a future timestamp 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. For existing subscriptions, the value can only be set to `now` or `unchanged`. attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # This simulates the subscription being canceled or expired immediately. attr_accessor :cancel_now @@ -3054,6 +3077,7 @@ def initialize( def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, @@ -3066,6 +3090,7 @@ def initialize( trial_end: nil ) @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @cancel_now = cancel_now diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index daa9a10e6..8dfc506b8 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -2,10 +2,7 @@ # frozen_string_literal: true module Stripe - # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an - # invoice by creating or updating it with an `invoice` field, at which point it will be included as - # [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within - # [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). # # Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined # with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb index 880e44013..30026c37e 100644 --- a/lib/stripe/resources/mandate.rb +++ b/lib/stripe/resources/mandate.rb @@ -63,6 +63,7 @@ class BacsDebit < Stripe::StripeObject class Card < Stripe::StripeObject; end class Cashapp < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject; end class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject; end @@ -102,6 +103,8 @@ class UsBankAccount < Stripe::StripeObject attr_reader :cashapp # Attribute for field kakao_pay attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna # Attribute for field kr_card attr_reader :kr_card # Attribute for field link diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 79b210961..c6db3883f 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -847,7 +847,7 @@ class AvailablePlan < Stripe::StripeObject # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. # One of `month`. attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_reader :type end @@ -857,7 +857,7 @@ class Plan < Stripe::StripeObject # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. # One of `month`. attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_reader :type end # Installment plans that may be selected for this PaymentIntent. @@ -890,7 +890,7 @@ class MandateOptions < Stripe::StripeObject end # Controls when the funds will be captured from the customer's account. attr_reader :capture_method - # Installment details for this payment (Mexico only). + # Installment details for this payment. # # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). attr_reader :installments @@ -950,6 +950,17 @@ class Cashapp < Stripe::StripeObject attr_reader :setup_future_usage end + class Crypto < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + end + class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject @@ -1420,6 +1431,8 @@ class Zip < Stripe::StripeObject attr_reader :card_present # Attribute for field cashapp attr_reader :cashapp + # Attribute for field crypto + attr_reader :crypto # Attribute for field customer_balance attr_reader :customer_balance # Attribute for field eps @@ -1764,6 +1777,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -1982,6 +1996,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -2073,6 +2089,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2126,6 +2143,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -2461,7 +2479,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -2739,6 +2757,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -2896,12 +2931,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2914,11 +3015,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -3527,6 +3638,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -3612,6 +3725,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -3662,6 +3776,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -3833,7 +3948,7 @@ def initialize(amount: nil, destination: nil) attr_accessor :payment_method_data # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). attr_accessor :radar_options @@ -4047,6 +4162,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -4265,6 +4381,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -4356,6 +4474,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -4409,6 +4528,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -4744,7 +4864,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -5022,6 +5142,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -5179,12 +5316,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5197,11 +5400,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -5810,6 +6023,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -5895,6 +6110,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -5945,6 +6161,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -6071,7 +6288,7 @@ def initialize(amount: nil) attr_accessor :payment_method_data # Payment-method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). attr_accessor :receipt_email @@ -6394,6 +6611,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -6612,6 +6830,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -6703,6 +6923,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -6756,6 +6977,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -7091,7 +7313,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -7369,6 +7591,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -7526,12 +7765,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7544,11 +7849,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -8157,6 +8472,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -8242,6 +8559,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -8292,6 +8610,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -8413,7 +8732,7 @@ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_numbe attr_accessor :payment_method_data # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). attr_accessor :radar_options diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 6ee730185..619286c2f 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -114,9 +114,9 @@ class Offline < Stripe::StripeObject class Receipt < Stripe::StripeObject # The type of account being debited or credited attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. attr_reader :application_preferred_name # Identifier for this transaction. attr_reader :authorization_code @@ -124,11 +124,11 @@ class Receipt < Stripe::StripeObject attr_reader :authorization_response_code # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. attr_reader :transaction_status_information end @@ -180,7 +180,7 @@ class Wallet < Stripe::StripeObject attr_reader :offline # Defines whether the authorized amount can be over-captured or not attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -407,7 +407,7 @@ class Wallet < Stripe::StripeObject attr_reader :networks # Details about payment methods collected offline. attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -422,6 +422,7 @@ class Cashapp < Stripe::StripeObject attr_reader :cashtag end + class Crypto < Stripe::StripeObject; end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject @@ -440,7 +441,7 @@ class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. attr_reader :bank # The Bank Identifier Code of the customer's bank, if the bank was provided. attr_reader :bic @@ -479,7 +480,7 @@ class Networks < Stripe::StripeObject attr_reader :last4 # Contains information about card networks that can be used to process the payment. attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. attr_reader :preferred_locales # How card details were read in this transaction. attr_reader :read_method @@ -826,6 +827,7 @@ def initialize( end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -1046,6 +1048,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :card # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # The `Customer` to whom the original PaymentMethod is attached. attr_accessor :customer # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. @@ -1144,6 +1148,7 @@ def initialize( boleto: nil, card: nil, cashapp: nil, + crypto: nil, customer: nil, customer_balance: nil, eps: nil, @@ -1201,6 +1206,7 @@ def initialize( @boleto = boleto @card = card @cashapp = cashapp + @crypto = crypto @customer = customer @customer_balance = customer_balance @eps = eps @@ -1427,6 +1433,8 @@ def initialize(expand: nil) attr_reader :cashapp # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field crypto + attr_reader :crypto # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. attr_reader :customer # Attribute for field customer_balance diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index dab0ecdd0..03be86513 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -167,6 +167,12 @@ class StatusTransitions < Stripe::StripeObject end class SubscriptionData < Stripe::StripeObject + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_reader :type + end + # The billing mode of the quote. + attr_reader :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_reader :description # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -412,16 +418,33 @@ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_r end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. attr_accessor :metadata # Integer representing the number of trial period days before the customer is charged for the first time. attr_accessor :trial_period_days - def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil) + def initialize( + billing_mode: nil, + description: nil, + effective_date: nil, + metadata: nil, + trial_period_days: nil + ) + @billing_mode = billing_mode @description = description @effective_date = effective_date @metadata = metadata @@ -681,7 +704,7 @@ def initialize( class SubscriptionData < Stripe::RequestParams # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. attr_accessor :metadata diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index e78847729..9c45842b1 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -130,7 +130,7 @@ class Offline < Stripe::StripeObject class Cashapp < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. attr_reader :bank # The Bank Identifier Code of the customer's bank. attr_reader :bic diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index 06f6a26ec..2bc96a531 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -229,6 +229,13 @@ class MandateOptions < Stripe::StripeObject class CardPresent < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject + # The currency of the setup intent. Three letter ISO currency code. + attr_reader :currency + # Preferred locale of the Klarna checkout page that the customer is redirected to. + attr_reader :preferred_locale + end + class Link < Stripe::StripeObject # [Deprecated] This is a legacy parameter that no longer has any function. attr_reader :persistent_token @@ -285,6 +292,8 @@ class MandateOptions < Stripe::StripeObject attr_reader :card # Attribute for field card_present attr_reader :card_present + # Attribute for field klarna + attr_reader :klarna # Attribute for field link attr_reader :link # Attribute for field paypal @@ -519,6 +528,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -737,6 +747,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -828,6 +840,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -881,6 +894,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -1133,6 +1147,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -1243,6 +1339,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -1258,6 +1356,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -1268,6 +1367,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit @@ -1325,7 +1425,7 @@ def initialize(amount: nil, currency: nil) attr_accessor :payment_method_data # Payment method-specific configuration for this SetupIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). attr_accessor :return_url @@ -1496,6 +1596,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -1714,6 +1815,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -1805,6 +1908,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -1858,6 +1962,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -2110,6 +2215,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -2220,6 +2407,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -2235,6 +2424,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -2245,6 +2435,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit @@ -2278,7 +2469,7 @@ def initialize( attr_accessor :payment_method_data # Payment method-specific configuration for this SetupIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types def initialize( @@ -2472,6 +2663,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -2690,6 +2882,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -2781,6 +2975,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2834,6 +3029,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -3086,6 +3282,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -3196,6 +3474,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -3211,6 +3491,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -3221,6 +3502,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit @@ -3334,7 +3616,7 @@ def initialize(amounts: nil, descriptor_code: nil, expand: nil) attr_reader :payment_method_configuration_details # Payment method-specific configuration for this SetupIntent. attr_reader :payment_method_options - # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_reader :payment_method_types # ID of the single_use Mandate generated by the SetupIntent. attr_reader :single_use_mandate diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index 0766a69b1..b6b6b4d94 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -44,6 +44,13 @@ class BillingCycleAnchorConfig < Stripe::StripeObject attr_reader :second end + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_reader :type + # Details on when the current billing_mode was adopted. + attr_reader :updated_at + end + class BillingThresholds < Stripe::StripeObject # Monetary threshold that triggers the subscription to create an invoice attr_reader :amount_gte @@ -747,7 +754,7 @@ def initialize(end_behavior: nil) attr_accessor :billing_thresholds # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # Details about why this subscription was cancelled attr_accessor :cancellation_details @@ -1105,6 +1112,15 @@ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: ni end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period attr_accessor :amount_gte @@ -1481,19 +1497,21 @@ def initialize(end_behavior: nil) attr_accessor :add_invoice_items # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). attr_accessor :application_fee_percent - # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + # Automatic tax settings for this subscription. attr_accessor :automatic_tax - # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. attr_accessor :backdate_start_date # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). 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. attr_accessor :billing_cycle_anchor # 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. attr_accessor :billing_cycle_anchor_config + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. attr_accessor :billing_thresholds # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. attr_accessor :collection_method @@ -1561,6 +1579,7 @@ def initialize( backdate_start_date: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, + billing_mode: nil, billing_thresholds: nil, cancel_at: nil, cancel_at_period_end: nil, @@ -1595,6 +1614,7 @@ def initialize( @backdate_start_date = backdate_start_date @billing_cycle_anchor = billing_cycle_anchor @billing_cycle_anchor_config = billing_cycle_anchor_config + @billing_mode = billing_mode @billing_thresholds = billing_thresholds @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @@ -1643,6 +1663,26 @@ def initialize(expand: nil, limit: nil, page: nil, query: nil) end end + class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(billing_mode: nil, expand: nil) + @billing_mode = billing_mode + @expand = expand + end + end + class ResumeParams < Stripe::RequestParams # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). attr_accessor :billing_cycle_anchor @@ -1675,11 +1715,13 @@ def initialize( attr_reader :billing_cycle_anchor # The fixed values used to calculate the `billing_cycle_anchor`. attr_reader :billing_cycle_anchor_config + # The billing mode of the subscription. + attr_reader :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period attr_reader :billing_thresholds # A date in the future at which the subscription will automatically get canceled attr_reader :cancel_at - # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field will be removed in a future API version. Please use `cancel_at` instead. + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. attr_reader :cancel_at_period_end # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. attr_reader :canceled_at @@ -1759,7 +1801,7 @@ def initialize( attr_reader :trial_end # Settings related to subscription trials. attr_reader :trial_settings - # If the subscription has a trial, the beginning of that trial. For subsequent trials, this date remains as the start of the first ever trial on the subscription. + # If the subscription has a trial, the beginning of that trial. attr_reader :trial_start # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -1826,6 +1868,26 @@ def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/subscriptions", params: params, opts: opts) end + # Upgrade the billing_mode of an existing subscription. + def migrate(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/subscriptions/%s/migrate", { subscription: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + # Upgrade the billing_mode of an existing subscription. + def self.migrate(subscription, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/subscriptions/%s/migrate", { subscription: CGI.escape(subscription) }), + params: params, + opts: opts + ) + end + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. def resume(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 25467dd3c..73ad7036d 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -15,6 +15,13 @@ def self.object_name "subscription_schedule" end + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_reader :type + # Details on when the current billing_mode was adopted. + attr_reader :updated_at + end + class CurrentPhase < Stripe::StripeObject # The end of this phase of the subscription schedule. attr_reader :end_date @@ -351,6 +358,15 @@ def initialize( end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -813,6 +829,8 @@ def initialize( @trial_end = trial_end end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. attr_accessor :customer # Object representing the subscription schedule's default settings. @@ -831,6 +849,7 @@ def initialize( attr_accessor :start_date def initialize( + billing_mode: nil, customer: nil, default_settings: nil, end_behavior: nil, @@ -840,6 +859,7 @@ def initialize( phases: nil, start_date: nil ) + @billing_mode = billing_mode @customer = customer @default_settings = default_settings @end_behavior = end_behavior @@ -1376,6 +1396,8 @@ def initialize(expand: nil, preserve_cancel_date: nil) end # ID of the Connect Application that created the schedule. attr_reader :application + # The billing mode of the subscription. + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 5b7b35505..861c972db 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -637,6 +637,11 @@ class Tz < Stripe::StripeObject attr_reader :type end + class Ua < Stripe::StripeObject + # Type of registration in `country`. + attr_reader :type + end + class Ug < Stripe::StripeObject # Type of registration in `country`. attr_reader :type @@ -884,6 +889,8 @@ class Zw < Stripe::StripeObject attr_reader :tr # Attribute for field tz attr_reader :tz + # Attribute for field ua + attr_reader :ua # Attribute for field ug attr_reader :ug # Attribute for field us @@ -2049,6 +2056,15 @@ def initialize(type: nil) end end + class Ua < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Ug < Stripe::RequestParams # Type of registration to be created in `country`. attr_accessor :type @@ -2355,6 +2371,8 @@ def initialize(type: nil) attr_accessor :tr # Options for the registration in TZ. attr_accessor :tz + # Options for the registration in UA. + attr_accessor :ua # Options for the registration in UG. attr_accessor :ug # Options for the registration in US. @@ -2463,6 +2481,7 @@ def initialize( tj: nil, tr: nil, tz: nil, + ua: nil, ug: nil, us: nil, uy: nil, @@ -2562,6 +2581,7 @@ def initialize( @tj = tj @tr = tr @tz = tz + @ua = ua @ug = ug @us = us @uy = uy diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index 6b6fcb46b..9ac01a412 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -4,6 +4,7 @@ module Stripe module Terminal # A Configurations object represents how features should be configured for terminal readers. + # For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). class Configuration < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index 658389431..9fc10ada3 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -112,15 +112,51 @@ class Toggle < Stripe::StripeObject attr_reader :metadata end + class CollectPaymentMethod < Stripe::StripeObject + class CollectConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_reader :amount_eligible + end + # Enable customer-initiated cancellation when processing this payment. + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + attr_reader :tipping + end + # Represents a per-transaction override of a reader configuration + attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + end + + class ConfirmPaymentIntent < Stripe::StripeObject + class ConfirmConfig < Stripe::StripeObject + # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + attr_reader :return_url + end + # Represents a per-transaction override of a reader configuration + attr_reader :confirm_config + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + end + class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. + # Enable customer-initiated cancellation when processing this payment. attr_reader :enable_customer_cancellation - # If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion. + # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. attr_reader :return_url # Override showing a tipping selection screen on this transaction. attr_reader :skip_tipping @@ -135,7 +171,7 @@ class Tipping < Stripe::StripeObject class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject - # Enable customer initiated cancellation when processing this SetupIntent. + # Enable customer-initiated cancellation when processing this SetupIntent. attr_reader :enable_customer_cancellation end # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. @@ -148,7 +184,7 @@ class ProcessConfig < Stripe::StripeObject class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject - # Enable customer initiated cancellation when refunding this payment. + # Enable customer-initiated cancellation when refunding this payment. attr_reader :enable_customer_cancellation end # The amount being refunded. @@ -197,6 +233,10 @@ class LineItem < Stripe::StripeObject end # Represents a reader action to collect customer inputs attr_reader :collect_inputs + # Represents a reader action to collect a payment method + attr_reader :collect_payment_method + # Represents a reader action to confirm a payment + attr_reader :confirm_payment_intent # Failure code, only set if status is `failed`. attr_reader :failure_code # Detailed failure message, only set if status is `failed`. @@ -397,6 +437,74 @@ def initialize(expand: nil, inputs: nil, metadata: nil) end end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Configuration overrides. + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID. + attr_accessor :payment_intent + + def initialize(collect_config: nil, expand: nil, payment_intent: nil) + @collect_config = collect_config + @expand = expand + @payment_intent = payment_intent + end + end + + class ConfirmPaymentIntentParams < Stripe::RequestParams + class ConfirmConfig < Stripe::RequestParams + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + attr_accessor :return_url + + def initialize(return_url: nil) + @return_url = return_url + end + end + # Configuration overrides. + attr_accessor :confirm_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID. + attr_accessor :payment_intent + + def initialize(confirm_config: nil, expand: nil, payment_intent: nil) + @confirm_config = confirm_config + @expand = expand + @payment_intent = payment_intent + end + end + class ProcessPaymentIntentParams < Stripe::RequestParams class ProcessConfig < Stripe::RequestParams class Tipping < Stripe::RequestParams @@ -696,6 +804,46 @@ def self.collect_inputs(reader, params = {}, opts = {}) ) end + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + def collect_payment_method(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/terminal/readers/%s/collect_payment_method", { reader: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + def self.collect_payment_method(reader, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/terminal/readers/%s/collect_payment_method", { reader: CGI.escape(reader) }), + params: params, + opts: opts + ) + end + + # Finalizes a payment on a Reader. + def confirm_payment_intent(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/terminal/readers/%s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + # Finalizes a payment on a Reader. + def self.confirm_payment_intent(reader, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/terminal/readers/%s/confirm_payment_intent", { reader: CGI.escape(reader) }), + params: params, + opts: opts + ) + end + # Creates a new Reader object. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index 065129b62..1f4b46ba0 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -230,7 +230,7 @@ def initialize(document: nil) attr_accessor :ownership_exemption_reason # The company's phone number (used for verification). attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. attr_accessor :registration_date # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). attr_accessor :registration_number diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index ea9023a31..8c321c5ef 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -89,19 +89,23 @@ def initialize(gt: nil, gte: nil, lt: nil, lte: nil) attr_accessor :limit # An object ID cursor for use in pagination. attr_accessor :starting_after + # Only return FinancialAccounts that have the given status: `open` or `closed` + attr_accessor :status def initialize( created: nil, ending_before: nil, expand: nil, limit: nil, - starting_after: nil + starting_after: nil, + status: nil ) @created = created @ending_before = ending_before @expand = expand @limit = limit @starting_after = starting_after + @status = status end end diff --git a/lib/stripe/services/account_service.rb b/lib/stripe/services/account_service.rb index 65ad1e9fa..da1694171 100644 --- a/lib/stripe/services/account_service.rb +++ b/lib/stripe/services/account_service.rb @@ -317,6 +317,15 @@ def initialize(requested: nil) end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + @requested = requested + end + end + class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. attr_accessor :requested @@ -726,6 +735,8 @@ def initialize(requested: nil) attr_accessor :cartes_bancaires_payments # The cashapp_payments capability. attr_accessor :cashapp_payments + # The crypto_payments capability. + attr_accessor :crypto_payments # The eps_payments capability. attr_accessor :eps_payments # The fpx_payments capability. @@ -828,6 +839,7 @@ def initialize( card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -887,6 +899,7 @@ def initialize( @card_payments = card_payments @cartes_bancaires_payments = cartes_bancaires_payments @cashapp_payments = cashapp_payments + @crypto_payments = crypto_payments @eps_payments = eps_payments @fpx_payments = fpx_payments @gb_bank_transfer_payments = gb_bank_transfer_payments @@ -1329,6 +1342,15 @@ def initialize(files: nil) end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + @files = files + end + end + class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. attr_accessor :files @@ -1358,6 +1380,8 @@ def initialize(files: nil) attr_accessor :company_registration_verification # One or more documents that demonstrate proof of a company's tax ID. attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. attr_accessor :proof_of_registration # One or more documents that demonstrate proof of ultimate beneficial ownership. @@ -1370,6 +1394,7 @@ def initialize( company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ) @@ -1379,6 +1404,7 @@ def initialize( @company_ministerial_decree = company_ministerial_decree @company_registration_verification = company_registration_verification @company_tax_id_verification = company_tax_id_verification + @proof_of_address = proof_of_address @proof_of_registration = proof_of_registration @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership end @@ -1824,14 +1850,27 @@ class Schedule < Stripe::RequestParams attr_accessor :interval # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) attr_accessor :weekly_anchor - - def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + attr_accessor :weekly_payout_days + + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil + ) @delay_days = delay_days @interval = interval @monthly_anchor = monthly_anchor + @monthly_payout_days = monthly_payout_days @weekly_anchor = weekly_anchor + @weekly_payout_days = weekly_payout_days end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). @@ -2338,6 +2377,15 @@ def initialize(requested: nil) end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + @requested = requested + end + end + class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. attr_accessor :requested @@ -2747,6 +2795,8 @@ def initialize(requested: nil) attr_accessor :cartes_bancaires_payments # The cashapp_payments capability. attr_accessor :cashapp_payments + # The crypto_payments capability. + attr_accessor :crypto_payments # The eps_payments capability. attr_accessor :eps_payments # The fpx_payments capability. @@ -2849,6 +2899,7 @@ def initialize( card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -2908,6 +2959,7 @@ def initialize( @card_payments = card_payments @cartes_bancaires_payments = cartes_bancaires_payments @cashapp_payments = cashapp_payments + @crypto_payments = crypto_payments @eps_payments = eps_payments @fpx_payments = fpx_payments @gb_bank_transfer_payments = gb_bank_transfer_payments @@ -3231,7 +3283,7 @@ def initialize(document: nil) attr_accessor :ownership_exemption_reason # The company's phone number (used for verification). attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. attr_accessor :registration_date # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). attr_accessor :registration_number @@ -3394,6 +3446,15 @@ def initialize(files: nil) end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + @files = files + end + end + class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. attr_accessor :files @@ -3423,6 +3484,8 @@ def initialize(files: nil) attr_accessor :company_registration_verification # One or more documents that demonstrate proof of a company's tax ID. attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. attr_accessor :proof_of_registration # One or more documents that demonstrate proof of ultimate beneficial ownership. @@ -3435,6 +3498,7 @@ def initialize( company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ) @@ -3444,6 +3508,7 @@ def initialize( @company_ministerial_decree = company_ministerial_decree @company_registration_verification = company_registration_verification @company_tax_id_verification = company_tax_id_verification + @proof_of_address = proof_of_address @proof_of_registration = proof_of_registration @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership end @@ -3886,14 +3951,27 @@ class Schedule < Stripe::RequestParams attr_accessor :interval # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) attr_accessor :weekly_anchor - - def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + attr_accessor :weekly_payout_days + + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil + ) @delay_days = delay_days @interval = interval @monthly_anchor = monthly_anchor + @monthly_payout_days = monthly_payout_days @weekly_anchor = weekly_anchor + @weekly_payout_days = weekly_payout_days end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). diff --git a/lib/stripe/services/account_session_service.rb b/lib/stripe/services/account_session_service.rb index 04af0e9ae..1ee6bb2b3 100644 --- a/lib/stripe/services/account_session_service.rb +++ b/lib/stripe/services/account_session_service.rb @@ -7,9 +7,9 @@ class CreateParams < Stripe::RequestParams class Components < Stripe::RequestParams class AccountManagement < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -33,9 +33,9 @@ def initialize(enabled: nil, features: nil) class AccountOnboarding < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -59,15 +59,15 @@ def initialize(enabled: nil, features: nil) class Balances < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :standard_payouts def initialize( @@ -99,11 +99,11 @@ class DisputesList < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -144,9 +144,9 @@ def initialize(enabled: nil, features: nil) class FinancialAccount < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection # Whether to allow sending money. attr_accessor :send_money @@ -238,7 +238,7 @@ class Features < Stripe::RequestParams attr_accessor :card_spend_dispute_management # Whether to allow cardholder management features. attr_accessor :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication # Whether to allow spend control management features. attr_accessor :spend_control_management @@ -270,9 +270,9 @@ def initialize(enabled: nil, features: nil) class NotificationBanner < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection def initialize( @@ -298,11 +298,11 @@ class PaymentDetails < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -330,11 +330,11 @@ def initialize(enabled: nil, features: nil) class PaymentDisputes < Stripe::RequestParams class Features < Stripe::RequestParams - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -362,11 +362,11 @@ class Payments < Stripe::RequestParams class Features < Stripe::RequestParams # Whether to allow capturing and cancelling payment intents. This is `true` by default. attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. attr_accessor :refund_management def initialize( @@ -394,15 +394,15 @@ def initialize(enabled: nil, features: nil) class Payouts < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. attr_accessor :standard_payouts def initialize( @@ -468,39 +468,39 @@ def initialize(enabled: nil, features: nil) @features = features end end - # Configuration for the account management embedded component. + # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component. attr_accessor :account_management - # Configuration for the account onboarding embedded component. + # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component. attr_accessor :account_onboarding - # Configuration for the balances embedded component. + # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component. attr_accessor :balances - # Configuration for the disputes list embedded component. + # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component. attr_accessor :disputes_list - # Configuration for the documents embedded component. + # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component. attr_accessor :documents - # Configuration for the financial account embedded component. + # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component. attr_accessor :financial_account - # Configuration for the financial account transactions embedded component. + # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component. attr_accessor :financial_account_transactions - # Configuration for the issuing card embedded component. + # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component. attr_accessor :issuing_card - # Configuration for the issuing cards list embedded component. + # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component. attr_accessor :issuing_cards_list - # Configuration for the notification banner embedded component. + # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component. attr_accessor :notification_banner - # Configuration for the payment details embedded component. + # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component. attr_accessor :payment_details - # Configuration for the payment disputes embedded component. + # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component. attr_accessor :payment_disputes - # Configuration for the payments embedded component. + # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component. attr_accessor :payments - # Configuration for the payouts embedded component. + # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component. attr_accessor :payouts - # Configuration for the payouts list embedded component. + # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component. attr_accessor :payouts_list - # Configuration for the tax registrations embedded component. + # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component. attr_accessor :tax_registrations - # Configuration for the tax settings embedded component. + # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component. attr_accessor :tax_settings def initialize( diff --git a/lib/stripe/services/billing_portal/session_service.rb b/lib/stripe/services/billing_portal/session_service.rb index 9ac0f765f..83955bb38 100644 --- a/lib/stripe/services/billing_portal/session_service.rb +++ b/lib/stripe/services/billing_portal/session_service.rb @@ -105,7 +105,7 @@ def initialize(id: nil, price: nil, quantity: nil) @quantity = quantity end end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. attr_accessor :discounts # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. attr_accessor :items diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index e99794925..846b20e8d 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -1161,6 +1161,43 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1169,9 +1206,12 @@ class Klarna < Stripe::RequestParams # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_accessor :setup_future_usage + # Subscription details if the Checkout Session sets up a future subscription. + attr_accessor :subscriptions - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, subscriptions: nil) @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -1854,6 +1894,15 @@ def initialize(shipping_rate: nil, shipping_rate_data: nil) end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -1906,6 +1955,8 @@ def initialize(end_behavior: nil) attr_accessor :application_fee_percent # A future timestamp to anchor the subscription's billing cycle for new subscriptions. attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated # from the subscription. @@ -1924,12 +1975,9 @@ def initialize(end_behavior: nil) attr_accessor :proration_behavior # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. attr_accessor :transfer_data - # Unix timestamp representing the end of the trial period the customer - # will get before being charged for the first time. Has to be at least - # 48 hours in the future. + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. attr_accessor :trial_end - # Integer representing the number of trial period days before the - # customer is charged for the first time. Has to be at least 1. + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. attr_accessor :trial_period_days # Settings related to subscription trials. attr_accessor :trial_settings @@ -1937,6 +1985,7 @@ def initialize(end_behavior: nil) def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -1950,6 +1999,7 @@ def initialize( ) @application_fee_percent = application_fee_percent @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings @@ -2053,7 +2103,7 @@ def initialize(link: nil) attr_accessor :expires_at # Generate a post-purchase Invoice for one-time payments. attr_accessor :invoice_creation - # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. # # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. # diff --git a/lib/stripe/services/credit_note_preview_lines_service.rb b/lib/stripe/services/credit_note_preview_lines_service.rb index 1ac235810..cc6631209 100644 --- a/lib/stripe/services/credit_note_preview_lines_service.rb +++ b/lib/stripe/services/credit_note_preview_lines_service.rb @@ -81,7 +81,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -97,7 +97,7 @@ def initialize(shipping_rate: nil) attr_accessor :invoice # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. attr_accessor :limit - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -111,7 +111,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. attr_accessor :starting_after diff --git a/lib/stripe/services/credit_note_service.rb b/lib/stripe/services/credit_note_service.rb index 74dddab34..5deba438a 100644 --- a/lib/stripe/services/credit_note_service.rb +++ b/lib/stripe/services/credit_note_service.rb @@ -141,7 +141,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -153,7 +153,7 @@ def initialize(shipping_rate: nil) attr_accessor :expand # ID of the invoice. attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -167,7 +167,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost def initialize( @@ -305,7 +305,7 @@ def initialize(shipping_rate: nil) @shipping_rate = shipping_rate end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. attr_accessor :credit_amount @@ -317,7 +317,7 @@ def initialize(shipping_rate: nil) attr_accessor :expand # ID of the invoice. attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :lines # The credit note's memo appears on the credit note PDF. attr_accessor :memo @@ -331,7 +331,7 @@ def initialize(shipping_rate: nil) attr_accessor :refund_amount # Refunds to link to this credit note. attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. attr_accessor :shipping_cost def initialize( diff --git a/lib/stripe/services/customer_session_service.rb b/lib/stripe/services/customer_session_service.rb index 50bd22126..d2a538f9e 100644 --- a/lib/stripe/services/customer_session_service.rb +++ b/lib/stripe/services/customer_session_service.rb @@ -22,7 +22,7 @@ class Features < Stripe::RequestParams attr_accessor :payment_method_allow_redisplay_filters # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. attr_accessor :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. attr_accessor :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. # diff --git a/lib/stripe/services/identity/verification_session_service.rb b/lib/stripe/services/identity/verification_session_service.rb index 85668f9b6..8e6b01ad4 100644 --- a/lib/stripe/services/identity/verification_session_service.rb +++ b/lib/stripe/services/identity/verification_session_service.rb @@ -103,6 +103,18 @@ def initialize(email: nil, phone: nil) @phone = phone end end + + class RelatedPerson < Stripe::RequestParams + # A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + attr_accessor :account + # A token referencing a Person resource that this verification is being used to verify. + attr_accessor :person + + def initialize(account: nil, person: nil) + @account = account + @person = person + end + end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_accessor :client_reference_id # Specifies which fields in the response should be expanded. @@ -115,6 +127,8 @@ def initialize(email: nil, phone: nil) attr_accessor :provided_details # Customer ID attr_accessor :related_customer + # Tokens referencing a Person resource and it's associated account. + attr_accessor :related_person # The URL that the user will be redirected to upon completing the verification flow. attr_accessor :return_url # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. @@ -129,6 +143,7 @@ def initialize( options: nil, provided_details: nil, related_customer: nil, + related_person: nil, return_url: nil, type: nil, verification_flow: nil @@ -139,6 +154,7 @@ def initialize( @options = options @provided_details = provided_details @related_customer = related_customer + @related_person = related_person @return_url = return_url @type = type @verification_flow = verification_flow diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index da75030e6..239c8a9d6 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -123,7 +123,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -770,7 +770,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -2110,6 +2110,15 @@ def initialize(account: nil, type: nil) end class ScheduleDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -2463,6 +2472,8 @@ def initialize( @trial_end = trial_end end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # 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. attr_accessor :end_behavior # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -2470,7 +2481,8 @@ def initialize( # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. attr_accessor :proration_behavior - def initialize(end_behavior: nil, phases: nil, proration_behavior: nil) + def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil) + @billing_mode = billing_mode @end_behavior = end_behavior @phases = phases @proration_behavior = proration_behavior @@ -2478,6 +2490,15 @@ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil) end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -2595,9 +2616,11 @@ def initialize( end # For new subscriptions, a future timestamp 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. For existing subscriptions, the value can only be set to `now` or `unchanged`. attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # This simulates the subscription being canceled or expired immediately. attr_accessor :cancel_now @@ -2618,6 +2641,7 @@ def initialize( def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, @@ -2630,6 +2654,7 @@ def initialize( trial_end: nil ) @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @cancel_now = cancel_now diff --git a/lib/stripe/services/payment_intent_service.rb b/lib/stripe/services/payment_intent_service.rb index 654d20c85..954197645 100644 --- a/lib/stripe/services/payment_intent_service.rb +++ b/lib/stripe/services/payment_intent_service.rb @@ -217,6 +217,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -435,6 +436,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -526,6 +529,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -579,6 +583,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -914,7 +919,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -1192,6 +1197,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -1349,12 +1371,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1367,11 +1455,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -1980,6 +2078,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -2065,6 +2165,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2115,6 +2216,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -2286,7 +2388,7 @@ def initialize(amount: nil, destination: nil) attr_accessor :payment_method_data # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). attr_accessor :radar_options @@ -2512,6 +2614,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -2730,6 +2833,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -2821,6 +2926,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2874,6 +2980,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -3209,7 +3316,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -3487,6 +3594,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -3644,12 +3768,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3662,11 +3852,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -4275,6 +4475,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -4360,6 +4562,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -4410,6 +4613,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -4536,7 +4740,7 @@ def initialize(amount: nil) attr_accessor :payment_method_data # Payment-method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). attr_accessor :receipt_email @@ -4859,6 +5063,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -5077,6 +5282,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -5168,6 +5375,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -5221,6 +5429,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -5556,7 +5765,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) @@ -5834,6 +6043,23 @@ def initialize(capture_method: nil, setup_future_usage: nil) end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + @setup_future_usage = setup_future_usage + end + end + class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -5991,12 +6217,78 @@ def initialize(capture_method: nil, setup_future_usage: nil) end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. # # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to attr_accessor :preferred_locale # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6009,11 +6301,21 @@ class Klarna < Stripe::RequestParams # # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. + attr_accessor :subscriptions - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ) @capture_method = capture_method + @on_demand = on_demand @preferred_locale = preferred_locale @setup_future_usage = setup_future_usage + @subscriptions = subscriptions end end @@ -6622,6 +6924,8 @@ def initialize(setup_future_usage: nil) attr_accessor :card_present # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. attr_accessor :customer_balance # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. @@ -6707,6 +7011,7 @@ def initialize( card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -6757,6 +7062,7 @@ def initialize( @card = card @card_present = card_present @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -6878,7 +7184,7 @@ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_numbe attr_accessor :payment_method_data # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). attr_accessor :radar_options diff --git a/lib/stripe/services/payment_method_service.rb b/lib/stripe/services/payment_method_service.rb index 86d8e1f93..e0762fd29 100644 --- a/lib/stripe/services/payment_method_service.rb +++ b/lib/stripe/services/payment_method_service.rb @@ -185,6 +185,7 @@ def initialize( end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -405,6 +406,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :card # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # The `Customer` to whom the original PaymentMethod is attached. attr_accessor :customer # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. @@ -503,6 +506,7 @@ def initialize( boleto: nil, card: nil, cashapp: nil, + crypto: nil, customer: nil, customer_balance: nil, eps: nil, @@ -560,6 +564,7 @@ def initialize( @boleto = boleto @card = card @cashapp = cashapp + @crypto = crypto @customer = customer @customer_balance = customer_balance @eps = eps diff --git a/lib/stripe/services/quote_service.rb b/lib/stripe/services/quote_service.rb index ad92262e4..622bd03a5 100644 --- a/lib/stripe/services/quote_service.rb +++ b/lib/stripe/services/quote_service.rb @@ -198,16 +198,33 @@ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_r end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. attr_accessor :metadata # Integer representing the number of trial period days before the customer is charged for the first time. attr_accessor :trial_period_days - def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil) + def initialize( + billing_mode: nil, + description: nil, + effective_date: nil, + metadata: nil, + trial_period_days: nil + ) + @billing_mode = billing_mode @description = description @effective_date = effective_date @metadata = metadata @@ -476,7 +493,7 @@ def initialize( class SubscriptionData < Stripe::RequestParams # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. attr_accessor :metadata diff --git a/lib/stripe/services/setup_intent_service.rb b/lib/stripe/services/setup_intent_service.rb index 4d7ef3a32..e2c9eb3f3 100644 --- a/lib/stripe/services/setup_intent_service.rb +++ b/lib/stripe/services/setup_intent_service.rb @@ -227,6 +227,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -445,6 +446,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -536,6 +539,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -589,6 +593,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -841,6 +846,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -951,6 +1038,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -966,6 +1055,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -976,6 +1066,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit @@ -1033,7 +1124,7 @@ def initialize(amount: nil, currency: nil) attr_accessor :payment_method_data # Payment method-specific configuration for this SetupIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). attr_accessor :return_url @@ -1216,6 +1307,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -1434,6 +1526,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -1525,6 +1619,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -1578,6 +1673,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -1830,6 +1926,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -1940,6 +2118,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -1955,6 +2135,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -1965,6 +2146,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit @@ -1998,7 +2180,7 @@ def initialize( attr_accessor :payment_method_data # Payment method-specific configuration for this SetupIntent. attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). attr_accessor :payment_method_types def initialize( @@ -2192,6 +2374,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -2410,6 +2593,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -2501,6 +2686,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2554,6 +2740,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -2806,6 +2993,88 @@ def initialize( class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + attr_accessor :purchase_interval_count + + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ) + @average_amount = average_amount + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @purchase_interval = purchase_interval + @purchase_interval_count = purchase_interval_count + end + end + + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + attr_accessor :date + + def initialize(amount: nil, date: nil) + @amount = amount + @date = date + end + end + # Unit of time between subscription charges. + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + attr_accessor :interval_count + # Name for subscription. + attr_accessor :name + # Describes the upcoming charge for this subscription. + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + attr_accessor :reference + + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ) + @interval = interval + @interval_count = interval_count + @name = name + @next_billing = next_billing + @reference = reference + end + end + # The currency of the SetupIntent. Three letter ISO currency code. + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + attr_accessor :subscriptions + + def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil) + @currency = currency + @on_demand = on_demand + @preferred_locale = preferred_locale + @subscriptions = subscriptions + end + end + class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. attr_accessor :persistent_token @@ -2916,6 +3185,8 @@ def initialize( attr_accessor :card # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. attr_accessor :link # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. @@ -2931,6 +3202,7 @@ def initialize( bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -2941,6 +3213,7 @@ def initialize( @bacs_debit = bacs_debit @card = card @card_present = card_present + @klarna = klarna @link = link @paypal = paypal @sepa_debit = sepa_debit diff --git a/lib/stripe/services/subscription_schedule_service.rb b/lib/stripe/services/subscription_schedule_service.rb index 1e58c0951..6fde056db 100644 --- a/lib/stripe/services/subscription_schedule_service.rb +++ b/lib/stripe/services/subscription_schedule_service.rb @@ -122,6 +122,15 @@ def initialize( end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -584,6 +593,8 @@ def initialize( @trial_end = trial_end end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. attr_accessor :customer # Object representing the subscription schedule's default settings. @@ -602,6 +613,7 @@ def initialize( attr_accessor :start_date def initialize( + billing_mode: nil, customer: nil, default_settings: nil, end_behavior: nil, @@ -611,6 +623,7 @@ def initialize( phases: nil, start_date: nil ) + @billing_mode = billing_mode @customer = customer @default_settings = default_settings @end_behavior = end_behavior diff --git a/lib/stripe/services/subscription_service.rb b/lib/stripe/services/subscription_service.rb index bd8ab78c1..bc53f9204 100644 --- a/lib/stripe/services/subscription_service.rb +++ b/lib/stripe/services/subscription_service.rb @@ -547,7 +547,7 @@ def initialize(end_behavior: nil) attr_accessor :billing_thresholds # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # Details about why this subscription was cancelled attr_accessor :cancellation_details @@ -905,6 +905,15 @@ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: ni end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period attr_accessor :amount_gte @@ -1281,19 +1290,21 @@ def initialize(end_behavior: nil) attr_accessor :add_invoice_items # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). attr_accessor :application_fee_percent - # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + # Automatic tax settings for this subscription. attr_accessor :automatic_tax - # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. attr_accessor :backdate_start_date # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). 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. attr_accessor :billing_cycle_anchor # 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. attr_accessor :billing_cycle_anchor_config + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. attr_accessor :billing_thresholds # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. attr_accessor :cancel_at_period_end # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. attr_accessor :collection_method @@ -1361,6 +1372,7 @@ def initialize( backdate_start_date: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, + billing_mode: nil, billing_thresholds: nil, cancel_at: nil, cancel_at_period_end: nil, @@ -1395,6 +1407,7 @@ def initialize( @backdate_start_date = backdate_start_date @billing_cycle_anchor = billing_cycle_anchor @billing_cycle_anchor_config = billing_cycle_anchor_config + @billing_mode = billing_mode @billing_thresholds = billing_thresholds @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @@ -1443,6 +1456,26 @@ def initialize(expand: nil, limit: nil, page: nil, query: nil) end end + class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + attr_accessor :billing_mode + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(billing_mode: nil, expand: nil) + @billing_mode = billing_mode + @expand = expand + end + end + class ResumeParams < Stripe::RequestParams # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). attr_accessor :billing_cycle_anchor @@ -1520,6 +1553,17 @@ def list(params = {}, opts = {}) ) end + # Upgrade the billing_mode of an existing subscription. + def migrate(subscription, params = {}, opts = {}) + request( + method: :post, + path: format("/v1/subscriptions/%s/migrate", { subscription: CGI.escape(subscription) }), + params: params, + opts: opts, + base_address: :api + ) + end + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. def resume(subscription, params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/registration_service.rb b/lib/stripe/services/tax/registration_service.rb index d2eed5850..8d5db0d1d 100644 --- a/lib/stripe/services/tax/registration_service.rb +++ b/lib/stripe/services/tax/registration_service.rb @@ -1151,6 +1151,15 @@ def initialize(type: nil) end end + class Ua < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Ug < Stripe::RequestParams # Type of registration to be created in `country`. attr_accessor :type @@ -1457,6 +1466,8 @@ def initialize(type: nil) attr_accessor :tr # Options for the registration in TZ. attr_accessor :tz + # Options for the registration in UA. + attr_accessor :ua # Options for the registration in UG. attr_accessor :ug # Options for the registration in US. @@ -1565,6 +1576,7 @@ def initialize( tj: nil, tr: nil, tz: nil, + ua: nil, ug: nil, us: nil, uy: nil, @@ -1664,6 +1676,7 @@ def initialize( @tj = tj @tr = tr @tz = tz + @ua = ua @ug = ug @us = us @uy = uy diff --git a/lib/stripe/services/terminal/reader_service.rb b/lib/stripe/services/terminal/reader_service.rb index cc3548229..0a9cdbe30 100644 --- a/lib/stripe/services/terminal/reader_service.rb +++ b/lib/stripe/services/terminal/reader_service.rb @@ -195,6 +195,74 @@ def initialize(expand: nil, inputs: nil, metadata: nil) end end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Configuration overrides. + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID. + attr_accessor :payment_intent + + def initialize(collect_config: nil, expand: nil, payment_intent: nil) + @collect_config = collect_config + @expand = expand + @payment_intent = payment_intent + end + end + + class ConfirmPaymentIntentParams < Stripe::RequestParams + class ConfirmConfig < Stripe::RequestParams + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + attr_accessor :return_url + + def initialize(return_url: nil) + @return_url = return_url + end + end + # Configuration overrides. + attr_accessor :confirm_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID. + attr_accessor :payment_intent + + def initialize(confirm_config: nil, expand: nil, payment_intent: nil) + @confirm_config = confirm_config + @expand = expand + @payment_intent = payment_intent + end + end + class ProcessPaymentIntentParams < Stripe::RequestParams class ProcessConfig < Stripe::RequestParams class Tipping < Stripe::RequestParams @@ -385,6 +453,28 @@ def collect_inputs(reader, params = {}, opts = {}) ) end + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + def collect_payment_method(reader, params = {}, opts = {}) + request( + method: :post, + path: format("/v1/terminal/readers/%s/collect_payment_method", { reader: CGI.escape(reader) }), + params: params, + opts: opts, + base_address: :api + ) + end + + # Finalizes a payment on a Reader. + def confirm_payment_intent(reader, params = {}, opts = {}) + request( + method: :post, + path: format("/v1/terminal/readers/%s/confirm_payment_intent", { reader: CGI.escape(reader) }), + params: params, + opts: opts, + base_address: :api + ) + end + # Creates a new Reader object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/confirmation_token_service.rb b/lib/stripe/services/test_helpers/confirmation_token_service.rb index 6f74cab39..212474983 100644 --- a/lib/stripe/services/test_helpers/confirmation_token_service.rb +++ b/lib/stripe/services/test_helpers/confirmation_token_service.rb @@ -117,6 +117,7 @@ def initialize(tax_id: nil) end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams @@ -335,6 +336,8 @@ class Zip < Stripe::RequestParams; end attr_accessor :boleto # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. attr_accessor :customer_balance # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -426,6 +429,7 @@ def initialize( blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -479,6 +483,7 @@ def initialize( @blik = blik @boleto = boleto @cashapp = cashapp + @crypto = crypto @customer_balance = customer_balance @eps = eps @fpx = fpx @@ -528,7 +533,7 @@ class Plan < Stripe::RequestParams # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. # One of `month`. attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. attr_accessor :type def initialize(count: nil, interval: nil, type: nil) diff --git a/lib/stripe/services/token_service.rb b/lib/stripe/services/token_service.rb index 94c5ed603..f16c24df2 100644 --- a/lib/stripe/services/token_service.rb +++ b/lib/stripe/services/token_service.rb @@ -212,7 +212,7 @@ def initialize(document: nil) attr_accessor :ownership_exemption_reason # The company's phone number (used for verification). attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. attr_accessor :registration_date # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). attr_accessor :registration_number diff --git a/lib/stripe/services/treasury/financial_account_service.rb b/lib/stripe/services/treasury/financial_account_service.rb index 522c7f73d..e61ec03c8 100644 --- a/lib/stripe/services/treasury/financial_account_service.rb +++ b/lib/stripe/services/treasury/financial_account_service.rb @@ -39,19 +39,23 @@ def initialize(gt: nil, gte: nil, lt: nil, lte: nil) attr_accessor :limit # An object ID cursor for use in pagination. attr_accessor :starting_after + # Only return FinancialAccounts that have the given status: `open` or `closed` + attr_accessor :status def initialize( created: nil, ending_before: nil, expand: nil, limit: nil, - starting_after: nil + starting_after: nil, + status: nil ) @created = created @ending_before = ending_before @expand = expand @limit = limit @starting_after = starting_after + @status = status end end diff --git a/lib/stripe/services/v2/billing_service.rb b/lib/stripe/services/v2/billing_service.rb index b4cffb6b0..54dea6b8f 100644 --- a/lib/stripe/services/v2/billing_service.rb +++ b/lib/stripe/services/v2/billing_service.rb @@ -4,12 +4,12 @@ module Stripe module V2 class BillingService < StripeService - attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events + attr_reader :meter_event_adjustments, :meter_event_session, :meter_event_stream, :meter_events def initialize(requestor) super - @meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor) @meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor) + @meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor) @meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor) @meter_events = Stripe::V2::Billing::MeterEventService.new(@requestor) end diff --git a/lib/stripe/services/v2/core/event_destination_service.rb b/lib/stripe/services/v2/core/event_destination_service.rb index bd86351da..eeb082387 100644 --- a/lib/stripe/services/v2/core/event_destination_service.rb +++ b/lib/stripe/services/v2/core/event_destination_service.rb @@ -5,6 +5,18 @@ module Stripe module V2 module Core class EventDestinationService < StripeService + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + attr_accessor :include + # The page size. + attr_accessor :limit + + def initialize(include: nil, limit: nil) + @include = include + @limit = limit + end + end + class CreateParams < Stripe::RequestParams class AmazonEventbridge < Stripe::RequestParams # The AWS account ID. @@ -77,22 +89,6 @@ def initialize( end class DeleteParams < Stripe::RequestParams; end - class DisableParams < Stripe::RequestParams; end - class EnableParams < Stripe::RequestParams; end - - class ListParams < Stripe::RequestParams - # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - attr_accessor :include - # The page size. - attr_accessor :limit - - def initialize(include: nil, limit: nil) - @include = include - @limit = limit - end - end - - class PingParams < Stripe::RequestParams; end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. @@ -142,6 +138,10 @@ def initialize( end end + class DisableParams < Stripe::RequestParams; end + class EnableParams < Stripe::RequestParams; end + class PingParams < Stripe::RequestParams; end + # Create a new event destination. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index 0390954ce..7fa7e4635 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "15.2.1" + VERSION = "15.3.0" end diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 4becbc79a..9989b3b82 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -142,6 +142,9 @@ module Stripe # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. sig { returns(String) } attr_reader :cashapp_payments + # The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + sig { returns(String) } + attr_reader :crypto_payments # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. sig { returns(String) } attr_reader :eps_payments @@ -687,9 +690,15 @@ module Stripe # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. sig { returns(Integer) } attr_reader :monthly_anchor + # The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + sig { returns(T::Array[Integer]) } + attr_reader :monthly_payout_days # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. sig { returns(String) } attr_reader :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + sig { returns(T::Array[String]) } + attr_reader :weekly_payout_days end # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. sig { returns(T::Boolean) } @@ -1104,6 +1113,13 @@ module Stripe sig { params(requested: T.nilable(T::Boolean)).void } def initialize(requested: nil); end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :requested + sig { params(requested: T.nilable(T::Boolean)).void } + def initialize(requested: nil); end + end class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. sig { returns(T.nilable(T::Boolean)) } @@ -1456,6 +1472,9 @@ module Stripe # The cashapp_payments capability. sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CashappPayments)) } attr_accessor :cashapp_payments + # The crypto_payments capability. + sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CryptoPayments)) } + attr_accessor :crypto_payments # The eps_payments capability. sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::EpsPayments)) } attr_accessor :eps_payments @@ -1609,7 +1628,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::ZipPayments)) } attr_accessor :zip_payments sig { - params(acss_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::ZipPayments)).void + params(acss_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CashappPayments), crypto_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CryptoPayments), eps_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::ZipPayments)).void } def initialize( acss_debit_payments: nil, @@ -1628,6 +1647,7 @@ module Stripe card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -2059,6 +2079,13 @@ module Stripe sig { params(files: T.nilable(T::Array[String])).void } def initialize(files: nil); end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :files + sig { params(files: T.nilable(T::Array[String])).void } + def initialize(files: nil); end + end class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. sig { returns(T.nilable(T::Array[String])) } @@ -2101,6 +2128,9 @@ module Stripe returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification)) } attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + sig { returns(T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfAddress)) } + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. sig { returns(T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration)) } attr_accessor :proof_of_registration @@ -2110,7 +2140,7 @@ module Stripe } attr_accessor :proof_of_ultimate_beneficial_ownership sig { - params(bank_account_ownership_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void + params(bank_account_ownership_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_address: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfAddress), proof_of_registration: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void } def initialize( bank_account_ownership_verification: nil, @@ -2119,6 +2149,7 @@ module Stripe company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ); end @@ -2570,17 +2601,25 @@ module Stripe # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. sig { returns(T.nilable(Integer)) } attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + sig { returns(T.nilable(T::Array[Integer])) } + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) sig { returns(T.nilable(String)) } attr_accessor :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :weekly_payout_days sig { - params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void + params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), monthly_payout_days: T.nilable(T::Array[Integer]), weekly_anchor: T.nilable(String), weekly_payout_days: T.nilable(T::Array[String])).void } def initialize( delay_days: nil, interval: nil, monthly_anchor: nil, - weekly_anchor: nil + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil ); end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). @@ -3063,6 +3102,13 @@ module Stripe sig { params(requested: T.nilable(T::Boolean)).void } def initialize(requested: nil); end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :requested + sig { params(requested: T.nilable(T::Boolean)).void } + def initialize(requested: nil); end + end class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. sig { returns(T.nilable(T::Boolean)) } @@ -3415,6 +3461,9 @@ module Stripe # The cashapp_payments capability. sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CashappPayments)) } attr_accessor :cashapp_payments + # The crypto_payments capability. + sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CryptoPayments)) } + attr_accessor :crypto_payments # The eps_payments capability. sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::EpsPayments)) } attr_accessor :eps_payments @@ -3568,7 +3617,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::ZipPayments)) } attr_accessor :zip_payments sig { - params(acss_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::ZipPayments)).void + params(acss_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CashappPayments), crypto_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CryptoPayments), eps_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::ZipPayments)).void } def initialize( acss_debit_payments: nil, @@ -3587,6 +3636,7 @@ module Stripe card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -3924,7 +3974,7 @@ module Stripe # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::Account::CreateParams::Company::RegistrationDate)))) } @@ -4062,6 +4112,13 @@ module Stripe sig { params(files: T.nilable(T::Array[String])).void } def initialize(files: nil); end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :files + sig { params(files: T.nilable(T::Array[String])).void } + def initialize(files: nil); end + end class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. sig { returns(T.nilable(T::Array[String])) } @@ -4104,6 +4161,9 @@ module Stripe returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification)) } attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + sig { returns(T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfAddress)) } + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. sig { returns(T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfRegistration)) } attr_accessor :proof_of_registration @@ -4113,7 +4173,7 @@ module Stripe } attr_accessor :proof_of_ultimate_beneficial_ownership sig { - params(bank_account_ownership_verification: T.nilable(::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void + params(bank_account_ownership_verification: T.nilable(::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification), proof_of_address: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfAddress), proof_of_registration: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void } def initialize( bank_account_ownership_verification: nil, @@ -4122,6 +4182,7 @@ module Stripe company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ); end @@ -4568,17 +4629,25 @@ module Stripe # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. sig { returns(T.nilable(Integer)) } attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + sig { returns(T.nilable(T::Array[Integer])) } + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) sig { returns(T.nilable(String)) } attr_accessor :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :weekly_payout_days sig { - params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void + params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), monthly_payout_days: T.nilable(T::Array[Integer]), weekly_anchor: T.nilable(String), weekly_payout_days: T.nilable(T::Array[String])).void } def initialize( delay_days: nil, interval: nil, monthly_anchor: nil, - weekly_anchor: nil + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil ); end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index 43048b6a7..ada8cc5dc 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -14,10 +14,10 @@ module Stripe class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end @@ -30,10 +30,10 @@ module Stripe end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end @@ -46,19 +46,19 @@ module Stripe end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :standard_payouts end @@ -74,13 +74,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end @@ -102,10 +102,10 @@ module Stripe end class FinancialAccount < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection # Whether to allow sending money. @@ -168,7 +168,7 @@ module Stripe # Whether to allow cardholder management features. sig { returns(T::Boolean) } attr_reader :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow spend control management features. @@ -184,10 +184,10 @@ module Stripe end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end @@ -203,13 +203,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end @@ -222,13 +222,13 @@ module Stripe end class PaymentDisputes < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end @@ -244,13 +244,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end @@ -263,19 +263,19 @@ module Stripe end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T::Boolean) } attr_reader :standard_payouts end @@ -391,10 +391,10 @@ module Stripe class Components < Stripe::RequestParams class AccountManagement < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -420,10 +420,10 @@ module Stripe end class AccountOnboarding < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -449,19 +449,19 @@ module Stripe end class Balances < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :standard_payouts sig { @@ -493,13 +493,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -542,10 +542,10 @@ module Stripe end class FinancialAccount < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection # Whether to allow sending money. @@ -646,7 +646,7 @@ module Stripe # Whether to allow cardholder management features. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication # Whether to allow spend control management features. @@ -678,10 +678,10 @@ module Stripe end class NotificationBanner < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -710,13 +710,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -744,13 +744,13 @@ module Stripe end class PaymentDisputes < Stripe::RequestParams class Features < Stripe::RequestParams - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -780,13 +780,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -814,19 +814,19 @@ module Stripe end class Payouts < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :standard_payouts sig { @@ -898,73 +898,73 @@ module Stripe } def initialize(enabled: nil, features: nil); end end - # Configuration for the account management embedded component. + # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement)) } attr_accessor :account_management - # Configuration for the account onboarding embedded component. + # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding)) } attr_accessor :account_onboarding - # Configuration for the balances embedded component. + # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances)) } attr_accessor :balances - # Configuration for the disputes list embedded component. + # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::DisputesList)) } attr_accessor :disputes_list - # Configuration for the documents embedded component. + # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents)) } attr_accessor :documents - # Configuration for the financial account embedded component. + # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount)) } attr_accessor :financial_account - # Configuration for the financial account transactions embedded component. + # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions)) } attr_accessor :financial_account_transactions - # Configuration for the issuing card embedded component. + # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard)) } attr_accessor :issuing_card - # Configuration for the issuing cards list embedded component. + # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList)) } attr_accessor :issuing_cards_list - # Configuration for the notification banner embedded component. + # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner)) } attr_accessor :notification_banner - # Configuration for the payment details embedded component. + # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails)) } attr_accessor :payment_details - # Configuration for the payment disputes embedded component. + # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDisputes)) } attr_accessor :payment_disputes - # Configuration for the payments embedded component. + # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments)) } attr_accessor :payments - # Configuration for the payouts embedded component. + # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts)) } attr_accessor :payouts - # Configuration for the payouts list embedded component. + # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList)) } attr_accessor :payouts_list - # Configuration for the tax registrations embedded component. + # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations)) } attr_accessor :tax_registrations - # Configuration for the tax settings embedded component. + # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component. sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)) } attr_accessor :tax_settings sig { diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi index f4df6aa9e..a2f72db49 100644 --- a/rbi/stripe/resources/billing_portal/session.rbi +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -87,7 +87,7 @@ module Stripe sig { returns(Integer) } attr_reader :quantity end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. sig { returns(T.nilable(T::Array[Discount])) } attr_reader :discounts # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. @@ -249,7 +249,7 @@ module Stripe } def initialize(id: nil, price: nil, quantity: nil); end end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. sig { returns(T.nilable(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount])) } diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index b1d8e1acd..a3b23faee 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -353,7 +353,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_reader :type end @@ -596,7 +596,7 @@ module Stripe # Attribute for field incremental_authorization sig { returns(IncrementalAuthorization) } attr_reader :incremental_authorization - # Installment details for this payment (Mexico only). + # Installment details for this payment. # # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } @@ -651,10 +651,10 @@ module Stripe # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name # Identifier for this transaction. @@ -666,13 +666,13 @@ module Stripe # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end @@ -746,7 +746,7 @@ module Stripe # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -767,6 +767,20 @@ module Stripe sig { returns(T.nilable(String)) } attr_reader :cashtag end + class Crypto < Stripe::StripeObject + # The wallet address of the customer. + sig { returns(String) } + attr_reader :buyer_address + # The blockchain network that the transaction was sent on. + sig { returns(String) } + attr_reader :network + # The token currency that the transaction was sent with. + sig { returns(String) } + attr_reader :token_currency + # The blockchain transaction hash of the crypto payment. + sig { returns(String) } + attr_reader :transaction_hash + end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. @@ -811,7 +825,7 @@ module Stripe attr_reader :transaction_id end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank # The Bank Identifier Code of the customer's bank. @@ -836,10 +850,10 @@ module Stripe # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name # Identifier for this transaction. @@ -851,13 +865,13 @@ module Stripe # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end @@ -908,7 +922,7 @@ module Stripe # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -1304,6 +1318,9 @@ module Stripe # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field crypto + sig { returns(Crypto) } + attr_reader :crypto # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index c803f264f..6377e4630 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -2578,6 +2578,45 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -2587,8 +2626,15 @@ module Stripe # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Subscription details if the Checkout Session sets up a future subscription. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize(setup_future_usage: nil, subscriptions: nil); end end class Konbini < Stripe::RequestParams # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. @@ -3335,6 +3381,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -3390,6 +3443,11 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode)) + } + attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated # from the subscription. @@ -3419,13 +3477,10 @@ module Stripe returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData)) } attr_accessor :transfer_data - # Unix timestamp representing the end of the trial period the customer - # will get before being charged for the first time. Has to be at least - # 48 hours in the future. + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. sig { returns(T.nilable(Integer)) } attr_accessor :trial_end - # Integer representing the number of trial period days before the - # customer is charged for the first time. Has to be at least 1. + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. sig { returns(T.nilable(Integer)) } attr_accessor :trial_period_days # Settings related to subscription trials. @@ -3434,11 +3489,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -3558,7 +3614,7 @@ module Stripe # Generate a post-purchase Invoice for one-time payments. sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation)) } attr_accessor :invoice_creation - # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. # # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. # diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi index 933750c35..f768c97eb 100644 --- a/rbi/stripe/resources/confirmation_token.rbi +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -43,7 +43,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_reader :type end @@ -179,10 +179,10 @@ module Stripe # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name # Identifier for this transaction. @@ -194,13 +194,13 @@ module Stripe # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end @@ -274,7 +274,7 @@ module Stripe # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -579,7 +579,7 @@ module Stripe # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -597,6 +597,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_reader :cashtag end + class Crypto < Stripe::StripeObject; end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. @@ -614,7 +615,7 @@ module Stripe class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank # The Bank Identifier Code of the customer's bank, if the bank was provided. @@ -668,7 +669,7 @@ module Stripe # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -903,6 +904,9 @@ module Stripe # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field crypto + sig { returns(Crypto) } + attr_reader :crypto # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer @@ -1194,6 +1198,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -1432,6 +1437,11 @@ module Stripe returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance)) @@ -1614,7 +1624,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -1632,6 +1642,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -1682,7 +1693,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index 6ae2ccf79..3c037d947 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -323,7 +323,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -341,7 +341,7 @@ module Stripe # ID of the invoice. sig { returns(String) } attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Line])) } attr_accessor :lines # The credit note's memo appears on the credit note PDF. @@ -362,7 +362,7 @@ module Stripe # Refunds to link to this credit note. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNote::CreateParams::ShippingCost)) } attr_accessor :shipping_cost sig { @@ -476,7 +476,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -494,7 +494,7 @@ module Stripe # ID of the invoice. sig { returns(String) } attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Line])) } attr_accessor :lines # The credit note's memo appears on the credit note PDF. @@ -515,7 +515,7 @@ module Stripe # Refunds to link to this credit note. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNote::PreviewParams::ShippingCost)) } attr_accessor :shipping_cost sig { @@ -614,7 +614,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -638,7 +638,7 @@ module Stripe # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. sig { returns(T.nilable(Integer)) } attr_accessor :limit - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line])) } attr_accessor :lines # The credit note's memo appears on the credit note PDF. @@ -659,7 +659,7 @@ module Stripe # Refunds to link to this credit note. sig { returns(T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNote::ListPreviewLineItemsParams::ShippingCost)) } attr_accessor :shipping_cost # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi index bc3c7d2dc..26cd2249c 100644 --- a/rbi/stripe/resources/customer_session.rbi +++ b/rbi/stripe/resources/customer_session.rbi @@ -26,7 +26,7 @@ module Stripe # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(String) } attr_reader :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. sig { returns(T.nilable(Integer)) } attr_reader :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. @@ -109,7 +109,7 @@ module Stripe # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(T.nilable(String)) } attr_accessor :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. sig { returns(T.nilable(Integer)) } attr_accessor :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index d0baeeb63..1f018b6f7 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -53,7 +53,7 @@ module Stripe # The connected account that originates the event. sig { returns(String) } attr_reader :account - # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + # The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. sig { returns(T.nilable(String)) } attr_reader :api_version # Authentication context needed to fetch the event or related object. diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index 07ebce09c..53db2c0e6 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -45,6 +45,14 @@ module Stripe attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end + class Matching < Stripe::StripeObject + # Strictness of the DOB matching policy to apply. + sig { returns(String) } + attr_reader :dob + # Strictness of the name matching policy to apply. + sig { returns(String) } + attr_reader :name + end class Phone < Stripe::StripeObject # Request one time password verification of `provided_details.phone`. sig { returns(T::Boolean) } @@ -59,6 +67,9 @@ module Stripe # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number + # Attribute for field matching + sig { returns(Matching) } + attr_reader :matching # Attribute for field phone sig { returns(Phone) } attr_reader :phone @@ -76,6 +87,14 @@ module Stripe sig { returns(String) } attr_reader :status end + class RelatedPerson < Stripe::StripeObject + # Token referencing the associated Account of the related Person resource. + sig { returns(String) } + attr_reader :account + # Token referencing the related Person resource. + sig { returns(String) } + attr_reader :person + end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject # City, district, suburb, town, or village. @@ -181,6 +200,9 @@ module Stripe # Customer ID sig { returns(T.nilable(String)) } attr_reader :related_customer + # Attribute for field related_person + sig { returns(RelatedPerson) } + attr_reader :related_person # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). sig { returns(String) } attr_reader :status @@ -300,6 +322,16 @@ module Stripe sig { params(email: T.nilable(String), phone: T.nilable(String)).void } def initialize(email: nil, phone: nil); end end + class RelatedPerson < Stripe::RequestParams + # A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + sig { returns(String) } + attr_accessor :account + # A token referencing a Person resource that this verification is being used to verify. + sig { returns(String) } + attr_accessor :person + sig { params(account: String, person: String).void } + def initialize(account: nil, person: nil); end + end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. sig { returns(T.nilable(String)) } attr_accessor :client_reference_id @@ -320,6 +352,11 @@ module Stripe # Customer ID sig { returns(T.nilable(String)) } attr_accessor :related_customer + # Tokens referencing a Person resource and it's associated account. + sig { + returns(T.nilable(::Stripe::Identity::VerificationSession::CreateParams::RelatedPerson)) + } + attr_accessor :related_person # The URL that the user will be redirected to upon completing the verification flow. sig { returns(T.nilable(String)) } attr_accessor :return_url @@ -330,7 +367,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :verification_flow sig { - params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails), related_customer: T.nilable(String), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void + params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails), related_customer: T.nilable(String), related_person: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::RelatedPerson), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void } def initialize( client_reference_id: nil, @@ -339,6 +376,7 @@ module Stripe options: nil, provided_details: nil, related_customer: nil, + related_person: nil, return_url: nil, type: nil, verification_flow: nil diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 238d38803..92c3daa68 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -888,7 +888,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -1580,7 +1580,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -2981,6 +2981,13 @@ module Stripe def initialize(account: nil, type: nil); end end class ScheduleDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -3361,6 +3368,11 @@ module Stripe trial_end: nil ); end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode)) + } + attr_accessor :billing_mode # 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. sig { returns(T.nilable(String)) } attr_accessor :end_behavior @@ -3373,11 +3385,23 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void + params(billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void } - def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end + def initialize( + billing_mode: nil, + end_behavior: nil, + phases: nil, + proration_behavior: nil + ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -3503,10 +3527,15 @@ module Stripe # For new subscriptions, a future timestamp 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. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } + attr_accessor :billing_mode # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # This simulates the subscription being canceled or expired immediately. @@ -3536,10 +3565,11 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index 0972c2d80..8433898ca 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -3,10 +3,7 @@ # typed: true module Stripe - # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an - # invoice by creating or updating it with an `invoice` field, at which point it will be included as - # [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within - # [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). # # Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined # with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi index 2047bed66..81117b763 100644 --- a/rbi/stripe/resources/mandate.rbi +++ b/rbi/stripe/resources/mandate.rbi @@ -67,6 +67,7 @@ module Stripe class Card < Stripe::StripeObject; end class Cashapp < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject; end class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject; end @@ -114,6 +115,9 @@ module Stripe # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna + sig { returns(Klarna) } + attr_reader :klarna # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index 6255741d7..e19b1f935 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -1065,7 +1065,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_reader :type end @@ -1077,7 +1077,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_reader :type end @@ -1123,7 +1123,7 @@ module Stripe # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Installment details for this payment (Mexico only). + # Installment details for this payment. # # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } @@ -1198,6 +1198,17 @@ module Stripe sig { returns(String) } attr_reader :setup_future_usage end + class Crypto < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_reader :setup_future_usage + end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject @@ -1725,6 +1736,9 @@ module Stripe # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field crypto + sig { returns(Crypto) } + attr_reader :crypto # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance @@ -2252,6 +2266,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -2478,6 +2493,9 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Crypto)) } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance)) @@ -2628,7 +2646,7 @@ module Stripe sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -2646,6 +2664,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2980,7 +2999,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -3273,6 +3292,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -3423,6 +3457,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -3430,6 +3530,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -3444,10 +3549,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -4088,6 +4204,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance)))) @@ -4259,7 +4380,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -4277,6 +4398,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -4468,7 +4590,7 @@ module Stripe # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). @@ -4655,6 +4777,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -4881,6 +5004,9 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Crypto)) } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance)) @@ -5031,7 +5157,7 @@ module Stripe sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -5049,6 +5175,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -5383,7 +5510,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -5676,6 +5803,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -5826,6 +5968,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -5833,6 +6041,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -5847,10 +6060,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -6491,6 +6715,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance)))) @@ -6662,7 +6891,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -6680,6 +6909,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -6817,7 +7047,7 @@ module Stripe # Payment-method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). @@ -7128,6 +7358,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -7362,6 +7593,11 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance)) @@ -7522,7 +7758,7 @@ module Stripe sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -7540,6 +7776,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -7874,7 +8111,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -8167,6 +8404,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -8317,6 +8569,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -8324,6 +8642,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -8338,10 +8661,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -8982,6 +9316,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance)))) @@ -9153,7 +9492,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -9171,6 +9510,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -9303,7 +9643,7 @@ module Stripe # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi index 728d995c8..8d2a43067 100644 --- a/rbi/stripe/resources/payment_method.rbi +++ b/rbi/stripe/resources/payment_method.rbi @@ -125,10 +125,10 @@ module Stripe # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. + # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name # Identifier for this transaction. @@ -140,13 +140,13 @@ module Stripe # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. + # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. + # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end @@ -220,7 +220,7 @@ module Stripe # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -525,7 +525,7 @@ module Stripe # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -543,6 +543,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_reader :cashtag end + class Crypto < Stripe::StripeObject; end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. @@ -560,7 +561,7 @@ module Stripe class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank # The Bank Identifier Code of the customer's bank, if the bank was provided. @@ -614,7 +615,7 @@ module Stripe # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales # How card details were read in this transaction. @@ -857,6 +858,9 @@ module Stripe # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :created + # Attribute for field crypto + sig { returns(Crypto) } + attr_reader :crypto # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer @@ -1155,6 +1159,7 @@ module Stripe ); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -1364,6 +1369,9 @@ module Stripe # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Crypto)) } + attr_accessor :crypto # The `Customer` to whom the original PaymentMethod is attached. sig { returns(T.nilable(String)) } attr_accessor :customer @@ -1485,7 +1493,7 @@ module Stripe sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethod::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethod::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethod::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethod::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethod::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethod::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethod::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethod::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethod::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethod::CreateParams::Cashapp), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethod::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethod::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethod::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethod::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethod::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethod::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethod::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethod::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethod::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethod::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethod::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethod::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethod::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethod::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethod::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethod::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethod::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethod::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethod::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethod::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethod::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethod::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethod::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethod::CreateParams::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethod::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethod::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethod::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethod::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethod::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethod::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethod::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethod::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethod::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethod::CreateParams::Cashapp), crypto: T.nilable(::Stripe::PaymentMethod::CreateParams::Crypto), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethod::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethod::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethod::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethod::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethod::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethod::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethod::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethod::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethod::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethod::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethod::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethod::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethod::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethod::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethod::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethod::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethod::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethod::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethod::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethod::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethod::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethod::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethod::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethod::CreateParams::Zip)).void } def initialize( acss_debit: nil, @@ -1504,6 +1512,7 @@ module Stripe boleto: nil, card: nil, cashapp: nil, + crypto: nil, customer: nil, customer_balance: nil, eps: nil, diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index e175a77a2..a0c888496 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -201,6 +201,14 @@ module Stripe attr_reader :finalized_at end class SubscriptionData < Stripe::StripeObject + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(String) } + attr_reader :type + end + # The billing mode of the quote. + sig { returns(BillingMode) } + attr_reader :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description @@ -570,10 +578,20 @@ module Stripe ); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode)) } + attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) } attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. @@ -583,9 +601,10 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(billing_mode: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( + billing_mode: nil, description: nil, effective_date: nil, metadata: nil, @@ -850,7 +869,7 @@ module Stripe # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) } attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index 95fffc932..964c23eb4 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -154,7 +154,7 @@ module Stripe end class Cashapp < Stripe::StripeObject; end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank # The Bank Identifier Code of the customer's bank. diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index eefbc6481..d3e49c49c 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -269,6 +269,14 @@ module Stripe attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject + # The currency of the setup intent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_reader :currency + # Preferred locale of the Klarna checkout page that the customer is redirected to. + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + end class Link < Stripe::StripeObject # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -339,6 +347,9 @@ module Stripe # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field klarna + sig { returns(Klarna) } + attr_reader :klarna # Attribute for field link sig { returns(Link) } attr_reader :link @@ -423,7 +434,7 @@ module Stripe # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T::Array[String]) } attr_reader :payment_method_types # ID of the single_use Mandate generated by the SetupIntent. @@ -657,6 +668,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -881,6 +893,9 @@ module Stripe # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Crypto)) } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance)) @@ -1019,7 +1034,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -1037,6 +1052,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -1301,6 +1317,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -1426,6 +1535,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link)) } attr_accessor :link @@ -1445,7 +1559,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -1453,6 +1567,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -1525,7 +1640,7 @@ module Stripe # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). @@ -1675,6 +1790,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -1899,6 +2015,9 @@ module Stripe # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Crypto)) } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance)) @@ -2037,7 +2156,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -2055,6 +2174,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2319,6 +2439,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -2444,6 +2657,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link)) } attr_accessor :link @@ -2463,7 +2681,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -2471,6 +2689,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -2514,7 +2733,7 @@ module Stripe # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types sig { @@ -2697,6 +2916,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -2921,6 +3141,9 @@ module Stripe # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Crypto)) } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance)) @@ -3065,7 +3288,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -3083,6 +3306,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -3347,6 +3571,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -3472,6 +3789,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link)) } attr_accessor :link @@ -3491,7 +3813,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -3499,6 +3821,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index e060831bf..a4da9cb1a 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -43,6 +43,14 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_reader :second end + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(String) } + attr_reader :type + # Details on when the current billing_mode was adopted. + sig { returns(Integer) } + attr_reader :updated_at + end class BillingThresholds < Stripe::StripeObject # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } @@ -265,13 +273,16 @@ module Stripe # The fixed values used to calculate the `billing_cycle_anchor`. sig { returns(T.nilable(BillingCycleAnchorConfig)) } attr_reader :billing_cycle_anchor_config + # The billing mode of the subscription. + sig { returns(BillingMode) } + attr_reader :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds # A date in the future at which the subscription will automatically get canceled sig { returns(T.nilable(Integer)) } attr_reader :cancel_at - # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field will be removed in a future API version. Please use `cancel_at` instead. + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. sig { returns(T::Boolean) } attr_reader :cancel_at_period_end # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. @@ -388,7 +399,7 @@ module Stripe # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings - # If the subscription has a trial, the beginning of that trial. For subsequent trials, this date remains as the start of the first ever trial on the subscription. + # If the subscription has a trial, the beginning of that trial. sig { returns(T.nilable(Integer)) } attr_reader :trial_start class CancelParams < Stripe::RequestParams @@ -965,7 +976,7 @@ module Stripe # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # Details about why this subscription was cancelled @@ -1335,6 +1346,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -1737,10 +1755,10 @@ module Stripe # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). sig { returns(T.nilable(T.nilable(T.any(String, Float)))) } attr_accessor :application_fee_percent - # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + # Automatic tax settings for this subscription. sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax)) } attr_accessor :automatic_tax - # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. sig { returns(T.nilable(Integer)) } attr_accessor :backdate_start_date # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). 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. @@ -1749,6 +1767,9 @@ module Stripe # 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. sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) } attr_accessor :billing_cycle_anchor_config + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingMode)) } + attr_accessor :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds)))) @@ -1757,7 +1778,7 @@ module Stripe # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(Integer)) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. @@ -1847,7 +1868,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void + params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::Subscription::CreateParams::BillingMode), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void } def initialize( add_invoice_items: nil, @@ -1856,6 +1877,7 @@ module Stripe backdate_start_date: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, + billing_mode: nil, billing_thresholds: nil, cancel_at: nil, cancel_at_period_end: nil, @@ -1903,6 +1925,25 @@ module Stripe } def initialize(expand: nil, limit: nil, page: nil, query: nil); end end + class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(::Stripe::Subscription::MigrateParams::BillingMode) } + attr_accessor :billing_mode + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + sig { + params(billing_mode: ::Stripe::Subscription::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } + def initialize(billing_mode: nil, expand: nil); end + end class ResumeParams < Stripe::RequestParams # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } @@ -1976,6 +2017,18 @@ module Stripe } def self.list(params = {}, opts = {}); end + # Upgrade the billing_mode of an existing subscription. + sig { + params(params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def migrate(params = {}, opts = {}); end + + # Upgrade the billing_mode of an existing subscription. + sig { + params(subscription: String, params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def self.migrate(subscription, params = {}, opts = {}); end + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. sig { params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index 226fe3cef..c1e2a1586 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -7,6 +7,14 @@ module Stripe # # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) class SubscriptionSchedule < APIResource + class BillingMode < Stripe::StripeObject + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(String) } + attr_reader :type + # Details on when the current billing_mode was adopted. + sig { returns(Integer) } + attr_reader :updated_at + end class CurrentPhase < Stripe::StripeObject # The end of this phase of the subscription schedule. sig { returns(Integer) } @@ -295,6 +303,9 @@ module Stripe # ID of the Connect Application that created the schedule. sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application + # The billing mode of the subscription. + sig { returns(BillingMode) } + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at @@ -474,6 +485,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -976,6 +994,9 @@ module Stripe trial_end: nil ); end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) } + attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } attr_accessor :customer @@ -1001,9 +1022,10 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void + params(billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void } def initialize( + billing_mode: nil, customer: nil, default_settings: nil, end_behavior: nil, diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi index 9d03a9af3..204bcf404 100644 --- a/rbi/stripe/resources/tax/registration.rbi +++ b/rbi/stripe/resources/tax/registration.rbi @@ -685,6 +685,11 @@ module Stripe sig { returns(String) } attr_reader :type end + class Ua < Stripe::StripeObject + # Type of registration in `country`. + sig { returns(String) } + attr_reader :type + end class Ug < Stripe::StripeObject # Type of registration in `country`. sig { returns(String) } @@ -1030,6 +1035,9 @@ module Stripe # Attribute for field tz sig { returns(Tz) } attr_reader :tz + # Attribute for field ua + sig { returns(Ua) } + attr_reader :ua # Attribute for field ug sig { returns(Ug) } attr_reader :ug @@ -2133,6 +2141,13 @@ module Stripe sig { params(type: String).void } def initialize(type: nil); end end + class Ua < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Ug < Stripe::RequestParams # Type of registration to be created in `country`. sig { returns(String) } @@ -2520,6 +2535,9 @@ module Stripe # Options for the registration in TZ. sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz)) } attr_accessor :tz + # Options for the registration in UA. + sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ua)) } + attr_accessor :ua # Options for the registration in UG. sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug)) } attr_accessor :ug @@ -2545,7 +2563,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)) } attr_accessor :zw sig { - params(ae: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz), ug: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)).void + params(ae: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz), ua: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ua), ug: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)).void } def initialize( ae: nil, @@ -2638,6 +2656,7 @@ module Stripe tj: nil, tr: nil, tz: nil, + ua: nil, ug: nil, us: nil, uy: nil, diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi index c38d95109..6a5316664 100644 --- a/rbi/stripe/resources/terminal/configuration.rbi +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -5,6 +5,7 @@ module Stripe module Terminal # A Configurations object represents how features should be configured for terminal readers. + # For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). class Configuration < APIResource class BbposWiseposE < Stripe::StripeObject # A File ID representing an image to display on the reader diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi index 97cf73773..e7e381c6f 100644 --- a/rbi/stripe/resources/terminal/location.rbi +++ b/rbi/stripe/resources/terminal/location.rbi @@ -92,7 +92,7 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :configuration_overrides # A name for the location. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(T.nilable(String))) } attr_accessor :display_name # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -101,7 +101,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) } attr_accessor :metadata sig { - params(address: T.nilable(::Stripe::Terminal::Location::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void + params(address: T.nilable(::Stripe::Terminal::Location::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void } def initialize( address: nil, diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index 06ede9c89..604a5fbce 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -127,6 +127,50 @@ module Stripe sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata end + class CollectPaymentMethod < Stripe::StripeObject + class CollectConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_reader :amount_eligible + end + # Enable customer-initiated cancellation when processing this payment. + sig { returns(T::Boolean) } + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T::Boolean) } + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + sig { returns(Tipping) } + attr_reader :tipping + end + # Represents a per-transaction override of a reader configuration + sig { returns(CollectConfig) } + attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + end + class ConfirmPaymentIntent < Stripe::StripeObject + class ConfirmConfig < Stripe::StripeObject + # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. + sig { returns(String) } + attr_reader :return_url + end + # Represents a per-transaction override of a reader configuration + sig { returns(ConfirmConfig) } + attr_reader :confirm_config + # Most recent PaymentIntent processed by the reader. + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject @@ -134,10 +178,10 @@ module Stripe sig { returns(Integer) } attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. + # Enable customer-initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation - # If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion. + # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. sig { returns(String) } attr_reader :return_url # Override showing a tipping selection screen on this transaction. @@ -156,7 +200,7 @@ module Stripe end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject - # Enable customer initiated cancellation when processing this SetupIntent. + # Enable customer-initiated cancellation when processing this SetupIntent. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end @@ -172,7 +216,7 @@ module Stripe end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject - # Enable customer initiated cancellation when refunding this payment. + # Enable customer-initiated cancellation when refunding this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end @@ -240,6 +284,12 @@ module Stripe # Represents a reader action to collect customer inputs sig { returns(CollectInputs) } attr_reader :collect_inputs + # Represents a reader action to collect a payment method + sig { returns(CollectPaymentMethod) } + attr_reader :collect_payment_method + # Represents a reader action to confirm a payment + sig { returns(ConfirmPaymentIntent) } + attr_reader :confirm_payment_intent # Failure code, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_code @@ -496,6 +546,79 @@ module Stripe } def initialize(expand: nil, inputs: nil, metadata: nil); end end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(T.nilable(Integer)) } + attr_accessor :amount_eligible + sig { params(amount_eligible: T.nilable(Integer)).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(T.nilable(String)) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping)) + } + attr_accessor :tipping + sig { + params(allow_redisplay: T.nilable(String), enable_customer_cancellation: T.nilable(T::Boolean), skip_tipping: T.nilable(T::Boolean), tipping: T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping)).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Configuration overrides. + sig { + returns(T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig)) + } + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + # PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(collect_config: T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void + } + def initialize(collect_config: nil, expand: nil, payment_intent: nil); end + end + class ConfirmPaymentIntentParams < Stripe::RequestParams + class ConfirmConfig < Stripe::RequestParams + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + sig { params(return_url: T.nilable(String)).void } + def initialize(return_url: nil); end + end + # Configuration overrides. + sig { + returns(T.nilable(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams::ConfirmConfig)) + } + attr_accessor :confirm_config + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + # PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(confirm_config: T.nilable(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams::ConfirmConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void + } + def initialize(confirm_config: nil, expand: nil, payment_intent: nil); end + end class ProcessPaymentIntentParams < Stripe::RequestParams class ProcessConfig < Stripe::RequestParams class Tipping < Stripe::RequestParams @@ -765,6 +888,30 @@ module Stripe } def self.collect_inputs(reader, params = {}, opts = {}); end + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_payment_method(params = {}, opts = {}); end + + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.collect_payment_method(reader, params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def confirm_payment_intent(params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.confirm_payment_intent(reader, params = {}, opts = {}); end + # Creates a new Reader object. sig { params(params: T.any(::Stripe::Terminal::Reader::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi index e7baa9928..c12e2a2e3 100644 --- a/rbi/stripe/resources/token.rbi +++ b/rbi/stripe/resources/token.rbi @@ -281,7 +281,7 @@ module Stripe # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Account::Company::RegistrationDate)))) } diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi index d17218541..d18738e97 100644 --- a/rbi/stripe/resources/treasury/financial_account.rbi +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -155,15 +155,19 @@ module Stripe # An object ID cursor for use in pagination. sig { returns(T.nilable(String)) } attr_accessor :starting_after + # Only return FinancialAccounts that have the given status: `open` or `closed` + sig { returns(T.nilable(String)) } + attr_accessor :status sig { - params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void + params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void } def initialize( created: nil, ending_before: nil, expand: nil, limit: nil, - starting_after: nil + starting_after: nil, + status: nil ); end end class CreateParams < Stripe::RequestParams diff --git a/rbi/stripe/services/account_service.rbi b/rbi/stripe/services/account_service.rbi index ed8001c81..dca4486ad 100644 --- a/rbi/stripe/services/account_service.rbi +++ b/rbi/stripe/services/account_service.rbi @@ -280,6 +280,13 @@ module Stripe sig { params(requested: T.nilable(T::Boolean)).void } def initialize(requested: nil); end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :requested + sig { params(requested: T.nilable(T::Boolean)).void } + def initialize(requested: nil); end + end class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. sig { returns(T.nilable(T::Boolean)) } @@ -654,6 +661,11 @@ module Stripe returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments)) } attr_accessor :cashapp_payments + # The crypto_payments capability. + sig { + returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CryptoPayments)) + } + attr_accessor :crypto_payments # The eps_payments capability. sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments)) @@ -861,7 +873,7 @@ module Stripe } attr_accessor :zip_payments sig { - params(acss_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments)).void + params(acss_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments), crypto_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CryptoPayments), eps_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments)).void } def initialize( acss_debit_payments: nil, @@ -880,6 +892,7 @@ module Stripe card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -1313,6 +1326,13 @@ module Stripe sig { params(files: T.nilable(T::Array[String])).void } def initialize(files: nil); end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :files + sig { params(files: T.nilable(T::Array[String])).void } + def initialize(files: nil); end + end class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. sig { returns(T.nilable(T::Array[String])) } @@ -1357,6 +1377,11 @@ module Stripe returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification)) } attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + sig { + returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfAddress)) + } + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration)) @@ -1368,7 +1393,7 @@ module Stripe } attr_accessor :proof_of_ultimate_beneficial_ownership sig { - params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void + params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_address: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfAddress), proof_of_registration: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void } def initialize( bank_account_ownership_verification: nil, @@ -1377,6 +1402,7 @@ module Stripe company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ); end @@ -1830,17 +1856,25 @@ module Stripe # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. sig { returns(T.nilable(Integer)) } attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + sig { returns(T.nilable(T::Array[Integer])) } + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) sig { returns(T.nilable(String)) } attr_accessor :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :weekly_payout_days sig { - params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void + params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), monthly_payout_days: T.nilable(T::Array[Integer]), weekly_anchor: T.nilable(String), weekly_payout_days: T.nilable(T::Array[String])).void } def initialize( delay_days: nil, interval: nil, monthly_anchor: nil, - weekly_anchor: nil + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil ); end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). @@ -2338,6 +2372,13 @@ module Stripe sig { params(requested: T.nilable(T::Boolean)).void } def initialize(requested: nil); end end + class CryptoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :requested + sig { params(requested: T.nilable(T::Boolean)).void } + def initialize(requested: nil); end + end class EpsPayments < Stripe::RequestParams # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. sig { returns(T.nilable(T::Boolean)) } @@ -2712,6 +2753,11 @@ module Stripe returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments)) } attr_accessor :cashapp_payments + # The crypto_payments capability. + sig { + returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CryptoPayments)) + } + attr_accessor :crypto_payments # The eps_payments capability. sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments)) @@ -2919,7 +2965,7 @@ module Stripe } attr_accessor :zip_payments sig { - params(acss_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::ZipPayments)).void + params(acss_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments), crypto_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CryptoPayments), eps_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments), nz_bank_account_becs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NzBankAccountBecsDebitPayments), oxxo_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments), pix_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PixPayments), promptpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::ZipPayments)).void } def initialize( acss_debit_payments: nil, @@ -2938,6 +2984,7 @@ module Stripe card_payments: nil, cartes_bancaires_payments: nil, cashapp_payments: nil, + crypto_payments: nil, eps_payments: nil, fpx_payments: nil, gb_bank_transfer_payments: nil, @@ -3277,7 +3324,7 @@ module Stripe # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::AccountService::CreateParams::Company::RegistrationDate)))) } @@ -3417,6 +3464,13 @@ module Stripe sig { params(files: T.nilable(T::Array[String])).void } def initialize(files: nil); end end + class ProofOfAddress < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :files + sig { params(files: T.nilable(T::Array[String])).void } + def initialize(files: nil); end + end class ProofOfRegistration < Stripe::RequestParams # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. sig { returns(T.nilable(T::Array[String])) } @@ -3461,6 +3515,11 @@ module Stripe returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification)) } attr_accessor :company_tax_id_verification + # One or more documents that demonstrate proof of address. + sig { + returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfAddress)) + } + attr_accessor :proof_of_address # One or more documents showing the company’s proof of registration with the national business registry. sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration)) @@ -3472,7 +3531,7 @@ module Stripe } attr_accessor :proof_of_ultimate_beneficial_ownership sig { - params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void + params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification), proof_of_address: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfAddress), proof_of_registration: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void } def initialize( bank_account_ownership_verification: nil, @@ -3481,6 +3540,7 @@ module Stripe company_ministerial_decree: nil, company_registration_verification: nil, company_tax_id_verification: nil, + proof_of_address: nil, proof_of_registration: nil, proof_of_ultimate_beneficial_ownership: nil ); end @@ -3929,17 +3989,25 @@ module Stripe # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. sig { returns(T.nilable(Integer)) } attr_accessor :monthly_anchor + # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + sig { returns(T.nilable(T::Array[Integer])) } + attr_accessor :monthly_payout_days # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) sig { returns(T.nilable(String)) } attr_accessor :weekly_anchor + # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :weekly_payout_days sig { - params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void + params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), monthly_payout_days: T.nilable(T::Array[Integer]), weekly_anchor: T.nilable(String), weekly_payout_days: T.nilable(T::Array[String])).void } def initialize( delay_days: nil, interval: nil, monthly_anchor: nil, - weekly_anchor: nil + monthly_payout_days: nil, + weekly_anchor: nil, + weekly_payout_days: nil ); end end # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). diff --git a/rbi/stripe/services/account_session_service.rbi b/rbi/stripe/services/account_session_service.rbi index f2262f09f..b28f30951 100644 --- a/rbi/stripe/services/account_session_service.rbi +++ b/rbi/stripe/services/account_session_service.rbi @@ -8,10 +8,10 @@ module Stripe class Components < Stripe::RequestParams class AccountManagement < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -37,10 +37,10 @@ module Stripe end class AccountOnboarding < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -66,19 +66,19 @@ module Stripe end class Balances < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :standard_payouts sig { @@ -110,13 +110,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -159,10 +159,10 @@ module Stripe end class FinancialAccount < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow external accounts to be linked for money transfer. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection # Whether to allow sending money. @@ -263,7 +263,7 @@ module Stripe # Whether to allow cardholder management features. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cardholder_management - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication # Whether to allow spend control management features. @@ -295,10 +295,10 @@ module Stripe end class NotificationBanner < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection sig { @@ -327,13 +327,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -361,13 +361,13 @@ module Stripe end class PaymentDisputes < Stripe::RequestParams class Features < Stripe::RequestParams - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -397,13 +397,13 @@ module Stripe # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :dispute_management - # Whether to allow sending refunds. This is `true` by default. + # Whether sending refunds is enabled. This is `true` by default. sig { returns(T.nilable(T::Boolean)) } attr_accessor :refund_management sig { @@ -431,19 +431,19 @@ module Stripe end class Payouts < Stripe::RequestParams class Features < Stripe::RequestParams - # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :standard_payouts sig { @@ -515,87 +515,87 @@ module Stripe } def initialize(enabled: nil, features: nil); end end - # Configuration for the account management embedded component. + # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement)) } attr_accessor :account_management - # Configuration for the account onboarding embedded component. + # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding)) } attr_accessor :account_onboarding - # Configuration for the balances embedded component. + # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Balances)) } attr_accessor :balances - # Configuration for the disputes list embedded component. + # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::DisputesList)) } attr_accessor :disputes_list - # Configuration for the documents embedded component. + # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Documents)) } attr_accessor :documents - # Configuration for the financial account embedded component. + # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount)) } attr_accessor :financial_account - # Configuration for the financial account transactions embedded component. + # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions)) } attr_accessor :financial_account_transactions - # Configuration for the issuing card embedded component. + # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard)) } attr_accessor :issuing_card - # Configuration for the issuing cards list embedded component. + # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList)) } attr_accessor :issuing_cards_list - # Configuration for the notification banner embedded component. + # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner)) } attr_accessor :notification_banner - # Configuration for the payment details embedded component. + # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails)) } attr_accessor :payment_details - # Configuration for the payment disputes embedded component. + # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDisputes)) } attr_accessor :payment_disputes - # Configuration for the payments embedded component. + # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payments)) } attr_accessor :payments - # Configuration for the payouts embedded component. + # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payouts)) } attr_accessor :payouts - # Configuration for the payouts list embedded component. + # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList)) } attr_accessor :payouts_list - # Configuration for the tax registrations embedded component. + # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations)) } attr_accessor :tax_registrations - # Configuration for the tax settings embedded component. + # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component. sig { returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings)) } diff --git a/rbi/stripe/services/billing_portal/session_service.rbi b/rbi/stripe/services/billing_portal/session_service.rbi index 0a8821f3d..5c1a0b33c 100644 --- a/rbi/stripe/services/billing_portal/session_service.rbi +++ b/rbi/stripe/services/billing_portal/session_service.rbi @@ -108,7 +108,7 @@ module Stripe } def initialize(id: nil, price: nil, quantity: nil); end end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + # The coupon or promotion code to apply to this subscription update. sig { returns(T.nilable(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount])) } diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi index 013e6e01c..6390bb1dd 100644 --- a/rbi/stripe/services/checkout/session_service.rbi +++ b/rbi/stripe/services/checkout/session_service.rbi @@ -1181,6 +1181,45 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1190,8 +1229,15 @@ module Stripe # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Subscription details if the Checkout Session sets up a future subscription. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize(setup_future_usage: nil, subscriptions: nil); end end class Konbini < Stripe::RequestParams # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. @@ -1938,6 +1984,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -1993,6 +2046,11 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode)) + } + attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated # from the subscription. @@ -2022,13 +2080,10 @@ module Stripe returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData)) } attr_accessor :transfer_data - # Unix timestamp representing the end of the trial period the customer - # will get before being charged for the first time. Has to be at least - # 48 hours in the future. + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. sig { returns(T.nilable(Integer)) } attr_accessor :trial_end - # Integer representing the number of trial period days before the - # customer is charged for the first time. Has to be at least 1. + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. sig { returns(T.nilable(Integer)) } attr_accessor :trial_period_days # Settings related to subscription trials. @@ -2037,11 +2092,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -2175,7 +2231,7 @@ module Stripe returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation)) } attr_accessor :invoice_creation - # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. # # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. # diff --git a/rbi/stripe/services/credit_note_preview_lines_service.rbi b/rbi/stripe/services/credit_note_preview_lines_service.rbi index 4f528581d..fc3c9c401 100644 --- a/rbi/stripe/services/credit_note_preview_lines_service.rbi +++ b/rbi/stripe/services/credit_note_preview_lines_service.rbi @@ -80,7 +80,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -104,7 +104,7 @@ module Stripe # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. sig { returns(T.nilable(Integer)) } attr_accessor :limit - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line])) } @@ -129,7 +129,7 @@ module Stripe returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost)) } attr_accessor :shipping_cost # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. diff --git a/rbi/stripe/services/credit_note_service.rbi b/rbi/stripe/services/credit_note_service.rbi index 6e2f2f2fb..1886563cf 100644 --- a/rbi/stripe/services/credit_note_service.rbi +++ b/rbi/stripe/services/credit_note_service.rbi @@ -135,7 +135,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -153,7 +153,7 @@ module Stripe # ID of the invoice. sig { returns(String) } attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line])) } attr_accessor :lines # The credit note's memo appears on the credit note PDF. @@ -174,7 +174,7 @@ module Stripe # Refunds to link to this credit note. sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNoteService::CreateParams::ShippingCost)) } attr_accessor :shipping_cost sig { @@ -295,7 +295,7 @@ module Stripe sig { params(shipping_rate: T.nilable(String)).void } def initialize(shipping_rate: nil); end end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(Integer)) } attr_accessor :amount # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. @@ -313,7 +313,7 @@ module Stripe # ID of the invoice. sig { returns(String) } attr_accessor :invoice - # Line items that make up the credit note. + # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line])) } attr_accessor :lines # The credit note's memo appears on the credit note PDF. @@ -334,7 +334,7 @@ module Stripe # Refunds to link to this credit note. sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Refund])) } attr_accessor :refunds - # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. sig { returns(T.nilable(::Stripe::CreditNoteService::PreviewParams::ShippingCost)) } attr_accessor :shipping_cost sig { diff --git a/rbi/stripe/services/customer_session_service.rbi b/rbi/stripe/services/customer_session_service.rbi index 6137d158c..b4cc486cb 100644 --- a/rbi/stripe/services/customer_session_service.rbi +++ b/rbi/stripe/services/customer_session_service.rbi @@ -23,7 +23,7 @@ module Stripe # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(T.nilable(String)) } attr_accessor :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. sig { returns(T.nilable(Integer)) } attr_accessor :payment_method_redisplay_limit # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. diff --git a/rbi/stripe/services/identity/verification_session_service.rbi b/rbi/stripe/services/identity/verification_session_service.rbi index 781925602..e86d943cc 100644 --- a/rbi/stripe/services/identity/verification_session_service.rbi +++ b/rbi/stripe/services/identity/verification_session_service.rbi @@ -109,6 +109,16 @@ module Stripe sig { params(email: T.nilable(String), phone: T.nilable(String)).void } def initialize(email: nil, phone: nil); end end + class RelatedPerson < Stripe::RequestParams + # A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + sig { returns(String) } + attr_accessor :account + # A token referencing a Person resource that this verification is being used to verify. + sig { returns(String) } + attr_accessor :person + sig { params(account: String, person: String).void } + def initialize(account: nil, person: nil); end + end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. sig { returns(T.nilable(String)) } attr_accessor :client_reference_id @@ -131,6 +141,11 @@ module Stripe # Customer ID sig { returns(T.nilable(String)) } attr_accessor :related_customer + # Tokens referencing a Person resource and it's associated account. + sig { + returns(T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::RelatedPerson)) + } + attr_accessor :related_person # The URL that the user will be redirected to upon completing the verification flow. sig { returns(T.nilable(String)) } attr_accessor :return_url @@ -141,7 +156,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :verification_flow sig { - params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails), related_customer: T.nilable(String), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void + params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails), related_customer: T.nilable(String), related_person: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::RelatedPerson), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void } def initialize( client_reference_id: nil, @@ -150,6 +165,7 @@ module Stripe options: nil, provided_details: nil, related_customer: nil, + related_person: nil, return_url: nil, type: nil, verification_flow: nil diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi index f2560737e..2eabad9b8 100644 --- a/rbi/stripe/services/invoice_service.rbi +++ b/rbi/stripe/services/invoice_service.rbi @@ -111,7 +111,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -805,7 +805,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -2216,6 +2216,13 @@ module Stripe def initialize(account: nil, type: nil); end end class ScheduleDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -2596,6 +2603,11 @@ module Stripe trial_end: nil ); end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode)) + } + attr_accessor :billing_mode # 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. sig { returns(T.nilable(String)) } attr_accessor :end_behavior @@ -2608,11 +2620,23 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void + params(billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void } - def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end + def initialize( + billing_mode: nil, + end_behavior: nil, + phases: nil, + proration_behavior: nil + ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -2738,10 +2762,15 @@ module Stripe # For new subscriptions, a future timestamp 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. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } + attr_accessor :billing_mode # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # This simulates the subscription being canceled or expired immediately. @@ -2771,10 +2800,11 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, diff --git a/rbi/stripe/services/payment_intent_service.rbi b/rbi/stripe/services/payment_intent_service.rbi index 98bdabdf9..9c740ecf5 100644 --- a/rbi/stripe/services/payment_intent_service.rbi +++ b/rbi/stripe/services/payment_intent_service.rbi @@ -218,6 +218,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -456,6 +457,11 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance)) @@ -638,7 +644,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -656,6 +662,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -990,7 +997,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -1283,6 +1290,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -1433,6 +1455,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -1440,6 +1528,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -1454,10 +1547,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -2098,6 +2202,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance)))) @@ -2269,7 +2378,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -2287,6 +2396,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2480,7 +2590,7 @@ module Stripe # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). @@ -2677,6 +2787,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -2915,6 +3026,11 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance)) @@ -3097,7 +3213,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -3115,6 +3231,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -3449,7 +3566,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -3742,6 +3859,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -3892,6 +4024,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -3899,6 +4097,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -3913,10 +4116,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -4557,6 +4771,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance)))) @@ -4728,7 +4947,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -4746,6 +4965,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -4883,7 +5103,7 @@ module Stripe # Payment-method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). @@ -5194,6 +5414,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -5432,6 +5653,11 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance)) @@ -5614,7 +5840,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -5632,6 +5858,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -5966,7 +6193,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { @@ -6259,6 +6486,21 @@ module Stripe } def initialize(capture_method: nil, setup_future_usage: nil); end end + class Crypto < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end class CustomerBalance < Stripe::RequestParams class BankTransfer < Stripe::RequestParams class EuBankTransfer < Stripe::RequestParams @@ -6409,6 +6651,72 @@ module Stripe def initialize(capture_method: nil, setup_future_usage: nil); end end class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling), reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end # Controls when the funds are captured from the customer's account. # # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. @@ -6416,6 +6724,11 @@ module Stripe # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :capture_method + # On-demand details if setting up or charging an on-demand payment. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand # Preferred language of the Klarna authorization page that the customer is redirected to sig { returns(T.nilable(String)) } attr_accessor :preferred_locale @@ -6430,10 +6743,21 @@ module Stripe # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. sig { returns(T.nilable(String)) } attr_accessor :setup_future_usage + # Subscription details if setting up or charging a subscription. sig { - params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))) } - def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + attr_accessor :subscriptions + sig { + params(capture_method: T.nilable(T.nilable(String)), on_demand: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + capture_method: nil, + on_demand: nil, + preferred_locale: nil, + setup_future_usage: nil, + subscriptions: nil + ); end end class Konbini < Stripe::RequestParams # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. @@ -7074,6 +7398,11 @@ module Stripe returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp)))) } attr_accessor :cashapp + # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Crypto)))) + } + attr_accessor :crypto # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance)))) @@ -7245,7 +7574,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip)))).void + params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact))), billie: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Billie))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp))), crypto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Crypto))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay))), satispay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Satispay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip)))).void } def initialize( acss_debit: nil, @@ -7263,6 +7592,7 @@ module Stripe card: nil, card_present: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -7397,7 +7727,7 @@ module Stripe returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). diff --git a/rbi/stripe/services/payment_method_service.rbi b/rbi/stripe/services/payment_method_service.rbi index 02a9bdf04..b4947200f 100644 --- a/rbi/stripe/services/payment_method_service.rbi +++ b/rbi/stripe/services/payment_method_service.rbi @@ -179,6 +179,7 @@ module Stripe ); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -390,6 +391,9 @@ module Stripe # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Crypto)) } + attr_accessor :crypto # The `Customer` to whom the original PaymentMethod is attached. sig { returns(T.nilable(String)) } attr_accessor :customer @@ -511,7 +515,7 @@ module Stripe sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Zip)) } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethodService::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodService::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodService::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethodService::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodService::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodService::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethodService::CreateParams::Cashapp), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethodService::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodService::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodService::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethodService::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodService::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethodService::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethodService::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodService::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodService::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethodService::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethodService::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethodService::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodService::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodService::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodService::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodService::CreateParams::Zip)).void + params(acss_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethodService::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodService::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodService::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethodService::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodService::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodService::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethodService::CreateParams::Cashapp), crypto: T.nilable(::Stripe::PaymentMethodService::CreateParams::Crypto), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethodService::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodService::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodService::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethodService::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodService::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethodService::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethodService::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodService::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodService::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethodService::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethodService::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethodService::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodService::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodService::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodService::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodService::CreateParams::Zip)).void } def initialize( acss_debit: nil, @@ -530,6 +534,7 @@ module Stripe boleto: nil, card: nil, cashapp: nil, + crypto: nil, customer: nil, customer_balance: nil, eps: nil, diff --git a/rbi/stripe/services/quote_service.rbi b/rbi/stripe/services/quote_service.rbi index 5038bae38..51c81d748 100644 --- a/rbi/stripe/services/quote_service.rbi +++ b/rbi/stripe/services/quote_service.rbi @@ -199,10 +199,22 @@ module Stripe ); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { + returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode)) + } + attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) } attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. @@ -212,9 +224,10 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(billing_mode: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( + billing_mode: nil, description: nil, effective_date: nil, metadata: nil, @@ -488,7 +501,7 @@ module Stripe # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(T.nilable(String))) } attr_accessor :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted. sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) } attr_accessor :effective_date # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. diff --git a/rbi/stripe/services/setup_intent_service.rbi b/rbi/stripe/services/setup_intent_service.rbi index 58526aa40..6203a7708 100644 --- a/rbi/stripe/services/setup_intent_service.rbi +++ b/rbi/stripe/services/setup_intent_service.rbi @@ -224,6 +224,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -462,6 +463,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance)) @@ -644,7 +650,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -662,6 +668,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -926,6 +933,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -1053,6 +1153,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link)) @@ -1074,7 +1179,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -1082,6 +1187,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -1156,7 +1262,7 @@ module Stripe # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). @@ -1316,6 +1422,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -1554,6 +1661,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance)) @@ -1736,7 +1848,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -1754,6 +1866,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -2018,6 +2131,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -2145,6 +2351,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link)) @@ -2166,7 +2377,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -2174,6 +2385,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, @@ -2217,7 +2429,7 @@ module Stripe # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions)) } attr_accessor :payment_method_options - # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). sig { returns(T.nilable(T::Array[String])) } attr_accessor :payment_method_types sig { @@ -2400,6 +2612,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -2638,6 +2851,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance)) @@ -2820,7 +3038,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -2838,6 +3056,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -3102,6 +3321,99 @@ module Stripe ); end end class CardPresent < Stripe::RequestParams; end + class Klarna < Stripe::RequestParams + class OnDemand < Stripe::RequestParams + # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :average_amount + # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :maximum_amount + # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + sig { returns(T.nilable(Integer)) } + attr_accessor :minimum_amount + # Interval at which the customer is making purchases + sig { returns(T.nilable(String)) } + attr_accessor :purchase_interval + # The number of `purchase_interval` between charges + sig { returns(T.nilable(Integer)) } + attr_accessor :purchase_interval_count + sig { + params(average_amount: T.nilable(Integer), maximum_amount: T.nilable(Integer), minimum_amount: T.nilable(Integer), purchase_interval: T.nilable(String), purchase_interval_count: T.nilable(Integer)).void + } + def initialize( + average_amount: nil, + maximum_amount: nil, + minimum_amount: nil, + purchase_interval: nil, + purchase_interval_count: nil + ); end + end + class Subscription < Stripe::RequestParams + class NextBilling < Stripe::RequestParams + # The amount of the next charge for the subscription. + sig { returns(Integer) } + attr_accessor :amount + # The date of the next charge for the subscription in YYYY-MM-DD format. + sig { returns(String) } + attr_accessor :date + sig { params(amount: Integer, date: String).void } + def initialize(amount: nil, date: nil); end + end + # Unit of time between subscription charges. + sig { returns(String) } + attr_accessor :interval + # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + sig { returns(T.nilable(Integer)) } + attr_accessor :interval_count + # Name for subscription. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Describes the upcoming charge for this subscription. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling) + } + attr_accessor :next_billing + # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + sig { returns(String) } + attr_accessor :reference + sig { + params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void + } + def initialize( + interval: nil, + interval_count: nil, + name: nil, + next_billing: nil, + reference: nil + ); end + end + # The currency of the SetupIntent. Three letter ISO currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # On-demand details if setting up a payment method for on-demand payments. + sig { + returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand)) + } + attr_accessor :on_demand + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(T.nilable(String)) } + attr_accessor :preferred_locale + # Subscription details if setting up or charging a subscription + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))) + } + attr_accessor :subscriptions + sig { + params(currency: T.nilable(String), on_demand: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::OnDemand), preferred_locale: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna::Subscription])))).void + } + def initialize( + currency: nil, + on_demand: nil, + preferred_locale: nil, + subscriptions: nil + ); end + end class Link < Stripe::RequestParams # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } @@ -3229,6 +3541,11 @@ module Stripe returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent)) } attr_accessor :card_present + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. sig { returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link)) @@ -3250,7 +3567,7 @@ module Stripe } attr_accessor :us_bank_account sig { - params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void + params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void } def initialize( acss_debit: nil, @@ -3258,6 +3575,7 @@ module Stripe bacs_debit: nil, card: nil, card_present: nil, + klarna: nil, link: nil, paypal: nil, sepa_debit: nil, diff --git a/rbi/stripe/services/subscription_schedule_service.rbi b/rbi/stripe/services/subscription_schedule_service.rbi index ef3eae455..1b8922cf8 100644 --- a/rbi/stripe/services/subscription_schedule_service.rbi +++ b/rbi/stripe/services/subscription_schedule_service.rbi @@ -132,6 +132,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -634,6 +641,9 @@ module Stripe trial_end: nil ); end end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode)) } + attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } attr_accessor :customer @@ -663,9 +673,10 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void + params(billing_mode: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode), customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void } def initialize( + billing_mode: nil, customer: nil, default_settings: nil, end_behavior: nil, diff --git a/rbi/stripe/services/subscription_service.rbi b/rbi/stripe/services/subscription_service.rbi index c949b349b..4d70e1cb9 100644 --- a/rbi/stripe/services/subscription_service.rbi +++ b/rbi/stripe/services/subscription_service.rbi @@ -593,7 +593,7 @@ module Stripe # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # Details about why this subscription was cancelled @@ -967,6 +967,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -1373,10 +1380,10 @@ module Stripe # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). sig { returns(T.nilable(T.nilable(T.any(String, Float)))) } attr_accessor :application_fee_percent - # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + # Automatic tax settings for this subscription. sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax)) } attr_accessor :automatic_tax - # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. sig { returns(T.nilable(Integer)) } attr_accessor :backdate_start_date # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). 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. @@ -1387,6 +1394,9 @@ module Stripe returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig)) } attr_accessor :billing_cycle_anchor_config + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode)) } + attr_accessor :billing_mode # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::BillingThresholds)))) @@ -1395,7 +1405,7 @@ module Stripe # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. sig { returns(T.nilable(Integer)) } attr_accessor :cancel_at - # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. sig { returns(T.nilable(T::Boolean)) } attr_accessor :cancel_at_period_end # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. @@ -1485,7 +1495,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)).void + params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)).void } def initialize( add_invoice_items: nil, @@ -1494,6 +1504,7 @@ module Stripe backdate_start_date: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, + billing_mode: nil, billing_thresholds: nil, cancel_at: nil, cancel_at_period_end: nil, @@ -1541,6 +1552,25 @@ module Stripe } def initialize(expand: nil, limit: nil, page: nil, query: nil); end end + class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Controls how prorations and invoices for subscriptions are calculated and orchestrated. + sig { returns(::Stripe::SubscriptionService::MigrateParams::BillingMode) } + attr_accessor :billing_mode + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + sig { + params(billing_mode: ::Stripe::SubscriptionService::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } + def initialize(billing_mode: nil, expand: nil); end + end class ResumeParams < Stripe::RequestParams # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } @@ -1598,6 +1628,12 @@ module Stripe } def list(params = {}, opts = {}); end + # Upgrade the billing_mode of an existing subscription. + sig { + params(subscription: String, params: T.any(::Stripe::SubscriptionService::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def migrate(subscription, params = {}, opts = {}); end + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. sig { params(subscription: String, params: T.any(::Stripe::SubscriptionService::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) diff --git a/rbi/stripe/services/tax/registration_service.rbi b/rbi/stripe/services/tax/registration_service.rbi index 6cd438775..ce1557e4a 100644 --- a/rbi/stripe/services/tax/registration_service.rbi +++ b/rbi/stripe/services/tax/registration_service.rbi @@ -1056,6 +1056,13 @@ module Stripe sig { params(type: String).void } def initialize(type: nil); end end + class Ua < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Ug < Stripe::RequestParams # Type of registration to be created in `country`. sig { returns(String) } @@ -1623,6 +1630,11 @@ module Stripe returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz)) } attr_accessor :tz + # Options for the registration in UA. + sig { + returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ua)) + } + attr_accessor :ua # Options for the registration in UG. sig { returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ug)) @@ -1664,7 +1676,7 @@ module Stripe } attr_accessor :zw sig { - params(ae: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz), ug: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zw)).void + params(ae: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz), ua: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ua), ug: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zw)).void } def initialize( ae: nil, @@ -1757,6 +1769,7 @@ module Stripe tj: nil, tr: nil, tz: nil, + ua: nil, ug: nil, us: nil, uy: nil, diff --git a/rbi/stripe/services/terminal/location_service.rbi b/rbi/stripe/services/terminal/location_service.rbi index ffaa4e7f2..1b61d5332 100644 --- a/rbi/stripe/services/terminal/location_service.rbi +++ b/rbi/stripe/services/terminal/location_service.rbi @@ -52,7 +52,7 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :configuration_overrides # A name for the location. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(T.nilable(String))) } attr_accessor :display_name # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -61,7 +61,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) } attr_accessor :metadata sig { - params(address: T.nilable(::Stripe::Terminal::LocationService::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void + params(address: T.nilable(::Stripe::Terminal::LocationService::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void } def initialize( address: nil, diff --git a/rbi/stripe/services/terminal/reader_service.rbi b/rbi/stripe/services/terminal/reader_service.rbi index 04d77f58a..409cd7af1 100644 --- a/rbi/stripe/services/terminal/reader_service.rbi +++ b/rbi/stripe/services/terminal/reader_service.rbi @@ -204,6 +204,79 @@ module Stripe } def initialize(expand: nil, inputs: nil, metadata: nil); end end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(T.nilable(Integer)) } + attr_accessor :amount_eligible + sig { params(amount_eligible: T.nilable(Integer)).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(T.nilable(String)) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(T.nilable(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig::Tipping)) + } + attr_accessor :tipping + sig { + params(allow_redisplay: T.nilable(String), enable_customer_cancellation: T.nilable(T::Boolean), skip_tipping: T.nilable(T::Boolean), tipping: T.nilable(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig::Tipping)).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Configuration overrides. + sig { + returns(T.nilable(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig)) + } + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + # PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(collect_config: T.nilable(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void + } + def initialize(collect_config: nil, expand: nil, payment_intent: nil); end + end + class ConfirmPaymentIntentParams < Stripe::RequestParams + class ConfirmConfig < Stripe::RequestParams + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + sig { params(return_url: T.nilable(String)).void } + def initialize(return_url: nil); end + end + # Configuration overrides. + sig { + returns(T.nilable(::Stripe::Terminal::ReaderService::ConfirmPaymentIntentParams::ConfirmConfig)) + } + attr_accessor :confirm_config + # Specifies which fields in the response should be expanded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :expand + # PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(confirm_config: T.nilable(::Stripe::Terminal::ReaderService::ConfirmPaymentIntentParams::ConfirmConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void + } + def initialize(confirm_config: nil, expand: nil, payment_intent: nil); end + end class ProcessPaymentIntentParams < Stripe::RequestParams class ProcessConfig < Stripe::RequestParams class Tipping < Stripe::RequestParams @@ -397,6 +470,18 @@ module Stripe } def collect_inputs(reader, params = {}, opts = {}); end + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_payment_method(reader, params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def confirm_payment_intent(reader, params = {}, opts = {}); end + # Creates a new Reader object. sig { params(params: T.any(::Stripe::Terminal::ReaderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) diff --git a/rbi/stripe/services/test_helpers/confirmation_token_service.rbi b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi index 110f9c6be..7089b1fd2 100644 --- a/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +++ b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi @@ -112,6 +112,7 @@ module Stripe def initialize(tax_id: nil); end end class Cashapp < Stripe::RequestParams; end + class Crypto < Stripe::RequestParams; end class CustomerBalance < Stripe::RequestParams; end class Eps < Stripe::RequestParams # The customer's bank. @@ -350,6 +351,11 @@ module Stripe returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp)) } attr_accessor :cashapp + # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + sig { + returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Crypto)) + } + attr_accessor :crypto # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. sig { returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance)) @@ -532,7 +538,7 @@ module Stripe } attr_accessor :zip sig { - params(acss_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip)).void + params(acss_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp), crypto: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Crypto), customer_balance: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip)).void } def initialize( acss_debit: nil, @@ -550,6 +556,7 @@ module Stripe blik: nil, boleto: nil, cashapp: nil, + crypto: nil, customer_balance: nil, eps: nil, fpx: nil, @@ -600,7 +607,7 @@ module Stripe # One of `month`. sig { returns(T.nilable(String)) } attr_accessor :interval - # Type of installment plan, one of `fixed_count`. + # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. sig { returns(String) } attr_accessor :type sig { diff --git a/rbi/stripe/services/token_service.rbi b/rbi/stripe/services/token_service.rbi index c1474d64c..3198f26b3 100644 --- a/rbi/stripe/services/token_service.rbi +++ b/rbi/stripe/services/token_service.rbi @@ -237,7 +237,7 @@ module Stripe # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_accessor :phone - # Attribute for param field registration_date + # When the business was incorporated or registered. sig { returns(T.nilable(T.nilable(T.any(String, ::Stripe::TokenService::CreateParams::Account::Company::RegistrationDate)))) } diff --git a/rbi/stripe/services/treasury/financial_account_service.rbi b/rbi/stripe/services/treasury/financial_account_service.rbi index 5152b7e0f..5e82fd93c 100644 --- a/rbi/stripe/services/treasury/financial_account_service.rbi +++ b/rbi/stripe/services/treasury/financial_account_service.rbi @@ -42,15 +42,19 @@ module Stripe # An object ID cursor for use in pagination. sig { returns(T.nilable(String)) } attr_accessor :starting_after + # Only return FinancialAccounts that have the given status: `open` or `closed` + sig { returns(T.nilable(String)) } + attr_accessor :status sig { - params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void + params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void } def initialize( created: nil, ending_before: nil, expand: nil, limit: nil, - starting_after: nil + starting_after: nil, + status: nil ); end end class CreateParams < Stripe::RequestParams diff --git a/rbi/stripe/services/v2/billing_service.rbi b/rbi/stripe/services/v2/billing_service.rbi index a92403818..502f6e6ef 100644 --- a/rbi/stripe/services/v2/billing_service.rbi +++ b/rbi/stripe/services/v2/billing_service.rbi @@ -5,8 +5,8 @@ module Stripe module V2 class BillingService < StripeService - attr_reader :meter_event_session attr_reader :meter_event_adjustments + attr_reader :meter_event_session attr_reader :meter_event_stream attr_reader :meter_events end diff --git a/rbi/stripe/services/v2/core/event_destination_service.rbi b/rbi/stripe/services/v2/core/event_destination_service.rbi index e5ccfe947..5477802fa 100644 --- a/rbi/stripe/services/v2/core/event_destination_service.rbi +++ b/rbi/stripe/services/v2/core/event_destination_service.rbi @@ -6,6 +6,16 @@ module Stripe module V2 module Core class EventDestinationService < StripeService + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include + # The page size. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } + def initialize(include: nil, limit: nil); end + end class CreateParams < Stripe::RequestParams class AmazonEventbridge < Stripe::RequestParams # The AWS account ID. @@ -79,19 +89,6 @@ module Stripe ); end end class DeleteParams < Stripe::RequestParams; end - class DisableParams < Stripe::RequestParams; end - class EnableParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams - # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include - # The page size. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } - def initialize(include: nil, limit: nil); end - end - class PingParams < Stripe::RequestParams; end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. sig { returns(T.nilable(T::Array[String])) } @@ -139,6 +136,9 @@ module Stripe webhook_endpoint: nil ); end end + class DisableParams < Stripe::RequestParams; end + class EnableParams < Stripe::RequestParams; end + class PingParams < Stripe::RequestParams; end # Create a new event destination. sig { params(params: T.any(::Stripe::V2::Core::EventDestinationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) diff --git a/test/stripe/api_requestor_test.rb b/test/stripe/api_requestor_test.rb index cec11cfdb..c08231c18 100644 --- a/test/stripe/api_requestor_test.rb +++ b/test/stripe/api_requestor_test.rb @@ -1530,7 +1530,7 @@ class RequestorTest < Test::Unit::TestCase assert(trace_payload["last_request_metrics"]["usage"].nil?) end - # TODO (http://go/j/DEVSDK-2318): This test fails intermittently in jruby/truffle + # TODO: (http://go/j/DEVSDK-2318): This test fails intermittently in jruby/truffle # so we have thread safety issues. Commenting out until we can # fix it. # should "check for thread safety" do diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 4d83f8da7..4a54b1c00 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -7512,16 +7512,6 @@ class CodegennedExampleTest < Test::Unit::TestCase ) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v1/webhook_endpoints/we_xxxxxxxxxxxxx" end - should "Test v2 billing meter event session post (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session").to_return( - body: '{"authentication_token":"authentication_token","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","id":"obj_123","object":"v2.billing.meter_event_session","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - meter_event_session = client.v2.billing.meter_event_session.create - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session" - end should "Test v2 billing meter event adjustment post (service)" do stub_request( :post, @@ -7539,6 +7529,16 @@ class CodegennedExampleTest < Test::Unit::TestCase }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_adjustments" end + should "Test v2 billing meter event session post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session").to_return( + body: '{"authentication_token":"authentication_token","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","id":"obj_123","object":"v2.billing.meter_event_session","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + meter_event_session = client.v2.billing.meter_event_session.create + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session" + end should "Test v2 billing meter event stream post (service)" do stub_request( :post, @@ -7571,6 +7571,16 @@ class CodegennedExampleTest < Test::Unit::TestCase }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_events" end + should "Test v2 core event destination get (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + event_destinations = client.v2.core.event_destinations.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations" + end should "Test v2 core event destination post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', @@ -7599,77 +7609,67 @@ class CodegennedExampleTest < Test::Unit::TestCase deleted = client.v2.core.event_destinations.delete("id_123") assert_requested :delete, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" end - should "Test v2 core event destination post 2 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" - ).to_return( + should "Test v2 core event destination get 2 (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123").to_return( body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - event_destination = client.v2.core.event_destinations.disable("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" + event_destination = client.v2.core.event_destinations.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" end - should "Test v2 core event destination post 3 (service)" do + should "Test v2 core event destination post 2 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" + "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" ).to_return( body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - event_destination = client.v2.core.event_destinations.enable("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" + event_destination = client.v2.core.event_destinations.update("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" end - should "Test v2 core event destination get (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}],"next_page_url":null,"previous_page_url":null}', + should "Test v2 core event destination post 3 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - event_destinations = client.v2.core.event_destinations.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations" + event_destination = client.v2.core.event_destinations.disable("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" end should "Test v2 core event destination post 4 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" + "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" ).to_return( - body: '{"context":null,"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.core.event","reason":null,"type":"type","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - event = client.v2.core.event_destinations.ping("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" - end - should "Test v2 core event destination get 2 (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123").to_return( body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - event_destination = client.v2.core.event_destinations.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + event_destination = client.v2.core.event_destinations.enable("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" end should "Test v2 core event destination post 5 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', + body: '{"context":null,"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.core.event","reason":null,"type":"type","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - event_destination = client.v2.core.event_destinations.update("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + event = client.v2.core.event_destinations.ping("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" end should "Test v2 core event get (service)" do stub_request( diff --git a/test/stripe/webhook_test.rb b/test/stripe/webhook_test.rb index a3669b74c..e54fc3676 100644 --- a/test/stripe/webhook_test.rb +++ b/test/stripe/webhook_test.rb @@ -66,14 +66,14 @@ class WebhookTest < Test::Unit::TestCase should "can call refresh on Event data object" do payload = { - "id": "evt_123", - "object": "event", - "data": { - "object": { - "id": "cus_123", - "object": "customer", - } - } + id: "evt_123", + object: "event", + data: { + object: { + id: "cus_123", + object: "customer", + }, + }, }.to_json header = Test::WebhookHelpers.generate_header(payload: payload)