twilio-ruby 5.48.0 → 5.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +21 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
- data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +10 -8
- data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
- data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
- data/lib/twilio-ruby/rest/client.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
- data/lib/twilio-ruby/rest/events/v1.rb +20 -16
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +3 -3
- data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
- data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
- data/lib/twilio-ruby/rest/insights.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
- data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
- data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
- data/lib/twilio-ruby/rest/messaging/v1.rb +10 -8
- data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
- data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +10 -8
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
- data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
- data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
- data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
- data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +25 -20
- data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +9 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -15
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +22 -33
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -15
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +22 -35
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -15
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
- data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
- data/lib/twilio-ruby/rest/trusthub/v1.rb +35 -28
- data/lib/twilio-ruby/rest/verify/v2.rb +15 -12
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +4 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +64 -13
- data/lib/twilio-ruby/rest/video/v1.rb +20 -16
- data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
- data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
- data/lib/twilio-ruby/twiml/voice_response.rb +22 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/messaging/v1/brand_registration_spec.rb +2 -2
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +3 -3
- metadata +2 -2
@@ -17,7 +17,7 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the ParticipantList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] room_sid
|
20
|
+
# @param [String] room_sid Unique identifier for the room.
|
21
21
|
# @return [ParticipantList] ParticipantList
|
22
22
|
def initialize(version, room_sid: nil)
|
23
23
|
super(version)
|
@@ -151,8 +151,8 @@ module Twilio
|
|
151
151
|
##
|
152
152
|
# Initialize the ParticipantContext
|
153
153
|
# @param [Version] version Version that contains the resource
|
154
|
-
# @param [String] room_sid The
|
155
|
-
# @param [String] participant_sid The
|
154
|
+
# @param [String] room_sid The SID of the Room resource.
|
155
|
+
# @param [String] participant_sid The SID of the Participant resource.
|
156
156
|
# @return [ParticipantContext] ParticipantContext
|
157
157
|
def initialize(version, room_sid, participant_sid)
|
158
158
|
super(version)
|
@@ -198,8 +198,8 @@ module Twilio
|
|
198
198
|
# Initialize the ParticipantInstance
|
199
199
|
# @param [Version] version Version that contains the resource
|
200
200
|
# @param [Hash] payload payload that contains response from Twilio
|
201
|
-
# @param [String] room_sid
|
202
|
-
# @param [String] participant_sid The
|
201
|
+
# @param [String] room_sid Unique identifier for the room.
|
202
|
+
# @param [String] participant_sid The SID of the Participant resource.
|
203
203
|
# @return [ParticipantInstance] ParticipantInstance
|
204
204
|
def initialize(version, payload, room_sid: nil, participant_sid: nil)
|
205
205
|
super(version)
|
@@ -249,103 +249,103 @@ module Twilio
|
|
249
249
|
end
|
250
250
|
|
251
251
|
##
|
252
|
-
# @return [String]
|
252
|
+
# @return [String] Unique identifier for the participant.
|
253
253
|
def participant_sid
|
254
254
|
@properties['participant_sid']
|
255
255
|
end
|
256
256
|
|
257
257
|
##
|
258
|
-
# @return [String] The
|
258
|
+
# @return [String] The application-defined string that uniquely identifies the participant within a Room.
|
259
259
|
def participant_identity
|
260
260
|
@properties['participant_identity']
|
261
261
|
end
|
262
262
|
|
263
263
|
##
|
264
|
-
# @return [Time]
|
264
|
+
# @return [Time] When the participant joined the room.
|
265
265
|
def join_time
|
266
266
|
@properties['join_time']
|
267
267
|
end
|
268
268
|
|
269
269
|
##
|
270
|
-
# @return [Time]
|
270
|
+
# @return [Time] When the participant left the room
|
271
271
|
def leave_time
|
272
272
|
@properties['leave_time']
|
273
273
|
end
|
274
274
|
|
275
275
|
##
|
276
|
-
# @return [String]
|
276
|
+
# @return [String] Amount of time in seconds the participant was in the room.
|
277
277
|
def duration_sec
|
278
278
|
@properties['duration_sec']
|
279
279
|
end
|
280
280
|
|
281
281
|
##
|
282
|
-
# @return [String]
|
282
|
+
# @return [String] Account SID associated with the room.
|
283
283
|
def account_sid
|
284
284
|
@properties['account_sid']
|
285
285
|
end
|
286
286
|
|
287
287
|
##
|
288
|
-
# @return [String]
|
288
|
+
# @return [String] Unique identifier for the room.
|
289
289
|
def room_sid
|
290
290
|
@properties['room_sid']
|
291
291
|
end
|
292
292
|
|
293
293
|
##
|
294
|
-
# @return [participant.RoomStatus]
|
294
|
+
# @return [participant.RoomStatus] Status of the room.
|
295
295
|
def status
|
296
296
|
@properties['status']
|
297
297
|
end
|
298
298
|
|
299
299
|
##
|
300
|
-
# @return [Array[participant.Codec]]
|
300
|
+
# @return [Array[participant.Codec]] Codecs detected from the participant.
|
301
301
|
def codecs
|
302
302
|
@properties['codecs']
|
303
303
|
end
|
304
304
|
|
305
305
|
##
|
306
|
-
# @return [String]
|
306
|
+
# @return [String] Reason the participant left the room.
|
307
307
|
def end_reason
|
308
308
|
@properties['end_reason']
|
309
309
|
end
|
310
310
|
|
311
311
|
##
|
312
|
-
# @return [String]
|
312
|
+
# @return [String] Errors encountered by the participant.
|
313
313
|
def error_code
|
314
314
|
@properties['error_code']
|
315
315
|
end
|
316
316
|
|
317
317
|
##
|
318
|
-
# @return [String]
|
318
|
+
# @return [String] Twilio error code dictionary link.
|
319
319
|
def error_code_url
|
320
320
|
@properties['error_code_url']
|
321
321
|
end
|
322
322
|
|
323
323
|
##
|
324
|
-
# @return [participant.TwilioRealm]
|
324
|
+
# @return [participant.TwilioRealm] Twilio media region the participant connected to.
|
325
325
|
def media_region
|
326
326
|
@properties['media_region']
|
327
327
|
end
|
328
328
|
|
329
329
|
##
|
330
|
-
# @return [Hash]
|
330
|
+
# @return [Hash] Object containing information about the participant's data from the room.
|
331
331
|
def properties
|
332
332
|
@properties['properties']
|
333
333
|
end
|
334
334
|
|
335
335
|
##
|
336
|
-
# @return [participant.EdgeLocation]
|
336
|
+
# @return [participant.EdgeLocation] Name of the edge location the participant connected to.
|
337
337
|
def edge_location
|
338
338
|
@properties['edge_location']
|
339
339
|
end
|
340
340
|
|
341
341
|
##
|
342
|
-
# @return [Hash]
|
342
|
+
# @return [Hash] Object containing information about the SDK name and version.
|
343
343
|
def publisher_info
|
344
344
|
@properties['publisher_info']
|
345
345
|
end
|
346
346
|
|
347
347
|
##
|
348
|
-
# @return [String]
|
348
|
+
# @return [String] URL of the participant resource.
|
349
349
|
def url
|
350
350
|
@properties['url']
|
351
351
|
end
|
@@ -25,11 +25,12 @@ module Twilio
|
|
25
25
|
# @return [Twilio::REST::Ip_messaging::V1::CredentialList]
|
26
26
|
def credentials(sid=:unset)
|
27
27
|
if sid.nil?
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@credentials ||= CredentialList.new self
|
31
32
|
else
|
32
|
-
|
33
|
+
CredentialContext.new(self, sid)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -39,11 +40,12 @@ module Twilio
|
|
39
40
|
# @return [Twilio::REST::Ip_messaging::V1::ServiceList]
|
40
41
|
def services(sid=:unset)
|
41
42
|
if sid.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
raise ArgumentError, 'sid cannot be nil'
|
44
|
+
end
|
45
|
+
if sid == :unset
|
46
|
+
@services ||= ServiceList.new self
|
45
47
|
else
|
46
|
-
|
48
|
+
ServiceContext.new(self, sid)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
@@ -25,11 +25,12 @@ module Twilio
|
|
25
25
|
# @return [Twilio::REST::Ip_messaging::V2::CredentialList]
|
26
26
|
def credentials(sid=:unset)
|
27
27
|
if sid.nil?
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@credentials ||= CredentialList.new self
|
31
32
|
else
|
32
|
-
|
33
|
+
CredentialContext.new(self, sid)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -39,11 +40,12 @@ module Twilio
|
|
39
40
|
# @return [Twilio::REST::Ip_messaging::V2::ServiceList]
|
40
41
|
def services(sid=:unset)
|
41
42
|
if sid.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
raise ArgumentError, 'sid cannot be nil'
|
44
|
+
end
|
45
|
+
if sid == :unset
|
46
|
+
@services ||= ServiceList.new self
|
45
47
|
else
|
46
|
-
|
48
|
+
ServiceContext.new(self, sid)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
@@ -26,11 +26,12 @@ module Twilio
|
|
26
26
|
# @return [Twilio::REST::Lookups::V1::PhoneNumberList]
|
27
27
|
def phone_numbers(phone_number=:unset)
|
28
28
|
if phone_number.nil?
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
raise ArgumentError, 'phone_number cannot be nil'
|
30
|
+
end
|
31
|
+
if phone_number == :unset
|
32
|
+
@phone_numbers ||= PhoneNumberList.new self
|
32
33
|
else
|
33
|
-
|
34
|
+
PhoneNumberContext.new(self, phone_number)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -26,11 +26,12 @@ module Twilio
|
|
26
26
|
# @return [Twilio::REST::Messaging::V1::BrandRegistrationList]
|
27
27
|
def brand_registrations(sid=:unset)
|
28
28
|
if sid.nil?
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
raise ArgumentError, 'sid cannot be nil'
|
30
|
+
end
|
31
|
+
if sid == :unset
|
32
|
+
@brand_registrations ||= BrandRegistrationList.new self
|
32
33
|
else
|
33
|
-
|
34
|
+
BrandRegistrationContext.new(self, sid)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -46,11 +47,12 @@ module Twilio
|
|
46
47
|
# @return [Twilio::REST::Messaging::V1::ServiceList]
|
47
48
|
def services(sid=:unset)
|
48
49
|
if sid.nil?
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
raise ArgumentError, 'sid cannot be nil'
|
51
|
+
end
|
52
|
+
if sid == :unset
|
53
|
+
@services ||= ServiceList.new self
|
52
54
|
else
|
53
|
-
|
55
|
+
ServiceContext.new(self, sid)
|
54
56
|
end
|
55
57
|
end
|
56
58
|
|
@@ -25,11 +25,12 @@ module Twilio
|
|
25
25
|
# @return [Twilio::REST::Monitor::V1::AlertList]
|
26
26
|
def alerts(sid=:unset)
|
27
27
|
if sid.nil?
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@alerts ||= AlertList.new self
|
31
32
|
else
|
32
|
-
|
33
|
+
AlertContext.new(self, sid)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -39,11 +40,12 @@ module Twilio
|
|
39
40
|
# @return [Twilio::REST::Monitor::V1::EventList]
|
40
41
|
def events(sid=:unset)
|
41
42
|
if sid.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
raise ArgumentError, 'sid cannot be nil'
|
44
|
+
end
|
45
|
+
if sid == :unset
|
46
|
+
@events ||= EventList.new self
|
45
47
|
else
|
46
|
-
|
48
|
+
EventContext.new(self, sid)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
@@ -26,11 +26,12 @@ module Twilio
|
|
26
26
|
# @return [Twilio::REST::Notify::V1::CredentialList]
|
27
27
|
def credentials(sid=:unset)
|
28
28
|
if sid.nil?
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
raise ArgumentError, 'sid cannot be nil'
|
30
|
+
end
|
31
|
+
if sid == :unset
|
32
|
+
@credentials ||= CredentialList.new self
|
32
33
|
else
|
33
|
-
|
34
|
+
CredentialContext.new(self, sid)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# @return [Twilio::REST::Notify::V1::ServiceList]
|
42
43
|
def services(sid=:unset)
|
43
44
|
if sid.nil?
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
raise ArgumentError, 'sid cannot be nil'
|
46
|
+
end
|
47
|
+
if sid == :unset
|
48
|
+
@services ||= ServiceList.new self
|
47
49
|
else
|
48
|
-
|
50
|
+
ServiceContext.new(self, sid)
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -26,11 +26,12 @@ module Twilio
|
|
26
26
|
# @return [Twilio::REST::Preview::BulkExports::ExportList]
|
27
27
|
def exports(resource_type=:unset)
|
28
28
|
if resource_type.nil?
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
raise ArgumentError, 'resource_type cannot be nil'
|
30
|
+
end
|
31
|
+
if resource_type == :unset
|
32
|
+
@exports ||= ExportList.new self
|
32
33
|
else
|
33
|
-
|
34
|
+
ExportContext.new(self, resource_type)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# @return [Twilio::REST::Preview::BulkExports::ExportConfigurationList]
|
42
43
|
def export_configuration(resource_type=:unset)
|
43
44
|
if resource_type.nil?
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
raise ArgumentError, 'resource_type cannot be nil'
|
46
|
+
end
|
47
|
+
if resource_type == :unset
|
48
|
+
@export_configuration ||= ExportConfigurationList.new self
|
47
49
|
else
|
48
|
-
|
50
|
+
ExportConfigurationContext.new(self, resource_type)
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -25,11 +25,12 @@ module Twilio
|
|
25
25
|
# @return [Twilio::REST::Preview::DeployedDevices::FleetList]
|
26
26
|
def fleets(sid=:unset)
|
27
27
|
if sid.nil?
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@fleets ||= FleetList.new self
|
31
32
|
else
|
32
|
-
|
33
|
+
FleetContext.new(self, sid)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -26,11 +26,12 @@ module Twilio
|
|
26
26
|
# @return [Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentList]
|
27
27
|
def authorization_documents(sid=:unset)
|
28
28
|
if sid.nil?
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
raise ArgumentError, 'sid cannot be nil'
|
30
|
+
end
|
31
|
+
if sid == :unset
|
32
|
+
@authorization_documents ||= AuthorizationDocumentList.new self
|
32
33
|
else
|
33
|
-
|
34
|
+
AuthorizationDocumentContext.new(self, sid)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# @return [Twilio::REST::Preview::HostedNumbers::HostedNumberOrderList]
|
42
43
|
def hosted_number_orders(sid=:unset)
|
43
44
|
if sid.nil?
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
raise ArgumentError, 'sid cannot be nil'
|
46
|
+
end
|
47
|
+
if sid == :unset
|
48
|
+
@hosted_number_orders ||= HostedNumberOrderList.new self
|
47
49
|
else
|
48
|
-
|
50
|
+
HostedNumberOrderContext.new(self, sid)
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -25,11 +25,12 @@ module Twilio
|
|
25
25
|
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
26
26
|
def available_add_ons(sid=:unset)
|
27
27
|
if sid.nil?
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@available_add_ons ||= AvailableAddOnList.new self
|
31
32
|
else
|
32
|
-
|
33
|
+
AvailableAddOnContext.new(self, sid)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -39,11 +40,12 @@ module Twilio
|
|
39
40
|
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
40
41
|
def installed_add_ons(sid=:unset)
|
41
42
|
if sid.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
raise ArgumentError, 'sid cannot be nil'
|
44
|
+
end
|
45
|
+
if sid == :unset
|
46
|
+
@installed_add_ons ||= InstalledAddOnList.new self
|
45
47
|
else
|
46
|
-
|
48
|
+
InstalledAddOnContext.new(self, sid)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|