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