twilio-ruby 5.23.1 → 5.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +30 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
  5. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +26 -0
  6. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +437 -0
  7. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  8. data/lib/twilio-ruby/rest/insights/v1/summary.rb +7 -0
  9. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +61 -5
  10. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -19
  11. data/lib/twilio-ruby/rest/sync.rb +1 -1
  12. data/lib/twilio-ruby/rest/sync/v1.rb +1 -1
  13. data/lib/twilio-ruby/rest/sync/v1/service.rb +62 -6
  14. data/lib/twilio-ruby/rest/verify/v2/service.rb +26 -0
  15. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +416 -0
  16. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +424 -0
  17. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +6 -1
  18. data/lib/twilio-ruby/twiml/voice_response.rb +3 -3
  19. data/lib/twilio-ruby/version.rb +1 -1
  20. data/spec/integration/api/v2010/account/conference/participant_spec.rb +142 -15
  21. data/spec/integration/api/v2010/account/conference_spec.rb +190 -20
  22. data/spec/integration/api/v2010/account/message_spec.rb +125 -51
  23. data/spec/integration/autopilot/v1/assistant/webhook_spec.rb +246 -0
  24. data/spec/integration/autopilot/v1/assistant_spec.rb +8 -4
  25. data/spec/integration/flex_api/v1/configuration_spec.rb +48 -0
  26. data/spec/integration/insights/v1/summary_spec.rb +1 -0
  27. data/spec/integration/preview/trusted_comms/current_call_spec.rb +9 -1
  28. data/spec/integration/sync/v1/service_spec.rb +12 -4
  29. data/spec/integration/verify/v2/service/rate_limit/bucket_spec.rb +249 -0
  30. data/spec/integration/verify/v2/service/rate_limit_spec.rb +221 -0
  31. data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
  32. data/spec/integration/verify/v2/service_spec.rb +8 -4
  33. metadata +11 -2
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.23.1'
2
+ VERSION = '5.24.0'
3
3
  end
@@ -282,36 +282,76 @@ describe 'Participant' do
282
282
  ))).to eq(true)
283
283
  end
284
284
 
285
- it "receives read_full responses" do
285
+ it "receives read_empty responses" do
286
286
  @holodeck.mock(Twilio::Response.new(
287
287
  200,
288
288
  %q[
289
289
  {
290
- "end": 0,
291
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Page=0&PageSize=50",
290
+ "participants": [],
291
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Hold=True&PageSize=50&Page=0",
292
292
  "next_page_uri": null,
293
+ "previous_page_uri": null,
294
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Hold=True&PageSize=50&Page=0",
293
295
  "page": 0,
294
296
  "page_size": 50,
297
+ "end": 0,
298
+ "start": 0
299
+ }
300
+ ]
301
+ ))
302
+
303
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
304
+ .conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
305
+ .participants.list()
306
+
307
+ expect(actual).to_not eq(nil)
308
+ end
309
+
310
+ it "receives read_full responses" do
311
+ @holodeck.mock(Twilio::Response.new(
312
+ 200,
313
+ %q[
314
+ {
295
315
  "participants": [
296
316
  {
297
317
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
298
318
  "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
299
319
  "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
300
- "date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
301
- "date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
320
+ "date_created": "Sat, 19 Feb 2011 21:07:19 +0000",
321
+ "date_updated": "Sat, 19 Feb 2011 21:07:19 +0000",
302
322
  "end_conference_on_exit": false,
303
- "muted": false,
323
+ "muted": true,
304
324
  "hold": false,
305
- "status": "complete",
325
+ "status": "connected",
306
326
  "start_conference_on_enter": true,
307
327
  "coaching": true,
308
328
  "call_sid_to_coach": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
309
329
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
330
+ },
331
+ {
332
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
333
+ "call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
334
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
335
+ "date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
336
+ "date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
337
+ "end_conference_on_exit": false,
338
+ "muted": true,
339
+ "hold": false,
340
+ "status": "connected",
341
+ "start_conference_on_enter": true,
342
+ "coaching": false,
343
+ "call_sid_to_coach": null,
344
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json"
310
345
  }
311
346
  ],
347
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0",
348
+ "next_page_uri": null,
312
349
  "previous_page_uri": null,
350
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0",
351
+ "page": 0,
352
+ "page_size": 2,
313
353
  "start": 0,
314
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json"
354
+ "end": 1
315
355
  }
316
356
  ]
317
357
  ))
@@ -323,20 +363,107 @@ describe 'Participant' do
323
363
  expect(actual).to_not eq(nil)
324
364
  end
325
365
 
326
- it "receives read_empty responses" do
366
+ it "receives read_next responses" do
327
367
  @holodeck.mock(Twilio::Response.new(
328
368
  200,
329
369
  %q[
330
370
  {
331
- "end": 0,
332
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Page=0&PageSize=50",
371
+ "participants": [
372
+ {
373
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
374
+ "call_sid": "CAcccccccccccccccccccccccccccccccc",
375
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
376
+ "date_created": "Thu, 17 Feb 2011 21:07:19 +0000",
377
+ "date_updated": "Thu, 17 Feb 2011 21:07:19 +0000",
378
+ "end_conference_on_exit": false,
379
+ "muted": true,
380
+ "hold": false,
381
+ "status": "connected",
382
+ "start_conference_on_enter": true,
383
+ "coaching": false,
384
+ "call_sid_to_coach": null,
385
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAcccccccccccccccccccccccccccccccc.json"
386
+ },
387
+ {
388
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
389
+ "call_sid": "CAdddddddddddddddddddddddddddddddd",
390
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
391
+ "date_created": "Wed, 16 Feb 2011 21:07:19 +0000",
392
+ "date_updated": "Wed, 16 Feb 2011 21:07:19 +0000",
393
+ "end_conference_on_exit": false,
394
+ "muted": true,
395
+ "hold": false,
396
+ "status": "connected",
397
+ "start_conference_on_enter": true,
398
+ "coaching": false,
399
+ "call_sid_to_coach": null,
400
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAdddddddddddddddddddddddddddddddd.json"
401
+ }
402
+ ],
403
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0",
404
+ "next_page_uri": null,
405
+ "previous_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0&PageToken=PBCPcccccccccccccccccccccccccccccccc",
406
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=1&PageToken=PACPbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
407
+ "page": 1,
408
+ "page_size": 2,
409
+ "start": 2,
410
+ "end": 3
411
+ }
412
+ ]
413
+ ))
414
+
415
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
416
+ .conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
417
+ .participants.list()
418
+
419
+ expect(actual).to_not eq(nil)
420
+ end
421
+
422
+ it "receives read_previous responses" do
423
+ @holodeck.mock(Twilio::Response.new(
424
+ 200,
425
+ %q[
426
+ {
427
+ "participants": [
428
+ {
429
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
430
+ "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
431
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
432
+ "date_created": "Sat, 19 Feb 2011 21:07:19 +0000",
433
+ "date_updated": "Sat, 19 Feb 2011 21:07:19 +0000",
434
+ "end_conference_on_exit": false,
435
+ "muted": true,
436
+ "hold": false,
437
+ "status": "connected",
438
+ "start_conference_on_enter": true,
439
+ "coaching": true,
440
+ "call_sid_to_coach": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
441
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
442
+ },
443
+ {
444
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
445
+ "call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
446
+ "conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
447
+ "date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
448
+ "date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
449
+ "end_conference_on_exit": false,
450
+ "muted": true,
451
+ "hold": false,
452
+ "status": "connected",
453
+ "start_conference_on_enter": true,
454
+ "coaching": false,
455
+ "call_sid_to_coach": null,
456
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json"
457
+ }
458
+ ],
459
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0",
333
460
  "next_page_uri": null,
334
- "page": 0,
335
- "page_size": 50,
336
- "participants": [],
337
461
  "previous_page_uri": null,
462
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json?Muted=true&PageSize=2&Page=0&PageToken=PBCPcccccccccccccccccccccccccccccccc",
463
+ "page": 0,
464
+ "page_size": 2,
338
465
  "start": 0,
339
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json"
466
+ "end": 1
340
467
  }
341
468
  ]
342
469
  ))
@@ -153,6 +153,30 @@ describe 'Conference' do
153
153
  ))).to eq(true)
154
154
  end
155
155
 
156
+ it "receives read_empty responses" do
157
+ @holodeck.mock(Twilio::Response.new(
158
+ 200,
159
+ %q[
160
+ {
161
+ "conferences": [],
162
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=init&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=50&Page=0",
163
+ "next_page_uri": null,
164
+ "previous_page_uri": null,
165
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=init&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=50&Page=0",
166
+ "page": 0,
167
+ "page_size": 50,
168
+ "start": 0,
169
+ "end": 0
170
+ }
171
+ ]
172
+ ))
173
+
174
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
175
+ .conferences.list()
176
+
177
+ expect(actual).to_not eq(nil)
178
+ end
179
+
156
180
  it "receives read_full responses" do
157
181
  @holodeck.mock(Twilio::Response.new(
158
182
  200,
@@ -160,29 +184,59 @@ describe 'Conference' do
160
184
  {
161
185
  "conferences": [
162
186
  {
163
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
164
- "api_version": "2010-04-01",
165
- "date_created": "Mon, 22 Aug 2011 20:58:45 +0000",
166
- "date_updated": "Mon, 22 Aug 2011 20:58:46 +0000",
167
- "friendly_name": null,
168
- "region": "us1",
169
- "sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170
187
  "status": "in-progress",
188
+ "region": "jp1",
189
+ "sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190
+ "date_updated": "Sat, 03 Jan 2015 11:23:45 +0000",
191
+ "date_created": "Sat, 03 Jan 2015 11:23:45 +0000",
171
192
  "subresource_uris": {
172
193
  "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
173
194
  "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
174
195
  },
175
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
196
+ "friendly_name": "friendly_name",
197
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
198
+ "api_version": "2010-04-01",
199
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
200
+ },
201
+ {
202
+ "status": "in-progress",
203
+ "region": "unknown",
204
+ "sid": "CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
205
+ "date_updated": "Fri, 02 Jan 2015 11:23:45 +0000",
206
+ "date_created": "Fri, 02 Jan 2015 11:23:45 +0000",
207
+ "subresource_uris": {
208
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/Participants.json",
209
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/Recordings.json"
210
+ },
211
+ "friendly_name": "friendly_name",
212
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json",
213
+ "api_version": "2010-04-01",
214
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
215
+ },
216
+ {
217
+ "status": "in-progress",
218
+ "region": "us1",
219
+ "sid": "CFcccccccccccccccccccccccccccccccc",
220
+ "date_updated": "Thu, 01 Jan 2015 11:23:45 +0000",
221
+ "date_created": "Thu, 01 Jan 2015 11:23:45 +0000",
222
+ "subresource_uris": {
223
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc/Participants.json",
224
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc/Recordings.json"
225
+ },
226
+ "friendly_name": "friendly_name",
227
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc.json",
228
+ "api_version": "2010-04-01",
229
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
176
230
  }
177
231
  ],
178
- "end": 0,
179
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?PageSize=1&Page=0",
232
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
180
233
  "next_page_uri": null,
181
- "page": 0,
182
- "page_size": 1,
183
234
  "previous_page_uri": null,
235
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
236
+ "page": 0,
237
+ "page_size": 3,
184
238
  "start": 0,
185
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?PageSize=1"
239
+ "end": 2
186
240
  }
187
241
  ]
188
242
  ))
@@ -193,20 +247,136 @@ describe 'Conference' do
193
247
  expect(actual).to_not eq(nil)
194
248
  end
195
249
 
196
- it "receives read_empty responses" do
250
+ it "receives read_next responses" do
197
251
  @holodeck.mock(Twilio::Response.new(
198
252
  200,
199
253
  %q[
200
254
  {
201
- "conferences": [],
202
- "end": 0,
203
- "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?PageSize=1&Page=0",
255
+ "conferences": [
256
+ {
257
+ "status": "in-progress",
258
+ "region": "jp1",
259
+ "sid": "CFdddddddddddddddddddddddddddddddd",
260
+ "date_updated": "Thu, 01 Jan 2015 10:23:45 +0000",
261
+ "date_created": "Thu, 01 Jan 2015 10:23:45 +0000",
262
+ "subresource_uris": {
263
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFdddddddddddddddddddddddddddddddd/Participants.json",
264
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFdddddddddddddddddddddddddddddddd/Recordings.json"
265
+ },
266
+ "friendly_name": "friendly_name",
267
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFdddddddddddddddddddddddddddddddd.json",
268
+ "api_version": "2010-04-01",
269
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
270
+ },
271
+ {
272
+ "status": "in-progress",
273
+ "region": "unknown",
274
+ "sid": "CFeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
275
+ "date_updated": "Thu, 01 Jan 2015 09:23:45 +0000",
276
+ "date_created": "Thu, 01 Jan 2015 09:23:45 +0000",
277
+ "subresource_uris": {
278
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/Participants.json",
279
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/Recordings.json"
280
+ },
281
+ "friendly_name": "friendly_name",
282
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.json",
283
+ "api_version": "2010-04-01",
284
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
285
+ },
286
+ {
287
+ "status": "in-progress",
288
+ "region": "us1",
289
+ "sid": "CFffffffffffffffffffffffffffffffff",
290
+ "date_updated": "Thu, 01 Jan 2015 08:23:45 +0000",
291
+ "date_created": "Thu, 01 Jan 2015 08:23:45 +0000",
292
+ "subresource_uris": {
293
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFffffffffffffffffffffffffffffffff/Participants.json",
294
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFffffffffffffffffffffffffffffffff/Recordings.json"
295
+ },
296
+ "friendly_name": "friendly_name",
297
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFffffffffffffffffffffffffffffffff.json",
298
+ "api_version": "2010-04-01",
299
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
300
+ }
301
+ ],
302
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
303
+ "next_page_uri": null,
304
+ "previous_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0&PageToken=PBCFdddddddddddddddddddddddddddddddd",
305
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=1&PageToken=PACFcccccccccccccccccccccccccccccccc",
306
+ "page": 1,
307
+ "page_size": 3,
308
+ "start": 3,
309
+ "end": 5
310
+ }
311
+ ]
312
+ ))
313
+
314
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
315
+ .conferences.list()
316
+
317
+ expect(actual).to_not eq(nil)
318
+ end
319
+
320
+ it "receives read_previous responses" do
321
+ @holodeck.mock(Twilio::Response.new(
322
+ 200,
323
+ %q[
324
+ {
325
+ "conferences": [
326
+ {
327
+ "status": "in-progress",
328
+ "region": "jp1",
329
+ "sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
330
+ "date_updated": "Sat, 03 Jan 2015 11:23:45 +0000",
331
+ "date_created": "Sat, 03 Jan 2015 11:23:45 +0000",
332
+ "subresource_uris": {
333
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
334
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
335
+ },
336
+ "friendly_name": "friendly_name",
337
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
338
+ "api_version": "2010-04-01",
339
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
340
+ },
341
+ {
342
+ "status": "in-progress",
343
+ "region": "unknown",
344
+ "sid": "CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
345
+ "date_updated": "Fri, 02 Jan 2015 11:23:45 +0000",
346
+ "date_created": "Fri, 02 Jan 2015 11:23:45 +0000",
347
+ "subresource_uris": {
348
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/Participants.json",
349
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/Recordings.json"
350
+ },
351
+ "friendly_name": "friendly_name",
352
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json",
353
+ "api_version": "2010-04-01",
354
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
355
+ },
356
+ {
357
+ "status": "in-progress",
358
+ "region": "us1",
359
+ "sid": "CFcccccccccccccccccccccccccccccccc",
360
+ "date_updated": "Thu, 01 Jan 2015 11:23:45 +0000",
361
+ "date_created": "Thu, 01 Jan 2015 11:23:45 +0000",
362
+ "subresource_uris": {
363
+ "participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc/Participants.json",
364
+ "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc/Recordings.json"
365
+ },
366
+ "friendly_name": "friendly_name",
367
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc.json",
368
+ "api_version": "2010-04-01",
369
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
370
+ }
371
+ ],
372
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
204
373
  "next_page_uri": null,
205
- "page": 0,
206
- "page_size": 1,
207
374
  "previous_page_uri": null,
375
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0&PageToken=PBCFdddddddddddddddddddddddddddddddd",
376
+ "page": 0,
377
+ "page_size": 3,
208
378
  "start": 0,
209
- "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?PageSize=1"
379
+ "end": 2
210
380
  }
211
381
  ]
212
382
  ))