Skip to content

Commit bfa4fa0

Browse files
Merge upstream and update generated code for v2392 and d2893458baa73de9e9336a3645d4d5972d6ea3f7
2 parents f250b14 + 26ebdec commit bfa4fa0

12 files changed

Lines changed: 60 additions & 69 deletions

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
44014016ec56efb57a8cf6d0ee0771c2e6b4eebe
1+
d2893458baa73de9e9336a3645d4d5972d6ea3f7

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2349
1+
v2392

lib/stripe/api_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
module Stripe
55
module ApiVersion
66
CURRENT = "2026-07-29.preview"
7+
CURRENT_MAJOR = ""
78
end
89
end

lib/stripe/list_object.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def auto_paging_each(&blk)
8585
end
8686

8787
break if page.empty?
88+
rescue LocalJumpError => e
89+
raise unless e.reason == :break
90+
91+
break
8892
end
8993
end
9094

lib/stripe/search_result_object.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def auto_paging_each(&blk)
7171
page = page.next_search_result_page
7272

7373
break if page.empty?
74+
rescue LocalJumpError => e
75+
raise unless e.reason == :break
76+
77+
break
7478
end
7579
end
7680

lib/stripe/v2_list_object.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def auto_paging_each(&blk)
5858
break if page.next_page_url.nil?
5959

6060
page = page.fetch_next_page
61+
rescue LocalJumpError => e
62+
raise unless e.reason == :break
63+
64+
break
6165
end
6266
end
6367

rbi/stripe.rbi

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -186,71 +186,6 @@ module Stripe
186186
end
187187
end
188188
# typed: true
189-
module Stripe
190-
module FinancialConnections
191-
# An Authorization represents the set of credentials used to connect a group of Financial Connections Accounts.
192-
class Authorization < APIResource
193-
class StatusDetails < ::Stripe::StripeObject
194-
class Active < ::Stripe::StripeObject
195-
# The action (if any) to proactively relink the Authorization.
196-
sig { returns(String) }
197-
def action; end
198-
# When the Authorization is expected to become inactive, if applicable.
199-
sig { returns(Integer) }
200-
def expected_deactivation_date; end
201-
def self.inner_class_types
202-
@inner_class_types = {}
203-
end
204-
def self.field_remappings
205-
@field_remappings = {}
206-
end
207-
end
208-
class Inactive < ::Stripe::StripeObject
209-
# The action (if any) to relink the inactive Authorization.
210-
sig { returns(String) }
211-
def action; end
212-
def self.inner_class_types
213-
@inner_class_types = {}
214-
end
215-
def self.field_remappings
216-
@field_remappings = {}
217-
end
218-
end
219-
# Attribute for field active
220-
sig { returns(T.nilable(Active)) }
221-
def active; end
222-
# Attribute for field inactive
223-
sig { returns(T.nilable(Inactive)) }
224-
def inactive; end
225-
def self.inner_class_types
226-
@inner_class_types = {active: Active, inactive: Inactive}
227-
end
228-
def self.field_remappings
229-
@field_remappings = {}
230-
end
231-
end
232-
# Unique identifier for the object.
233-
sig { returns(String) }
234-
def id; end
235-
# The name of the institution that this authorization belongs to.
236-
sig { returns(String) }
237-
def institution_name; end
238-
# If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
239-
sig { returns(T::Boolean) }
240-
def livemode; end
241-
# String representing the object's type. Objects of the same type share the same value.
242-
sig { returns(String) }
243-
def object; end
244-
# The status of the connection to the Authorization.
245-
sig { returns(String) }
246-
def status; end
247-
# Attribute for field status_details
248-
sig { returns(StatusDetails) }
249-
def status_details; end
250-
end
251-
end
252-
end
253-
# typed: true
254189
module Stripe
255190
# These bank accounts are payment methods on `Customer` objects.
256191
#

rbi/stripe/resources/v2/core/event_notification.rbi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# File copied from our code generator; changes here will be overwritten.
22
# frozen_string_literal: true
33

4-
# frozen_string_literal: true
54
# typed: true
65

76
module Stripe

rbi/stripe/stripe_event_notification_handler.rbi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# File copied from our code generator; changes here will be overwritten.
22
# frozen_string_literal: true
33

4-
# frozen_string_literal: true
54
# typed: true
65

76
module Stripe

test/stripe/list_object_test.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,21 @@ class ListObjectTest < Test::Unit::TestCase
162162
assert_equal expected, actual
163163
end
164164

165+
should "support break inside #auto_paging_each block" do
166+
list = TestListObject.construct_from(data: [{ id: 1 }, { id: 2 }],
167+
has_more: true,
168+
url: "/things",
169+
object: "list")
170+
171+
actual = []
172+
list.auto_paging_each do |obj|
173+
actual << obj
174+
break if actual.size == 1
175+
end
176+
177+
assert_equal 1, actual.size
178+
end
179+
165180
should "provide #empty?" do
166181
list = Stripe::ListObject.construct_from(data: [])
167182
assert list.empty?

0 commit comments

Comments
 (0)