twilio-ruby 5.63.1 → 5.65.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test-and-deploy.yml +7 -2
- data/CHANGES.md +81 -0
- data/README.md +3 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +27 -7
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +447 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
- data/lib/twilio-ruby/rest/conversations.rb +9 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +56 -65
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +82 -54
- data/lib/twilio-ruby/rest/insights/v1.rb +1 -1
- data/lib/twilio-ruby/rest/insights.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +385 -0
- data/lib/twilio-ruby/rest/media/v1.rb +16 -0
- data/lib/twilio-ruby/rest/media.rb +9 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +9 -9
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +18 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +22 -4
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
- data/lib/twilio-ruby/rest/verify.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room.rb +7 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +1 -1
- metadata +5 -2
@@ -152,57 +152,6 @@ module Twilio
|
|
152
152
|
FaxPage.new(@version, response, @solution)
|
153
153
|
end
|
154
154
|
|
155
|
-
##
|
156
|
-
# Create the FaxInstance
|
157
|
-
# @param [String] to The phone number to receive the fax in
|
158
|
-
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format or the
|
159
|
-
# recipient's SIP URI.
|
160
|
-
# @param [String] media_url The URL of the PDF that contains the fax. See our
|
161
|
-
# {security}[https://www.twilio.com/docs/usage/security] page for information on
|
162
|
-
# how to ensure the request for your media comes from Twilio.
|
163
|
-
# @param [fax.Quality] quality The {Fax Quality
|
164
|
-
# value}[https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values] that
|
165
|
-
# describes the fax quality. Can be: `standard`, `fine`, or `superfine` and
|
166
|
-
# defaults to `fine`.
|
167
|
-
# @param [String] status_callback The URL we should call using the `POST` method
|
168
|
-
# to send {status
|
169
|
-
# information}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback]
|
170
|
-
# to your application when the status of the fax changes.
|
171
|
-
# @param [String] from The number the fax was sent from. Can be the phone number
|
172
|
-
# in {E.164}[https://www.twilio.com/docs/glossary/what-e164] format or the SIP
|
173
|
-
# `from` value. The caller ID displayed to the recipient uses this value. If this
|
174
|
-
# is a phone number, it must be a Twilio number or a verified outgoing caller id
|
175
|
-
# from your account. If `to` is a SIP address, this can be any alphanumeric string
|
176
|
-
# (and also the characters `+`, `_`, `.`, and `-`), which will be used in the
|
177
|
-
# `from` header of the SIP request.
|
178
|
-
# @param [String] sip_auth_username The username to use with the
|
179
|
-
# `sip_auth_password` to authenticate faxes sent to a SIP address.
|
180
|
-
# @param [String] sip_auth_password The password to use with `sip_auth_username`
|
181
|
-
# to authenticate faxes sent to a SIP address.
|
182
|
-
# @param [Boolean] store_media Whether to store a copy of the sent media on our
|
183
|
-
# servers for later retrieval. Can be: `true` or `false` and the default is
|
184
|
-
# `true`.
|
185
|
-
# @param [String] ttl How long in minutes from when the fax is initiated that we
|
186
|
-
# should try to send the fax.
|
187
|
-
# @return [FaxInstance] Created FaxInstance
|
188
|
-
def create(to: nil, media_url: nil, quality: :unset, status_callback: :unset, from: :unset, sip_auth_username: :unset, sip_auth_password: :unset, store_media: :unset, ttl: :unset)
|
189
|
-
data = Twilio::Values.of({
|
190
|
-
'To' => to,
|
191
|
-
'MediaUrl' => media_url,
|
192
|
-
'Quality' => quality,
|
193
|
-
'StatusCallback' => status_callback,
|
194
|
-
'From' => from,
|
195
|
-
'SipAuthUsername' => sip_auth_username,
|
196
|
-
'SipAuthPassword' => sip_auth_password,
|
197
|
-
'StoreMedia' => store_media,
|
198
|
-
'Ttl' => ttl,
|
199
|
-
})
|
200
|
-
|
201
|
-
payload = @version.create('POST', @uri, data: data)
|
202
|
-
|
203
|
-
FaxInstance.new(@version, payload, )
|
204
|
-
end
|
205
|
-
|
206
155
|
##
|
207
156
|
# Provide a user friendly representation
|
208
157
|
def to_s
|
@@ -270,21 +219,6 @@ module Twilio
|
|
270
219
|
FaxInstance.new(@version, payload, sid: @solution[:sid], )
|
271
220
|
end
|
272
221
|
|
273
|
-
##
|
274
|
-
# Update the FaxInstance
|
275
|
-
# @param [fax.UpdateStatus] status The new
|
276
|
-
# {status}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values] of
|
277
|
-
# the resource. Can be only `canceled`. This may fail if transmission has already
|
278
|
-
# started.
|
279
|
-
# @return [FaxInstance] Updated FaxInstance
|
280
|
-
def update(status: :unset)
|
281
|
-
data = Twilio::Values.of({'Status' => status, })
|
282
|
-
|
283
|
-
payload = @version.update('POST', @uri, data: data)
|
284
|
-
|
285
|
-
FaxInstance.new(@version, payload, sid: @solution[:sid], )
|
286
|
-
end
|
287
|
-
|
288
222
|
##
|
289
223
|
# Delete the FaxInstance
|
290
224
|
# @return [Boolean] true if delete succeeds, false otherwise
|
@@ -491,17 +425,6 @@ module Twilio
|
|
491
425
|
context.fetch
|
492
426
|
end
|
493
427
|
|
494
|
-
##
|
495
|
-
# Update the FaxInstance
|
496
|
-
# @param [fax.UpdateStatus] status The new
|
497
|
-
# {status}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values] of
|
498
|
-
# the resource. Can be only `canceled`. This may fail if transmission has already
|
499
|
-
# started.
|
500
|
-
# @return [FaxInstance] Updated FaxInstance
|
501
|
-
def update(status: :unset)
|
502
|
-
context.update(status: status, )
|
503
|
-
end
|
504
|
-
|
505
428
|
##
|
506
429
|
# Delete the FaxInstance
|
507
430
|
# @return [Boolean] true if delete succeeds, false otherwise
|
@@ -15,7 +15,7 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the ConferenceParticipantList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] conference_sid The
|
18
|
+
# @param [String] conference_sid The unique SID identifier of the Conference.
|
19
19
|
# @return [ConferenceParticipantList] ConferenceParticipantList
|
20
20
|
def initialize(version, conference_sid: nil)
|
21
21
|
super(version)
|
@@ -29,9 +29,10 @@ module Twilio
|
|
29
29
|
# Lists ConferenceParticipantInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
-
# @param [String] participant_sid The
|
33
|
-
# @param [String] label
|
34
|
-
# @param [String] events
|
32
|
+
# @param [String] participant_sid The unique SID identifier of the Participant.
|
33
|
+
# @param [String] label User-specified label for a participant.
|
34
|
+
# @param [String] events Conference events generated by application or participant
|
35
|
+
# activity; e.g. `hold`, `mute`, etc.
|
35
36
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
36
37
|
# guarantees to never return more than limit. Default is no limit
|
37
38
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -53,9 +54,10 @@ module Twilio
|
|
53
54
|
# Streams ConferenceParticipantInstance records from the API as an Enumerable.
|
54
55
|
# This operation lazily loads records as efficiently as possible until the limit
|
55
56
|
# is reached.
|
56
|
-
# @param [String] participant_sid The
|
57
|
-
# @param [String] label
|
58
|
-
# @param [String] events
|
57
|
+
# @param [String] participant_sid The unique SID identifier of the Participant.
|
58
|
+
# @param [String] label User-specified label for a participant.
|
59
|
+
# @param [String] events Conference events generated by application or participant
|
60
|
+
# activity; e.g. `hold`, `mute`, etc.
|
59
61
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
60
62
|
# guarantees to never return more than limit. Default is no limit.
|
61
63
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -93,9 +95,10 @@ module Twilio
|
|
93
95
|
##
|
94
96
|
# Retrieve a single page of ConferenceParticipantInstance records from the API.
|
95
97
|
# Request is executed immediately.
|
96
|
-
# @param [String] participant_sid The
|
97
|
-
# @param [String] label
|
98
|
-
# @param [String] events
|
98
|
+
# @param [String] participant_sid The unique SID identifier of the Participant.
|
99
|
+
# @param [String] label User-specified label for a participant.
|
100
|
+
# @param [String] events Conference events generated by application or participant
|
101
|
+
# activity; e.g. `hold`, `mute`, etc.
|
99
102
|
# @param [String] page_token PageToken provided by the API
|
100
103
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
101
104
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -168,8 +171,8 @@ module Twilio
|
|
168
171
|
##
|
169
172
|
# Initialize the ConferenceParticipantContext
|
170
173
|
# @param [Version] version Version that contains the resource
|
171
|
-
# @param [String] conference_sid The
|
172
|
-
# @param [String] participant_sid The
|
174
|
+
# @param [String] conference_sid The unique SID identifier of the Conference.
|
175
|
+
# @param [String] participant_sid The unique SID identifier of the Participant.
|
173
176
|
# @return [ConferenceParticipantContext] ConferenceParticipantContext
|
174
177
|
def initialize(version, conference_sid, participant_sid)
|
175
178
|
super(version)
|
@@ -181,8 +184,9 @@ module Twilio
|
|
181
184
|
|
182
185
|
##
|
183
186
|
# Fetch the ConferenceParticipantInstance
|
184
|
-
# @param [String] events
|
185
|
-
#
|
187
|
+
# @param [String] events Conference events generated by application or participant
|
188
|
+
# activity; e.g. `hold`, `mute`, etc.
|
189
|
+
# @param [String] metrics Object. Contains participant call quality metrics.
|
186
190
|
# @return [ConferenceParticipantInstance] Fetched ConferenceParticipantInstance
|
187
191
|
def fetch(events: :unset, metrics: :unset)
|
188
192
|
params = Twilio::Values.of({'Events' => events, 'Metrics' => metrics, })
|
@@ -217,8 +221,8 @@ module Twilio
|
|
217
221
|
# Initialize the ConferenceParticipantInstance
|
218
222
|
# @param [Version] version Version that contains the resource
|
219
223
|
# @param [Hash] payload payload that contains response from Twilio
|
220
|
-
# @param [String] conference_sid The
|
221
|
-
# @param [String] participant_sid The
|
224
|
+
# @param [String] conference_sid The unique SID identifier of the Conference.
|
225
|
+
# @param [String] participant_sid The unique SID identifier of the Participant.
|
222
226
|
# @return [ConferenceParticipantInstance] ConferenceParticipantInstance
|
223
227
|
def initialize(version, payload, conference_sid: nil, participant_sid: nil)
|
224
228
|
super(version)
|
@@ -233,14 +237,12 @@ module Twilio
|
|
233
237
|
'call_direction' => payload['call_direction'],
|
234
238
|
'from' => payload['from'],
|
235
239
|
'to' => payload['to'],
|
236
|
-
'
|
240
|
+
'call_status' => payload['call_status'],
|
237
241
|
'country_code' => payload['country_code'],
|
238
242
|
'is_moderator' => payload['is_moderator'],
|
239
243
|
'join_time' => Twilio.deserialize_iso8601_datetime(payload['join_time']),
|
240
244
|
'leave_time' => Twilio.deserialize_iso8601_datetime(payload['leave_time']),
|
241
245
|
'duration_seconds' => payload['duration_seconds'] == nil ? payload['duration_seconds'] : payload['duration_seconds'].to_i,
|
242
|
-
'whisper' => payload['whisper'],
|
243
|
-
'agent_audio' => payload['agent_audio'],
|
244
246
|
'outbound_queue_length' => payload['outbound_queue_length'] == nil ? payload['outbound_queue_length'] : payload['outbound_queue_length'].to_i,
|
245
247
|
'outbound_time_in_queue' => payload['outbound_time_in_queue'] == nil ? payload['outbound_time_in_queue'] : payload['outbound_time_in_queue'].to_i,
|
246
248
|
'jitter_buffer_size' => payload['jitter_buffer_size'],
|
@@ -249,7 +251,7 @@ module Twilio
|
|
249
251
|
'participant_region' => payload['participant_region'],
|
250
252
|
'conference_region' => payload['conference_region'],
|
251
253
|
'call_type' => payload['call_type'],
|
252
|
-
'
|
254
|
+
'processing_state' => payload['processing_state'],
|
253
255
|
'properties' => payload['properties'],
|
254
256
|
'events' => payload['events'],
|
255
257
|
'metrics' => payload['metrics'],
|
@@ -280,183 +282,172 @@ module Twilio
|
|
280
282
|
end
|
281
283
|
|
282
284
|
##
|
283
|
-
# @return [String]
|
285
|
+
# @return [String] SID for this participant.
|
284
286
|
def participant_sid
|
285
287
|
@properties['participant_sid']
|
286
288
|
end
|
287
289
|
|
288
290
|
##
|
289
|
-
# @return [String] The label
|
291
|
+
# @return [String] The user-specified label of this participant.
|
290
292
|
def label
|
291
293
|
@properties['label']
|
292
294
|
end
|
293
295
|
|
294
296
|
##
|
295
|
-
# @return [String]
|
297
|
+
# @return [String] Conference SID.
|
296
298
|
def conference_sid
|
297
299
|
@properties['conference_sid']
|
298
300
|
end
|
299
301
|
|
300
302
|
##
|
301
|
-
# @return [String]
|
303
|
+
# @return [String] Unique SID identifier of the call.
|
302
304
|
def call_sid
|
303
305
|
@properties['call_sid']
|
304
306
|
end
|
305
307
|
|
306
308
|
##
|
307
|
-
# @return [String]
|
309
|
+
# @return [String] Account SID.
|
308
310
|
def account_sid
|
309
311
|
@properties['account_sid']
|
310
312
|
end
|
311
313
|
|
312
314
|
##
|
313
|
-
# @return [conference_participant.CallDirection]
|
315
|
+
# @return [conference_participant.CallDirection] Call direction of the participant.
|
314
316
|
def call_direction
|
315
317
|
@properties['call_direction']
|
316
318
|
end
|
317
319
|
|
318
320
|
##
|
319
|
-
# @return [String]
|
321
|
+
# @return [String] Caller ID of the calling party.
|
320
322
|
def from
|
321
323
|
@properties['from']
|
322
324
|
end
|
323
325
|
|
324
326
|
##
|
325
|
-
# @return [String]
|
327
|
+
# @return [String] Called party.
|
326
328
|
def to
|
327
329
|
@properties['to']
|
328
330
|
end
|
329
331
|
|
330
332
|
##
|
331
|
-
# @return [conference_participant.
|
332
|
-
def
|
333
|
-
@properties['
|
333
|
+
# @return [conference_participant.CallStatus] Call status of the call that generated the participant.
|
334
|
+
def call_status
|
335
|
+
@properties['call_status']
|
334
336
|
end
|
335
337
|
|
336
338
|
##
|
337
|
-
# @return [String]
|
339
|
+
# @return [String] ISO alpha-2 country code of the participant.
|
338
340
|
def country_code
|
339
341
|
@properties['country_code']
|
340
342
|
end
|
341
343
|
|
342
344
|
##
|
343
|
-
# @return [Boolean]
|
345
|
+
# @return [Boolean] Boolean. Indicates whether participant had startConferenceOnEnter=true or endConferenceOnExit=true.
|
344
346
|
def is_moderator
|
345
347
|
@properties['is_moderator']
|
346
348
|
end
|
347
349
|
|
348
350
|
##
|
349
|
-
# @return [Time]
|
351
|
+
# @return [Time] ISO 8601 timestamp of participant join event.
|
350
352
|
def join_time
|
351
353
|
@properties['join_time']
|
352
354
|
end
|
353
355
|
|
354
356
|
##
|
355
|
-
# @return [Time]
|
357
|
+
# @return [Time] ISO 8601 timestamp of participant leave event.
|
356
358
|
def leave_time
|
357
359
|
@properties['leave_time']
|
358
360
|
end
|
359
361
|
|
360
362
|
##
|
361
|
-
# @return [String]
|
363
|
+
# @return [String] Participant durations in seconds.
|
362
364
|
def duration_seconds
|
363
365
|
@properties['duration_seconds']
|
364
366
|
end
|
365
367
|
|
366
368
|
##
|
367
|
-
# @return [String]
|
368
|
-
def whisper
|
369
|
-
@properties['whisper']
|
370
|
-
end
|
371
|
-
|
372
|
-
##
|
373
|
-
# @return [Boolean] The agent_audio
|
374
|
-
def agent_audio
|
375
|
-
@properties['agent_audio']
|
376
|
-
end
|
377
|
-
|
378
|
-
##
|
379
|
-
# @return [String] The outbound_queue_length
|
369
|
+
# @return [String] Estimated time in queue at call creation.
|
380
370
|
def outbound_queue_length
|
381
371
|
@properties['outbound_queue_length']
|
382
372
|
end
|
383
373
|
|
384
374
|
##
|
385
|
-
# @return [String]
|
375
|
+
# @return [String] Actual time in queue (seconds).
|
386
376
|
def outbound_time_in_queue
|
387
377
|
@properties['outbound_time_in_queue']
|
388
378
|
end
|
389
379
|
|
390
380
|
##
|
391
|
-
# @return [conference_participant.JitterBufferSize] The
|
381
|
+
# @return [conference_participant.JitterBufferSize] The Jitter Buffer Size of this Conference Participant.
|
392
382
|
def jitter_buffer_size
|
393
383
|
@properties['jitter_buffer_size']
|
394
384
|
end
|
395
385
|
|
396
386
|
##
|
397
|
-
# @return [Boolean]
|
387
|
+
# @return [Boolean] Boolean. Indicated whether participant was a coach.
|
398
388
|
def is_coach
|
399
389
|
@properties['is_coach']
|
400
390
|
end
|
401
391
|
|
402
392
|
##
|
403
|
-
# @return [Array[String]]
|
393
|
+
# @return [Array[String]] Call SIDs coached by this participant.
|
404
394
|
def coached_participants
|
405
395
|
@properties['coached_participants']
|
406
396
|
end
|
407
397
|
|
408
398
|
##
|
409
|
-
# @return [conference_participant.Region]
|
399
|
+
# @return [conference_participant.Region] Twilio region where the participant media originates.
|
410
400
|
def participant_region
|
411
401
|
@properties['participant_region']
|
412
402
|
end
|
413
403
|
|
414
404
|
##
|
415
|
-
# @return [conference_participant.Region] The
|
405
|
+
# @return [conference_participant.Region] The Conference Region of this Conference Participant.
|
416
406
|
def conference_region
|
417
407
|
@properties['conference_region']
|
418
408
|
end
|
419
409
|
|
420
410
|
##
|
421
|
-
# @return [conference_participant.CallType] The
|
411
|
+
# @return [conference_participant.CallType] The Call Type of this Conference Participant.
|
422
412
|
def call_type
|
423
413
|
@properties['call_type']
|
424
414
|
end
|
425
415
|
|
426
416
|
##
|
427
|
-
# @return [
|
428
|
-
def
|
429
|
-
@properties['
|
417
|
+
# @return [conference_participant.ProcessingState] Processing state of the Participant Summary.
|
418
|
+
def processing_state
|
419
|
+
@properties['processing_state']
|
430
420
|
end
|
431
421
|
|
432
422
|
##
|
433
|
-
# @return [Hash]
|
423
|
+
# @return [Hash] Participant properties and metadata.
|
434
424
|
def properties
|
435
425
|
@properties['properties']
|
436
426
|
end
|
437
427
|
|
438
428
|
##
|
439
|
-
# @return [Hash]
|
429
|
+
# @return [Hash] Object containing information of actions taken by participants. Nested resource URLs.
|
440
430
|
def events
|
441
431
|
@properties['events']
|
442
432
|
end
|
443
433
|
|
444
434
|
##
|
445
|
-
# @return [Hash]
|
435
|
+
# @return [Hash] Object. Contains participant quality metrics.
|
446
436
|
def metrics
|
447
437
|
@properties['metrics']
|
448
438
|
end
|
449
439
|
|
450
440
|
##
|
451
|
-
# @return [String] The
|
441
|
+
# @return [String] The URL of this resource.
|
452
442
|
def url
|
453
443
|
@properties['url']
|
454
444
|
end
|
455
445
|
|
456
446
|
##
|
457
447
|
# Fetch the ConferenceParticipantInstance
|
458
|
-
# @param [String] events
|
459
|
-
#
|
448
|
+
# @param [String] events Conference events generated by application or participant
|
449
|
+
# activity; e.g. `hold`, `mute`, etc.
|
450
|
+
# @param [String] metrics Object. Contains participant call quality metrics.
|
460
451
|
# @return [ConferenceParticipantInstance] Fetched ConferenceParticipantInstance
|
461
452
|
def fetch(events: :unset, metrics: :unset)
|
462
453
|
context.fetch(events: events, metrics: metrics, )
|