twilio-ruby 5.22.3 → 5.23.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 +27 -0
- data/README.md +2 -4
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +68 -47
- data/lib/twilio-ruby/rest/chat/v1/service.rb +311 -320
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +59 -41
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +52 -40
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +71 -64
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +58 -40
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +39 -29
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +51 -48
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +16 -12
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +13 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +68 -47
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +311 -320
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +59 -41
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +52 -40
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +71 -64
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +58 -40
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +39 -29
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +51 -48
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +16 -12
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +25 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +49 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +217 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +146 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +169 -0
- data/lib/twilio-ruby/rest/serverless/v1.rb +2 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +30 -9
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +39 -6
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +191 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +133 -99
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference_spec.rb +86 -2
- data/spec/integration/api/v2010/account/connect_app_spec.rb +28 -6
- data/spec/integration/api/v2010/account/queue/member_spec.rb +4 -4
- data/spec/integration/insights/v1/summary_spec.rb +1 -0
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +46 -0
- data/spec/integration/preview/trusted_comms/device_spec.rb +45 -0
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +48 -0
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +6 -0
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +92 -0
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +31 -68
- data/spec/integration/video/v1/room/room_participant_spec.rb +6 -3
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- metadata +15 -2
data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb
CHANGED
@@ -16,26 +16,22 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the SubscribedTrackList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] room_sid
|
20
|
-
# @param [String]
|
19
|
+
# @param [String] room_sid Unique Room identifier where this Track is published.
|
20
|
+
# @param [String] participant_sid Unique Participant identifier that subscribes to
|
21
|
+
# this Track.
|
21
22
|
# @return [SubscribedTrackList] SubscribedTrackList
|
22
|
-
def initialize(version, room_sid: nil,
|
23
|
+
def initialize(version, room_sid: nil, participant_sid: nil)
|
23
24
|
super(version)
|
24
25
|
|
25
26
|
# Path Solution
|
26
|
-
@solution = {room_sid: room_sid,
|
27
|
-
@uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:
|
27
|
+
@solution = {room_sid: room_sid, participant_sid: participant_sid}
|
28
|
+
@uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:participant_sid]}/SubscribedTracks"
|
28
29
|
end
|
29
30
|
|
30
31
|
##
|
31
32
|
# Lists SubscribedTrackInstance records from the API as a list.
|
32
33
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
34
|
# memory before returning.
|
34
|
-
# @param [Time] date_created_after The date_created_after
|
35
|
-
# @param [Time] date_created_before The date_created_before
|
36
|
-
# @param [String] track The track
|
37
|
-
# @param [String] publisher The publisher
|
38
|
-
# @param [subscribed_track.Kind] kind The kind
|
39
35
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
36
|
# guarantees to never return more than limit. Default is no limit
|
41
37
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -43,27 +39,14 @@ module Twilio
|
|
43
39
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
40
|
# efficient page size, i.e. min(limit, 1000)
|
45
41
|
# @return [Array] Array of up to limit results
|
46
|
-
def list(
|
47
|
-
self.stream(
|
48
|
-
date_created_after: date_created_after,
|
49
|
-
date_created_before: date_created_before,
|
50
|
-
track: track,
|
51
|
-
publisher: publisher,
|
52
|
-
kind: kind,
|
53
|
-
limit: limit,
|
54
|
-
page_size: page_size
|
55
|
-
).entries
|
42
|
+
def list(limit: nil, page_size: nil)
|
43
|
+
self.stream(limit: limit, page_size: page_size).entries
|
56
44
|
end
|
57
45
|
|
58
46
|
##
|
59
47
|
# Streams SubscribedTrackInstance records from the API as an Enumerable.
|
60
48
|
# This operation lazily loads records as efficiently as possible until the limit
|
61
49
|
# is reached.
|
62
|
-
# @param [Time] date_created_after The date_created_after
|
63
|
-
# @param [Time] date_created_before The date_created_before
|
64
|
-
# @param [String] track The track
|
65
|
-
# @param [String] publisher The publisher
|
66
|
-
# @param [subscribed_track.Kind] kind The kind
|
67
50
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
68
51
|
# guarantees to never return more than limit. Default is no limit.
|
69
52
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -71,17 +54,10 @@ module Twilio
|
|
71
54
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
72
55
|
# efficient page size, i.e. min(limit, 1000)
|
73
56
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
74
|
-
def stream(
|
57
|
+
def stream(limit: nil, page_size: nil)
|
75
58
|
limits = @version.read_limits(limit, page_size)
|
76
59
|
|
77
|
-
page = self.page(
|
78
|
-
date_created_after: date_created_after,
|
79
|
-
date_created_before: date_created_before,
|
80
|
-
track: track,
|
81
|
-
publisher: publisher,
|
82
|
-
kind: kind,
|
83
|
-
page_size: limits[:page_size],
|
84
|
-
)
|
60
|
+
page = self.page(page_size: limits[:page_size], )
|
85
61
|
|
86
62
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
87
63
|
end
|
@@ -103,22 +79,12 @@ module Twilio
|
|
103
79
|
##
|
104
80
|
# Retrieve a single page of SubscribedTrackInstance records from the API.
|
105
81
|
# Request is executed immediately.
|
106
|
-
# @param [Time] date_created_after The date_created_after
|
107
|
-
# @param [Time] date_created_before The date_created_before
|
108
|
-
# @param [String] track The track
|
109
|
-
# @param [String] publisher The publisher
|
110
|
-
# @param [subscribed_track.Kind] kind The kind
|
111
82
|
# @param [String] page_token PageToken provided by the API
|
112
83
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
113
84
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
114
85
|
# @return [Page] Page of SubscribedTrackInstance
|
115
|
-
def page(
|
86
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
116
87
|
params = Twilio::Values.of({
|
117
|
-
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
|
118
|
-
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
|
119
|
-
'Track' => track,
|
120
|
-
'Publisher' => publisher,
|
121
|
-
'Kind' => kind,
|
122
88
|
'PageToken' => page_token,
|
123
89
|
'Page' => page_number,
|
124
90
|
'PageSize' => page_size,
|
@@ -144,35 +110,6 @@ module Twilio
|
|
144
110
|
SubscribedTrackPage.new(@version, response, @solution)
|
145
111
|
end
|
146
112
|
|
147
|
-
##
|
148
|
-
# Update the SubscribedTrackInstance
|
149
|
-
# @param [String] track The track
|
150
|
-
# @param [String] publisher The publisher
|
151
|
-
# @param [subscribed_track.Kind] kind The kind
|
152
|
-
# @param [subscribed_track.Status] status The status
|
153
|
-
# @return [SubscribedTrackInstance] Updated SubscribedTrackInstance
|
154
|
-
def update(track: :unset, publisher: :unset, kind: :unset, status: :unset)
|
155
|
-
data = Twilio::Values.of({
|
156
|
-
'Track' => track,
|
157
|
-
'Publisher' => publisher,
|
158
|
-
'Kind' => kind,
|
159
|
-
'Status' => status,
|
160
|
-
})
|
161
|
-
|
162
|
-
payload = @version.update(
|
163
|
-
'POST',
|
164
|
-
@uri,
|
165
|
-
data: data,
|
166
|
-
)
|
167
|
-
|
168
|
-
SubscribedTrackInstance.new(
|
169
|
-
@version,
|
170
|
-
payload,
|
171
|
-
room_sid: @solution[:room_sid],
|
172
|
-
subscriber_sid: @solution[:subscriber_sid],
|
173
|
-
)
|
174
|
-
end
|
175
|
-
|
176
113
|
##
|
177
114
|
# Provide a user friendly representation
|
178
115
|
def to_s
|
@@ -203,7 +140,7 @@ module Twilio
|
|
203
140
|
@version,
|
204
141
|
payload,
|
205
142
|
room_sid: @solution[:room_sid],
|
206
|
-
|
143
|
+
participant_sid: @solution[:participant_sid],
|
207
144
|
)
|
208
145
|
end
|
209
146
|
|
@@ -214,95 +151,192 @@ module Twilio
|
|
214
151
|
end
|
215
152
|
end
|
216
153
|
|
154
|
+
class SubscribedTrackContext < InstanceContext
|
155
|
+
##
|
156
|
+
# Initialize the SubscribedTrackContext
|
157
|
+
# @param [Version] version Version that contains the resource
|
158
|
+
# @param [String] room_sid Unique Room identifier where this Track is subscribed.
|
159
|
+
# @param [String] participant_sid Unique Participant identifier that subscribes to
|
160
|
+
# this Track.
|
161
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
162
|
+
# resource.
|
163
|
+
# @return [SubscribedTrackContext] SubscribedTrackContext
|
164
|
+
def initialize(version, room_sid, participant_sid, sid)
|
165
|
+
super(version)
|
166
|
+
|
167
|
+
# Path Solution
|
168
|
+
@solution = {room_sid: room_sid, participant_sid: participant_sid, sid: sid, }
|
169
|
+
@uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:participant_sid]}/SubscribedTracks/#{@solution[:sid]}"
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# Fetch a SubscribedTrackInstance
|
174
|
+
# @return [SubscribedTrackInstance] Fetched SubscribedTrackInstance
|
175
|
+
def fetch
|
176
|
+
params = Twilio::Values.of({})
|
177
|
+
|
178
|
+
payload = @version.fetch(
|
179
|
+
'GET',
|
180
|
+
@uri,
|
181
|
+
params,
|
182
|
+
)
|
183
|
+
|
184
|
+
SubscribedTrackInstance.new(
|
185
|
+
@version,
|
186
|
+
payload,
|
187
|
+
room_sid: @solution[:room_sid],
|
188
|
+
participant_sid: @solution[:participant_sid],
|
189
|
+
sid: @solution[:sid],
|
190
|
+
)
|
191
|
+
end
|
192
|
+
|
193
|
+
##
|
194
|
+
# Provide a user friendly representation
|
195
|
+
def to_s
|
196
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
197
|
+
"#<Twilio.Video.V1.SubscribedTrackContext #{context}>"
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Provide a detailed, user friendly representation
|
202
|
+
def inspect
|
203
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
204
|
+
"#<Twilio.Video.V1.SubscribedTrackContext #{context}>"
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
217
208
|
class SubscribedTrackInstance < InstanceResource
|
218
209
|
##
|
219
210
|
# Initialize the SubscribedTrackInstance
|
220
211
|
# @param [Version] version Version that contains the resource
|
221
212
|
# @param [Hash] payload payload that contains response from Twilio
|
222
|
-
# @param [String] room_sid
|
223
|
-
# @param [String]
|
213
|
+
# @param [String] room_sid Unique Room identifier where this Track is published.
|
214
|
+
# @param [String] participant_sid Unique Participant identifier that subscribes to
|
215
|
+
# this Track.
|
216
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
217
|
+
# resource.
|
224
218
|
# @return [SubscribedTrackInstance] SubscribedTrackInstance
|
225
|
-
def initialize(version, payload, room_sid: nil,
|
219
|
+
def initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil)
|
226
220
|
super(version)
|
227
221
|
|
228
222
|
# Marshaled Properties
|
229
223
|
@properties = {
|
230
224
|
'sid' => payload['sid'],
|
225
|
+
'participant_sid' => payload['participant_sid'],
|
226
|
+
'publisher_sid' => payload['publisher_sid'],
|
231
227
|
'room_sid' => payload['room_sid'],
|
232
228
|
'name' => payload['name'],
|
233
|
-
'publisher_sid' => payload['publisher_sid'],
|
234
|
-
'subscriber_sid' => payload['subscriber_sid'],
|
235
229
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
236
230
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
237
231
|
'enabled' => payload['enabled'],
|
238
232
|
'kind' => payload['kind'],
|
233
|
+
'url' => payload['url'],
|
234
|
+
}
|
235
|
+
|
236
|
+
# Context
|
237
|
+
@instance_context = nil
|
238
|
+
@params = {
|
239
|
+
'room_sid' => room_sid,
|
240
|
+
'participant_sid' => participant_sid,
|
241
|
+
'sid' => sid || @properties['sid'],
|
239
242
|
}
|
240
243
|
end
|
241
244
|
|
242
245
|
##
|
243
|
-
#
|
244
|
-
|
245
|
-
|
246
|
+
# Generate an instance context for the instance, the context is capable of
|
247
|
+
# performing various actions. All instance actions are proxied to the context
|
248
|
+
# @return [SubscribedTrackContext] SubscribedTrackContext for this SubscribedTrackInstance
|
249
|
+
def context
|
250
|
+
unless @instance_context
|
251
|
+
@instance_context = SubscribedTrackContext.new(
|
252
|
+
@version,
|
253
|
+
@params['room_sid'],
|
254
|
+
@params['participant_sid'],
|
255
|
+
@params['sid'],
|
256
|
+
)
|
257
|
+
end
|
258
|
+
@instance_context
|
246
259
|
end
|
247
260
|
|
248
261
|
##
|
249
|
-
# @return [String]
|
250
|
-
def
|
251
|
-
@properties['
|
262
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
263
|
+
def sid
|
264
|
+
@properties['sid']
|
252
265
|
end
|
253
266
|
|
254
267
|
##
|
255
|
-
# @return [String]
|
256
|
-
def
|
257
|
-
@properties['
|
268
|
+
# @return [String] Unique Participant identifier that subscribes to this Track.
|
269
|
+
def participant_sid
|
270
|
+
@properties['participant_sid']
|
258
271
|
end
|
259
272
|
|
260
273
|
##
|
261
|
-
# @return [String]
|
274
|
+
# @return [String] Unique Participant identifier that publishes this Track.
|
262
275
|
def publisher_sid
|
263
276
|
@properties['publisher_sid']
|
264
277
|
end
|
265
278
|
|
266
279
|
##
|
267
|
-
# @return [String]
|
268
|
-
def
|
269
|
-
@properties['
|
280
|
+
# @return [String] Unique Room identifier where this Track is published.
|
281
|
+
def room_sid
|
282
|
+
@properties['room_sid']
|
270
283
|
end
|
271
284
|
|
272
285
|
##
|
273
|
-
# @return [
|
286
|
+
# @return [String] Track name. Limited to 128 characters.
|
287
|
+
def name
|
288
|
+
@properties['name']
|
289
|
+
end
|
290
|
+
|
291
|
+
##
|
292
|
+
# @return [Time] The date that this resource was created.
|
274
293
|
def date_created
|
275
294
|
@properties['date_created']
|
276
295
|
end
|
277
296
|
|
278
297
|
##
|
279
|
-
# @return [Time] The
|
298
|
+
# @return [Time] The date that this resource was last updated.
|
280
299
|
def date_updated
|
281
300
|
@properties['date_updated']
|
282
301
|
end
|
283
302
|
|
284
303
|
##
|
285
|
-
# @return [Boolean]
|
304
|
+
# @return [Boolean] Specifies whether the Track is enabled or not.
|
286
305
|
def enabled
|
287
306
|
@properties['enabled']
|
288
307
|
end
|
289
308
|
|
290
309
|
##
|
291
|
-
# @return [subscribed_track.Kind]
|
310
|
+
# @return [subscribed_track.Kind] Specifies whether Track represents `audio`, `video` or `data`
|
292
311
|
def kind
|
293
312
|
@properties['kind']
|
294
313
|
end
|
295
314
|
|
315
|
+
##
|
316
|
+
# @return [String] The absolute URL for this resource.
|
317
|
+
def url
|
318
|
+
@properties['url']
|
319
|
+
end
|
320
|
+
|
321
|
+
##
|
322
|
+
# Fetch a SubscribedTrackInstance
|
323
|
+
# @return [SubscribedTrackInstance] Fetched SubscribedTrackInstance
|
324
|
+
def fetch
|
325
|
+
context.fetch
|
326
|
+
end
|
327
|
+
|
296
328
|
##
|
297
329
|
# Provide a user friendly representation
|
298
330
|
def to_s
|
299
|
-
"
|
331
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
332
|
+
"<Twilio.Video.V1.SubscribedTrackInstance #{values}>"
|
300
333
|
end
|
301
334
|
|
302
335
|
##
|
303
336
|
# Provide a detailed, user friendly representation
|
304
337
|
def inspect
|
305
|
-
"
|
338
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
339
|
+
"<Twilio.Video.V1.SubscribedTrackInstance #{values}>"
|
306
340
|
end
|
307
341
|
end
|
308
342
|
end
|
@@ -182,7 +182,7 @@ module Twilio
|
|
182
182
|
'last_updated' => Twilio.deserialize_iso8601_datetime(payload['last_updated']),
|
183
183
|
'start' => Twilio.deserialize_iso8601_datetime(payload['start']),
|
184
184
|
'end_' => Twilio.deserialize_iso8601_datetime(payload['end']),
|
185
|
-
'
|
185
|
+
'imei' => payload['imei'],
|
186
186
|
}
|
187
187
|
end
|
188
188
|
|
@@ -278,8 +278,8 @@ module Twilio
|
|
278
278
|
|
279
279
|
##
|
280
280
|
# @return [String] The unique id of the device using the SIM to connect.
|
281
|
-
def
|
282
|
-
@properties['
|
281
|
+
def imei
|
282
|
+
@properties['imei']
|
283
283
|
end
|
284
284
|
|
285
285
|
##
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -25,13 +25,69 @@ describe 'Conference' do
|
|
25
25
|
))).to eq(true)
|
26
26
|
end
|
27
27
|
|
28
|
-
it "receives
|
28
|
+
it "receives fetch_valid_mixer_zone responses" do
|
29
29
|
@holodeck.mock(Twilio::Response.new(
|
30
30
|
200,
|
31
31
|
%q[
|
32
32
|
{
|
33
33
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
-
"api_version": "
|
34
|
+
"api_version": "2010-04-01",
|
35
|
+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
|
36
|
+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
|
37
|
+
"friendly_name": "AHH YEAH",
|
38
|
+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
39
|
+
"region": "us1",
|
40
|
+
"status": "completed",
|
41
|
+
"subresource_uris": {
|
42
|
+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
43
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
44
|
+
},
|
45
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
46
|
+
}
|
47
|
+
]
|
48
|
+
))
|
49
|
+
|
50
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
51
|
+
.conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
52
|
+
|
53
|
+
expect(actual).to_not eq(nil)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "receives fetch_valid_region_in_progress responses" do
|
57
|
+
@holodeck.mock(Twilio::Response.new(
|
58
|
+
200,
|
59
|
+
%q[
|
60
|
+
{
|
61
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
62
|
+
"api_version": "2010-04-01",
|
63
|
+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
|
64
|
+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
|
65
|
+
"friendly_name": "AHH YEAH",
|
66
|
+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
67
|
+
"region": "au1",
|
68
|
+
"status": "in-progress",
|
69
|
+
"subresource_uris": {
|
70
|
+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
71
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
72
|
+
},
|
73
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
74
|
+
}
|
75
|
+
]
|
76
|
+
))
|
77
|
+
|
78
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
79
|
+
.conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
80
|
+
|
81
|
+
expect(actual).to_not eq(nil)
|
82
|
+
end
|
83
|
+
|
84
|
+
it "receives fetch_without_mixer_zone_integer_status responses" do
|
85
|
+
@holodeck.mock(Twilio::Response.new(
|
86
|
+
200,
|
87
|
+
%q[
|
88
|
+
{
|
89
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
90
|
+
"api_version": "2010-04-01",
|
35
91
|
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
|
36
92
|
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
|
37
93
|
"friendly_name": "AHH YEAH",
|
@@ -53,6 +109,34 @@ describe 'Conference' do
|
|
53
109
|
expect(actual).to_not eq(nil)
|
54
110
|
end
|
55
111
|
|
112
|
+
it "receives fetch_unknown_mixer_zone_init_integer_status responses" do
|
113
|
+
@holodeck.mock(Twilio::Response.new(
|
114
|
+
200,
|
115
|
+
%q[
|
116
|
+
{
|
117
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
118
|
+
"api_version": "2010-04-01",
|
119
|
+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
|
120
|
+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
|
121
|
+
"friendly_name": "AHH YEAH",
|
122
|
+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
123
|
+
"region": "unknown",
|
124
|
+
"status": "init",
|
125
|
+
"subresource_uris": {
|
126
|
+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
127
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
128
|
+
},
|
129
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
))
|
133
|
+
|
134
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
135
|
+
.conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
136
|
+
|
137
|
+
expect(actual).to_not eq(nil)
|
138
|
+
end
|
139
|
+
|
56
140
|
it "can read" do
|
57
141
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
58
142
|
|