Skip to content

Commit 21c7496

Browse files
Update generated code for v1822 and 2025-06-30.preview
1 parent a1c7dcd commit 21c7496

16 files changed

+2033
-35
lines changed

lib/stripe/api_requestor.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,14 @@ def self.maybe_gc_connection_managers
852852
# switch cases: The beginning of the section generated from our OpenAPI spec
853853
when "temporary_session_expired"
854854
TemporarySessionExpiredError.new(error_data[:message], **opts)
855-
when "financial_account_not_open"
856-
FinancialAccountNotOpenError.new(error_data[:message], **opts)
855+
when "non_zero_balance"
856+
NonZeroBalanceError.new(error_data[:message], **opts)
857+
when "already_exists"
858+
AlreadyExistsError.new(error_data[:message], **opts)
857859
when "feature_not_enabled"
858860
FeatureNotEnabledError.new(error_data[:message], **opts)
861+
when "financial_account_not_open"
862+
FinancialAccountNotOpenError.new(error_data[:message], **opts)
859863
when "blocked_by_stripe"
860864
BlockedByStripeError.new(error_data[:message], **opts)
861865
when "already_canceled"

lib/stripe/errors.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,18 @@ class UnsupportedResponseTypeError < OAuthError
165165
class TemporarySessionExpiredError < StripeError
166166
end
167167

168-
class FinancialAccountNotOpenError < StripeError
168+
class NonZeroBalanceError < StripeError
169+
end
170+
171+
class AlreadyExistsError < StripeError
169172
end
170173

171174
class FeatureNotEnabledError < StripeError
172175
end
173176

177+
class FinancialAccountNotOpenError < StripeError
178+
end
179+
174180
class BlockedByStripeError < StripeError
175181
end
176182

lib/stripe/event_types.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def self.thin_event_names_to_classes
2121
V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent,
2222
V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.lookup_type =>
2323
V2CoreAccountIncludingConfigurationRecipientUpdatedEvent,
24+
V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.lookup_type =>
25+
V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent,
26+
V2CoreAccountIncludingConfigurationStorerUpdatedEvent.lookup_type =>
27+
V2CoreAccountIncludingConfigurationStorerUpdatedEvent,
2428
V2CoreAccountIncludingDefaultsUpdatedEvent.lookup_type =>
2529
V2CoreAccountIncludingDefaultsUpdatedEvent,
2630
V2CoreAccountIncludingIdentityUpdatedEvent.lookup_type =>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
# Occurs when the status of an Account's storer configuration capability is updated.
6+
class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent < Stripe::V2::Event
7+
def self.lookup_type
8+
"v2.core.account[configuration.storer].capability_status_updated"
9+
end
10+
# There is additional data present for this event, accessible with the `data` property.
11+
# See the Stripe API docs for more information.
12+
13+
# Retrieves the related object from the API. Make an API request on every call.
14+
def fetch_related_object
15+
_request(
16+
method: :get,
17+
path: related_object.url,
18+
base_address: :api,
19+
opts: { stripe_account: context }
20+
)
21+
end
22+
end
23+
end
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
# Occurs when a Storer's configuration is updated.
6+
class V2CoreAccountIncludingConfigurationStorerUpdatedEvent < Stripe::V2::Event
7+
def self.lookup_type
8+
"v2.core.account[configuration.storer].updated"
9+
end
10+
11+
# Retrieves the related object from the API. Make an API request on every call.
12+
def fetch_related_object
13+
_request(
14+
method: :get,
15+
path: related_object.url,
16+
base_address: :api,
17+
opts: { stripe_account: context }
18+
)
19+
end
20+
end
21+
end

lib/stripe/resources.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@
201201
require "stripe/events/v2_core_account_including_configuration_merchant_updated_event"
202202
require "stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event"
203203
require "stripe/events/v2_core_account_including_configuration_recipient_updated_event"
204+
require "stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event"
205+
require "stripe/events/v2_core_account_including_configuration_storer_updated_event"
204206
require "stripe/events/v2_core_account_including_defaults_updated_event"
205207
require "stripe/events/v2_core_account_including_identity_updated_event"
206208
require "stripe/events/v2_core_account_including_requirements_updated_event"

lib/stripe/resources/v2/core/account.rb

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,12 +1079,176 @@ class DefaultOutboundDestination < Stripe::StripeObject
10791079
# The payout method to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through the dashboard.
10801080
attr_reader :default_outbound_destination
10811081
end
1082+
1083+
class Storer < Stripe::StripeObject
1084+
class Capabilities < Stripe::StripeObject
1085+
class FinancialAddresses < Stripe::StripeObject
1086+
class BankAccounts < Stripe::StripeObject
1087+
class StatusDetail < Stripe::StripeObject
1088+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1089+
attr_reader :code
1090+
# Machine-readable code explaining how to make the Capability active.
1091+
attr_reader :resolution
1092+
end
1093+
# Whether the Capability has been requested.
1094+
attr_reader :requested
1095+
# The status of the Capability.
1096+
attr_reader :status
1097+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1098+
attr_reader :status_details
1099+
end
1100+
# Can provision a bank-account like financial address (VBAN) to credit/debit a FinancialAccount.
1101+
attr_reader :bank_accounts
1102+
end
1103+
1104+
class HoldsCurrencies < Stripe::StripeObject
1105+
class Gbp < Stripe::StripeObject
1106+
class StatusDetail < Stripe::StripeObject
1107+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1108+
attr_reader :code
1109+
# Machine-readable code explaining how to make the Capability active.
1110+
attr_reader :resolution
1111+
end
1112+
# Whether the Capability has been requested.
1113+
attr_reader :requested
1114+
# The status of the Capability.
1115+
attr_reader :status
1116+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1117+
attr_reader :status_details
1118+
end
1119+
# Can hold storage-type funds on Stripe in GBP.
1120+
attr_reader :gbp
1121+
end
1122+
1123+
class InboundTransfers < Stripe::StripeObject
1124+
class BankAccounts < Stripe::StripeObject
1125+
class StatusDetail < Stripe::StripeObject
1126+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1127+
attr_reader :code
1128+
# Machine-readable code explaining how to make the Capability active.
1129+
attr_reader :resolution
1130+
end
1131+
# Whether the Capability has been requested.
1132+
attr_reader :requested
1133+
# The status of the Capability.
1134+
attr_reader :status
1135+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1136+
attr_reader :status_details
1137+
end
1138+
# Can pull funds from an external bank account, owned by yourself, to a FinancialAccount.
1139+
attr_reader :bank_accounts
1140+
end
1141+
1142+
class OutboundPayments < Stripe::StripeObject
1143+
class BankAccounts < Stripe::StripeObject
1144+
class StatusDetail < Stripe::StripeObject
1145+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1146+
attr_reader :code
1147+
# Machine-readable code explaining how to make the Capability active.
1148+
attr_reader :resolution
1149+
end
1150+
# Whether the Capability has been requested.
1151+
attr_reader :requested
1152+
# The status of the Capability.
1153+
attr_reader :status
1154+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1155+
attr_reader :status_details
1156+
end
1157+
1158+
class Cards < Stripe::StripeObject
1159+
class StatusDetail < Stripe::StripeObject
1160+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1161+
attr_reader :code
1162+
# Machine-readable code explaining how to make the Capability active.
1163+
attr_reader :resolution
1164+
end
1165+
# Whether the Capability has been requested.
1166+
attr_reader :requested
1167+
# The status of the Capability.
1168+
attr_reader :status
1169+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1170+
attr_reader :status_details
1171+
end
1172+
1173+
class FinancialAccounts < Stripe::StripeObject
1174+
class StatusDetail < Stripe::StripeObject
1175+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1176+
attr_reader :code
1177+
# Machine-readable code explaining how to make the Capability active.
1178+
attr_reader :resolution
1179+
end
1180+
# Whether the Capability has been requested.
1181+
attr_reader :requested
1182+
# The status of the Capability.
1183+
attr_reader :status
1184+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1185+
attr_reader :status_details
1186+
end
1187+
# Can send funds from a FinancialAccount to a bank account, owned by someone else.
1188+
attr_reader :bank_accounts
1189+
# Can send funds from a FinancialAccount to a debit card, owned by someone else.
1190+
attr_reader :cards
1191+
# Can send funds from a FinancialAccount to another FinancialAccount, owned by someone else.
1192+
attr_reader :financial_accounts
1193+
end
1194+
1195+
class OutboundTransfers < Stripe::StripeObject
1196+
class BankAccounts < Stripe::StripeObject
1197+
class StatusDetail < Stripe::StripeObject
1198+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1199+
attr_reader :code
1200+
# Machine-readable code explaining how to make the Capability active.
1201+
attr_reader :resolution
1202+
end
1203+
# Whether the Capability has been requested.
1204+
attr_reader :requested
1205+
# The status of the Capability.
1206+
attr_reader :status
1207+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1208+
attr_reader :status_details
1209+
end
1210+
1211+
class FinancialAccounts < Stripe::StripeObject
1212+
class StatusDetail < Stripe::StripeObject
1213+
# Machine-readable code explaining the reason for the Capability to be in its current status.
1214+
attr_reader :code
1215+
# Machine-readable code explaining how to make the Capability active.
1216+
attr_reader :resolution
1217+
end
1218+
# Whether the Capability has been requested.
1219+
attr_reader :requested
1220+
# The status of the Capability.
1221+
attr_reader :status
1222+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
1223+
attr_reader :status_details
1224+
end
1225+
# Can send funds from a FinancialAccount, to a bank account, owned by yourself.
1226+
attr_reader :bank_accounts
1227+
# Can send funds from a FinancialAccount to another FinancialAccount, owned by yourself.
1228+
attr_reader :financial_accounts
1229+
end
1230+
# Can provision a financial address to credit/debit a FinancialAccount.
1231+
attr_reader :financial_addresses
1232+
# Can hold storage-type funds on Stripe.
1233+
attr_reader :holds_currencies
1234+
# Can pull funds from an external source, owned by yourself, to a FinancialAccount.
1235+
attr_reader :inbound_transfers
1236+
# Can send funds from a FinancialAccount to a destination owned by someone else.
1237+
attr_reader :outbound_payments
1238+
# Can send funds from a FinancialAccount to a destination owned by yourself.
1239+
attr_reader :outbound_transfers
1240+
end
1241+
# Capabilities that have been requested on the Storer Configuration.
1242+
attr_reader :capabilities
1243+
end
10821244
# The Customer Configuration allows the Account to be used in inbound payment flows.
10831245
attr_reader :customer
10841246
# The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you’ve completed onboarding as a Connect platform.
10851247
attr_reader :merchant
10861248
# The Recipient Configuration allows the Account to receive funds.
10871249
attr_reader :recipient
1250+
# The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts.
1251+
attr_reader :storer
10881252
end
10891253

10901254
class Defaults < Stripe::StripeObject

lib/stripe/resources/v2/money_management/financial_account.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ class Other < Stripe::StripeObject
2525
attr_reader :type
2626
end
2727

28+
class StatusDetails < Stripe::StripeObject
29+
class Closed < Stripe::StripeObject
30+
class ForwardingSettings < Stripe::StripeObject
31+
# The address to send forwarded payments to.
32+
attr_reader :payment_method
33+
# The address to send forwarded payouts to.
34+
attr_reader :payout_method
35+
end
36+
# Attribute for field forwarding_settings
37+
attr_reader :forwarding_settings
38+
# Attribute for field reason
39+
attr_reader :reason
40+
end
41+
# Attribute for field closed
42+
attr_reader :closed
43+
end
44+
2845
class Storage < Stripe::StripeObject
2946
# The currencies that this FinancialAccount can hold.
3047
attr_reader :holds_currencies
@@ -45,6 +62,8 @@ class Storage < Stripe::StripeObject
4562
attr_reader :other
4663
# Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows.
4764
attr_reader :status
65+
# Attribute for field status_details
66+
attr_reader :status_details
4867
# If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts.
4968
attr_reader :storage
5069
# Type of the FinancialAccount. An additional hash is included on the FinancialAccount with a name matching this value.

0 commit comments

Comments
 (0)