twilio-ruby 6.0.0.pre.rc.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +92 -40
  3. data/CONTRIBUTING.md +10 -8
  4. data/README.md +128 -46
  5. data/UPGRADE.md +7 -4
  6. data/advanced-examples/custom-http-client.md +170 -0
  7. data/lib/twilio-ruby/jwt/access_token.rb +0 -59
  8. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
  14. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
  15. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
  17. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
  20. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
  21. data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
  25. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
  26. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
  27. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
  28. data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
  29. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
  30. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
  31. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
  32. data/lib/twilio-ruby/rest/client.rb +16 -15
  33. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
  34. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +6 -36
  35. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
  36. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +6 -39
  37. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
  38. data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
  39. data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
  40. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
  41. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
  42. data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
  43. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +20 -20
  44. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +5 -5
  45. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +23 -23
  46. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +13 -13
  47. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +31 -31
  48. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +13 -86
  49. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +1 -1
  50. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +1 -1
  51. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
  52. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
  53. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
  54. data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
  55. data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
  56. data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
  57. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
  58. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
  59. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
  60. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
  61. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
  62. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
  63. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
  64. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +2 -21
  65. data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
  66. data/lib/twilio-ruby/rest/messaging/v1.rb +0 -15
  67. data/lib/twilio-ruby/rest/messaging.rb +1 -1
  68. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
  69. data/lib/twilio-ruby/rest/microvisor.rb +2 -1
  70. data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
  71. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
  72. data/lib/twilio-ruby/rest/oauth.rb +1 -1
  73. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
  74. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
  75. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
  76. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
  77. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
  78. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
  79. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
  80. data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
  81. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
  82. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
  83. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
  84. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
  85. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
  86. data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
  87. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
  88. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
  89. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
  90. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
  91. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
  92. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
  93. data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
  94. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
  95. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
  96. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
  97. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
  98. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
  99. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
  100. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
  101. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
  102. data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
  103. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
  104. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
  105. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
  106. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
  107. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
  108. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
  109. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
  110. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
  111. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
  112. data/lib/twilio-ruby/rest/verify/v2/service.rb +11 -33
  113. data/lib/twilio-ruby/rest/verify/v2/template.rb +5 -5
  114. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
  115. data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
  116. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
  117. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
  118. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
  119. data/lib/twilio-ruby/version.rb +1 -1
  120. data/twilio-ruby.gemspec +1 -1
  121. metadata +9 -9
  122. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -730
@@ -26,7 +26,7 @@ module Twilio
26
26
  super(version)
27
27
  # Path Solution
28
28
  @solution = { }
29
- @uri = "/Insights/QM/Questionnaires"
29
+ @uri = "/Insights/QualityManagement/Questionnaires"
30
30
 
31
31
  end
32
32
  ##
@@ -34,14 +34,14 @@ module Twilio
34
34
  # @param [String] name The name of this questionnaire
35
35
  # @param [String] description The description of this questionnaire
36
36
  # @param [Boolean] active The flag to enable or disable questionnaire
37
- # @param [Array[String]] question_ids The list of questions ids under a questionnaire
37
+ # @param [Array[String]] question_sids The list of questions sids under a questionnaire
38
38
  # @param [String] token The Token HTTP request header
39
39
  # @return [InsightsQuestionnairesInstance] Created InsightsQuestionnairesInstance
40
40
  def create(
41
41
  name: nil,
42
42
  description: :unset,
43
43
  active: :unset,
44
- question_ids: :unset,
44
+ question_sids: :unset,
45
45
  token: :unset
46
46
  )
47
47
 
@@ -49,7 +49,7 @@ module Twilio
49
49
  'Name' => name,
50
50
  'Description' => description,
51
51
  'Active' => active,
52
- 'QuestionIds' => Twilio.serialize_list(question_ids) { |e| e },
52
+ 'QuestionSids' => Twilio.serialize_list(question_sids) { |e| e },
53
53
  })
54
54
 
55
55
  headers = Twilio::Values.of({ 'Token' => token, })
@@ -175,14 +175,14 @@ module Twilio
175
175
  ##
176
176
  # Initialize the InsightsQuestionnairesContext
177
177
  # @param [Version] version Version that contains the resource
178
- # @param [String] id The unique ID of the questionnaire
178
+ # @param [String] questionnaire_sid The SID of the questionnaire
179
179
  # @return [InsightsQuestionnairesContext] InsightsQuestionnairesContext
180
- def initialize(version, id)
180
+ def initialize(version, questionnaire_sid)
181
181
  super(version)
182
182
 
183
183
  # Path Solution
184
- @solution = { id: id, }
185
- @uri = "/Insights/QM/Questionnaires/#{@solution[:id]}"
184
+ @solution = { questionnaire_sid: questionnaire_sid, }
185
+ @uri = "/Insights/QualityManagement/Questionnaires/#{@solution[:questionnaire_sid]}"
186
186
 
187
187
 
188
188
  end
@@ -211,7 +211,7 @@ module Twilio
211
211
  InsightsQuestionnairesInstance.new(
212
212
  @version,
213
213
  payload,
214
- id: @solution[:id],
214
+ questionnaire_sid: @solution[:questionnaire_sid],
215
215
  )
216
216
  end
217
217
 
@@ -220,14 +220,14 @@ module Twilio
220
220
  # @param [Boolean] active The flag to enable or disable questionnaire
221
221
  # @param [String] name The name of this questionnaire
222
222
  # @param [String] description The description of this questionnaire
223
- # @param [Array[String]] question_ids The list of questions ids under a questionnaire
223
+ # @param [Array[String]] question_sids The list of questions sids under a questionnaire
224
224
  # @param [String] token The Token HTTP request header
225
225
  # @return [InsightsQuestionnairesInstance] Updated InsightsQuestionnairesInstance
226
226
  def update(
227
227
  active: nil,
228
228
  name: :unset,
229
229
  description: :unset,
230
- question_ids: :unset,
230
+ question_sids: :unset,
231
231
  token: :unset
232
232
  )
233
233
 
@@ -235,7 +235,7 @@ module Twilio
235
235
  'Active' => active,
236
236
  'Name' => name,
237
237
  'Description' => description,
238
- 'QuestionIds' => Twilio.serialize_list(question_ids) { |e| e },
238
+ 'QuestionSids' => Twilio.serialize_list(question_sids) { |e| e },
239
239
  })
240
240
 
241
241
  headers = Twilio::Values.of({ 'Token' => token, })
@@ -243,7 +243,7 @@ module Twilio
243
243
  InsightsQuestionnairesInstance.new(
244
244
  @version,
245
245
  payload,
246
- id: @solution[:id],
246
+ questionnaire_sid: @solution[:questionnaire_sid],
247
247
  )
248
248
  end
249
249
 
@@ -301,13 +301,13 @@ module Twilio
301
301
  # resource.
302
302
  # @param [String] sid The SID of the Call resource to fetch.
303
303
  # @return [InsightsQuestionnairesInstance] InsightsQuestionnairesInstance
304
- def initialize(version, payload , id: nil)
304
+ def initialize(version, payload , questionnaire_sid: nil)
305
305
  super(version)
306
306
 
307
307
  # Marshaled Properties
308
308
  @properties = {
309
309
  'account_sid' => payload['account_sid'],
310
- 'id' => payload['id'],
310
+ 'questionnaire_sid' => payload['questionnaire_sid'],
311
311
  'name' => payload['name'],
312
312
  'description' => payload['description'],
313
313
  'active' => payload['active'],
@@ -317,7 +317,7 @@ module Twilio
317
317
 
318
318
  # Context
319
319
  @instance_context = nil
320
- @params = { 'id' => id || @properties['id'] , }
320
+ @params = { 'questionnaire_sid' => questionnaire_sid || @properties['questionnaire_sid'] , }
321
321
  end
322
322
 
323
323
  ##
@@ -326,7 +326,7 @@ module Twilio
326
326
  # @return [InsightsQuestionnairesContext] CallContext for this CallInstance
327
327
  def context
328
328
  unless @instance_context
329
- @instance_context = InsightsQuestionnairesContext.new(@version , @params['id'])
329
+ @instance_context = InsightsQuestionnairesContext.new(@version , @params['questionnaire_sid'])
330
330
  end
331
331
  @instance_context
332
332
  end
@@ -338,9 +338,9 @@ module Twilio
338
338
  end
339
339
 
340
340
  ##
341
- # @return [String] The unique id of this questionnaire
342
- def id
343
- @properties['id']
341
+ # @return [String] The sid of this questionnaire
342
+ def questionnaire_sid
343
+ @properties['questionnaire_sid']
344
344
  end
345
345
 
346
346
  ##
@@ -404,14 +404,14 @@ module Twilio
404
404
  # @param [Boolean] active The flag to enable or disable questionnaire
405
405
  # @param [String] name The name of this questionnaire
406
406
  # @param [String] description The description of this questionnaire
407
- # @param [Array[String]] question_ids The list of questions ids under a questionnaire
407
+ # @param [Array[String]] question_sids The list of questions sids under a questionnaire
408
408
  # @param [String] token The Token HTTP request header
409
409
  # @return [InsightsQuestionnairesInstance] Updated InsightsQuestionnairesInstance
410
410
  def update(
411
411
  active: nil,
412
412
  name: :unset,
413
413
  description: :unset,
414
- question_ids: :unset,
414
+ question_sids: :unset,
415
415
  token: :unset
416
416
  )
417
417
 
@@ -419,7 +419,7 @@ module Twilio
419
419
  active: active,
420
420
  name: name,
421
421
  description: description,
422
- question_ids: question_ids,
422
+ question_sids: question_sids,
423
423
  token: token,
424
424
  )
425
425
  end
@@ -26,7 +26,7 @@ module Twilio
26
26
  super(version)
27
27
  # Path Solution
28
28
  @solution = { }
29
- @uri = "/Insights/QM/Categories"
29
+ @uri = "/Insights/QualityManagement/Categories"
30
30
 
31
31
  end
32
32
  ##
@@ -159,14 +159,14 @@ module Twilio
159
159
  ##
160
160
  # Initialize the InsightsQuestionnairesCategoryContext
161
161
  # @param [Version] version Version that contains the resource
162
- # @param [String] category_id The ID of the category to be update
162
+ # @param [String] category_sid The SID of the category to be updated
163
163
  # @return [InsightsQuestionnairesCategoryContext] InsightsQuestionnairesCategoryContext
164
- def initialize(version, category_id)
164
+ def initialize(version, category_sid)
165
165
  super(version)
166
166
 
167
167
  # Path Solution
168
- @solution = { category_id: category_id, }
169
- @uri = "/Insights/QM/Categories/#{@solution[:category_id]}"
168
+ @solution = { category_sid: category_sid, }
169
+ @uri = "/Insights/QualityManagement/Categories/#{@solution[:category_sid]}"
170
170
 
171
171
 
172
172
  end
@@ -201,7 +201,7 @@ module Twilio
201
201
  InsightsQuestionnairesCategoryInstance.new(
202
202
  @version,
203
203
  payload,
204
- category_id: @solution[:category_id],
204
+ category_sid: @solution[:category_sid],
205
205
  )
206
206
  end
207
207
 
@@ -259,20 +259,20 @@ module Twilio
259
259
  # resource.
260
260
  # @param [String] sid The SID of the Call resource to fetch.
261
261
  # @return [InsightsQuestionnairesCategoryInstance] InsightsQuestionnairesCategoryInstance
262
- def initialize(version, payload , category_id: nil)
262
+ def initialize(version, payload , category_sid: nil)
263
263
  super(version)
264
264
 
265
265
  # Marshaled Properties
266
266
  @properties = {
267
267
  'account_sid' => payload['account_sid'],
268
- 'category_id' => payload['category_id'],
268
+ 'category_sid' => payload['category_sid'],
269
269
  'name' => payload['name'],
270
270
  'url' => payload['url'],
271
271
  }
272
272
 
273
273
  # Context
274
274
  @instance_context = nil
275
- @params = { 'category_id' => category_id || @properties['category_id'] , }
275
+ @params = { 'category_sid' => category_sid || @properties['category_sid'] , }
276
276
  end
277
277
 
278
278
  ##
@@ -281,7 +281,7 @@ module Twilio
281
281
  # @return [InsightsQuestionnairesCategoryContext] CallContext for this CallInstance
282
282
  def context
283
283
  unless @instance_context
284
- @instance_context = InsightsQuestionnairesCategoryContext.new(@version , @params['category_id'])
284
+ @instance_context = InsightsQuestionnairesCategoryContext.new(@version , @params['category_sid'])
285
285
  end
286
286
  @instance_context
287
287
  end
@@ -293,9 +293,9 @@ module Twilio
293
293
  end
294
294
 
295
295
  ##
296
- # @return [String] The unique ID for the category
297
- def category_id
298
- @properties['category_id']
296
+ # @return [String] The SID of the category
297
+ def category_sid
298
+ @properties['category_sid']
299
299
  end
300
300
 
301
301
  ##
@@ -26,12 +26,12 @@ module Twilio
26
26
  super(version)
27
27
  # Path Solution
28
28
  @solution = { }
29
- @uri = "/Insights/QM/Questions"
29
+ @uri = "/Insights/QualityManagement/Questions"
30
30
 
31
31
  end
32
32
  ##
33
33
  # Create the InsightsQuestionnairesQuestionInstance
34
- # @param [String] category_id The ID of the category
34
+ # @param [String] category_sid The SID of the category
35
35
  # @param [String] question The question.
36
36
  # @param [String] answer_set_id The answer_set for the question.
37
37
  # @param [Boolean] allow_na The flag to enable for disable NA for answer.
@@ -39,7 +39,7 @@ module Twilio
39
39
  # @param [String] token The Token HTTP request header
40
40
  # @return [InsightsQuestionnairesQuestionInstance] Created InsightsQuestionnairesQuestionInstance
41
41
  def create(
42
- category_id: nil,
42
+ category_sid: nil,
43
43
  question: nil,
44
44
  answer_set_id: nil,
45
45
  allow_na: nil,
@@ -48,7 +48,7 @@ module Twilio
48
48
  )
49
49
 
50
50
  data = Twilio::Values.of({
51
- 'CategoryId' => category_id,
51
+ 'CategorySid' => category_sid,
52
52
  'Question' => question,
53
53
  'AnswerSetId' => answer_set_id,
54
54
  'AllowNa' => allow_na,
@@ -69,7 +69,7 @@ module Twilio
69
69
  # Unlike stream(), this operation is eager and will load `limit` records into
70
70
  # memory before returning.
71
71
  # @param [String] token The Token HTTP request header
72
- # @param [Array[String]] category_id The list of category IDs
72
+ # @param [Array[String]] category_sid The list of category SIDs
73
73
  # @param [Integer] limit Upper limit for the number of records to return. stream()
74
74
  # guarantees to never return more than limit. Default is no limit
75
75
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -77,10 +77,10 @@ module Twilio
77
77
  # but a limit is defined, stream() will attempt to read the limit with the most
78
78
  # efficient page size, i.e. min(limit, 1000)
79
79
  # @return [Array] Array of up to limit results
80
- def list(token: :unset, category_id: :unset, limit: nil, page_size: nil)
80
+ def list(token: :unset, category_sid: :unset, limit: nil, page_size: nil)
81
81
  self.stream(
82
82
  token: token,
83
- category_id: category_id,
83
+ category_sid: category_sid,
84
84
  limit: limit,
85
85
  page_size: page_size
86
86
  ).entries
@@ -91,7 +91,7 @@ module Twilio
91
91
  # This operation lazily loads records as efficiently as possible until the limit
92
92
  # is reached.
93
93
  # @param [String] token The Token HTTP request header
94
- # @param [Array[String]] category_id The list of category IDs
94
+ # @param [Array[String]] category_sid The list of category SIDs
95
95
  # @param [Integer] limit Upper limit for the number of records to return. stream()
96
96
  # guarantees to never return more than limit. Default is no limit
97
97
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -99,12 +99,12 @@ module Twilio
99
99
  # but a limit is defined, stream() will attempt to read the limit with the most
100
100
  # efficient page size, i.e. min(limit, 1000)
101
101
  # @return [Enumerable] Enumerable that will yield up to limit results
102
- def stream(token: :unset, category_id: :unset, limit: nil, page_size: nil)
102
+ def stream(token: :unset, category_sid: :unset, limit: nil, page_size: nil)
103
103
  limits = @version.read_limits(limit, page_size)
104
104
 
105
105
  page = self.page(
106
106
  token: token,
107
- category_id: category_id,
107
+ category_sid: category_sid,
108
108
  page_size: limits[:page_size], )
109
109
 
110
110
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -128,17 +128,17 @@ module Twilio
128
128
  # Retrieve a single page of InsightsQuestionnairesQuestionInstance records from the API.
129
129
  # Request is executed immediately.
130
130
  # @param [String] token The Token HTTP request header
131
- # @param [Array[String]] category_id The list of category IDs
131
+ # @param [Array[String]] category_sid The list of category SIDs
132
132
  # @param [String] page_token PageToken provided by the API
133
133
  # @param [Integer] page_number Page Number, this value is simply for client state
134
134
  # @param [Integer] page_size Number of records to return, defaults to 50
135
135
  # @return [Page] Page of InsightsQuestionnairesQuestionInstance
136
- def page(token: :unset, category_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
136
+ def page(token: :unset, category_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
137
137
  params = Twilio::Values.of({
138
138
 
139
139
  'Token' => token,
140
140
 
141
- 'CategoryId' => Twilio.serialize_list(category_id),
141
+ 'CategorySid' => Twilio.serialize_list(category_sid),
142
142
 
143
143
  'PageToken' => page_token,
144
144
  'Page' => page_number,
@@ -178,14 +178,14 @@ module Twilio
178
178
  ##
179
179
  # Initialize the InsightsQuestionnairesQuestionContext
180
180
  # @param [Version] version Version that contains the resource
181
- # @param [String] question_id The unique ID of the question
181
+ # @param [String] question_sid The SID of the question
182
182
  # @return [InsightsQuestionnairesQuestionContext] InsightsQuestionnairesQuestionContext
183
- def initialize(version, question_id)
183
+ def initialize(version, question_sid)
184
184
  super(version)
185
185
 
186
186
  # Path Solution
187
- @solution = { question_id: question_id, }
188
- @uri = "/Insights/QM/Questions/#{@solution[:question_id]}"
187
+ @solution = { question_sid: question_sid, }
188
+ @uri = "/Insights/QualityManagement/Questions/#{@solution[:question_sid]}"
189
189
 
190
190
 
191
191
  end
@@ -204,7 +204,7 @@ module Twilio
204
204
  ##
205
205
  # Update the InsightsQuestionnairesQuestionInstance
206
206
  # @param [Boolean] allow_na The flag to enable for disable NA for answer.
207
- # @param [String] category_id The ID of the category
207
+ # @param [String] category_sid The SID of the category
208
208
  # @param [String] question The question.
209
209
  # @param [String] description The description for the question.
210
210
  # @param [String] answer_set_id The answer_set for the question.
@@ -212,7 +212,7 @@ module Twilio
212
212
  # @return [InsightsQuestionnairesQuestionInstance] Updated InsightsQuestionnairesQuestionInstance
213
213
  def update(
214
214
  allow_na: nil,
215
- category_id: :unset,
215
+ category_sid: :unset,
216
216
  question: :unset,
217
217
  description: :unset,
218
218
  answer_set_id: :unset,
@@ -221,7 +221,7 @@ module Twilio
221
221
 
222
222
  data = Twilio::Values.of({
223
223
  'AllowNa' => allow_na,
224
- 'CategoryId' => category_id,
224
+ 'CategorySid' => category_sid,
225
225
  'Question' => question,
226
226
  'Description' => description,
227
227
  'AnswerSetId' => answer_set_id,
@@ -232,7 +232,7 @@ module Twilio
232
232
  InsightsQuestionnairesQuestionInstance.new(
233
233
  @version,
234
234
  payload,
235
- question_id: @solution[:question_id],
235
+ question_sid: @solution[:question_sid],
236
236
  )
237
237
  end
238
238
 
@@ -290,13 +290,13 @@ module Twilio
290
290
  # resource.
291
291
  # @param [String] sid The SID of the Call resource to fetch.
292
292
  # @return [InsightsQuestionnairesQuestionInstance] InsightsQuestionnairesQuestionInstance
293
- def initialize(version, payload , question_id: nil)
293
+ def initialize(version, payload , question_sid: nil)
294
294
  super(version)
295
295
 
296
296
  # Marshaled Properties
297
297
  @properties = {
298
298
  'account_sid' => payload['account_sid'],
299
- 'question_id' => payload['question_id'],
299
+ 'question_sid' => payload['question_sid'],
300
300
  'question' => payload['question'],
301
301
  'description' => payload['description'],
302
302
  'category' => payload['category'],
@@ -309,7 +309,7 @@ module Twilio
309
309
 
310
310
  # Context
311
311
  @instance_context = nil
312
- @params = { 'question_id' => question_id || @properties['question_id'] , }
312
+ @params = { 'question_sid' => question_sid || @properties['question_sid'] , }
313
313
  end
314
314
 
315
315
  ##
@@ -318,7 +318,7 @@ module Twilio
318
318
  # @return [InsightsQuestionnairesQuestionContext] CallContext for this CallInstance
319
319
  def context
320
320
  unless @instance_context
321
- @instance_context = InsightsQuestionnairesQuestionContext.new(@version , @params['question_id'])
321
+ @instance_context = InsightsQuestionnairesQuestionContext.new(@version , @params['question_sid'])
322
322
  end
323
323
  @instance_context
324
324
  end
@@ -330,9 +330,9 @@ module Twilio
330
330
  end
331
331
 
332
332
  ##
333
- # @return [String] The unique ID of the question
334
- def question_id
335
- @properties['question_id']
333
+ # @return [String] The SID of the question
334
+ def question_sid
335
+ @properties['question_sid']
336
336
  end
337
337
 
338
338
  ##
@@ -399,7 +399,7 @@ module Twilio
399
399
  ##
400
400
  # Update the InsightsQuestionnairesQuestionInstance
401
401
  # @param [Boolean] allow_na The flag to enable for disable NA for answer.
402
- # @param [String] category_id The ID of the category
402
+ # @param [String] category_sid The SID of the category
403
403
  # @param [String] question The question.
404
404
  # @param [String] description The description for the question.
405
405
  # @param [String] answer_set_id The answer_set for the question.
@@ -407,7 +407,7 @@ module Twilio
407
407
  # @return [InsightsQuestionnairesQuestionInstance] Updated InsightsQuestionnairesQuestionInstance
408
408
  def update(
409
409
  allow_na: nil,
410
- category_id: :unset,
410
+ category_sid: :unset,
411
411
  question: :unset,
412
412
  description: :unset,
413
413
  answer_set_id: :unset,
@@ -416,7 +416,7 @@ module Twilio
416
416
 
417
417
  context.update(
418
418
  allow_na: allow_na,
419
- category_id: category_id,
419
+ category_sid: category_sid,
420
420
  question: question,
421
421
  description: description,
422
422
  answer_set_id: answer_set_id,
@@ -35,6 +35,7 @@ module Twilio
35
35
  # Unlike stream(), this operation is eager and will load `limit` records into
36
36
  # memory before returning.
37
37
  # @param [String] token The Token HTTP request header
38
+ # @param [String] segment_id To unique id of the segment
38
39
  # @param [Array[String]] reservation_id The list of reservation Ids
39
40
  # @param [Integer] limit Upper limit for the number of records to return. stream()
40
41
  # guarantees to never return more than limit. Default is no limit
@@ -43,9 +44,10 @@ module Twilio
43
44
  # but a limit is defined, stream() will attempt to read the limit with the most
44
45
  # efficient page size, i.e. min(limit, 1000)
45
46
  # @return [Array] Array of up to limit results
46
- def list(token: :unset, reservation_id: :unset, limit: nil, page_size: nil)
47
+ def list(token: :unset, segment_id: :unset, reservation_id: :unset, limit: nil, page_size: nil)
47
48
  self.stream(
48
49
  token: token,
50
+ segment_id: segment_id,
49
51
  reservation_id: reservation_id,
50
52
  limit: limit,
51
53
  page_size: page_size
@@ -57,6 +59,7 @@ module Twilio
57
59
  # This operation lazily loads records as efficiently as possible until the limit
58
60
  # is reached.
59
61
  # @param [String] token The Token HTTP request header
62
+ # @param [String] segment_id To unique id of the segment
60
63
  # @param [Array[String]] reservation_id The list of reservation Ids
61
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
65
  # guarantees to never return more than limit. Default is no limit
@@ -65,11 +68,12 @@ module Twilio
65
68
  # but a limit is defined, stream() will attempt to read the limit with the most
66
69
  # efficient page size, i.e. min(limit, 1000)
67
70
  # @return [Enumerable] Enumerable that will yield up to limit results
68
- def stream(token: :unset, reservation_id: :unset, limit: nil, page_size: nil)
71
+ def stream(token: :unset, segment_id: :unset, reservation_id: :unset, limit: nil, page_size: nil)
69
72
  limits = @version.read_limits(limit, page_size)
70
73
 
71
74
  page = self.page(
72
75
  token: token,
76
+ segment_id: segment_id,
73
77
  reservation_id: reservation_id,
74
78
  page_size: limits[:page_size], )
75
79
 
@@ -94,16 +98,19 @@ module Twilio
94
98
  # Retrieve a single page of InsightsSegmentsInstance records from the API.
95
99
  # Request is executed immediately.
96
100
  # @param [String] token The Token HTTP request header
101
+ # @param [String] segment_id To unique id of the segment
97
102
  # @param [Array[String]] reservation_id The list of reservation Ids
98
103
  # @param [String] page_token PageToken provided by the API
99
104
  # @param [Integer] page_number Page Number, this value is simply for client state
100
105
  # @param [Integer] page_size Number of records to return, defaults to 50
101
106
  # @return [Page] Page of InsightsSegmentsInstance
102
- def page(token: :unset, reservation_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
107
+ def page(token: :unset, segment_id: :unset, reservation_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
103
108
  params = Twilio::Values.of({
104
109
 
105
110
  'Token' => token,
106
111
 
112
+ 'SegmentId' => segment_id,
113
+
107
114
  'ReservationId' => Twilio.serialize_list(reservation_id),
108
115
 
109
116
  'PageToken' => page_token,
@@ -137,57 +144,6 @@ module Twilio
137
144
  end
138
145
  end
139
146
 
140
-
141
- ##
142
- #PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
143
- class InsightsSegmentsContext < InstanceContext
144
- ##
145
- # Initialize the InsightsSegmentsContext
146
- # @param [Version] version Version that contains the resource
147
- # @param [String] segment_id To unique id of the segment
148
- # @return [InsightsSegmentsContext] InsightsSegmentsContext
149
- def initialize(version, segment_id)
150
- super(version)
151
-
152
- # Path Solution
153
- @solution = { segment_id: segment_id, }
154
- @uri = "/Insights/Segments/#{@solution[:segment_id]}"
155
-
156
-
157
- end
158
- ##
159
- # Fetch the InsightsSegmentsInstance
160
- # @param [String] token The Token HTTP request header
161
- # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
162
- def fetch(
163
- token: :unset
164
- )
165
-
166
- headers = Twilio::Values.of({ 'Token' => token, })
167
- payload = @version.fetch('GET', @uri, headers: headers)
168
- InsightsSegmentsInstance.new(
169
- @version,
170
- payload,
171
- segment_id: @solution[:segment_id],
172
- )
173
- end
174
-
175
-
176
- ##
177
- # Provide a user friendly representation
178
- def to_s
179
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
180
- "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
181
- end
182
-
183
- ##
184
- # Provide a detailed, user friendly representation
185
- def inspect
186
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
187
- "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
188
- end
189
- end
190
-
191
147
  class InsightsSegmentsPage < Page
192
148
  ##
193
149
  # Initialize the InsightsSegmentsPage
@@ -226,7 +182,7 @@ module Twilio
226
182
  # resource.
227
183
  # @param [String] sid The SID of the Call resource to fetch.
228
184
  # @return [InsightsSegmentsInstance] InsightsSegmentsInstance
229
- def initialize(version, payload , segment_id: nil)
185
+ def initialize(version, payload )
230
186
  super(version)
231
187
 
232
188
  # Marshaled Properties
@@ -254,22 +210,8 @@ module Twilio
254
210
  'assessment_percentage' => payload['assessment_percentage'],
255
211
  'url' => payload['url'],
256
212
  }
257
-
258
- # Context
259
- @instance_context = nil
260
- @params = { 'segment_id' => segment_id || @properties['segment_id'] , }
261
213
  end
262
214
 
263
- ##
264
- # Generate an instance context for the instance, the context is capable of
265
- # performing various actions. All instance actions are proxied to the context
266
- # @return [InsightsSegmentsContext] CallContext for this CallInstance
267
- def context
268
- unless @instance_context
269
- @instance_context = InsightsSegmentsContext.new(@version , @params['segment_id'])
270
- end
271
- @instance_context
272
- end
273
215
 
274
216
  ##
275
217
  # @return [String] To unique id of the segment
@@ -403,31 +345,16 @@ module Twilio
403
345
  @properties['url']
404
346
  end
405
347
 
406
- ##
407
- # Fetch the InsightsSegmentsInstance
408
- # @param [String] token The Token HTTP request header
409
- # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
410
- def fetch(
411
- token: :unset
412
- )
413
-
414
- context.fetch(
415
- token: token,
416
- )
417
- end
418
-
419
348
  ##
420
349
  # Provide a user friendly representation
421
350
  def to_s
422
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
423
- "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
351
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance>"
424
352
  end
425
353
 
426
354
  ##
427
355
  # Provide a detailed, user friendly representation
428
356
  def inspect
429
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
430
- "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
357
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance>"
431
358
  end
432
359
  end
433
360