orb-billing 1.43.0 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +6 -0
  5. data/lib/orb/models/alert_create_for_plan_params.rb +156 -0
  6. data/lib/orb/models/dimensional_price_groups/price_create_params.rb +147 -0
  7. data/lib/orb/models/dimensional_price_groups/price_create_response.rb +19 -0
  8. data/lib/orb/models/dimensional_price_groups/price_list_params.rb +65 -0
  9. data/lib/orb/models/plan_created_webhook_event.rb +91 -0
  10. data/lib/orb/models/plan_edited_webhook_event.rb +131 -0
  11. data/lib/orb/models/tax_amount.rb +32 -1
  12. data/lib/orb/models/unwrap_webhook_event.rb +7 -1
  13. data/lib/orb/models/webhook_endpoint.rb +56 -0
  14. data/lib/orb/models/webhook_endpoint_create_params.rb +34 -0
  15. data/lib/orb/models/webhook_endpoint_delete_params.rb +20 -0
  16. data/lib/orb/models/webhook_endpoint_disable_params.rb +20 -0
  17. data/lib/orb/models/webhook_endpoint_enable_params.rb +20 -0
  18. data/lib/orb/models/webhook_endpoint_list_params.rb +34 -0
  19. data/lib/orb/models/webhook_endpoint_retrieve_params.rb +20 -0
  20. data/lib/orb/models/webhook_endpoint_update_params.rb +41 -0
  21. data/lib/orb/models/webhook_endpoint_with_secret.rb +65 -0
  22. data/lib/orb/models.rb +24 -0
  23. data/lib/orb/resources/alerts.rb +55 -0
  24. data/lib/orb/resources/dimensional_price_groups/prices.rb +87 -0
  25. data/lib/orb/resources/dimensional_price_groups.rb +4 -0
  26. data/lib/orb/resources/webhook_endpoints.rb +183 -0
  27. data/lib/orb/resources/webhooks.rb +1 -1
  28. data/lib/orb/version.rb +1 -1
  29. data/lib/orb.rb +17 -0
  30. data/rbi/orb/client.rbi +5 -0
  31. data/rbi/orb/models/alert_create_for_plan_params.rbi +290 -0
  32. data/rbi/orb/models/dimensional_price_groups/price_create_params.rbi +298 -0
  33. data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +76 -0
  34. data/rbi/orb/models/dimensional_price_groups/price_list_params.rbi +134 -0
  35. data/rbi/orb/models/plan_created_webhook_event.rbi +140 -0
  36. data/rbi/orb/models/plan_edited_webhook_event.rbi +259 -0
  37. data/rbi/orb/models/tax_amount.rbi +41 -3
  38. data/rbi/orb/models/unwrap_webhook_event.rbi +2 -0
  39. data/rbi/orb/models/webhook_endpoint.rbi +71 -0
  40. data/rbi/orb/models/webhook_endpoint_create_params.rbi +53 -0
  41. data/rbi/orb/models/webhook_endpoint_delete_params.rbi +35 -0
  42. data/rbi/orb/models/webhook_endpoint_disable_params.rbi +35 -0
  43. data/rbi/orb/models/webhook_endpoint_enable_params.rbi +35 -0
  44. data/rbi/orb/models/webhook_endpoint_list_params.rbi +56 -0
  45. data/rbi/orb/models/webhook_endpoint_retrieve_params.rbi +35 -0
  46. data/rbi/orb/models/webhook_endpoint_update_params.rbi +59 -0
  47. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +83 -0
  48. data/rbi/orb/models.rbi +24 -0
  49. data/rbi/orb/resources/alerts.rbi +59 -0
  50. data/rbi/orb/resources/dimensional_price_groups/prices.rbi +82 -0
  51. data/rbi/orb/resources/dimensional_price_groups.rbi +3 -0
  52. data/rbi/orb/resources/webhook_endpoints.rbi +116 -0
  53. data/rbi/orb/resources/webhooks.rbi +2 -0
  54. data/sig/orb/client.rbs +2 -0
  55. data/sig/orb/models/alert_create_for_plan_params.rbs +126 -0
  56. data/sig/orb/models/dimensional_price_groups/price_create_params.rbs +123 -0
  57. data/sig/orb/models/dimensional_price_groups/price_create_response.rbs +15 -0
  58. data/sig/orb/models/dimensional_price_groups/price_list_params.rbs +61 -0
  59. data/sig/orb/models/plan_created_webhook_event.rbs +72 -0
  60. data/sig/orb/models/plan_edited_webhook_event.rbs +116 -0
  61. data/sig/orb/models/tax_amount.rbs +31 -3
  62. data/sig/orb/models/unwrap_webhook_event.rbs +2 -0
  63. data/sig/orb/models/webhook_endpoint.rbs +40 -0
  64. data/sig/orb/models/webhook_endpoint_create_params.rbs +28 -0
  65. data/sig/orb/models/webhook_endpoint_delete_params.rbs +23 -0
  66. data/sig/orb/models/webhook_endpoint_disable_params.rbs +23 -0
  67. data/sig/orb/models/webhook_endpoint_enable_params.rbs +23 -0
  68. data/sig/orb/models/webhook_endpoint_list_params.rbs +30 -0
  69. data/sig/orb/models/webhook_endpoint_retrieve_params.rbs +23 -0
  70. data/sig/orb/models/webhook_endpoint_update_params.rbs +36 -0
  71. data/sig/orb/models/webhook_endpoint_with_secret.rbs +45 -0
  72. data/sig/orb/models.rbs +24 -0
  73. data/sig/orb/resources/alerts.rbs +12 -0
  74. data/sig/orb/resources/dimensional_price_groups/prices.rbs +28 -0
  75. data/sig/orb/resources/dimensional_price_groups.rbs +2 -0
  76. data/sig/orb/resources/webhook_endpoints.rbs +46 -0
  77. data/sig/orb/resources/webhooks.rbs +2 -0
  78. metadata +52 -1
@@ -0,0 +1,259 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class PlanEditedWebhookEvent < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::PlanEditedWebhookEvent, Orb::Internal::AnyHash)
9
+ end
10
+
11
+ # The ID of this webhook event.
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The time at which this event was created, to the second.
16
+ sig { returns(Time) }
17
+ attr_accessor :created_at
18
+
19
+ # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
20
+ # subscribed to by a customer. Plans define the billing behavior of the
21
+ # subscription. You can see more about how to configure prices in the
22
+ # [Price resource](/reference/price).
23
+ sig { returns(Orb::Plan) }
24
+ attr_reader :plan
25
+
26
+ sig { params(plan: Orb::Plan::OrHash).void }
27
+ attr_writer :plan
28
+
29
+ sig { returns(Orb::PlanEditedWebhookEvent::Properties) }
30
+ attr_reader :properties
31
+
32
+ sig do
33
+ params(properties: Orb::PlanEditedWebhookEvent::Properties::OrHash).void
34
+ end
35
+ attr_writer :properties
36
+
37
+ # The event this payload describes.
38
+ sig { returns(Orb::PlanEditedWebhookEvent::Type::TaggedSymbol) }
39
+ attr_accessor :type
40
+
41
+ # Issued when a plan's name, description, external plan ID, metadata or status is
42
+ # edited.
43
+ sig do
44
+ params(
45
+ id: String,
46
+ created_at: Time,
47
+ plan: Orb::Plan::OrHash,
48
+ properties: Orb::PlanEditedWebhookEvent::Properties::OrHash,
49
+ type: Orb::PlanEditedWebhookEvent::Type::OrSymbol
50
+ ).returns(T.attached_class)
51
+ end
52
+ def self.new(
53
+ # The ID of this webhook event.
54
+ id:,
55
+ # The time at which this event was created, to the second.
56
+ created_at:,
57
+ # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
58
+ # subscribed to by a customer. Plans define the billing behavior of the
59
+ # subscription. You can see more about how to configure prices in the
60
+ # [Price resource](/reference/price).
61
+ plan:,
62
+ properties:,
63
+ # The event this payload describes.
64
+ type:
65
+ )
66
+ end
67
+
68
+ sig do
69
+ override.returns(
70
+ {
71
+ id: String,
72
+ created_at: Time,
73
+ plan: Orb::Plan,
74
+ properties: Orb::PlanEditedWebhookEvent::Properties,
75
+ type: Orb::PlanEditedWebhookEvent::Type::TaggedSymbol
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+
82
+ class Properties < Orb::Internal::Type::BaseModel
83
+ OrHash =
84
+ T.type_alias do
85
+ T.any(
86
+ Orb::PlanEditedWebhookEvent::Properties,
87
+ Orb::Internal::AnyHash
88
+ )
89
+ end
90
+
91
+ # metadata values are non-null on the wire, as on the price event.
92
+ sig do
93
+ returns(Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes)
94
+ end
95
+ attr_reader :previous_attributes
96
+
97
+ sig do
98
+ params(
99
+ previous_attributes:
100
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::OrHash
101
+ ).void
102
+ end
103
+ attr_writer :previous_attributes
104
+
105
+ sig do
106
+ params(
107
+ previous_attributes:
108
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::OrHash
109
+ ).returns(T.attached_class)
110
+ end
111
+ def self.new(
112
+ # metadata values are non-null on the wire, as on the price event.
113
+ previous_attributes:
114
+ )
115
+ end
116
+
117
+ sig do
118
+ override.returns(
119
+ {
120
+ previous_attributes:
121
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes
122
+ }
123
+ )
124
+ end
125
+ def to_hash
126
+ end
127
+
128
+ class PreviousAttributes < Orb::Internal::Type::BaseModel
129
+ OrHash =
130
+ T.type_alias do
131
+ T.any(
132
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes,
133
+ Orb::Internal::AnyHash
134
+ )
135
+ end
136
+
137
+ sig { returns(T.nilable(String)) }
138
+ attr_accessor :description
139
+
140
+ sig { returns(T.nilable(String)) }
141
+ attr_accessor :external_plan_id
142
+
143
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
144
+ attr_accessor :metadata
145
+
146
+ sig { returns(T.nilable(String)) }
147
+ attr_accessor :name
148
+
149
+ sig do
150
+ returns(
151
+ T.nilable(
152
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
153
+ )
154
+ )
155
+ end
156
+ attr_accessor :status
157
+
158
+ # metadata values are non-null on the wire, as on the price event.
159
+ sig do
160
+ params(
161
+ description: T.nilable(String),
162
+ external_plan_id: T.nilable(String),
163
+ metadata: T.nilable(T::Hash[Symbol, String]),
164
+ name: T.nilable(String),
165
+ status:
166
+ T.nilable(
167
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::OrSymbol
168
+ )
169
+ ).returns(T.attached_class)
170
+ end
171
+ def self.new(
172
+ description: nil,
173
+ external_plan_id: nil,
174
+ metadata: nil,
175
+ name: nil,
176
+ status: nil
177
+ )
178
+ end
179
+
180
+ sig do
181
+ override.returns(
182
+ {
183
+ description: T.nilable(String),
184
+ external_plan_id: T.nilable(String),
185
+ metadata: T.nilable(T::Hash[Symbol, String]),
186
+ name: T.nilable(String),
187
+ status:
188
+ T.nilable(
189
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
190
+ )
191
+ }
192
+ )
193
+ end
194
+ def to_hash
195
+ end
196
+
197
+ module Status
198
+ extend Orb::Internal::Type::Enum
199
+
200
+ TaggedSymbol =
201
+ T.type_alias do
202
+ T.all(
203
+ Symbol,
204
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status
205
+ )
206
+ end
207
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
208
+
209
+ ACTIVE =
210
+ T.let(
211
+ :active,
212
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
213
+ )
214
+ ARCHIVED =
215
+ T.let(
216
+ :archived,
217
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
218
+ )
219
+ DRAFT =
220
+ T.let(
221
+ :draft,
222
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
223
+ )
224
+
225
+ sig do
226
+ override.returns(
227
+ T::Array[
228
+ Orb::PlanEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
229
+ ]
230
+ )
231
+ end
232
+ def self.values
233
+ end
234
+ end
235
+ end
236
+ end
237
+
238
+ # The event this payload describes.
239
+ module Type
240
+ extend Orb::Internal::Type::Enum
241
+
242
+ TaggedSymbol =
243
+ T.type_alias { T.all(Symbol, Orb::PlanEditedWebhookEvent::Type) }
244
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
245
+
246
+ PLAN_EDITED =
247
+ T.let(:"plan.edited", Orb::PlanEditedWebhookEvent::Type::TaggedSymbol)
248
+
249
+ sig do
250
+ override.returns(
251
+ T::Array[Orb::PlanEditedWebhookEvent::Type::TaggedSymbol]
252
+ )
253
+ end
254
+ def self.values
255
+ end
256
+ end
257
+ end
258
+ end
259
+ end
@@ -17,11 +17,17 @@ module Orb
17
17
  sig { returns(T.nilable(String)) }
18
18
  attr_accessor :tax_rate_percentage
19
19
 
20
+ # Why this tax was or was not charged, such as reverse_charge or customer_exempt.
21
+ # Null on tax calculated before reasons were recorded.
22
+ sig { returns(T.nilable(Orb::TaxAmount::TaxReason::TaggedSymbol)) }
23
+ attr_accessor :tax_reason
24
+
20
25
  sig do
21
26
  params(
22
27
  amount: String,
23
28
  tax_rate_description: String,
24
- tax_rate_percentage: T.nilable(String)
29
+ tax_rate_percentage: T.nilable(String),
30
+ tax_reason: T.nilable(Orb::TaxAmount::TaxReason::OrSymbol)
25
31
  ).returns(T.attached_class)
26
32
  end
27
33
  def self.new(
@@ -30,7 +36,10 @@ module Orb
30
36
  # The human-readable description of the applied tax rate.
31
37
  tax_rate_description:,
32
38
  # The tax rate percentage, out of 100.
33
- tax_rate_percentage:
39
+ tax_rate_percentage:,
40
+ # Why this tax was or was not charged, such as reverse_charge or customer_exempt.
41
+ # Null on tax calculated before reasons were recorded.
42
+ tax_reason: nil
34
43
  )
35
44
  end
36
45
 
@@ -39,12 +48,41 @@ module Orb
39
48
  {
40
49
  amount: String,
41
50
  tax_rate_description: String,
42
- tax_rate_percentage: T.nilable(String)
51
+ tax_rate_percentage: T.nilable(String),
52
+ tax_reason: T.nilable(Orb::TaxAmount::TaxReason::TaggedSymbol)
43
53
  }
44
54
  )
45
55
  end
46
56
  def to_hash
47
57
  end
58
+
59
+ # Why this tax was or was not charged, such as reverse_charge or customer_exempt.
60
+ # Null on tax calculated before reasons were recorded.
61
+ module TaxReason
62
+ extend Orb::Internal::Type::Enum
63
+
64
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::TaxAmount::TaxReason) }
65
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
66
+
67
+ TAXED = T.let(:taxed, Orb::TaxAmount::TaxReason::TaggedSymbol)
68
+ REVERSE_CHARGE =
69
+ T.let(:reverse_charge, Orb::TaxAmount::TaxReason::TaggedSymbol)
70
+ CUSTOMER_EXEMPT =
71
+ T.let(:customer_exempt, Orb::TaxAmount::TaxReason::TaggedSymbol)
72
+ PRODUCT_EXEMPT =
73
+ T.let(:product_exempt, Orb::TaxAmount::TaxReason::TaggedSymbol)
74
+ NOT_REGISTERED =
75
+ T.let(:not_registered, Orb::TaxAmount::TaxReason::TaggedSymbol)
76
+ ZERO_RATED = T.let(:zero_rated, Orb::TaxAmount::TaxReason::TaggedSymbol)
77
+ NOT_TAXED_OTHER =
78
+ T.let(:not_taxed_other, Orb::TaxAmount::TaxReason::TaggedSymbol)
79
+
80
+ sig do
81
+ override.returns(T::Array[Orb::TaxAmount::TaxReason::TaggedSymbol])
82
+ end
83
+ def self.values
84
+ end
85
+ end
48
86
  end
49
87
  end
50
88
  end
@@ -58,7 +58,9 @@ module Orb
58
58
  Orb::MetricEventsDroppedByWatermarkWebhookEvent,
59
59
  Orb::PaymentMethodCreatedWebhookEvent,
60
60
  Orb::PaymentMethodDeletedWebhookEvent,
61
+ Orb::PlanCreatedWebhookEvent,
61
62
  Orb::PlanDefaultVersionSetWebhookEvent,
63
+ Orb::PlanEditedWebhookEvent,
62
64
  Orb::PlanVersionCreatedWebhookEvent,
63
65
  Orb::PriceEditedWebhookEvent,
64
66
  Orb::ResourceEventTestWebhookEvent,
@@ -0,0 +1,71 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpoint < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Orb::WebhookEndpoint, Orb::Internal::AnyHash) }
8
+
9
+ # The Orb-assigned unique identifier for the webhook endpoint.
10
+ sig { returns(String) }
11
+ attr_accessor :id
12
+
13
+ # The time the webhook endpoint was created.
14
+ sig { returns(Time) }
15
+ attr_accessor :created_at
16
+
17
+ # Whether Orb sends webhook events to this endpoint.
18
+ sig { returns(T::Boolean) }
19
+ attr_accessor :enabled
20
+
21
+ # The webhook event types sent to this endpoint. If null, all event types are
22
+ # sent.
23
+ sig { returns(T.nilable(T::Array[String])) }
24
+ attr_accessor :enabled_event_types
25
+
26
+ # The HTTPS URL that Orb sends webhook events to.
27
+ sig { returns(String) }
28
+ attr_accessor :url
29
+
30
+ # A webhook endpoint is an HTTPS URL that Orb sends
31
+ # [webhook events](/integrations-and-exports/webhooks) to.
32
+ sig do
33
+ params(
34
+ id: String,
35
+ created_at: Time,
36
+ enabled: T::Boolean,
37
+ enabled_event_types: T.nilable(T::Array[String]),
38
+ url: String
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # The Orb-assigned unique identifier for the webhook endpoint.
43
+ id:,
44
+ # The time the webhook endpoint was created.
45
+ created_at:,
46
+ # Whether Orb sends webhook events to this endpoint.
47
+ enabled:,
48
+ # The webhook event types sent to this endpoint. If null, all event types are
49
+ # sent.
50
+ enabled_event_types:,
51
+ # The HTTPS URL that Orb sends webhook events to.
52
+ url:
53
+ )
54
+ end
55
+
56
+ sig do
57
+ override.returns(
58
+ {
59
+ id: String,
60
+ created_at: Time,
61
+ enabled: T::Boolean,
62
+ enabled_event_types: T.nilable(T::Array[String]),
63
+ url: String
64
+ }
65
+ )
66
+ end
67
+ def to_hash
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,53 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointCreateParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointCreateParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ # The HTTPS URL that Orb sends webhook events to.
15
+ sig { returns(String) }
16
+ attr_accessor :url
17
+
18
+ # The webhook event types to send to this endpoint. If omitted or null, all event
19
+ # types are sent.
20
+ sig { returns(T.nilable(T::Array[String])) }
21
+ attr_accessor :enabled_event_types
22
+
23
+ sig do
24
+ params(
25
+ url: String,
26
+ enabled_event_types: T.nilable(T::Array[String]),
27
+ request_options: Orb::RequestOptions::OrHash
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(
31
+ # The HTTPS URL that Orb sends webhook events to.
32
+ url:,
33
+ # The webhook event types to send to this endpoint. If omitted or null, all event
34
+ # types are sent.
35
+ enabled_event_types: nil,
36
+ request_options: {}
37
+ )
38
+ end
39
+
40
+ sig do
41
+ override.returns(
42
+ {
43
+ url: String,
44
+ enabled_event_types: T.nilable(T::Array[String]),
45
+ request_options: Orb::RequestOptions
46
+ }
47
+ )
48
+ end
49
+ def to_hash
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointDeleteParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointDeleteParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :webhook_endpoint_id
16
+
17
+ sig do
18
+ params(
19
+ webhook_endpoint_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(webhook_endpoint_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { webhook_endpoint_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointDisableParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointDisableParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :webhook_endpoint_id
16
+
17
+ sig do
18
+ params(
19
+ webhook_endpoint_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(webhook_endpoint_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { webhook_endpoint_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointEnableParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointEnableParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :webhook_endpoint_id
16
+
17
+ sig do
18
+ params(
19
+ webhook_endpoint_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(webhook_endpoint_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { webhook_endpoint_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointListParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointListParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
15
+ # from the initial request.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :cursor
18
+
19
+ # The number of items to fetch. Defaults to 20.
20
+ sig { returns(T.nilable(Integer)) }
21
+ attr_reader :limit
22
+
23
+ sig { params(limit: Integer).void }
24
+ attr_writer :limit
25
+
26
+ sig do
27
+ params(
28
+ cursor: T.nilable(String),
29
+ limit: Integer,
30
+ request_options: Orb::RequestOptions::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
35
+ # from the initial request.
36
+ cursor: nil,
37
+ # The number of items to fetch. Defaults to 20.
38
+ limit: nil,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ sig do
44
+ override.returns(
45
+ {
46
+ cursor: T.nilable(String),
47
+ limit: Integer,
48
+ request_options: Orb::RequestOptions
49
+ }
50
+ )
51
+ end
52
+ def to_hash
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class WebhookEndpointRetrieveParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::WebhookEndpointRetrieveParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :webhook_endpoint_id
16
+
17
+ sig do
18
+ params(
19
+ webhook_endpoint_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(webhook_endpoint_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { webhook_endpoint_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end