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