From 25e66db3a8280acc6b8649405fd3a2f0233f7af4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:30:07 +0000 Subject: [PATCH 01/23] Update generated code for v1473 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/charge.rb | 2 +- rbi/stripe/resources/charge.rbi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 130232bf3..1c140afcc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1472 \ No newline at end of file +v1473 \ No newline at end of file diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index a6f9ae1c9..d09cbf6ed 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -1167,7 +1167,7 @@ class Zip < Stripe::StripeObject; end attr_reader :swish # Attribute for field twint attr_reader :twint - # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. # An additional hash is included on `payment_method_details` with a name matching this value. # It contains information specific to the payment method. attr_reader :type diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index 4ed89ec5a..b1e22979b 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -1497,7 +1497,7 @@ module Stripe # Attribute for field twint sig { returns(Twint) } attr_reader :twint - # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. # An additional hash is included on `payment_method_details` with a name matching this value. # It contains information specific to the payment method. sig { returns(String) } From 886c40ef5e50c6407eb7212a17a1f3e3d5d0444e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:08:57 +0000 Subject: [PATCH 02/23] Update generated code for v1479 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/billing/credit_grant.rb | 8 +++++++- lib/stripe/services/billing/credit_grant_service.rb | 6 +++++- rbi/stripe/resources/billing/credit_grant.rbi | 11 +++++++++-- rbi/stripe/services/billing/credit_grant_service.rbi | 8 ++++++-- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1c140afcc..00ad8bdb8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1473 \ No newline at end of file +v1479 \ No newline at end of file diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index a8f5b3d49..b5adc8f3c 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -140,6 +140,8 @@ def initialize(scope: nil) attr_accessor :metadata # A descriptive name shown in the Dashboard. attr_accessor :name + # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + attr_accessor :priority def initialize( amount: nil, @@ -150,7 +152,8 @@ def initialize( expand: nil, expires_at: nil, metadata: nil, - name: nil + name: nil, + priority: nil ) @amount = amount @applicability_config = applicability_config @@ -161,6 +164,7 @@ def initialize( @expires_at = expires_at @metadata = metadata @name = name + @priority = priority end end @@ -229,6 +233,8 @@ def initialize(expand: nil) attr_reader :name # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + attr_reader :priority # ID of the test clock this credit grant belongs to. attr_reader :test_clock # Time at which the object was last updated. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb index f4475495d..ad91f2853 100644 --- a/lib/stripe/services/billing/credit_grant_service.rb +++ b/lib/stripe/services/billing/credit_grant_service.rb @@ -100,6 +100,8 @@ def initialize(scope: nil) attr_accessor :metadata # A descriptive name shown in the Dashboard. attr_accessor :name + # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + attr_accessor :priority def initialize( amount: nil, @@ -110,7 +112,8 @@ def initialize( expand: nil, expires_at: nil, metadata: nil, - name: nil + name: nil, + priority: nil ) @amount = amount @applicability_config = applicability_config @@ -121,6 +124,7 @@ def initialize( @expires_at = expires_at @metadata = metadata @name = name + @priority = priority end end diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index f4d94c840..9e51a732a 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -78,6 +78,9 @@ module Stripe # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } attr_reader :object + # The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + sig { returns(T.nilable(Integer)) } + attr_reader :priority # ID of the test clock this credit grant belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock @@ -194,8 +197,11 @@ module Stripe # A descriptive name shown in the Dashboard. sig { returns(String) } attr_accessor :name + # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + sig { returns(Integer) } + attr_accessor :priority sig { - params(amount: ::Stripe::Billing::CreditGrant::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String).void + params(amount: ::Stripe::Billing::CreditGrant::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String, priority: Integer).void } def initialize( amount: nil, @@ -206,7 +212,8 @@ module Stripe expand: nil, expires_at: nil, metadata: nil, - name: nil + name: nil, + priority: nil ); end end class RetrieveParams < Stripe::RequestParams diff --git a/rbi/stripe/services/billing/credit_grant_service.rbi b/rbi/stripe/services/billing/credit_grant_service.rbi index 62363f803..907c52159 100644 --- a/rbi/stripe/services/billing/credit_grant_service.rbi +++ b/rbi/stripe/services/billing/credit_grant_service.rbi @@ -114,8 +114,11 @@ module Stripe # A descriptive name shown in the Dashboard. sig { returns(String) } attr_accessor :name + # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + sig { returns(Integer) } + attr_accessor :priority sig { - params(amount: ::Stripe::Billing::CreditGrantService::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String).void + params(amount: ::Stripe::Billing::CreditGrantService::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String, priority: Integer).void } def initialize( amount: nil, @@ -126,7 +129,8 @@ module Stripe expand: nil, expires_at: nil, metadata: nil, - name: nil + name: nil, + priority: nil ); end end class RetrieveParams < Stripe::RequestParams From eb0087ffe9b1aac70cc9054736c3bc8d25308e80 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:06:52 +0000 Subject: [PATCH 03/23] Update generated code for v1481 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/checkout/session.rb | 33 ++++- lib/stripe/resources/order.rb | 22 +++- lib/stripe/resources/payment_intent.rb | 97 +++++++++++++-- .../services/checkout/session_service.rb | 23 +++- lib/stripe/services/order_service.rb | 18 ++- lib/stripe/services/payment_intent_service.rb | 87 +++++++++++-- rbi/stripe/resources/checkout/session.rbi | 48 ++++++-- rbi/stripe/resources/order.rbi | 32 ++++- rbi/stripe/resources/payment_intent.rbi | 114 ++++++++++++++---- .../services/checkout/session_service.rbi | 33 +++-- rbi/stripe/services/order_service.rbi | 26 +++- .../services/payment_intent_service.rbi | 99 +++++++++++---- 13 files changed, 523 insertions(+), 111 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 00ad8bdb8..75ad4e96a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1479 \ No newline at end of file +v1481 \ No newline at end of file diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index 79f45dfc4..c80d9c342 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -354,6 +354,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date # Bank account verification method. attr_reader :verification_method end @@ -411,6 +413,8 @@ class AuBecsDebit < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class BacsDebit < Stripe::StripeObject @@ -428,6 +432,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class Bancontact < Stripe::StripeObject @@ -801,6 +807,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class Sofort < Stripe::StripeObject @@ -853,6 +861,8 @@ class ManualEntry < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date # Bank account verification method. attr_reader :verification_method end @@ -1818,6 +1828,8 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Verification method for the intent attr_accessor :verification_method @@ -1825,11 +1837,13 @@ def initialize( currency: nil, mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @currency = currency @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -1903,9 +1917,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1928,10 +1945,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -2520,10 +2540,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -2573,16 +2596,20 @@ def initialize(permissions: nil, prefetch: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Verification method for the intent attr_accessor :verification_method def initialize( financial_connections: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index f5bba6ba3..07567721d 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -93,6 +93,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date # Bank account verification method. attr_reader :verification_method end @@ -305,6 +307,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class Sofort < Stripe::StripeObject @@ -804,16 +808,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -1173,10 +1181,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1870,16 +1881,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -2239,10 +2254,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 51af46f57..b39dcc135 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -898,6 +898,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date # Bank account verification method. attr_reader :verification_method end @@ -971,6 +973,8 @@ class AuBecsDebit < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class BacsDebit < Stripe::StripeObject @@ -988,6 +992,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class Bancontact < Stripe::StripeObject @@ -1580,6 +1586,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date end class Shopeepay < Stripe::StripeObject @@ -1673,6 +1681,8 @@ class MandateOptions < Stripe::StripeObject # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_reader :target_date # Bank account verification method. attr_reader :verification_method end @@ -3295,12 +3305,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -3423,9 +3441,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -3450,10 +3471,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -4571,10 +4595,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -4735,6 +4762,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -4744,6 +4773,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -4751,6 +4781,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -6630,12 +6661,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -6758,9 +6797,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -6785,10 +6827,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -7906,10 +7951,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -8070,6 +8118,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -8079,6 +8129,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -8086,6 +8137,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -10685,12 +10737,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -10813,9 +10873,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -10840,10 +10903,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -11961,10 +12027,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -12125,6 +12194,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -12134,6 +12205,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -12141,6 +12213,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index 315013ae8..cc1793dcc 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -751,6 +751,8 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Verification method for the intent attr_accessor :verification_method @@ -758,11 +760,13 @@ def initialize( currency: nil, mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @currency = currency @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -836,9 +840,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -861,10 +868,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1453,10 +1463,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1506,16 +1519,20 @@ def initialize(permissions: nil, prefetch: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Verification method for the intent attr_accessor :verification_method def initialize( financial_connections: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end diff --git a/lib/stripe/services/order_service.rb b/lib/stripe/services/order_service.rb index 51b235bb7..eb7ef49cc 100644 --- a/lib/stripe/services/order_service.rb +++ b/lib/stripe/services/order_service.rb @@ -315,16 +315,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -684,10 +688,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1381,16 +1388,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -1750,10 +1761,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end diff --git a/lib/stripe/services/payment_intent_service.rb b/lib/stripe/services/payment_intent_service.rb index 45589594c..f43cd17ce 100644 --- a/lib/stripe/services/payment_intent_service.rb +++ b/lib/stripe/services/payment_intent_service.rb @@ -1435,12 +1435,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -1563,9 +1571,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -1590,10 +1601,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -2711,10 +2725,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -2875,6 +2892,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -2884,6 +2903,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -2891,6 +2911,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -4770,12 +4791,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -4898,9 +4927,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -4925,10 +4957,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -6046,10 +6081,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -6210,6 +6248,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -6219,6 +6259,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -6226,6 +6267,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -8825,12 +8867,20 @@ def initialize( # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method - def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + def initialize( + mandate_options: nil, + setup_future_usage: nil, + target_date: nil, + verification_method: nil + ) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end @@ -8953,9 +9003,12 @@ class AuBecsDebit < 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(setup_future_usage: nil) + def initialize(setup_future_usage: nil, target_date: nil) @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -8980,10 +9033,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -10101,10 +10157,13 @@ def initialize(reference_prefix: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date - def initialize(mandate_options: nil, setup_future_usage: nil) + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil) @mandate_options = mandate_options @setup_future_usage = setup_future_usage + @target_date = target_date end end @@ -10265,6 +10324,8 @@ def initialize(requested: nil) # # 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + attr_accessor :target_date # Bank account verification method. attr_accessor :verification_method @@ -10274,6 +10335,7 @@ def initialize( networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ) @financial_connections = financial_connections @@ -10281,6 +10343,7 @@ def initialize( @networks = networks @preferred_settlement_speed = preferred_settlement_speed @setup_future_usage = setup_future_usage + @target_date = target_date @verification_method = verification_method end end diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index ec596b320..a2e011952 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -432,6 +432,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date # Bank account verification method. sig { returns(String) } attr_reader :verification_method @@ -490,6 +493,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject @@ -509,6 +515,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class Bancontact < Stripe::StripeObject # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -918,6 +927,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class Sofort < Stripe::StripeObject # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -978,6 +990,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date # Bank account verification method. sig { returns(String) } attr_reader :verification_method @@ -2223,16 +2238,20 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Verification method for the intent sig { returns(String) } attr_accessor :verification_method sig { - params(currency: String, mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, verification_method: String).void + params(currency: String, mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, target_date: String, verification_method: String).void } def initialize( currency: nil, mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -2298,8 +2317,11 @@ 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(String) } attr_accessor :setup_future_usage - sig { params(setup_future_usage: String).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: String, target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -2323,10 +2345,13 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String).void + params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String, target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2878,10 +2903,13 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String).void + params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String, target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2928,15 +2956,19 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Verification method for the intent sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, verification_method: String).void + params(financial_connections: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, target_date: String, verification_method: String).void } def initialize( financial_connections: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi index fe1e0ab2c..2f9a80829 100644 --- a/rbi/stripe/resources/order.rbi +++ b/rbi/stripe/resources/order.rbi @@ -105,6 +105,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date # Bank account verification method. sig { returns(String) } attr_reader :verification_method @@ -351,6 +354,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class Sofort < Stripe::StripeObject # Preferred language of the SOFORT authorization page that the customer is redirected to. @@ -988,15 +994,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -1362,10 +1372,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Language shown to the payer on redirect. @@ -2091,15 +2104,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -2465,10 +2482,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Language shown to the payer on redirect. diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index 5a5565099..4a2923fe6 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -1166,6 +1166,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date # Bank account verification method. sig { returns(String) } attr_reader :verification_method @@ -1245,6 +1248,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject @@ -1264,6 +1270,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class Bancontact < Stripe::StripeObject # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -1945,6 +1954,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date end class Shopeepay < Stripe::StripeObject # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2050,6 +2062,9 @@ 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(String) } attr_reader :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_reader :target_date # Bank account verification method. sig { returns(String) } attr_reader :verification_method @@ -3887,15 +3902,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -4014,8 +4033,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -4041,10 +4063,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -5152,10 +5177,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5317,11 +5345,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -5329,6 +5360,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -7295,15 +7327,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -7422,8 +7458,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -7449,10 +7488,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -8560,10 +8602,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -8725,11 +8770,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -8737,6 +8785,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -11442,15 +11491,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -11569,8 +11622,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -11596,10 +11652,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -12707,10 +12766,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -12872,11 +12934,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -12884,6 +12949,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi index c2b475512..574d097fc 100644 --- a/rbi/stripe/services/checkout/session_service.rbi +++ b/rbi/stripe/services/checkout/session_service.rbi @@ -769,16 +769,20 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Verification method for the intent sig { returns(String) } attr_accessor :verification_method sig { - params(currency: String, mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, verification_method: String).void + params(currency: String, mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, target_date: String, verification_method: String).void } def initialize( currency: nil, mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -844,8 +848,11 @@ 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(String) } attr_accessor :setup_future_usage - sig { params(setup_future_usage: String).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: String, target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -869,10 +876,13 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String).void + params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String, target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1424,10 +1434,13 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String).void + params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String, target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1474,15 +1487,19 @@ 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(String) } attr_accessor :setup_future_usage + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Verification method for the intent sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, verification_method: String).void + params(financial_connections: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, target_date: String, verification_method: String).void } def initialize( financial_connections: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end diff --git a/rbi/stripe/services/order_service.rbi b/rbi/stripe/services/order_service.rbi index 44a51810c..3be2d9ced 100644 --- a/rbi/stripe/services/order_service.rbi +++ b/rbi/stripe/services/order_service.rbi @@ -312,15 +312,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -686,10 +690,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Language shown to the payer on redirect. @@ -1419,15 +1426,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -1793,10 +1804,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Sofort < Stripe::RequestParams # Language shown to the payer on redirect. diff --git a/rbi/stripe/services/payment_intent_service.rbi b/rbi/stripe/services/payment_intent_service.rbi index 37ce46f8c..28a3f23d2 100644 --- a/rbi/stripe/services/payment_intent_service.rbi +++ b/rbi/stripe/services/payment_intent_service.rbi @@ -1468,15 +1468,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -1595,8 +1599,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -1622,10 +1629,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -2733,10 +2743,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2898,11 +2911,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -2910,6 +2926,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -4920,15 +4937,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -5047,8 +5068,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -5074,10 +5098,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -6185,10 +6212,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6350,11 +6380,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -6362,6 +6395,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -9131,15 +9165,19 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( mandate_options: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end @@ -9258,8 +9296,11 @@ 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 - sig { params(setup_future_usage: T.nilable(String)).void } - def initialize(setup_future_usage: nil); end + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date + sig { params(setup_future_usage: T.nilable(String), target_date: String).void } + def initialize(setup_future_usage: nil, target_date: nil); end end class BacsDebit < Stripe::RequestParams class MandateOptions < Stripe::RequestParams @@ -9285,10 +9326,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Bancontact < Stripe::RequestParams # Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -10396,10 +10440,13 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date sig { - params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String), target_date: String).void } - def initialize(mandate_options: nil, setup_future_usage: nil); end + def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end end class Shopeepay < Stripe::RequestParams # Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -10561,11 +10608,14 @@ 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 + # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + sig { returns(String) } + attr_accessor :target_date # Bank account verification method. sig { returns(String) } attr_accessor :verification_method sig { - params(financial_connections: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + params(financial_connections: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), target_date: String, verification_method: String).void } def initialize( financial_connections: nil, @@ -10573,6 +10623,7 @@ module Stripe networks: nil, preferred_settlement_speed: nil, setup_future_usage: nil, + target_date: nil, verification_method: nil ); end end From 4652eeb792320f2c777d1bdf74516e27068865b5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:41:08 +0000 Subject: [PATCH 04/23] Update generated code for v1483 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/payment_intent.rb | 8 ++++---- rbi/stripe/resources/payment_intent.rbi | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 75ad4e96a..0dd08f616 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1481 \ No newline at end of file +v1483 \ No newline at end of file diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index b39dcc135..d3af6b2ad 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -1865,11 +1865,11 @@ class Address < Stripe::StripeObject end class TransferData < Stripe::StripeObject - # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + # The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + # The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + # representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). attr_reader :amount - # The account (if any) that the payment is attributed to for tax - # reporting, and where funds from the payment are transferred to after - # payment success. + # The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. attr_reader :destination end diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index 4a2923fe6..d4d8f92b7 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -2316,12 +2316,12 @@ module Stripe attr_reader :tracking_number end class TransferData < Stripe::StripeObject - # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + # The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + # The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + # representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). sig { returns(Integer) } attr_reader :amount - # The account (if any) that the payment is attributed to for tax - # reporting, and where funds from the payment are transferred to after - # payment success. + # The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end From cf3a254b117c02b274484db581593fa788d2a836 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:52:25 +0000 Subject: [PATCH 05/23] Update generated code for v1486 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/billing/credit_grant.rb | 2 +- lib/stripe/services/billing/credit_grant_service.rb | 2 +- rbi/stripe/resources/billing/credit_grant.rbi | 2 +- rbi/stripe/services/billing/credit_grant_service.rbi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0dd08f616..0234066a5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1483 \ No newline at end of file +v1486 \ No newline at end of file diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index b5adc8f3c..c6cb08378 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -124,7 +124,7 @@ def initialize(scope: nil) end # Amount of this credit grant. attr_accessor :amount - # Configuration specifying what this credit grant applies to. + # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. attr_accessor :applicability_config # The category of this credit grant. attr_accessor :category diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb index ad91f2853..2bde60d37 100644 --- a/lib/stripe/services/billing/credit_grant_service.rb +++ b/lib/stripe/services/billing/credit_grant_service.rb @@ -84,7 +84,7 @@ def initialize(scope: nil) end # Amount of this credit grant. attr_accessor :amount - # Configuration specifying what this credit grant applies to. + # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. attr_accessor :applicability_config # The category of this credit grant. attr_accessor :category diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index 9e51a732a..909b3f552 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -173,7 +173,7 @@ module Stripe # Amount of this credit grant. sig { returns(::Stripe::Billing::CreditGrant::CreateParams::Amount) } attr_accessor :amount - # Configuration specifying what this credit grant applies to. + # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. sig { returns(::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig) } attr_accessor :applicability_config # The category of this credit grant. diff --git a/rbi/stripe/services/billing/credit_grant_service.rbi b/rbi/stripe/services/billing/credit_grant_service.rbi index 907c52159..49a044fd3 100644 --- a/rbi/stripe/services/billing/credit_grant_service.rbi +++ b/rbi/stripe/services/billing/credit_grant_service.rbi @@ -90,7 +90,7 @@ module Stripe # Amount of this credit grant. sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::Amount) } attr_accessor :amount - # Configuration specifying what this credit grant applies to. + # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig) } attr_accessor :applicability_config # The category of this credit grant. From 23835db678033b35bc27b9eec676c78bfb1cb4a4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:49:01 +0000 Subject: [PATCH 06/23] Update generated code for v1487 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/product.rb | 4 ++++ lib/stripe/services/product_service.rb | 4 ++++ rbi/stripe/resources/product.rbi | 6 +++++- rbi/stripe/services/product_service.rbi | 6 +++++- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0234066a5..73182b6b3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1486 \ No newline at end of file +v1487 \ No newline at end of file diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index 4d93de440..b47d67413 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -336,6 +336,8 @@ def initialize(interval: nil, interval_count: nil) attr_accessor :currency_options # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_accessor :custom_unit_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata # The recurring components of a price such as `interval` and `interval_count`. attr_accessor :recurring # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. @@ -349,6 +351,7 @@ def initialize( currency: nil, currency_options: nil, custom_unit_amount: nil, + metadata: nil, recurring: nil, tax_behavior: nil, unit_amount: nil, @@ -357,6 +360,7 @@ def initialize( @currency = currency @currency_options = currency_options @custom_unit_amount = custom_unit_amount + @metadata = metadata @recurring = recurring @tax_behavior = tax_behavior @unit_amount = unit_amount diff --git a/lib/stripe/services/product_service.rb b/lib/stripe/services/product_service.rb index 6bb741d55..e61a6a267 100644 --- a/lib/stripe/services/product_service.rb +++ b/lib/stripe/services/product_service.rb @@ -286,6 +286,8 @@ def initialize(interval: nil, interval_count: nil) attr_accessor :currency_options # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_accessor :custom_unit_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata # The recurring components of a price such as `interval` and `interval_count`. attr_accessor :recurring # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. @@ -299,6 +301,7 @@ def initialize( currency: nil, currency_options: nil, custom_unit_amount: nil, + metadata: nil, recurring: nil, tax_behavior: nil, unit_amount: nil, @@ -307,6 +310,7 @@ def initialize( @currency = currency @currency_options = currency_options @custom_unit_amount = custom_unit_amount + @metadata = metadata @recurring = recurring @tax_behavior = tax_behavior @unit_amount = unit_amount diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi index 78c24a471..4a08cce4a 100644 --- a/rbi/stripe/resources/product.rbi +++ b/rbi/stripe/resources/product.rbi @@ -397,6 +397,9 @@ module Stripe # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount) } attr_accessor :custom_unit_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata # The recurring components of a price such as `interval` and `interval_count`. sig { returns(::Stripe::Product::CreateParams::DefaultPriceData::Recurring) } attr_accessor :recurring @@ -410,12 +413,13 @@ module Stripe sig { returns(String) } attr_accessor :unit_amount_decimal sig { - params(currency: String, currency_options: T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount, recurring: ::Stripe::Product::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + params(currency: String, currency_options: T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount, metadata: T::Hash[String, String], recurring: ::Stripe::Product::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void } def initialize( currency: nil, currency_options: nil, custom_unit_amount: nil, + metadata: nil, recurring: nil, tax_behavior: nil, unit_amount: nil, diff --git a/rbi/stripe/services/product_service.rbi b/rbi/stripe/services/product_service.rbi index fff85a71c..d7a6f9ef7 100644 --- a/rbi/stripe/services/product_service.rbi +++ b/rbi/stripe/services/product_service.rbi @@ -284,6 +284,9 @@ module Stripe # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount) } attr_accessor :custom_unit_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata # The recurring components of a price such as `interval` and `interval_count`. sig { returns(::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring) } attr_accessor :recurring @@ -297,12 +300,13 @@ module Stripe sig { returns(String) } attr_accessor :unit_amount_decimal sig { - params(currency: String, currency_options: T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount, recurring: ::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + params(currency: String, currency_options: T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount, metadata: T::Hash[String, String], recurring: ::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void } def initialize( currency: nil, currency_options: nil, custom_unit_amount: nil, + metadata: nil, recurring: nil, tax_behavior: nil, unit_amount: nil, From ce661f2c58bf48aa8666c887d5b1b12fd2694d9a Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:47:32 -0800 Subject: [PATCH 07/23] add codeowners file (#1533) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..8844b15a8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# All files should be reviewed by a member of the SDKs team +* @stripe/api-library-reviewers From 3b69aff23d2295ee26a638adb710e4ccb46d4b4c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 08:29:37 +0000 Subject: [PATCH 08/23] Merge upstream and update generated code for v1488 --- OPENAPI_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 73182b6b3..5114a0390 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1487 \ No newline at end of file +v1488 \ No newline at end of file From 73ae77d85049e632c7c29eeecffa1ae92e48301e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:52:35 +0000 Subject: [PATCH 09/23] Update generated code for v1490 --- OPENAPI_VERSION | 2 +- lib/stripe/api_version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5114a0390..a752d7321 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1488 \ No newline at end of file +v1490 \ No newline at end of file diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb index 464a06ef3..0f0b73b48 100644 --- a/lib/stripe/api_version.rb +++ b/lib/stripe/api_version.rb @@ -3,6 +3,6 @@ module Stripe module ApiVersion - CURRENT = "2025-01-27.acacia" + CURRENT = "2025-02-24.acacia" end end From f7cdb2ca4673f718c25424c45f33cbf93df3eb02 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 19:46:42 +0000 Subject: [PATCH 10/23] Update generated code for v1493 --- OPENAPI_VERSION | 2 +- rbi/stripe/resources/account.rbi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a752d7321..7c254a17b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1490 \ No newline at end of file +v1493 \ No newline at end of file diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 0e347e6ca..861fa7325 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -632,7 +632,7 @@ module Stripe sig { returns(Payouts) } attr_reader :payouts # Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_reader :rejected_reason end class Settings < Stripe::StripeObject From ad90417b1aa9a3e1033447272f69226d00600c6f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:06:03 +0000 Subject: [PATCH 11/23] Update generated code for v1494 --- OPENAPI_VERSION | 2 +- rbi/stripe/resources/account.rbi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7c254a17b..d9f1c75b6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1493 \ No newline at end of file +v1494 \ No newline at end of file diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 861fa7325..0e347e6ca 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -632,7 +632,7 @@ module Stripe sig { returns(Payouts) } attr_reader :payouts # Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) - sig { returns(T.nilable(String)) } + sig { returns(String) } attr_reader :rejected_reason end class Settings < Stripe::StripeObject From de68f00c6815e058f690d2f08003eb3240da8006 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:40:47 +0000 Subject: [PATCH 12/23] Update generated code for v1495 --- OPENAPI_VERSION | 2 +- rbi/stripe/resources/account.rbi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d9f1c75b6..6043724bf 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1494 \ No newline at end of file +v1495 \ No newline at end of file diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 0e347e6ca..861fa7325 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -632,7 +632,7 @@ module Stripe sig { returns(Payouts) } attr_reader :payouts # Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_reader :rejected_reason end class Settings < Stripe::StripeObject From 99092fffa0f8798aefaf01dc4a82910c51fb7960 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:52:30 +0000 Subject: [PATCH 13/23] Update generated code for v1495 --- lib/stripe/resources/v2/event.rb | 1 + lib/stripe/resources/v2/event_destination.rb | 1 + lib/stripe/services/v2/core/event_service.rb | 26 +++++++++++++++- rbi/stripe/resources/v2/event.rbi | 1 + rbi/stripe/resources/v2/event_destination.rbi | 1 + rbi/stripe/services/v2/core/event_service.rbi | 30 +++++++++++++++++-- 6 files changed, 57 insertions(+), 3 deletions(-) diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index 7c3e21820..8cf528877 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -3,6 +3,7 @@ module Stripe module V2 + # Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. class Event < APIResource OBJECT_NAME = "v2.core.event" def self.object_name diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index ff2d42b9f..13398ea98 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -3,6 +3,7 @@ module Stripe module V2 + # Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). class EventDestination < APIResource OBJECT_NAME = "v2.core.event_destination" def self.object_name diff --git a/lib/stripe/services/v2/core/event_service.rb b/lib/stripe/services/v2/core/event_service.rb index 58dd4b019..e0d587f0c 100644 --- a/lib/stripe/services/v2/core/event_service.rb +++ b/lib/stripe/services/v2/core/event_service.rb @@ -6,6 +6,16 @@ module V2 module Core class EventService < StripeService class ListParams < Stripe::RequestParams + # Filter for events created after the specified timestamp. + attr_accessor :created_gt + # Filter for events created at or after the specified timestamp. + attr_accessor :created_gte + # Filter for events created before the specified timestamp. + attr_accessor :created_lt + # Filter for events created at or before the specified timestamp. + attr_accessor :created_lte + # Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. + attr_accessor :delivery_success # The page size. attr_accessor :limit # Primary object ID used to retrieve related events. @@ -13,7 +23,21 @@ class ListParams < Stripe::RequestParams # The requested page. attr_accessor :page - def initialize(limit: nil, object_id: nil, page: nil) + def initialize( + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + delivery_success: nil, + limit: nil, + object_id: nil, + page: nil + ) + @created_gt = created_gt + @created_gte = created_gte + @created_lt = created_lt + @created_lte = created_lte + @delivery_success = delivery_success @limit = limit @object_id = object_id @page = page diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index 16d63b831..e5f39a728 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -4,6 +4,7 @@ # typed: true module Stripe module V2 + # Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. class Event < APIResource class Reason < Stripe::StripeObject class Request < Stripe::StripeObject diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index 2c1849199..6f4657fad 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -4,6 +4,7 @@ # typed: true module Stripe module V2 + # Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). class EventDestination < APIResource class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject diff --git a/rbi/stripe/services/v2/core/event_service.rbi b/rbi/stripe/services/v2/core/event_service.rbi index 4df567af5..7ce3ea0a9 100644 --- a/rbi/stripe/services/v2/core/event_service.rbi +++ b/rbi/stripe/services/v2/core/event_service.rbi @@ -7,6 +7,21 @@ module Stripe module Core class EventService < StripeService class ListParams < Stripe::RequestParams + # Filter for events created after the specified timestamp. + sig { returns(String) } + attr_accessor :created_gt + # Filter for events created at or after the specified timestamp. + sig { returns(String) } + attr_accessor :created_gte + # Filter for events created before the specified timestamp. + sig { returns(String) } + attr_accessor :created_lt + # Filter for events created at or before the specified timestamp. + sig { returns(String) } + attr_accessor :created_lte + # Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. + sig { returns(T::Boolean) } + attr_accessor :delivery_success # The page size. sig { returns(Integer) } attr_accessor :limit @@ -16,8 +31,19 @@ module Stripe # The requested page. sig { returns(String) } attr_accessor :page - sig { params(limit: Integer, object_id: String, page: String).void } - def initialize(limit: nil, object_id: nil, page: nil); end + sig { + params(created_gt: String, created_gte: String, created_lt: String, created_lte: String, delivery_success: T::Boolean, limit: Integer, object_id: String, page: String).void + } + def initialize( + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + delivery_success: nil, + limit: nil, + object_id: nil, + page: nil + ); end end class RetrieveParams < Stripe::RequestParams From 346e696018957acff49bc1f307a79e7f8a354fcb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:05:51 +0000 Subject: [PATCH 14/23] Update generated code for v1496 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/terminal/reader.rb | 32 +++++++++++++++++++ .../test_helpers/terminal/reader_service.rb | 23 +++++++++++++ rbi/stripe/resources/terminal/reader.rbi | 10 ++++++ .../test_helpers/terminal/reader_service.rbi | 16 ++++++++++ 5 files changed, 82 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6043724bf..c67d79cdf 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1495 \ No newline at end of file +v1496 \ No newline at end of file diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index d8d0b33cb..4300351ff 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -704,6 +704,18 @@ def initialize( @type = type end end + + class SucceedInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Skip behavior for input collection. + attr_accessor :skip_non_required_inputs + + def initialize(expand: nil, skip_non_required_inputs: nil) + @expand = expand + @skip_non_required_inputs = skip_non_required_inputs + end + end # The most recent action performed by the reader. attr_reader :action # The current software version of the reader. @@ -970,6 +982,26 @@ def present_payment_method(params = {}, opts = {}) opts: opts ) end + + # Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + def self.succeed_input_collection(reader, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/succeed_input_collection", { reader: CGI.escape(reader) }), + params: params, + opts: opts + ) + end + + # Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + def succeed_input_collection(params = {}, opts = {}) + @resource.request_stripe_object( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/succeed_input_collection", { reader: CGI.escape(@resource["id"]) }), + params: params, + opts: opts + ) + end end end end diff --git a/lib/stripe/services/test_helpers/terminal/reader_service.rb b/lib/stripe/services/test_helpers/terminal/reader_service.rb index d4237a41a..3161fb2f1 100644 --- a/lib/stripe/services/test_helpers/terminal/reader_service.rb +++ b/lib/stripe/services/test_helpers/terminal/reader_service.rb @@ -49,6 +49,18 @@ def initialize( end end + class SucceedInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Skip behavior for input collection. + attr_accessor :skip_non_required_inputs + + def initialize(expand: nil, skip_non_required_inputs: nil) + @expand = expand + @skip_non_required_inputs = skip_non_required_inputs + end + end + # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. def present_payment_method(reader, params = {}, opts = {}) request( @@ -59,6 +71,17 @@ def present_payment_method(reader, params = {}, opts = {}) base_address: :api ) end + + # Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + def succeed_input_collection(reader, params = {}, opts = {}) + request( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/succeed_input_collection", { reader: CGI.escape(reader) }), + params: params, + opts: opts, + base_address: :api + ) + end end end end diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index 3e766a515..ca55ab539 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -810,6 +810,16 @@ module Stripe type: nil ); end end + class SucceedInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Skip behavior for input collection. + sig { returns(String) } + attr_accessor :skip_non_required_inputs + sig { params(expand: T::Array[String], skip_non_required_inputs: String).void } + def initialize(expand: nil, skip_non_required_inputs: nil); end + end # Cancels the current reader action. sig { params(params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) diff --git a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi index 645cdd4d4..36e0eb5a7 100644 --- a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +++ b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi @@ -51,11 +51,27 @@ module Stripe type: nil ); end end + class SucceedInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Skip behavior for input collection. + sig { returns(String) } + attr_accessor :skip_non_required_inputs + sig { params(expand: T::Array[String], skip_non_required_inputs: String).void } + def initialize(expand: nil, skip_non_required_inputs: nil); end + end # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. sig { params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) } def present_payment_method(reader, params = {}, opts = {}); end + + # Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + sig { + params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::SucceedInputCollectionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def succeed_input_collection(reader, params = {}, opts = {}); end end end end From 94a05c4c6c8e49ebfdbc5a084568bf400af5e4c5 Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Fri, 21 Feb 2025 08:47:47 -0800 Subject: [PATCH 15/23] Fix InvoiceLineItem parent class (#1536) --- lib/stripe/resources/invoice_line_item.rb | 2 +- test/stripe/invoice_line_item_test.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index 8b315d1c7..72cc18228 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -5,7 +5,7 @@ module Stripe # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. # # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). - class InvoiceLineItem < StripeObject + class InvoiceLineItem < APIResource include Stripe::APIOperations::Save OBJECT_NAME = "line_item" diff --git a/test/stripe/invoice_line_item_test.rb b/test/stripe/invoice_line_item_test.rb index 0a89776bc..dfa7f69a5 100644 --- a/test/stripe/invoice_line_item_test.rb +++ b/test/stripe/invoice_line_item_test.rb @@ -4,5 +4,10 @@ module Stripe class InvoiceLineItemTest < Test::Unit::TestCase + should "be updateable" do + item = Stripe::InvoiceLineItem.update("in_123", "il_tmp_123") + assert_requested :post, "#{Stripe.api_base}/v1/invoices/in_123/lines/il_tmp_123" + assert item.is_a?(Stripe::InvoiceLineItem) + end end end From 427ab3722a1f8074e42564e3adfd521ba1ffd9ee Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:56:42 +0000 Subject: [PATCH 16/23] Update generated code for v1502 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/identity/verification_session.rb | 4 ++-- lib/stripe/services/identity/verification_session_service.rb | 2 +- rbi/stripe/resources/identity/verification_session.rbi | 4 ++-- rbi/stripe/services/identity/verification_session_service.rbi | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c67d79cdf..9fe689885 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1496 \ No newline at end of file +v1502 diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index 683f9311c..0d6172c2f 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -227,7 +227,7 @@ def initialize(email: nil, phone: nil) attr_accessor :options # Details provided about the user being verified. These details may be shown to the user. attr_accessor :provided_details - # Token referencing a Customer resource. + # Customer ID attr_accessor :related_customer # The URL that the user will be redirected to upon completing the verification flow. attr_accessor :return_url @@ -372,7 +372,7 @@ def initialize(expand: nil) attr_reader :provided_details # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. attr_reader :redaction - # Token referencing a Customer resource. + # Customer ID attr_reader :related_customer # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). attr_reader :status diff --git a/lib/stripe/services/identity/verification_session_service.rb b/lib/stripe/services/identity/verification_session_service.rb index e6e70304f..b242c31f6 100644 --- a/lib/stripe/services/identity/verification_session_service.rb +++ b/lib/stripe/services/identity/verification_session_service.rb @@ -113,7 +113,7 @@ def initialize(email: nil, phone: nil) attr_accessor :options # Details provided about the user being verified. These details may be shown to the user. attr_accessor :provided_details - # Token referencing a Customer resource. + # Customer ID attr_accessor :related_customer # The URL that the user will be redirected to upon completing the verification flow. attr_accessor :return_url diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index 6b62ea7b6..32778d02e 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -169,7 +169,7 @@ module Stripe # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. sig { returns(T.nilable(Redaction)) } attr_reader :redaction - # Token referencing a Customer resource. + # Customer ID sig { returns(T.nilable(String)) } attr_reader :related_customer # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). @@ -304,7 +304,7 @@ module Stripe # Details provided about the user being verified. These details may be shown to the user. sig { returns(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails) } attr_accessor :provided_details - # Token referencing a Customer resource. + # Customer ID sig { returns(String) } attr_accessor :related_customer # The URL that the user will be redirected to upon completing the verification flow. diff --git a/rbi/stripe/services/identity/verification_session_service.rbi b/rbi/stripe/services/identity/verification_session_service.rbi index 8f5f73eac..487b70692 100644 --- a/rbi/stripe/services/identity/verification_session_service.rbi +++ b/rbi/stripe/services/identity/verification_session_service.rbi @@ -124,7 +124,7 @@ module Stripe returns(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails) } attr_accessor :provided_details - # Token referencing a Customer resource. + # Customer ID sig { returns(String) } attr_accessor :related_customer # The URL that the user will be redirected to upon completing the verification flow. From 21b87331191bb1ac8d3154c551245ffb180644a1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:56:23 +0000 Subject: [PATCH 17/23] Update generated code for v1504 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/tax/calculation.rb | 2 +- lib/stripe/resources/tax_rate.rb | 2 +- rbi/stripe/resources/tax/calculation.rbi | 2 +- rbi/stripe/resources/tax_rate.rbi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9fe689885..4f12de022 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1502 +v1504 diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index ac7f7cc29..ab4a5cd4e 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -129,7 +129,7 @@ class FlatAmount < Stripe::StripeObject attr_reader :flat_amount # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. attr_reader :percentage_decimal - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. attr_reader :rate_type # State, county, province, or region. attr_reader :state diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index edfb176bd..a2db46cea 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -208,7 +208,7 @@ def initialize( attr_reader :object # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. attr_reader :percentage - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. attr_reader :rate_type # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. attr_reader :state diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi index 97f396456..7ecb90143 100644 --- a/rbi/stripe/resources/tax/calculation.rbi +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -162,7 +162,7 @@ module Stripe # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. sig { returns(String) } attr_reader :percentage_decimal - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. sig { returns(T.nilable(String)) } attr_reader :rate_type # State, county, province, or region. diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi index 45c8cbac6..88d1f937d 100644 --- a/rbi/stripe/resources/tax_rate.rbi +++ b/rbi/stripe/resources/tax_rate.rbi @@ -62,7 +62,7 @@ module Stripe # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. sig { returns(Float) } attr_reader :percentage - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. sig { returns(T.nilable(String)) } attr_reader :rate_type # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. From a0bc8dcbbefea0c8d0496990a405d048e3e66679 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:11:20 +0000 Subject: [PATCH 18/23] Update generated code for v1505 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/terminal/reader.rb | 29 +++++++++++++++++++ .../test_helpers/terminal/reader_service.rb | 20 +++++++++++++ rbi/stripe/resources/terminal/reader.rbi | 7 +++++ .../test_helpers/terminal/reader_service.rbi | 13 +++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4f12de022..3e5b24eb5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1504 +v1505 diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index 4300351ff..5797a7ed3 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -716,6 +716,15 @@ def initialize(expand: nil, skip_non_required_inputs: nil) @skip_non_required_inputs = skip_non_required_inputs end end + + class TimeoutInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + @expand = expand + end + end # The most recent action performed by the reader. attr_reader :action # The current software version of the reader. @@ -1002,6 +1011,26 @@ def succeed_input_collection(params = {}, opts = {}) opts: opts ) end + + # Completes an input collection with a timeout error on a simulated reader. + def self.timeout_input_collection(reader, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/timeout_input_collection", { reader: CGI.escape(reader) }), + params: params, + opts: opts + ) + end + + # Completes an input collection with a timeout error on a simulated reader. + def timeout_input_collection(params = {}, opts = {}) + @resource.request_stripe_object( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/timeout_input_collection", { reader: CGI.escape(@resource["id"]) }), + params: params, + opts: opts + ) + end end end end diff --git a/lib/stripe/services/test_helpers/terminal/reader_service.rb b/lib/stripe/services/test_helpers/terminal/reader_service.rb index 3161fb2f1..6c9a8823e 100644 --- a/lib/stripe/services/test_helpers/terminal/reader_service.rb +++ b/lib/stripe/services/test_helpers/terminal/reader_service.rb @@ -61,6 +61,15 @@ def initialize(expand: nil, skip_non_required_inputs: nil) end end + class TimeoutInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + @expand = expand + end + end + # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. def present_payment_method(reader, params = {}, opts = {}) request( @@ -82,6 +91,17 @@ def succeed_input_collection(reader, params = {}, opts = {}) base_address: :api ) end + + # Completes an input collection with a timeout error on a simulated reader. + def timeout_input_collection(reader, params = {}, opts = {}) + request( + method: :post, + path: format("/v1/test_helpers/terminal/readers/%s/timeout_input_collection", { reader: CGI.escape(reader) }), + params: params, + opts: opts, + base_address: :api + ) + end end end end diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index ca55ab539..68b4041cc 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -820,6 +820,13 @@ module Stripe sig { params(expand: T::Array[String], skip_non_required_inputs: String).void } def initialize(expand: nil, skip_non_required_inputs: nil); end end + class TimeoutInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end # Cancels the current reader action. sig { params(params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) diff --git a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi index 36e0eb5a7..8703d6ca7 100644 --- a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +++ b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi @@ -61,6 +61,13 @@ module Stripe sig { params(expand: T::Array[String], skip_non_required_inputs: String).void } def initialize(expand: nil, skip_non_required_inputs: nil); end end + class TimeoutInputCollectionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. sig { params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) @@ -72,6 +79,12 @@ module Stripe params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::SucceedInputCollectionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) } def succeed_input_collection(reader, params = {}, opts = {}); end + + # Completes an input collection with a timeout error on a simulated reader. + sig { + params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::TimeoutInputCollectionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def timeout_input_collection(reader, params = {}, opts = {}); end end end end From d5fd58989e0a64b6814735f1b37ccc89c9514d13 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:27:37 +0000 Subject: [PATCH 19/23] Update generated code for v1505 --- lib/stripe/resources/v2/event.rb | 1 - lib/stripe/resources/v2/event_destination.rb | 1 - lib/stripe/services/v2/core/event_service.rb | 26 +--------------- rbi/stripe/resources/v2/event.rbi | 1 - rbi/stripe/resources/v2/event_destination.rbi | 1 - rbi/stripe/services/v2/core/event_service.rbi | 30 ++----------------- 6 files changed, 3 insertions(+), 57 deletions(-) diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index 8cf528877..7c3e21820 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -3,7 +3,6 @@ module Stripe module V2 - # Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. class Event < APIResource OBJECT_NAME = "v2.core.event" def self.object_name diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index 13398ea98..ff2d42b9f 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -3,7 +3,6 @@ module Stripe module V2 - # Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). class EventDestination < APIResource OBJECT_NAME = "v2.core.event_destination" def self.object_name diff --git a/lib/stripe/services/v2/core/event_service.rb b/lib/stripe/services/v2/core/event_service.rb index e0d587f0c..58dd4b019 100644 --- a/lib/stripe/services/v2/core/event_service.rb +++ b/lib/stripe/services/v2/core/event_service.rb @@ -6,16 +6,6 @@ module V2 module Core class EventService < StripeService class ListParams < Stripe::RequestParams - # Filter for events created after the specified timestamp. - attr_accessor :created_gt - # Filter for events created at or after the specified timestamp. - attr_accessor :created_gte - # Filter for events created before the specified timestamp. - attr_accessor :created_lt - # Filter for events created at or before the specified timestamp. - attr_accessor :created_lte - # Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. - attr_accessor :delivery_success # The page size. attr_accessor :limit # Primary object ID used to retrieve related events. @@ -23,21 +13,7 @@ class ListParams < Stripe::RequestParams # The requested page. attr_accessor :page - def initialize( - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - delivery_success: nil, - limit: nil, - object_id: nil, - page: nil - ) - @created_gt = created_gt - @created_gte = created_gte - @created_lt = created_lt - @created_lte = created_lte - @delivery_success = delivery_success + def initialize(limit: nil, object_id: nil, page: nil) @limit = limit @object_id = object_id @page = page diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index e5f39a728..16d63b831 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -4,7 +4,6 @@ # typed: true module Stripe module V2 - # Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. class Event < APIResource class Reason < Stripe::StripeObject class Request < Stripe::StripeObject diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index 6f4657fad..2c1849199 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -4,7 +4,6 @@ # typed: true module Stripe module V2 - # Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). class EventDestination < APIResource class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject diff --git a/rbi/stripe/services/v2/core/event_service.rbi b/rbi/stripe/services/v2/core/event_service.rbi index 7ce3ea0a9..4df567af5 100644 --- a/rbi/stripe/services/v2/core/event_service.rbi +++ b/rbi/stripe/services/v2/core/event_service.rbi @@ -7,21 +7,6 @@ module Stripe module Core class EventService < StripeService class ListParams < Stripe::RequestParams - # Filter for events created after the specified timestamp. - sig { returns(String) } - attr_accessor :created_gt - # Filter for events created at or after the specified timestamp. - sig { returns(String) } - attr_accessor :created_gte - # Filter for events created before the specified timestamp. - sig { returns(String) } - attr_accessor :created_lt - # Filter for events created at or before the specified timestamp. - sig { returns(String) } - attr_accessor :created_lte - # Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. - sig { returns(T::Boolean) } - attr_accessor :delivery_success # The page size. sig { returns(Integer) } attr_accessor :limit @@ -31,19 +16,8 @@ module Stripe # The requested page. sig { returns(String) } attr_accessor :page - sig { - params(created_gt: String, created_gte: String, created_lt: String, created_lte: String, delivery_success: T::Boolean, limit: Integer, object_id: String, page: String).void - } - def initialize( - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - delivery_success: nil, - limit: nil, - object_id: nil, - page: nil - ); end + sig { params(limit: Integer, object_id: String, page: String).void } + def initialize(limit: nil, object_id: nil, page: nil); end end class RetrieveParams < Stripe::RequestParams From 13eb7c55975765069663e85853934b81d4325b23 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 22:24:01 +0000 Subject: [PATCH 20/23] Update generated code (#1534) * Update generated code for v1494 * Update generated code for v1495 * Update generated code for v1501 * Update generated code for v1505 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> From 7a29654b41bbb51df29e26cc116dfd6acc67f9e0 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Mon, 24 Feb 2025 17:35:14 -0500 Subject: [PATCH 21/23] Bump version to 13.5.0 --- CHANGELOG.md | 74 ++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaa0340c9..e0b4fc9f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ ## 13.5.0-beta.1 - 2025-02-07 * [#1527](https://github.com/stripe/stripe-ruby/pull/1527) Update generated code for beta +## 13.5.0 - 2025-02-24 +* [#1534](https://github.com/stripe/stripe-ruby/pull/1534) Update generated code + * Fixed `Stripe::InvoiceLineItem.update` method. +* [#1536](https://github.com/stripe/stripe-ruby/pull/1536) Fix InvoiceLineItem parent class + * Fix bug where `Stripe::InvoiceLineItem` had the incorrect parent class, making it error when `update` was called +* [#1533](https://github.com/stripe/stripe-ruby/pull/1533) add codeowners file ## 13.4.1 - 2025-01-28 * [#1528](https://github.com/stripe/stripe-ruby/pull/1528) Update generated code @@ -31,15 +37,15 @@ * Support parameter and resource fields with typed RBIs * [#1509](https://github.com/stripe/stripe-ruby/pull/1509) (beta) Publish RBIs with gem * [#1505](https://github.com/stripe/stripe-ruby/pull/1505) Add method parameter type classes to all resources and services - - * Add method parameter classes for all resources and service methods. + + * Add method parameter classes for all resources and service methods. * These changes are NOT breaking and are purely additive. The method parameter classes are not required, we still accept hashes as well as the new `RequestParams` classes. Any additional gated parameters are still available to pass via hash. Resource fields define publicly documented fields and other deserialized fields are still accessible. ## 13.3.1 - 2025-01-13 * [#1512](https://github.com/stripe/stripe-ruby/pull/1512) Import global configuration for options not available on StripeClient options * Fixes bug where `StripeClient` was not falling back to global options for options that are not available to be set per-client * [#1516](https://github.com/stripe/stripe-ruby/pull/1516) ThinEvent reason and livemode - - Add `livemode` and optional `reason` fields to ThinEvent + - Add `livemode` and optional `reason` fields to ThinEvent * [#1518](https://github.com/stripe/stripe-ruby/pull/1518) Pin ubuntu version in Test action * [#1508](https://github.com/stripe/stripe-ruby/pull/1508) Added pull request template @@ -47,15 +53,15 @@ * [#1500](https://github.com/stripe/stripe-ruby/pull/1500) This release changes the pinned API version to `2024-12-18.acacia`. * [#1507](https://github.com/stripe/stripe-ruby/pull/1507) Pass requestor to all deserialized objects including lists - + * Fixes bug where `StripeObject` retrieved from lists could not be used to make requests, such as `refresh` ## 13.3.0-beta.3 - 2024-12-12 * [#1499](https://github.com/stripe/stripe-ruby/pull/1499) Update generated code for beta - * Add support for `AllowRedisplay` on `Card` and `Source` - * Add support for new values `am_tin`, `ao_tin`, `ba_tin`, `bb_tin`, `bs_tin`, `cd_nif`, `gn_nif`, `kh_tin`, `me_pib`, `mk_vat`, `mr_nif`, `np_pan`, `sn_ninea`, `sr_fin`, `tj_tin`, `ug_tin`, `zm_tin`, and `zw_tin` on enums `CheckoutSessionCollectedInformationTaxIdsType` and `OrderTaxDetailsTaxIdsType` - * Add support for new value `network_fallback` on enum `IssuingAuthorizationRequestHistoryReason` - * Remove support for `AmountRefunded` on `PaymentRecord` + * Add support for `AllowRedisplay` on `Card` and `Source` + * Add support for new values `am_tin`, `ao_tin`, `ba_tin`, `bb_tin`, `bs_tin`, `cd_nif`, `gn_nif`, `kh_tin`, `me_pib`, `mk_vat`, `mr_nif`, `np_pan`, `sn_ninea`, `sr_fin`, `tj_tin`, `ug_tin`, `zm_tin`, and `zw_tin` on enums `CheckoutSessionCollectedInformationTaxIdsType` and `OrderTaxDetailsTaxIdsType` + * Add support for new value `network_fallback` on enum `IssuingAuthorizationRequestHistoryReason` + * Remove support for `AmountRefunded` on `PaymentRecord` * Add support for `Account` on `TerminalReaderActionCollectPaymentMethod`, `TerminalReaderActionConfirmPaymentIntent`, `TerminalReaderActionProcessPaymentIntent`, and `TerminalReaderActionRefundPayment` ## 13.3.0-beta.2 - 2024-12-05 @@ -105,40 +111,40 @@ * Add support for `submit_card` test helper method on resource `Issuing.Card` ## 13.1.0-beta.1 - 2024-10-03 -* [#1465](https://github.com/stripe/stripe-ruby/pull/1465) Updates to the `Preview` class +* [#1465](https://github.com/stripe/stripe-ruby/pull/1465) Updates to the `Preview` class * Remove `Stripe::Preview`. Use `StripeClient#raw_request` instead (see below). * Marked `Stripe.raw_request` and `Stripe.deserialize` as deprecated. Use `StripeClient#raw_request` and `StripeClient#deserialize` instead. In StripeClient, the params and opts parameters are passed as keyword arguments: ```ruby # Before resp = Stripe.raw_request(:post, "v1/charges", , {p1: "p1"}, {stripe_account: "acct_123"}) charge = Stripe.deserialize(resp.data) - + # After - client = StripeClient.new("sk_test_123") + client = StripeClient.new("sk_test_123") resp = client.raw_request(:post, "/v1/charges", params: {p1: "p1"}, opts: {stripe_account: "acct_123"}) charge = client.deserialize(resp.data) ``` ## 13.0.2 - 2024-10-23 * [#1473](https://github.com/stripe/stripe-ruby/pull/1473) Always return the result of APIResource#refresh in APIResource.retrieve - + * Fix bug where we would not return the mutated `self` object when calling `APIResource.retrieve` ## 13.0.1 - 2024-10-18 * [#1471](https://github.com/stripe/stripe-ruby/pull/1471) update object tags for meter-related classes - + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. * [#1470](https://github.com/stripe/stripe-ruby/pull/1470) Cleaned up examples and added documentation ## 13.0.0 - 2024-10-01 * [#1458](https://github.com/stripe/stripe-ruby/pull/1458) Support for APIs in the new API version 2024-09-30.acacia - + This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading. - - ### ⚠️ Breaking changes - + + ### ⚠️ Breaking changes + Please refer to our [migration guide for v13](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) for more information about the backwards incompatible changes. - + #### ❗ `StripeClient` and related changes * Move `StripeClient` and requestor logic to `APIRequestor`. * `StripeClient#request` is still available, but is deprecated and will be removed. We encourage `StripeClient#raw_request` as a replacement (see other breaking changes for more detail). @@ -146,21 +152,21 @@ * No global config: you can simultaneously use multiple clients with different configuration options (such as API keys) * No extra API calls. All API endpoints can be accessed with a single method call. You don't have to call `retrieve` before doing an `update`. * No static methods. Much easier mocking. - + #### Other breaking changes - + * Adjust default values around retries for HTTP requests. You can use the old defaults by setting them explicitly. New values are: - max retries: `0` -> `2` - max retry delay (seconds) `2` -> `5` * Remove `StripeClient#connection_manager`. This was a legacy method from years ago. - * Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument. + * Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument. ```ruby params = { expand: ["available"] } opts = { stripe_account: "acct_123" } - + # ❌ No longer works Stripe::Balance.retrieve(opts) - + # ✅ Correct way to call retrieve method Stripe::Balance.retrieve(params, opts) ``` @@ -169,7 +175,7 @@ ```ruby # Instead of Stripe::APIResource.request(:get, "/v1/endpoint", params, opts) - + # do client = Stripe::StripeClient.new(...) resp = client.raw_request(:get, "/v1/endpoint", params: params, opts: opts) @@ -185,15 +191,15 @@ # Before obj, api_key = StripeClient.execute_request(method, path, api_base: nil, api_key: nil, headers: {}, params: {}, usage: []) - + # is now, with base_address being one of [:api, :files, :connect, :meter_events] - + obj, opts = APIRequestor.execute_request(method, path, base_address, params: {}, opts: {}, usage: []) puts(opts) # will output {api_key: "sk_test_123", stripe_account: "acct_123"} ``` - - + + ### Additions * Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` in the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview) * Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview). @@ -250,7 +256,7 @@ * [#1433](https://github.com/stripe/stripe-ruby/pull/1433) Add usage to raw_request call * [#1431](https://github.com/stripe/stripe-ruby/pull/1431) Add `raw_request` - + - Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using `Stripe::APIResource.request(...)` to make custom requests, which is discouraged and will be broken in a future major version. ## 12.2.0-beta.1 - 2024-07-05 @@ -263,8 +269,8 @@ * [#1425](https://github.com/stripe/stripe-ruby/pull/1425) Update generated code * Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice` * [#1420](https://github.com/stripe/stripe-ruby/pull/1420) Update static methods for delete/list on BankAccount/Card to throw NotImplementedError - * The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id. - + * The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id. + Methods affected | Use these instead in the context of payment method | Use these in the context of external accounts ------ | ------ | ---- Stripe:: BankAccount.delete | Stripe::Customer.delete_source | Stripe::Account.delete_external_account @@ -276,12 +282,12 @@ ## 12.0.0 - 2024-06-24 * [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount -* [#1419](https://github.com/stripe/stripe-ruby/pull/1419) - +* [#1419](https://github.com/stripe/stripe-ruby/pull/1419) + This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading. ### Additions - + * Add support for `finalize_amount` test helper method on resource `Issuing.Authorization` ## 11.7.0 - 2024-06-13 From a9254a28169edf0998593a68d39fd0614a7dbb66 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Fri, 14 Mar 2025 11:26:09 -0700 Subject: [PATCH 22/23] InvoiceLineItem's parent is APIResource --- rbi/stripe/resources/invoice_line_item.rbi | 163 ++++++++++++++++----- 1 file changed, 130 insertions(+), 33 deletions(-) diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index 9833feddc..33980a9a0 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -2,57 +2,70 @@ # frozen_string_literal: true # typed: true + module Stripe # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. # # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). - class InvoiceLineItem < StripeObject + class InvoiceLineItem < APIResource class DiscountAmount < Stripe::StripeObject # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end + class MarginAmount < Stripe::StripeObject # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end + class Period < Stripe::StripeObject # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end + class PretaxCreditAmount < Stripe::StripeObject # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end + class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject # Invoice containing the credited invoice line items sig { returns(String) } attr_reader :invoice + # Credited invoice line items sig { returns(T::Array[String]) } attr_reader :invoice_line_items @@ -61,19 +74,24 @@ module Stripe sig { returns(T.nilable(CreditedItems)) } attr_reader :credited_items end + class TaxAmount < Stripe::StripeObject # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount @@ -81,87 +99,115 @@ module Stripe # The amount, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_excluding_tax + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # The amount of discount calculated per discount for this line item. sig { returns(T.nilable(T::Array[DiscountAmount])) } attr_reader :discount_amounts + # If true, discounts will apply to this line item. Always false for prorations. sig { returns(T::Boolean) } attr_reader :discountable + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The ID of the invoice that contains this line item. sig { returns(T.nilable(String)) } attr_reader :invoice + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. sig { returns(T.any(String, Stripe::InvoiceItem)) } attr_reader :invoice_item + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } attr_reader :livemode + # The amount of margin calculated per margin for this line item. sig { returns(T.nilable(T::Array[MarginAmount])) } attr_reader :margin_amounts + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } attr_reader :object + # Attribute for field period sig { returns(Period) } attr_reader :period + # The plan of the subscription, if the line item is a subscription or a proration. sig { returns(T.nilable(Stripe::Plan)) } attr_reader :plan + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } attr_reader :pretax_credit_amounts + # The price of the line item. sig { returns(T.nilable(Stripe::Price)) } attr_reader :price + # Whether this is a proration. sig { returns(T::Boolean) } attr_reader :proration + # Additional details for proration line items sig { returns(T.nilable(ProrationDetails)) } attr_reader :proration_details + # The quantity of the subscription, if the line item is a subscription or a proration. sig { returns(T.nilable(Integer)) } attr_reader :quantity + # The subscription that the invoice item pertains to, if any. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. sig { returns(T.any(String, Stripe::SubscriptionItem)) } attr_reader :subscription_item + # The amount of tax calculated per tax rate for this line item sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts + # The tax rates which apply to the line item. sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :tax_rates + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. sig { returns(String) } attr_reader :type + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. sig { returns(T.nilable(String)) } attr_reader :unit_amount_excluding_tax + class UpdateParams < Stripe::RequestParams class Discount < Stripe::RequestParams class DiscountEnd < Stripe::RequestParams @@ -169,102 +215,124 @@ module Stripe # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } def initialize(interval: nil, interval_count: nil); end end # Time span for the redeemed discount. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd::Duration) } attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. sig { returns(Integer) } attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. sig { returns(String) } attr_accessor :type - sig { - params(duration: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void - } + + sig do + params(duration: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd::Duration, + timestamp: Integer, type: String).void + end def initialize(duration: nil, timestamp: nil, type: nil); end end # ID of the coupon to create a new discount for. sig { returns(String) } attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(String) } attr_accessor :discount + # Details to determine how long the discount should be applied for. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd) } attr_accessor :discount_end + # ID of the promotion code to create a new discount for. sig { returns(String) } attr_accessor :promotion_code - sig { - params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd, promotion_code: String).void - } + + sig do + params(coupon: String, discount: String, + discount_end: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + end def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end end + class Period < Stripe::RequestParams # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_accessor :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_accessor :start + sig { params(end_: Integer, start: Integer).void } def initialize(end_: nil, start: nil); end end + class PriceData < Stripe::RequestParams class ProductData < Stripe::RequestParams # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. sig { returns(String) } attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. sig { returns(T::Array[String]) } attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. sig { returns(T::Hash[String, String]) } attr_accessor :metadata + # The product's name, meant to be displayable to the customer. sig { returns(String) } attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. sig { returns(String) } attr_accessor :tax_code - sig { - params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void - } - def initialize( - description: nil, - images: nil, - metadata: nil, - name: nil, - tax_code: nil - ); end + + sig do + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, + tax_code: String).void + end + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil); end end # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. sig { returns(String) } attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData) } attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. sig { returns(String) } attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. sig { returns(Integer) } attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. sig { returns(String) } attr_accessor :unit_amount_decimal - sig { - params(currency: String, product: String, product_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void - } + + sig do + params(currency: String, product: String, + product_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + end def initialize( currency: nil, product: nil, @@ -274,35 +342,45 @@ module Stripe unit_amount_decimal: nil ); end end + class TaxAmount < Stripe::RequestParams class TaxRateData < Stripe::RequestParams # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. sig { returns(String) } attr_accessor :description + # The display name of the tax rate, which will be shown to users. sig { returns(String) } attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. sig { returns(T::Boolean) } attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. sig { returns(String) } attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. sig { returns(Float) } attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(String) } attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_accessor :tax_type - sig { - params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void - } + + sig do + params(country: String, description: String, display_name: String, inclusive: T::Boolean, + jurisdiction: String, percentage: Float, state: String, tax_type: String).void + end def initialize( country: nil, description: nil, @@ -317,61 +395,79 @@ module Stripe # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_accessor :amount + # Data to find or create a TaxRate object. # # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData) } attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(Integer) } attr_accessor :taxable_amount - sig { - params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData, taxable_amount: Integer).void - } + + sig do + params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData, + taxable_amount: Integer).void + end def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end end # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. sig { returns(Integer) } attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. sig { returns(String) } attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. sig { returns(T::Boolean) } attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. sig { returns(T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount])) } attr_accessor :discounts + # Specifies which fields in the response should be expanded. sig { returns(T::Array[String]) } attr_accessor :expand + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. sig { returns(T.nilable(T::Array[String])) } attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. sig { returns(T.nilable(T::Hash[String, String])) } attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Period) } attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. sig { returns(String) } attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. sig { returns(::Stripe::InvoiceLineItem::UpdateParams::PriceData) } attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. sig { returns(Integer) } attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. sig { returns(T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount])) } attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. sig { returns(T.nilable(T::Array[String])) } attr_accessor :tax_rates - sig { - params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceLineItem::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void - } + + sig do + params(amount: Integer, description: String, discountable: T::Boolean, + discounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceLineItem::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + end def initialize( amount: nil, description: nil, @@ -392,9 +488,10 @@ module Stripe # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. # Updating an invoice's line item is only possible before the invoice is finalized. - sig { - params(invoice: String, line_item_id: String, params: T.any(::Stripe::InvoiceLineItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem) - } + sig do + params(invoice: String, line_item_id: String, + params: T.any(::Stripe::InvoiceLineItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem) + end def self.update(invoice, line_item_id, params = {}, opts = {}); end end -end \ No newline at end of file +end From 3a2f1e764f96ce2d6d5f732f9eef77c80042092a Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Fri, 14 Mar 2025 14:26:45 -0700 Subject: [PATCH 23/23] Locking rbi gem like we did in #1549 --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 235864c6a..a0d4c1962 100644 --- a/Gemfile +++ b/Gemfile @@ -34,4 +34,8 @@ group :development do gem "pry" gem "pry-byebug" end + + platforms :jruby do + gem "rbi", "0.2.4" # jruby does not support rbs, a new dependency in 0.3.0 + end end