Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 18.2.0 - 2026-01-16
* [#1767](https://github.com/stripe/stripe-ruby/pull/1767) Update generated code
* Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `V2::Core::Account`
* Add support for event notification `V2CoreAccountLinkReturnedEvent`
* Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `V2::Core::AccountPerson`

## 18.2.0-beta.1 - 2025-12-16
This release changes the pinned API version to `2025-12-15.preview`.

Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5abe0e44caedb3474ee672265284096ec89e0fa3
fdbf5e05015131c7993d2b4017103f0d94561b6a
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2150
v2160
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ Stripe::Instrumentation.subscribe(:request_end) do |request_event|
end
```

### How to use undocumented parameters and properties

In some cases, you might encounter parameters on an API request or fields on an API response that aren’t available in the SDKs.
This might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK.
See [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=ruby#undocumented-params-and-fields) to send those parameters or access those fields.

### Writing a Plugin

If you're writing a plugin that uses the library, we'd appreciate it if you
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/api_requestor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ def self.maybe_gc_connection_managers
NotCancelableError.new(error_data[:message], **opts)
when "quota_exceeded"
QuotaExceededError.new(error_data[:message], **opts)
when "rate_limit"
RateLimitError.new(error_data[:message], **opts)
when "recipient_not_notifiable"
RecipientNotNotifiableError.new(error_data[:message], **opts)
when "temporary_session_expired"
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

module Stripe
module ApiVersion
CURRENT = "2025-12-15.preview"
CURRENT = "2026-01-28.preview"
end
end
3 changes: 3 additions & 0 deletions lib/stripe/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ class NotCancelableError < StripeError
class QuotaExceededError < StripeError
end

class RateLimitError < StripeError
end

class RecipientNotNotifiableError < StripeError
end

Expand Down
4 changes: 4 additions & 0 deletions lib/stripe/event_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def self.v2_event_types_to_classes
Events::V2CoreAccountIncludingConfigurationStorerUpdatedEvent,
Events::V2CoreAccountIncludingDefaultsUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingDefaultsUpdatedEvent,
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent,
Events::V2CoreAccountIncludingIdentityUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingIdentityUpdatedEvent,
Events::V2CoreAccountIncludingRequirementsUpdatedEvent.lookup_type =>
Expand Down Expand Up @@ -145,6 +147,8 @@ def self.event_notification_types_to_classes
Events::V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification,
Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification,
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification,
Events::V2CoreAccountIncludingIdentityUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingIdentityUpdatedEventNotification,
Events::V2CoreAccountIncludingRequirementsUpdatedEventNotification.lookup_type =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Events
# Occurs when an Account's future requirements are updated.
class V2CoreAccountIncludingFutureRequirementsUpdatedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.core.account[future_requirements].updated"
end

# Retrieves the related object from the API. Makes an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_context: context }
)
end
attr_reader :related_object
end

# Occurs when an Account's future requirements are updated.
class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.core.account[future_requirements].updated"
end

attr_reader :related_object

# Retrieves the Account related to this EventNotification from the Stripe API. Makes an API request on every call.
def fetch_related_object
resp = @client.raw_request(
:get,
related_object.url,
opts: { stripe_context: context },
usage: ["fetch_related_object"]
)
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
end
end
end
end
2 changes: 2 additions & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def self.object_names_to_classes
FinancialConnections::AccountInferredBalance,
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
FinancialConnections::Authorization.object_name => FinancialConnections::Authorization,
FinancialConnections::Institution.object_name => FinancialConnections::Institution,
FinancialConnections::Session.object_name => FinancialConnections::Session,
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
Expand Down Expand Up @@ -126,6 +127,7 @@ def self.object_names_to_classes
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
Radar::PaymentEvaluation.object_name => Radar::PaymentEvaluation,
Radar::ValueList.object_name => Radar::ValueList,
Radar::ValueListItem.object_name => Radar::ValueListItem,
Refund.object_name => Refund,
Expand Down
8 changes: 3 additions & 5 deletions lib/stripe/params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
require "stripe/params/financial_connections/account_retrieve_params"
require "stripe/params/financial_connections/account_subscribe_params"
require "stripe/params/financial_connections/account_unsubscribe_params"
require "stripe/params/financial_connections/authorization_retrieve_params"
require "stripe/params/financial_connections/institution_list_params"
require "stripe/params/financial_connections/institution_retrieve_params"
require "stripe/params/financial_connections/session_create_params"
Expand All @@ -219,6 +220,7 @@
require "stripe/params/invoice_create_params"
require "stripe/params/invoice_create_preview_params"
require "stripe/params/invoice_delete_params"
require "stripe/params/invoice_detach_payment_params"
require "stripe/params/invoice_finalize_invoice_params"
require "stripe/params/invoice_item_create_params"
require "stripe/params/invoice_item_delete_params"
Expand Down Expand Up @@ -307,12 +309,8 @@
require "stripe/params/margin_list_params"
require "stripe/params/margin_retrieve_params"
require "stripe/params/margin_update_params"
require "stripe/params/order_cancel_params"
require "stripe/params/order_create_params"
require "stripe/params/order_line_item_list_params"
require "stripe/params/order_list_line_items_params"
require "stripe/params/order_list_params"
require "stripe/params/order_reopen_params"
require "stripe/params/order_retrieve_params"
require "stripe/params/order_submit_params"
require "stripe/params/order_update_params"
Expand Down Expand Up @@ -421,6 +419,7 @@
require "stripe/params/quote_update_params"
require "stripe/params/radar/early_fraud_warning_list_params"
require "stripe/params/radar/early_fraud_warning_retrieve_params"
require "stripe/params/radar/payment_evaluation_create_params"
require "stripe/params/radar/value_list_create_params"
require "stripe/params/radar/value_list_delete_params"
require "stripe/params/radar/value_list_item_create_params"
Expand Down Expand Up @@ -469,7 +468,6 @@
require "stripe/params/source_transaction_list_params"
require "stripe/params/source_update_params"
require "stripe/params/source_verify_params"
require "stripe/params/subscription_attach_cadence_params"
require "stripe/params/subscription_cancel_params"
require "stripe/params/subscription_create_params"
require "stripe/params/subscription_delete_discount_params"
Expand Down
47 changes: 46 additions & 1 deletion lib/stripe/params/account_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2239,11 +2239,56 @@ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor
end

class PaypayPayments < ::Stripe::RequestParams
class Site < ::Stripe::RequestParams
class Accessible < ::Stripe::RequestParams; end

class InDevelopment < ::Stripe::RequestParams
# The password needed to access your business's website.
attr_accessor :password
# The username needed to access your business's website.
attr_accessor :username

def initialize(password: nil, username: nil)
@password = password
@username = username
end
end

class Restricted < ::Stripe::RequestParams
# The file explaining the payment flow for your business.
attr_accessor :payment_flow_file

def initialize(payment_flow_file: nil)
@payment_flow_file = payment_flow_file
end
end
# Additional information about your business's website.
attr_accessor :accessible
# Additional information about your business's website.
attr_accessor :in_development
# Additional information about your business's website.
attr_accessor :restricted
# The status of your business's website.
attr_accessor :type

def initialize(accessible: nil, in_development: nil, restricted: nil, type: nil)
@accessible = accessible
@in_development = in_development
@restricted = restricted
@type = type
end
end
# Additional files that are required to support the onboarding process of your business.
attr_accessor :additional_files
# Whether your business sells digital content or not.
attr_accessor :goods_type
# Details regarding your business's website.
attr_accessor :site

def initialize(goods_type: nil)
def initialize(additional_files: nil, goods_type: nil, site: nil)
@additional_files = additional_files
@goods_type = goods_type
@site = site
end
end

Expand Down
6 changes: 3 additions & 3 deletions lib/stripe/params/account_session_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Features < ::Stripe::RequestParams
attr_accessor :edit_payout_schedule
# Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
attr_accessor :external_account_collection
# Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
# Whether instant payouts are enabled for this component.
attr_accessor :instant_payouts
# Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
attr_accessor :standard_payouts
Expand Down Expand Up @@ -300,7 +300,7 @@ class Features < ::Stripe::RequestParams
attr_accessor :disable_stripe_user_authentication
# Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
attr_accessor :external_account_collection
# Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
# Whether instant payouts are enabled for this component.
attr_accessor :instant_payouts

def initialize(
Expand Down Expand Up @@ -551,7 +551,7 @@ class Features < ::Stripe::RequestParams
attr_accessor :edit_payout_schedule
# Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
attr_accessor :external_account_collection
# Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
# Whether instant payouts are enabled for this component.
attr_accessor :instant_payouts
# Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
attr_accessor :standard_payouts
Expand Down
47 changes: 46 additions & 1 deletion lib/stripe/params/account_update_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2161,11 +2161,56 @@ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor
end

class PaypayPayments < ::Stripe::RequestParams
class Site < ::Stripe::RequestParams
class Accessible < ::Stripe::RequestParams; end

class InDevelopment < ::Stripe::RequestParams
# The password needed to access your business's website.
attr_accessor :password
# The username needed to access your business's website.
attr_accessor :username

def initialize(password: nil, username: nil)
@password = password
@username = username
end
end

class Restricted < ::Stripe::RequestParams
# The file explaining the payment flow for your business.
attr_accessor :payment_flow_file

def initialize(payment_flow_file: nil)
@payment_flow_file = payment_flow_file
end
end
# Additional information about your business's website.
attr_accessor :accessible
# Additional information about your business's website.
attr_accessor :in_development
# Additional information about your business's website.
attr_accessor :restricted
# The status of your business's website.
attr_accessor :type

def initialize(accessible: nil, in_development: nil, restricted: nil, type: nil)
@accessible = accessible
@in_development = in_development
@restricted = restricted
@type = type
end
end
# Additional files that are required to support the onboarding process of your business.
attr_accessor :additional_files
# Whether your business sells digital content or not.
attr_accessor :goods_type
# Details regarding your business's website.
attr_accessor :site

def initialize(goods_type: nil)
def initialize(additional_files: nil, goods_type: nil, site: nil)
@additional_files = additional_files
@goods_type = goods_type
@site = site
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/params/balance_transaction_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
attr_accessor :limit
# For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
attr_accessor :payout
# Only returns the original transaction.
# Only returns transactions associated with the given object.
attr_accessor :source
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
attr_accessor :starting_after
# Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
# Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
attr_accessor :type

def initialize(
Expand Down
Loading