telnyx 5.7.1 → 5.7.2

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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/fax_delivered_webhook_event.rb +193 -144
  5. data/lib/telnyx/models/fax_failed_webhook_event.rb +195 -146
  6. data/lib/telnyx/models/fax_media_processed_webhook_event.rb +177 -128
  7. data/lib/telnyx/models/fax_queued_webhook_event.rb +177 -128
  8. data/lib/telnyx/models/fax_sending_started_webhook_event.rb +177 -128
  9. data/lib/telnyx/models/faxes/action_cancel_response.rb +16 -5
  10. data/lib/telnyx/models/faxes/action_refresh_response.rb +16 -5
  11. data/lib/telnyx/version.rb +1 -1
  12. data/rbi/telnyx/models/fax_delivered_webhook_event.rbi +368 -247
  13. data/rbi/telnyx/models/fax_failed_webhook_event.rbi +388 -262
  14. data/rbi/telnyx/models/fax_media_processed_webhook_event.rbi +356 -239
  15. data/rbi/telnyx/models/fax_queued_webhook_event.rbi +348 -222
  16. data/rbi/telnyx/models/fax_sending_started_webhook_event.rbi +356 -239
  17. data/rbi/telnyx/models/faxes/action_cancel_response.rbi +45 -7
  18. data/rbi/telnyx/models/faxes/action_refresh_response.rbi +45 -7
  19. data/sig/telnyx/models/fax_delivered_webhook_event.rbs +175 -122
  20. data/sig/telnyx/models/fax_failed_webhook_event.rbs +178 -125
  21. data/sig/telnyx/models/fax_media_processed_webhook_event.rbs +165 -112
  22. data/sig/telnyx/models/fax_queued_webhook_event.rbs +165 -112
  23. data/sig/telnyx/models/fax_sending_started_webhook_event.rbs +165 -112
  24. data/sig/telnyx/models/faxes/action_cancel_response.rbs +24 -5
  25. data/sig/telnyx/models/faxes/action_refresh_response.rbs +24 -5
  26. metadata +1 -1
@@ -11,317 +11,185 @@ module Telnyx
11
11
  )
12
12
  end
13
13
 
14
- # Identifies the type of resource.
15
- sig { returns(T.nilable(String)) }
16
- attr_reader :id
14
+ sig { returns(T.nilable(Telnyx::FaxMediaProcessedWebhookEvent::Data)) }
15
+ attr_reader :data
17
16
 
18
- sig { params(id: String).void }
19
- attr_writer :id
20
-
21
- # The type of event being delivered.
22
17
  sig do
23
- returns(
24
- T.nilable(
25
- Telnyx::FaxMediaProcessedWebhookEvent::EventType::TaggedSymbol
26
- )
27
- )
28
- end
29
- attr_reader :event_type
30
-
31
- sig do
32
- params(
33
- event_type: Telnyx::FaxMediaProcessedWebhookEvent::EventType::OrSymbol
34
- ).void
18
+ params(data: Telnyx::FaxMediaProcessedWebhookEvent::Data::OrHash).void
35
19
  end
36
- attr_writer :event_type
20
+ attr_writer :data
37
21
 
38
- sig { returns(T.nilable(Telnyx::FaxMediaProcessedWebhookEvent::Payload)) }
39
- attr_reader :payload
40
-
41
- sig do
42
- params(
43
- payload: Telnyx::FaxMediaProcessedWebhookEvent::Payload::OrHash
44
- ).void
45
- end
46
- attr_writer :payload
47
-
48
- # Identifies the type of the resource.
49
- sig do
50
- returns(
51
- T.nilable(
52
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::TaggedSymbol
53
- )
54
- )
55
- end
56
- attr_reader :record_type
22
+ # Metadata about the webhook delivery.
23
+ sig { returns(T.nilable(Telnyx::FaxMediaProcessedWebhookEvent::Meta)) }
24
+ attr_reader :meta
57
25
 
58
26
  sig do
59
- params(
60
- record_type:
61
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::OrSymbol
62
- ).void
27
+ params(meta: Telnyx::FaxMediaProcessedWebhookEvent::Meta::OrHash).void
63
28
  end
64
- attr_writer :record_type
29
+ attr_writer :meta
65
30
 
66
31
  sig do
67
32
  params(
68
- id: String,
69
- event_type:
70
- Telnyx::FaxMediaProcessedWebhookEvent::EventType::OrSymbol,
71
- payload: Telnyx::FaxMediaProcessedWebhookEvent::Payload::OrHash,
72
- record_type:
73
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::OrSymbol
33
+ data: Telnyx::FaxMediaProcessedWebhookEvent::Data::OrHash,
34
+ meta: Telnyx::FaxMediaProcessedWebhookEvent::Meta::OrHash
74
35
  ).returns(T.attached_class)
75
36
  end
76
37
  def self.new(
77
- # Identifies the type of resource.
78
- id: nil,
79
- # The type of event being delivered.
80
- event_type: nil,
81
- payload: nil,
82
- # Identifies the type of the resource.
83
- record_type: nil
38
+ data: nil,
39
+ # Metadata about the webhook delivery.
40
+ meta: nil
84
41
  )
85
42
  end
86
43
 
87
44
  sig do
88
45
  override.returns(
89
46
  {
90
- id: String,
91
- event_type:
92
- Telnyx::FaxMediaProcessedWebhookEvent::EventType::TaggedSymbol,
93
- payload: Telnyx::FaxMediaProcessedWebhookEvent::Payload,
94
- record_type:
95
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::TaggedSymbol
47
+ data: Telnyx::FaxMediaProcessedWebhookEvent::Data,
48
+ meta: Telnyx::FaxMediaProcessedWebhookEvent::Meta
96
49
  }
97
50
  )
98
51
  end
99
52
  def to_hash
100
53
  end
101
54
 
102
- # The type of event being delivered.
103
- module EventType
104
- extend Telnyx::Internal::Type::Enum
105
-
106
- TaggedSymbol =
107
- T.type_alias do
108
- T.all(Symbol, Telnyx::FaxMediaProcessedWebhookEvent::EventType)
109
- end
110
- OrSymbol = T.type_alias { T.any(Symbol, String) }
111
-
112
- FAX_MEDIA_PROCESSED =
113
- T.let(
114
- :"fax.media.processed",
115
- Telnyx::FaxMediaProcessedWebhookEvent::EventType::TaggedSymbol
116
- )
117
-
118
- sig do
119
- override.returns(
120
- T::Array[
121
- Telnyx::FaxMediaProcessedWebhookEvent::EventType::TaggedSymbol
122
- ]
123
- )
124
- end
125
- def self.values
126
- end
127
- end
128
-
129
- class Payload < Telnyx::Internal::Type::BaseModel
55
+ class Data < Telnyx::Internal::Type::BaseModel
130
56
  OrHash =
131
57
  T.type_alias do
132
58
  T.any(
133
- Telnyx::FaxMediaProcessedWebhookEvent::Payload,
59
+ Telnyx::FaxMediaProcessedWebhookEvent::Data,
134
60
  Telnyx::Internal::AnyHash
135
61
  )
136
62
  end
137
63
 
138
- # State received from a command.
139
- sig { returns(T.nilable(String)) }
140
- attr_reader :client_state
141
-
142
- sig { params(client_state: String).void }
143
- attr_writer :client_state
144
-
145
- # The ID of the connection used to send the fax.
64
+ # Identifies the type of resource.
146
65
  sig { returns(T.nilable(String)) }
147
- attr_reader :connection_id
66
+ attr_reader :id
148
67
 
149
- sig { params(connection_id: String).void }
150
- attr_writer :connection_id
68
+ sig { params(id: String).void }
69
+ attr_writer :id
151
70
 
152
- # The direction of the fax.
71
+ # The type of event being delivered.
153
72
  sig do
154
73
  returns(
155
74
  T.nilable(
156
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::TaggedSymbol
75
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::TaggedSymbol
157
76
  )
158
77
  )
159
78
  end
160
- attr_reader :direction
79
+ attr_reader :event_type
161
80
 
162
81
  sig do
163
82
  params(
164
- direction:
165
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::OrSymbol
83
+ event_type:
84
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::OrSymbol
166
85
  ).void
167
86
  end
168
- attr_writer :direction
169
-
170
- # Identifies the fax.
171
- sig { returns(T.nilable(String)) }
172
- attr_reader :fax_id
173
-
174
- sig { params(fax_id: String).void }
175
- attr_writer :fax_id
87
+ attr_writer :event_type
176
88
 
177
- # The phone number, in E.164 format, the fax will be sent from.
178
- sig { returns(T.nilable(String)) }
179
- attr_reader :from
180
-
181
- sig { params(from: String).void }
182
- attr_writer :from
183
-
184
- # The media_name used for the fax's media. Must point to a file previously
185
- # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
186
- # and media_url/contents can't be submitted together.
187
- sig { returns(T.nilable(String)) }
188
- attr_reader :media_name
89
+ # ISO 8601 datetime of when the event occurred.
90
+ sig { returns(T.nilable(Time)) }
91
+ attr_reader :occurred_at
189
92
 
190
- sig { params(media_name: String).void }
191
- attr_writer :media_name
93
+ sig { params(occurred_at: Time).void }
94
+ attr_writer :occurred_at
192
95
 
193
- # The original URL to the PDF used for the fax's media. If media_name was
194
- # supplied, this is omitted
195
- sig { returns(T.nilable(String)) }
196
- attr_reader :original_media_url
96
+ sig do
97
+ returns(
98
+ T.nilable(Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload)
99
+ )
100
+ end
101
+ attr_reader :payload
197
102
 
198
- sig { params(original_media_url: String).void }
199
- attr_writer :original_media_url
103
+ sig do
104
+ params(
105
+ payload:
106
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::OrHash
107
+ ).void
108
+ end
109
+ attr_writer :payload
200
110
 
201
- # The status of the fax.
111
+ # Identifies the type of the resource.
202
112
  sig do
203
113
  returns(
204
114
  T.nilable(
205
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::TaggedSymbol
115
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::TaggedSymbol
206
116
  )
207
117
  )
208
118
  end
209
- attr_reader :status
119
+ attr_reader :record_type
210
120
 
211
121
  sig do
212
122
  params(
213
- status:
214
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::OrSymbol
123
+ record_type:
124
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::OrSymbol
215
125
  ).void
216
126
  end
217
- attr_writer :status
218
-
219
- # The phone number, in E.164 format, the fax will be sent to or SIP URI
220
- sig { returns(T.nilable(String)) }
221
- attr_reader :to
222
-
223
- sig { params(to: String).void }
224
- attr_writer :to
225
-
226
- # Identifier of the user to whom the fax belongs
227
- sig { returns(T.nilable(String)) }
228
- attr_reader :user_id
229
-
230
- sig { params(user_id: String).void }
231
- attr_writer :user_id
127
+ attr_writer :record_type
232
128
 
233
129
  sig do
234
130
  params(
235
- client_state: String,
236
- connection_id: String,
237
- direction:
238
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::OrSymbol,
239
- fax_id: String,
240
- from: String,
241
- media_name: String,
242
- original_media_url: String,
243
- status:
244
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::OrSymbol,
245
- to: String,
246
- user_id: String
131
+ id: String,
132
+ event_type:
133
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::OrSymbol,
134
+ occurred_at: Time,
135
+ payload:
136
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::OrHash,
137
+ record_type:
138
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::OrSymbol
247
139
  ).returns(T.attached_class)
248
140
  end
249
141
  def self.new(
250
- # State received from a command.
251
- client_state: nil,
252
- # The ID of the connection used to send the fax.
253
- connection_id: nil,
254
- # The direction of the fax.
255
- direction: nil,
256
- # Identifies the fax.
257
- fax_id: nil,
258
- # The phone number, in E.164 format, the fax will be sent from.
259
- from: nil,
260
- # The media_name used for the fax's media. Must point to a file previously
261
- # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
262
- # and media_url/contents can't be submitted together.
263
- media_name: nil,
264
- # The original URL to the PDF used for the fax's media. If media_name was
265
- # supplied, this is omitted
266
- original_media_url: nil,
267
- # The status of the fax.
268
- status: nil,
269
- # The phone number, in E.164 format, the fax will be sent to or SIP URI
270
- to: nil,
271
- # Identifier of the user to whom the fax belongs
272
- user_id: nil
142
+ # Identifies the type of resource.
143
+ id: nil,
144
+ # The type of event being delivered.
145
+ event_type: nil,
146
+ # ISO 8601 datetime of when the event occurred.
147
+ occurred_at: nil,
148
+ payload: nil,
149
+ # Identifies the type of the resource.
150
+ record_type: nil
273
151
  )
274
152
  end
275
153
 
276
154
  sig do
277
155
  override.returns(
278
156
  {
279
- client_state: String,
280
- connection_id: String,
281
- direction:
282
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::TaggedSymbol,
283
- fax_id: String,
284
- from: String,
285
- media_name: String,
286
- original_media_url: String,
287
- status:
288
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::TaggedSymbol,
289
- to: String,
290
- user_id: String
157
+ id: String,
158
+ event_type:
159
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::TaggedSymbol,
160
+ occurred_at: Time,
161
+ payload: Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload,
162
+ record_type:
163
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::TaggedSymbol
291
164
  }
292
165
  )
293
166
  end
294
167
  def to_hash
295
168
  end
296
169
 
297
- # The direction of the fax.
298
- module Direction
170
+ # The type of event being delivered.
171
+ module EventType
299
172
  extend Telnyx::Internal::Type::Enum
300
173
 
301
174
  TaggedSymbol =
302
175
  T.type_alias do
303
176
  T.all(
304
177
  Symbol,
305
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction
178
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType
306
179
  )
307
180
  end
308
181
  OrSymbol = T.type_alias { T.any(Symbol, String) }
309
182
 
310
- INBOUND =
311
- T.let(
312
- :inbound,
313
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::TaggedSymbol
314
- )
315
- OUTBOUND =
183
+ FAX_MEDIA_PROCESSED =
316
184
  T.let(
317
- :outbound,
318
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::TaggedSymbol
185
+ :"fax.media.processed",
186
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::TaggedSymbol
319
187
  )
320
188
 
321
189
  sig do
322
190
  override.returns(
323
191
  T::Array[
324
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction::TaggedSymbol
192
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType::TaggedSymbol
325
193
  ]
326
194
  )
327
195
  end
@@ -329,29 +197,263 @@ module Telnyx
329
197
  end
330
198
  end
331
199
 
332
- # The status of the fax.
333
- module Status
200
+ class Payload < Telnyx::Internal::Type::BaseModel
201
+ OrHash =
202
+ T.type_alias do
203
+ T.any(
204
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload,
205
+ Telnyx::Internal::AnyHash
206
+ )
207
+ end
208
+
209
+ # State received from a command.
210
+ sig { returns(T.nilable(String)) }
211
+ attr_reader :client_state
212
+
213
+ sig { params(client_state: String).void }
214
+ attr_writer :client_state
215
+
216
+ # The ID of the connection used to send the fax.
217
+ sig { returns(T.nilable(String)) }
218
+ attr_reader :connection_id
219
+
220
+ sig { params(connection_id: String).void }
221
+ attr_writer :connection_id
222
+
223
+ # The direction of the fax.
224
+ sig do
225
+ returns(
226
+ T.nilable(
227
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::TaggedSymbol
228
+ )
229
+ )
230
+ end
231
+ attr_reader :direction
232
+
233
+ sig do
234
+ params(
235
+ direction:
236
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::OrSymbol
237
+ ).void
238
+ end
239
+ attr_writer :direction
240
+
241
+ # Identifies the fax.
242
+ sig { returns(T.nilable(String)) }
243
+ attr_reader :fax_id
244
+
245
+ sig { params(fax_id: String).void }
246
+ attr_writer :fax_id
247
+
248
+ # The phone number, in E.164 format, the fax will be sent from.
249
+ sig { returns(T.nilable(String)) }
250
+ attr_reader :from
251
+
252
+ sig { params(from: String).void }
253
+ attr_writer :from
254
+
255
+ # The media_name used for the fax's media. Must point to a file previously
256
+ # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
257
+ # and media_url/contents can't be submitted together.
258
+ sig { returns(T.nilable(String)) }
259
+ attr_reader :media_name
260
+
261
+ sig { params(media_name: String).void }
262
+ attr_writer :media_name
263
+
264
+ # The original URL to the PDF used for the fax's media. If media_name was
265
+ # supplied, this is omitted
266
+ sig { returns(T.nilable(String)) }
267
+ attr_reader :original_media_url
268
+
269
+ sig { params(original_media_url: String).void }
270
+ attr_writer :original_media_url
271
+
272
+ # The status of the fax.
273
+ sig do
274
+ returns(
275
+ T.nilable(
276
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::TaggedSymbol
277
+ )
278
+ )
279
+ end
280
+ attr_reader :status
281
+
282
+ sig do
283
+ params(
284
+ status:
285
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::OrSymbol
286
+ ).void
287
+ end
288
+ attr_writer :status
289
+
290
+ # The phone number, in E.164 format, the fax will be sent to or SIP URI
291
+ sig { returns(T.nilable(String)) }
292
+ attr_reader :to
293
+
294
+ sig { params(to: String).void }
295
+ attr_writer :to
296
+
297
+ # Identifier of the user to whom the fax belongs
298
+ sig { returns(T.nilable(String)) }
299
+ attr_reader :user_id
300
+
301
+ sig { params(user_id: String).void }
302
+ attr_writer :user_id
303
+
304
+ sig do
305
+ params(
306
+ client_state: String,
307
+ connection_id: String,
308
+ direction:
309
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::OrSymbol,
310
+ fax_id: String,
311
+ from: String,
312
+ media_name: String,
313
+ original_media_url: String,
314
+ status:
315
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::OrSymbol,
316
+ to: String,
317
+ user_id: String
318
+ ).returns(T.attached_class)
319
+ end
320
+ def self.new(
321
+ # State received from a command.
322
+ client_state: nil,
323
+ # The ID of the connection used to send the fax.
324
+ connection_id: nil,
325
+ # The direction of the fax.
326
+ direction: nil,
327
+ # Identifies the fax.
328
+ fax_id: nil,
329
+ # The phone number, in E.164 format, the fax will be sent from.
330
+ from: nil,
331
+ # The media_name used for the fax's media. Must point to a file previously
332
+ # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
333
+ # and media_url/contents can't be submitted together.
334
+ media_name: nil,
335
+ # The original URL to the PDF used for the fax's media. If media_name was
336
+ # supplied, this is omitted
337
+ original_media_url: nil,
338
+ # The status of the fax.
339
+ status: nil,
340
+ # The phone number, in E.164 format, the fax will be sent to or SIP URI
341
+ to: nil,
342
+ # Identifier of the user to whom the fax belongs
343
+ user_id: nil
344
+ )
345
+ end
346
+
347
+ sig do
348
+ override.returns(
349
+ {
350
+ client_state: String,
351
+ connection_id: String,
352
+ direction:
353
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::TaggedSymbol,
354
+ fax_id: String,
355
+ from: String,
356
+ media_name: String,
357
+ original_media_url: String,
358
+ status:
359
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::TaggedSymbol,
360
+ to: String,
361
+ user_id: String
362
+ }
363
+ )
364
+ end
365
+ def to_hash
366
+ end
367
+
368
+ # The direction of the fax.
369
+ module Direction
370
+ extend Telnyx::Internal::Type::Enum
371
+
372
+ TaggedSymbol =
373
+ T.type_alias do
374
+ T.all(
375
+ Symbol,
376
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction
377
+ )
378
+ end
379
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
380
+
381
+ INBOUND =
382
+ T.let(
383
+ :inbound,
384
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::TaggedSymbol
385
+ )
386
+ OUTBOUND =
387
+ T.let(
388
+ :outbound,
389
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::TaggedSymbol
390
+ )
391
+
392
+ sig do
393
+ override.returns(
394
+ T::Array[
395
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction::TaggedSymbol
396
+ ]
397
+ )
398
+ end
399
+ def self.values
400
+ end
401
+ end
402
+
403
+ # The status of the fax.
404
+ module Status
405
+ extend Telnyx::Internal::Type::Enum
406
+
407
+ TaggedSymbol =
408
+ T.type_alias do
409
+ T.all(
410
+ Symbol,
411
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status
412
+ )
413
+ end
414
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
415
+
416
+ MEDIA_PROCESSED =
417
+ T.let(
418
+ :"media.processed",
419
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::TaggedSymbol
420
+ )
421
+
422
+ sig do
423
+ override.returns(
424
+ T::Array[
425
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status::TaggedSymbol
426
+ ]
427
+ )
428
+ end
429
+ def self.values
430
+ end
431
+ end
432
+ end
433
+
434
+ # Identifies the type of the resource.
435
+ module RecordType
334
436
  extend Telnyx::Internal::Type::Enum
335
437
 
336
438
  TaggedSymbol =
337
439
  T.type_alias do
338
440
  T.all(
339
441
  Symbol,
340
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status
442
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType
341
443
  )
342
444
  end
343
445
  OrSymbol = T.type_alias { T.any(Symbol, String) }
344
446
 
345
- MEDIA_PROCESSED =
447
+ EVENT =
346
448
  T.let(
347
- :"media.processed",
348
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::TaggedSymbol
449
+ :event,
450
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::TaggedSymbol
349
451
  )
350
452
 
351
453
  sig do
352
454
  override.returns(
353
455
  T::Array[
354
- Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status::TaggedSymbol
456
+ Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType::TaggedSymbol
355
457
  ]
356
458
  )
357
459
  end
@@ -360,30 +462,45 @@ module Telnyx
360
462
  end
361
463
  end
362
464
 
363
- # Identifies the type of the resource.
364
- module RecordType
365
- extend Telnyx::Internal::Type::Enum
366
-
367
- TaggedSymbol =
465
+ class Meta < Telnyx::Internal::Type::BaseModel
466
+ OrHash =
368
467
  T.type_alias do
369
- T.all(Symbol, Telnyx::FaxMediaProcessedWebhookEvent::RecordType)
468
+ T.any(
469
+ Telnyx::FaxMediaProcessedWebhookEvent::Meta,
470
+ Telnyx::Internal::AnyHash
471
+ )
370
472
  end
371
- OrSymbol = T.type_alias { T.any(Symbol, String) }
372
473
 
373
- EVENT =
374
- T.let(
375
- :event,
376
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::TaggedSymbol
377
- )
474
+ # The delivery attempt number.
475
+ sig { returns(T.nilable(Integer)) }
476
+ attr_reader :attempt
477
+
478
+ sig { params(attempt: Integer).void }
479
+ attr_writer :attempt
480
+
481
+ # The URL the webhook was delivered to.
482
+ sig { returns(T.nilable(String)) }
483
+ attr_reader :delivered_to
484
+
485
+ sig { params(delivered_to: String).void }
486
+ attr_writer :delivered_to
378
487
 
488
+ # Metadata about the webhook delivery.
379
489
  sig do
380
- override.returns(
381
- T::Array[
382
- Telnyx::FaxMediaProcessedWebhookEvent::RecordType::TaggedSymbol
383
- ]
490
+ params(attempt: Integer, delivered_to: String).returns(
491
+ T.attached_class
384
492
  )
385
493
  end
386
- def self.values
494
+ def self.new(
495
+ # The delivery attempt number.
496
+ attempt: nil,
497
+ # The URL the webhook was delivered to.
498
+ delivered_to: nil
499
+ )
500
+ end
501
+
502
+ sig { override.returns({ attempt: Integer, delivered_to: String }) }
503
+ def to_hash
387
504
  end
388
505
  end
389
506
  end