twilio-ruby 5.0.0.rc24 → 5.0.0.rc25

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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +32 -12
  3. data/LICENSE.md +12 -12
  4. data/README.md +28 -29
  5. data/examples/examples.rb +47 -58
  6. data/examples/print-call-log.rb +6 -6
  7. data/lib/twilio-ruby/jwt/jwt.rb +2 -2
  8. data/lib/twilio-ruby/rest/accounts/v1.rb +3 -1
  9. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +4 -1
  10. data/lib/twilio-ruby/rest/api/v2010.rb +3 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account.rb +80 -23
  12. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +2 -1
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +6 -3
  14. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -4
  15. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +10 -0
  16. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -1
  17. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -4
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +4 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -2
  20. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +4 -1
  21. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +18 -2
  22. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +4 -1
  23. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +14 -4
  24. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +4 -1
  25. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +8 -2
  26. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +4 -1
  27. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +6 -2
  28. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +16 -8
  29. data/lib/twilio-ruby/rest/chat/v1.rb +6 -2
  30. data/lib/twilio-ruby/rest/chat/v1/service.rb +12 -3
  31. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +12 -3
  32. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +2 -1
  33. data/lib/twilio-ruby/rest/chat/v2.rb +6 -2
  34. data/lib/twilio-ruby/rest/chat/v2/service.rb +12 -3
  35. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +12 -3
  36. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -1
  37. data/lib/twilio-ruby/rest/fax/v1.rb +3 -1
  38. data/lib/twilio-ruby/rest/fax/v1/fax.rb +4 -1
  39. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -2
  40. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +12 -3
  41. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +12 -3
  42. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +2 -1
  43. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -2
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +12 -3
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +12 -3
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -1
  47. data/lib/twilio-ruby/rest/lookups/v1.rb +3 -1
  48. data/lib/twilio-ruby/rest/messaging/v1.rb +3 -1
  49. data/lib/twilio-ruby/rest/messaging/v1/service.rb +26 -6
  50. data/lib/twilio-ruby/rest/monitor/v1.rb +6 -2
  51. data/lib/twilio-ruby/rest/notify/v1.rb +6 -2
  52. data/lib/twilio-ruby/rest/notify/v1/service.rb +12 -4
  53. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -1
  54. data/lib/twilio-ruby/rest/notify/v1/service/user.rb +8 -2
  55. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +6 -2
  56. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +2 -1
  57. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +3 -1
  58. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +18 -12
  59. data/lib/twilio-ruby/rest/preview/marketplace.rb +6 -2
  60. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +4 -1
  61. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +4 -1
  62. data/lib/twilio-ruby/rest/preview/proxy.rb +3 -1
  63. data/lib/twilio-ruby/rest/preview/proxy/service.rb +12 -3
  64. data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +8 -2
  65. data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +4 -1
  66. data/lib/twilio-ruby/rest/preview/sync.rb +3 -1
  67. data/lib/twilio-ruby/rest/preview/sync/service.rb +12 -3
  68. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -1
  69. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +8 -2
  70. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +8 -2
  71. data/lib/twilio-ruby/rest/preview/wireless.rb +9 -3
  72. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +2 -1
  73. data/lib/twilio-ruby/rest/pricing/v1.rb +9 -3
  74. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +4 -1
  75. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +4 -1
  76. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +8 -2
  77. data/lib/twilio-ruby/rest/sync/v1.rb +3 -1
  78. data/lib/twilio-ruby/rest/sync/v1/service.rb +12 -3
  79. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +4 -1
  80. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +8 -2
  81. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +8 -2
  82. data/lib/twilio-ruby/rest/taskrouter/v1.rb +3 -1
  83. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -8
  84. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +4 -1
  85. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +4 -2
  86. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +12 -4
  87. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +2 -1
  88. data/lib/twilio-ruby/rest/trunking/v1.rb +3 -1
  89. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +16 -4
  90. data/lib/twilio-ruby/rest/video/v1.rb +6 -2
  91. data/lib/twilio-ruby/rest/video/v1/recording.rb +17 -3
  92. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -1
  93. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +31 -3
  94. data/lib/twilio-ruby/rest/wireless/v1.rb +9 -3
  95. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +16 -1
  96. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -1
  97. data/lib/twilio-ruby/twiml/messaging_response.rb +8 -2
  98. data/lib/twilio-ruby/twiml/twiml.rb +3 -5
  99. data/lib/twilio-ruby/twiml/voice_response.rb +60 -42
  100. data/lib/twilio-ruby/version.rb +1 -1
  101. data/spec/integration/api/v2010/account/call/recording_spec.rb +14 -2
  102. data/spec/integration/api/v2010/account/recording_spec.rb +14 -2
  103. data/spec/integration/messaging/v1/service/phone_number_spec.rb +28 -0
  104. data/spec/integration/messaging/v1/service_spec.rb +4 -0
  105. data/spec/integration/notify/v1/service/notification_spec.rb +35 -0
  106. data/spec/integration/video/v1/recording_spec.rb +45 -0
  107. data/spec/integration/video/v1/room/recording_spec.rb +4 -3
  108. data/spec/integration/wireless/v1/rate_plan_spec.rb +8 -0
  109. data/spec/twiml/messaging_response_spec.rb +28 -0
  110. data/spec/twiml/voice_response_spec.rb +9 -0
  111. metadata +2 -2
@@ -259,8 +259,11 @@ module Twilio
259
259
 
260
260
  ##
261
261
  # Access the document_permissions
262
- # @return [DocumentPermissionList] DocumentPermissionList
262
+ # @return [DocumentPermissionList] if a(n) DocumentPermissionList object was created.
263
+ # @return [DocumentPermissionContext] if a(n) DocumentPermissionContext object was created.
263
264
  def document_permissions(identity=:unset)
265
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
266
+
264
267
  if identity != :unset
265
268
  return DocumentPermissionContext.new(
266
269
  @version,
@@ -235,8 +235,11 @@ module Twilio
235
235
 
236
236
  ##
237
237
  # Access the sync_list_items
238
- # @return [SyncListItemList] SyncListItemList
238
+ # @return [SyncListItemList] if a(n) SyncListItemList object was created.
239
+ # @return [SyncListItemContext] if a(n) SyncListItemContext object was created.
239
240
  def sync_list_items(index=:unset)
241
+ raise ArgumentError, 'index cannot be nil' if index.nil?
242
+
240
243
  if index != :unset
241
244
  return SyncListItemContext.new(
242
245
  @version,
@@ -259,8 +262,11 @@ module Twilio
259
262
 
260
263
  ##
261
264
  # Access the sync_list_permissions
262
- # @return [SyncListPermissionList] SyncListPermissionList
265
+ # @return [SyncListPermissionList] if a(n) SyncListPermissionList object was created.
266
+ # @return [SyncListPermissionContext] if a(n) SyncListPermissionContext object was created.
263
267
  def sync_list_permissions(identity=:unset)
268
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
269
+
264
270
  if identity != :unset
265
271
  return SyncListPermissionContext.new(
266
272
  @version,
@@ -235,8 +235,11 @@ module Twilio
235
235
 
236
236
  ##
237
237
  # Access the sync_map_items
238
- # @return [SyncMapItemList] SyncMapItemList
238
+ # @return [SyncMapItemList] if a(n) SyncMapItemList object was created.
239
+ # @return [SyncMapItemContext] if a(n) SyncMapItemContext object was created.
239
240
  def sync_map_items(key=:unset)
241
+ raise ArgumentError, 'key cannot be nil' if key.nil?
242
+
240
243
  if key != :unset
241
244
  return SyncMapItemContext.new(
242
245
  @version,
@@ -259,8 +262,11 @@ module Twilio
259
262
 
260
263
  ##
261
264
  # Access the sync_map_permissions
262
- # @return [SyncMapPermissionList] SyncMapPermissionList
265
+ # @return [SyncMapPermissionList] if a(n) SyncMapPermissionList object was created.
266
+ # @return [SyncMapPermissionContext] if a(n) SyncMapPermissionContext object was created.
263
267
  def sync_map_permissions(identity=:unset)
268
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
269
+
264
270
  if identity != :unset
265
271
  return SyncMapPermissionContext.new(
266
272
  @version,
@@ -19,7 +19,9 @@ module Twilio
19
19
  end
20
20
 
21
21
  def commands(sid=:unset)
22
- if sid == :unset
22
+ if sid.nil?
23
+ raise ArgumentError, 'sid cannot be nil'
24
+ elsif sid == :unset
23
25
  @commands ||= CommandList.new self
24
26
  else
25
27
  CommandContext.new(self, sid)
@@ -27,7 +29,9 @@ module Twilio
27
29
  end
28
30
 
29
31
  def rate_plans(sid=:unset)
30
- if sid == :unset
32
+ if sid.nil?
33
+ raise ArgumentError, 'sid cannot be nil'
34
+ elsif sid == :unset
31
35
  @rate_plans ||= RatePlanList.new self
32
36
  else
33
37
  RatePlanContext.new(self, sid)
@@ -35,7 +39,9 @@ module Twilio
35
39
  end
36
40
 
37
41
  def sims(sid=:unset)
38
- if sid == :unset
42
+ if sid.nil?
43
+ raise ArgumentError, 'sid cannot be nil'
44
+ elsif sid == :unset
39
45
  @sims ||= SimList.new self
40
46
  else
41
47
  SimContext.new(self, sid)
@@ -282,7 +282,8 @@ module Twilio
282
282
 
283
283
  ##
284
284
  # Access the usage
285
- # @return [UsageList] UsageList
285
+ # @return [UsageList] if a(n) UsageList object was created.
286
+ # @return [UsageContext] if a(n) UsageContext object was created.
286
287
  def usage
287
288
  UsageContext.new(
288
289
  @version,
@@ -19,7 +19,9 @@ module Twilio
19
19
  end
20
20
 
21
21
  def messaging(sid=:unset)
22
- if sid == :unset
22
+ if sid.nil?
23
+ raise ArgumentError, 'sid cannot be nil'
24
+ elsif sid == :unset
23
25
  @messaging ||= MessagingList.new self
24
26
  else
25
27
  MessagingContext.new(self, sid)
@@ -27,7 +29,9 @@ module Twilio
27
29
  end
28
30
 
29
31
  def phone_numbers(sid=:unset)
30
- if sid == :unset
32
+ if sid.nil?
33
+ raise ArgumentError, 'sid cannot be nil'
34
+ elsif sid == :unset
31
35
  @phone_numbers ||= PhoneNumberList.new self
32
36
  else
33
37
  PhoneNumberContext.new(self, sid)
@@ -35,7 +39,9 @@ module Twilio
35
39
  end
36
40
 
37
41
  def voice(sid=:unset)
38
- if sid == :unset
42
+ if sid.nil?
43
+ raise ArgumentError, 'sid cannot be nil'
44
+ elsif sid == :unset
39
45
  @voice ||= VoiceList.new self
40
46
  else
41
47
  VoiceContext.new(self, sid)
@@ -26,8 +26,11 @@ module Twilio
26
26
  ##
27
27
  # Access the countries
28
28
  # @param [String] iso_country The iso_country
29
- # @return [CountryList] CountryList
29
+ # @return [CountryList] if a(n) CountryList object was created.
30
+ # @return [CountryContext] if a(n) CountryContext object was created.
30
31
  def countries(iso_country=:unset)
32
+ raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil?
33
+
31
34
  if iso_country != :unset
32
35
  return CountryContext.new(
33
36
  @version,
@@ -26,8 +26,11 @@ module Twilio
26
26
  ##
27
27
  # Access the countries
28
28
  # @param [String] iso_country The iso_country
29
- # @return [CountryList] CountryList
29
+ # @return [CountryList] if a(n) CountryList object was created.
30
+ # @return [CountryContext] if a(n) CountryContext object was created.
30
31
  def countries(iso_country=:unset)
32
+ raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil?
33
+
31
34
  if iso_country != :unset
32
35
  return CountryContext.new(
33
36
  @version,
@@ -27,8 +27,11 @@ module Twilio
27
27
  ##
28
28
  # Access the numbers
29
29
  # @param [String] number The number
30
- # @return [NumberList] NumberList
30
+ # @return [NumberList] if a(n) NumberList object was created.
31
+ # @return [NumberContext] if a(n) NumberContext object was created.
31
32
  def numbers(number=:unset)
33
+ raise ArgumentError, 'number cannot be nil' if number.nil?
34
+
32
35
  if number != :unset
33
36
  return NumberContext.new(
34
37
  @version,
@@ -44,8 +47,11 @@ module Twilio
44
47
  ##
45
48
  # Access the countries
46
49
  # @param [String] iso_country The iso_country
47
- # @return [CountryList] CountryList
50
+ # @return [CountryList] if a(n) CountryList object was created.
51
+ # @return [CountryContext] if a(n) CountryContext object was created.
48
52
  def countries(iso_country=:unset)
53
+ raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil?
54
+
49
55
  if iso_country != :unset
50
56
  return CountryContext.new(
51
57
  @version,
@@ -17,7 +17,9 @@ module Twilio
17
17
  end
18
18
 
19
19
  def services(sid=:unset)
20
- if sid == :unset
20
+ if sid.nil?
21
+ raise ArgumentError, 'sid cannot be nil'
22
+ elsif sid == :unset
21
23
  @services ||= ServiceList.new self
22
24
  else
23
25
  ServiceContext.new(self, sid)
@@ -260,8 +260,11 @@ module Twilio
260
260
 
261
261
  ##
262
262
  # Access the documents
263
- # @return [DocumentList] DocumentList
263
+ # @return [DocumentList] if a(n) DocumentList object was created.
264
+ # @return [DocumentContext] if a(n) DocumentContext object was created.
264
265
  def documents(sid=:unset)
266
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
267
+
265
268
  if sid != :unset
266
269
  return DocumentContext.new(
267
270
  @version,
@@ -282,8 +285,11 @@ module Twilio
282
285
 
283
286
  ##
284
287
  # Access the sync_lists
285
- # @return [SyncListList] SyncListList
288
+ # @return [SyncListList] if a(n) SyncListList object was created.
289
+ # @return [SyncListContext] if a(n) SyncListContext object was created.
286
290
  def sync_lists(sid=:unset)
291
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
292
+
287
293
  if sid != :unset
288
294
  return SyncListContext.new(
289
295
  @version,
@@ -304,8 +310,11 @@ module Twilio
304
310
 
305
311
  ##
306
312
  # Access the sync_maps
307
- # @return [SyncMapList] SyncMapList
313
+ # @return [SyncMapList] if a(n) SyncMapList object was created.
314
+ # @return [SyncMapContext] if a(n) SyncMapContext object was created.
308
315
  def sync_maps(sid=:unset)
316
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
317
+
309
318
  if sid != :unset
310
319
  return SyncMapContext.new(
311
320
  @version,
@@ -259,8 +259,11 @@ module Twilio
259
259
 
260
260
  ##
261
261
  # Access the document_permissions
262
- # @return [DocumentPermissionList] DocumentPermissionList
262
+ # @return [DocumentPermissionList] if a(n) DocumentPermissionList object was created.
263
+ # @return [DocumentPermissionContext] if a(n) DocumentPermissionContext object was created.
263
264
  def document_permissions(identity=:unset)
265
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
266
+
264
267
  if identity != :unset
265
268
  return DocumentPermissionContext.new(
266
269
  @version,
@@ -235,8 +235,11 @@ module Twilio
235
235
 
236
236
  ##
237
237
  # Access the sync_list_items
238
- # @return [SyncListItemList] SyncListItemList
238
+ # @return [SyncListItemList] if a(n) SyncListItemList object was created.
239
+ # @return [SyncListItemContext] if a(n) SyncListItemContext object was created.
239
240
  def sync_list_items(index=:unset)
241
+ raise ArgumentError, 'index cannot be nil' if index.nil?
242
+
240
243
  if index != :unset
241
244
  return SyncListItemContext.new(
242
245
  @version,
@@ -259,8 +262,11 @@ module Twilio
259
262
 
260
263
  ##
261
264
  # Access the sync_list_permissions
262
- # @return [SyncListPermissionList] SyncListPermissionList
265
+ # @return [SyncListPermissionList] if a(n) SyncListPermissionList object was created.
266
+ # @return [SyncListPermissionContext] if a(n) SyncListPermissionContext object was created.
263
267
  def sync_list_permissions(identity=:unset)
268
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
269
+
264
270
  if identity != :unset
265
271
  return SyncListPermissionContext.new(
266
272
  @version,
@@ -235,8 +235,11 @@ module Twilio
235
235
 
236
236
  ##
237
237
  # Access the sync_map_items
238
- # @return [SyncMapItemList] SyncMapItemList
238
+ # @return [SyncMapItemList] if a(n) SyncMapItemList object was created.
239
+ # @return [SyncMapItemContext] if a(n) SyncMapItemContext object was created.
239
240
  def sync_map_items(key=:unset)
241
+ raise ArgumentError, 'key cannot be nil' if key.nil?
242
+
240
243
  if key != :unset
241
244
  return SyncMapItemContext.new(
242
245
  @version,
@@ -259,8 +262,11 @@ module Twilio
259
262
 
260
263
  ##
261
264
  # Access the sync_map_permissions
262
- # @return [SyncMapPermissionList] SyncMapPermissionList
265
+ # @return [SyncMapPermissionList] if a(n) SyncMapPermissionList object was created.
266
+ # @return [SyncMapPermissionContext] if a(n) SyncMapPermissionContext object was created.
263
267
  def sync_map_permissions(identity=:unset)
268
+ raise ArgumentError, 'identity cannot be nil' if identity.nil?
269
+
264
270
  if identity != :unset
265
271
  return SyncMapPermissionContext.new(
266
272
  @version,
@@ -17,7 +17,9 @@ module Twilio
17
17
  end
18
18
 
19
19
  def workspaces(sid=:unset)
20
- if sid == :unset
20
+ if sid.nil?
21
+ raise ArgumentError, 'sid cannot be nil'
22
+ elsif sid == :unset
21
23
  @workspaces ||= WorkspaceList.new self
22
24
  else
23
25
  WorkspaceContext.new(self, sid)
@@ -282,8 +282,11 @@ module Twilio
282
282
 
283
283
  ##
284
284
  # Access the activities
285
- # @return [ActivityList] ActivityList
285
+ # @return [ActivityList] if a(n) ActivityList object was created.
286
+ # @return [ActivityContext] if a(n) ActivityContext object was created.
286
287
  def activities(sid=:unset)
288
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
289
+
287
290
  if sid != :unset
288
291
  return ActivityContext.new(
289
292
  @version,
@@ -304,8 +307,11 @@ module Twilio
304
307
 
305
308
  ##
306
309
  # Access the events
307
- # @return [EventList] EventList
310
+ # @return [EventList] if a(n) EventList object was created.
311
+ # @return [EventContext] if a(n) EventContext object was created.
308
312
  def events(sid=:unset)
313
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
314
+
309
315
  if sid != :unset
310
316
  return EventContext.new(
311
317
  @version,
@@ -326,8 +332,11 @@ module Twilio
326
332
 
327
333
  ##
328
334
  # Access the tasks
329
- # @return [TaskList] TaskList
335
+ # @return [TaskList] if a(n) TaskList object was created.
336
+ # @return [TaskContext] if a(n) TaskContext object was created.
330
337
  def tasks(sid=:unset)
338
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
339
+
331
340
  if sid != :unset
332
341
  return TaskContext.new(
333
342
  @version,
@@ -348,8 +357,11 @@ module Twilio
348
357
 
349
358
  ##
350
359
  # Access the task_queues
351
- # @return [TaskQueueList] TaskQueueList
360
+ # @return [TaskQueueList] if a(n) TaskQueueList object was created.
361
+ # @return [TaskQueueContext] if a(n) TaskQueueContext object was created.
352
362
  def task_queues(sid=:unset)
363
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
364
+
353
365
  if sid != :unset
354
366
  return TaskQueueContext.new(
355
367
  @version,
@@ -370,8 +382,11 @@ module Twilio
370
382
 
371
383
  ##
372
384
  # Access the workers
373
- # @return [WorkerList] WorkerList
385
+ # @return [WorkerList] if a(n) WorkerList object was created.
386
+ # @return [WorkerContext] if a(n) WorkerContext object was created.
374
387
  def workers(sid=:unset)
388
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
389
+
375
390
  if sid != :unset
376
391
  return WorkerContext.new(
377
392
  @version,
@@ -392,8 +407,11 @@ module Twilio
392
407
 
393
408
  ##
394
409
  # Access the workflows
395
- # @return [WorkflowList] WorkflowList
410
+ # @return [WorkflowList] if a(n) WorkflowList object was created.
411
+ # @return [WorkflowContext] if a(n) WorkflowContext object was created.
396
412
  def workflows(sid=:unset)
413
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
414
+
397
415
  if sid != :unset
398
416
  return WorkflowContext.new(
399
417
  @version,
@@ -414,7 +432,8 @@ module Twilio
414
432
 
415
433
  ##
416
434
  # Access the statistics
417
- # @return [WorkspaceStatisticsList] WorkspaceStatisticsList
435
+ # @return [WorkspaceStatisticsList] if a(n) WorkspaceStatisticsList object was created.
436
+ # @return [WorkspaceStatisticsContext] if a(n) WorkspaceStatisticsContext object was created.
418
437
  def statistics
419
438
  WorkspaceStatisticsContext.new(
420
439
  @version,
@@ -424,8 +443,11 @@ module Twilio
424
443
 
425
444
  ##
426
445
  # Access the task_channels
427
- # @return [TaskChannelList] TaskChannelList
446
+ # @return [TaskChannelList] if a(n) TaskChannelList object was created.
447
+ # @return [TaskChannelContext] if a(n) TaskChannelContext object was created.
428
448
  def task_channels(sid=:unset)
449
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
450
+
429
451
  if sid != :unset
430
452
  return TaskChannelContext.new(
431
453
  @version,
@@ -336,8 +336,11 @@ module Twilio
336
336
 
337
337
  ##
338
338
  # Access the reservations
339
- # @return [ReservationList] ReservationList
339
+ # @return [ReservationList] if a(n) ReservationList object was created.
340
+ # @return [ReservationContext] if a(n) ReservationContext object was created.
340
341
  def reservations(sid=:unset)
342
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
343
+
341
344
  if sid != :unset
342
345
  return ReservationContext.new(
343
346
  @version,
@@ -299,7 +299,8 @@ module Twilio
299
299
 
300
300
  ##
301
301
  # Access the task_queues_statistics
302
- # @return [TaskQueuesStatisticsList] TaskQueuesStatisticsList
302
+ # @return [TaskQueuesStatisticsList] if a(n) TaskQueuesStatisticsList object was created.
303
+ # @return [TaskQueuesStatisticsContext] if a(n) TaskQueuesStatisticsContext object was created.
303
304
  def task_queues_statistics
304
305
  unless @task_queues_statistics
305
306
  @task_queues_statistics = TaskQueuesStatisticsList.new(
@@ -313,7 +314,8 @@ module Twilio
313
314
 
314
315
  ##
315
316
  # Access the task_queue_statistics
316
- # @return [TaskQueueStatisticsList] TaskQueueStatisticsList
317
+ # @return [TaskQueueStatisticsList] if a(n) TaskQueueStatisticsList object was created.
318
+ # @return [TaskQueueStatisticsContext] if a(n) TaskQueueStatisticsContext object was created.
317
319
  def task_queue_statistics
318
320
  TaskQueueStatisticsContext.new(
319
321
  @version,