Skip to content

Commit d17455a

Browse files
Update generated code for v1495
1 parent f43782c commit d17455a

File tree

6 files changed

+57
-3
lines changed

6 files changed

+57
-3
lines changed

lib/stripe/resources/v2/event.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
module Stripe
55
module V2
6+
# 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.
67
class Event < APIResource
78
OBJECT_NAME = "v2.core.event"
89
def self.object_name

lib/stripe/resources/v2/event_destination.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
module Stripe
55
module V2
6+
# 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).
67
class EventDestination < APIResource
78
OBJECT_NAME = "v2.core.event_destination"
89
def self.object_name

lib/stripe/services/v2/core/event_service.rb

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,38 @@ module V2
66
module Core
77
class EventService < StripeService
88
class ListParams < Stripe::RequestParams
9+
# Filter for events created after the specified timestamp.
10+
attr_accessor :created_gt
11+
# Filter for events created at or after the specified timestamp.
12+
attr_accessor :created_gte
13+
# Filter for events created before the specified timestamp.
14+
attr_accessor :created_lt
15+
# Filter for events created at or before the specified timestamp.
16+
attr_accessor :created_lte
17+
# 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.
18+
attr_accessor :delivery_success
919
# The page size.
1020
attr_accessor :limit
1121
# Primary object ID used to retrieve related events.
1222
attr_accessor :object_id
1323
# The requested page.
1424
attr_accessor :page
1525

16-
def initialize(limit: nil, object_id: nil, page: nil)
26+
def initialize(
27+
created_gt: nil,
28+
created_gte: nil,
29+
created_lt: nil,
30+
created_lte: nil,
31+
delivery_success: nil,
32+
limit: nil,
33+
object_id: nil,
34+
page: nil
35+
)
36+
@created_gt = created_gt
37+
@created_gte = created_gte
38+
@created_lt = created_lt
39+
@created_lte = created_lte
40+
@delivery_success = delivery_success
1741
@limit = limit
1842
@object_id = object_id
1943
@page = page

rbi/stripe/resources/v2/event.rbi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# typed: true
55
module Stripe
66
module V2
7+
# 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.
78
class Event < APIResource
89
class Reason < Stripe::StripeObject
910
class Request < Stripe::StripeObject

rbi/stripe/resources/v2/event_destination.rbi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# typed: true
55
module Stripe
66
module V2
7+
# 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).
78
class EventDestination < APIResource
89
class StatusDetails < Stripe::StripeObject
910
class Disabled < Stripe::StripeObject

rbi/stripe/services/v2/core/event_service.rbi

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ module Stripe
77
module Core
88
class EventService < StripeService
99
class ListParams < Stripe::RequestParams
10+
# Filter for events created after the specified timestamp.
11+
sig { returns(String) }
12+
attr_accessor :created_gt
13+
# Filter for events created at or after the specified timestamp.
14+
sig { returns(String) }
15+
attr_accessor :created_gte
16+
# Filter for events created before the specified timestamp.
17+
sig { returns(String) }
18+
attr_accessor :created_lt
19+
# Filter for events created at or before the specified timestamp.
20+
sig { returns(String) }
21+
attr_accessor :created_lte
22+
# 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.
23+
sig { returns(T::Boolean) }
24+
attr_accessor :delivery_success
1025
# The page size.
1126
sig { returns(Integer) }
1227
attr_accessor :limit
@@ -16,8 +31,19 @@ module Stripe
1631
# The requested page.
1732
sig { returns(String) }
1833
attr_accessor :page
19-
sig { params(limit: Integer, object_id: String, page: String).void }
20-
def initialize(limit: nil, object_id: nil, page: nil); end
34+
sig {
35+
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
36+
}
37+
def initialize(
38+
created_gt: nil,
39+
created_gte: nil,
40+
created_lt: nil,
41+
created_lte: nil,
42+
delivery_success: nil,
43+
limit: nil,
44+
object_id: nil,
45+
page: nil
46+
); end
2147
end
2248
class RetrieveParams < Stripe::RequestParams
2349

0 commit comments

Comments
 (0)