twilio-ruby 6.0.0.pre.rc.3 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +103 -47
  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/rest/api/v2010/account/address.rb +1 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
  15. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
  26. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
  29. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
  30. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
  31. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +11 -1
  32. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
  33. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +3 -12
  34. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
  35. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +3 -15
  36. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
  37. data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
  38. data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
  39. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
  40. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
  41. data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
  42. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +38 -44
  43. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +17 -23
  44. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +9 -9
  45. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +53 -53
  46. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +37 -37
  47. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +52 -52
  48. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +19 -92
  49. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +4 -4
  50. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +4 -4
  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/call_summaries.rb +31 -3
  56. data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
  57. data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
  58. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
  59. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
  60. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
  61. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
  62. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
  63. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
  64. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
  65. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +28 -2
  66. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +7 -0
  67. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
  68. data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
  69. data/lib/twilio-ruby/rest/messaging/v1.rb +15 -15
  70. data/lib/twilio-ruby/rest/messaging.rb +1 -1
  71. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
  72. data/lib/twilio-ruby/rest/microvisor.rb +2 -1
  73. data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
  74. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +224 -0
  75. data/lib/twilio-ruby/rest/numbers/v1.rb +49 -0
  76. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
  77. data/lib/twilio-ruby/rest/oauth.rb +1 -1
  78. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
  79. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
  80. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
  81. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
  82. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
  83. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
  84. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
  85. data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
  86. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
  87. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
  88. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
  89. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
  90. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
  91. data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
  92. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
  93. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
  94. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
  95. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
  96. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
  97. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
  98. data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
  99. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
  100. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
  101. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
  102. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
  103. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
  104. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
  105. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
  106. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
  107. data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
  110. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
  112. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
  113. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
  114. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
  115. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
  116. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
  117. data/lib/twilio-ruby/rest/verify/v2/service.rb +7 -29
  118. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
  119. data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
  120. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
  121. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
  122. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
  123. data/lib/twilio-ruby/rest.rb +1 -1
  124. data/lib/twilio-ruby/version.rb +1 -1
  125. data/twilio-ruby.gemspec +1 -1
  126. metadata +12 -9
  127. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -26,24 +26,24 @@ 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
  ##
33
33
  # Create the InsightsQuestionnairesCategoryInstance
34
34
  # @param [String] name The name of this category.
35
- # @param [String] token The Token HTTP request header
35
+ # @param [String] authorization The Authorization HTTP request header
36
36
  # @return [InsightsQuestionnairesCategoryInstance] Created InsightsQuestionnairesCategoryInstance
37
37
  def create(
38
38
  name: nil,
39
- token: :unset
39
+ authorization: :unset
40
40
  )
41
41
 
42
42
  data = Twilio::Values.of({
43
43
  'Name' => name,
44
44
  })
45
45
 
46
- headers = Twilio::Values.of({ 'Token' => token, })
46
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
47
47
  payload = @version.create('POST', @uri, data: data, headers: headers)
48
48
  InsightsQuestionnairesCategoryInstance.new(
49
49
  @version,
@@ -56,7 +56,7 @@ module Twilio
56
56
  # Lists InsightsQuestionnairesCategoryInstance records from the API as a list.
57
57
  # Unlike stream(), this operation is eager and will load `limit` records into
58
58
  # memory before returning.
59
- # @param [String] token The Token HTTP request header
59
+ # @param [String] authorization The Authorization HTTP request header
60
60
  # @param [Integer] limit Upper limit for the number of records to return. stream()
61
61
  # guarantees to never return more than limit. Default is no limit
62
62
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -64,9 +64,9 @@ module Twilio
64
64
  # but a limit is defined, stream() will attempt to read the limit with the most
65
65
  # efficient page size, i.e. min(limit, 1000)
66
66
  # @return [Array] Array of up to limit results
67
- def list(token: :unset, limit: nil, page_size: nil)
67
+ def list(authorization: :unset, limit: nil, page_size: nil)
68
68
  self.stream(
69
- token: token,
69
+ authorization: authorization,
70
70
  limit: limit,
71
71
  page_size: page_size
72
72
  ).entries
@@ -76,7 +76,7 @@ module Twilio
76
76
  # Streams Instance records from the API as an Enumerable.
77
77
  # This operation lazily loads records as efficiently as possible until the limit
78
78
  # is reached.
79
- # @param [String] token The Token HTTP request header
79
+ # @param [String] authorization The Authorization HTTP request header
80
80
  # @param [Integer] limit Upper limit for the number of records to return. stream()
81
81
  # guarantees to never return more than limit. Default is no limit
82
82
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -84,11 +84,11 @@ module Twilio
84
84
  # but a limit is defined, stream() will attempt to read the limit with the most
85
85
  # efficient page size, i.e. min(limit, 1000)
86
86
  # @return [Enumerable] Enumerable that will yield up to limit results
87
- def stream(token: :unset, limit: nil, page_size: nil)
87
+ def stream(authorization: :unset, limit: nil, page_size: nil)
88
88
  limits = @version.read_limits(limit, page_size)
89
89
 
90
90
  page = self.page(
91
- token: token,
91
+ authorization: authorization,
92
92
  page_size: limits[:page_size], )
93
93
 
94
94
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -111,15 +111,15 @@ module Twilio
111
111
  ##
112
112
  # Retrieve a single page of InsightsQuestionnairesCategoryInstance records from the API.
113
113
  # Request is executed immediately.
114
- # @param [String] token The Token HTTP request header
114
+ # @param [String] authorization The Authorization HTTP request header
115
115
  # @param [String] page_token PageToken provided by the API
116
116
  # @param [Integer] page_number Page Number, this value is simply for client state
117
117
  # @param [Integer] page_size Number of records to return, defaults to 50
118
118
  # @return [Page] Page of InsightsQuestionnairesCategoryInstance
119
- def page(token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
119
+ def page(authorization: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
120
120
  params = Twilio::Values.of({
121
121
 
122
- 'Token' => token,
122
+ 'Authorization' => authorization,
123
123
 
124
124
  'PageToken' => page_token,
125
125
  'Page' => page_number,
@@ -159,49 +159,49 @@ 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
173
173
  ##
174
174
  # Delete the InsightsQuestionnairesCategoryInstance
175
- # @param [String] token The Token HTTP request header
175
+ # @param [String] authorization The Authorization HTTP request header
176
176
  # @return [Boolean] True if delete succeeds, false otherwise
177
177
  def delete(
178
- token: :unset
178
+ authorization: :unset
179
179
  )
180
180
 
181
- headers = Twilio::Values.of({ 'Token' => token, })
181
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
182
182
  @version.delete('DELETE', @uri, headers: headers)
183
183
  end
184
184
 
185
185
  ##
186
186
  # Update the InsightsQuestionnairesCategoryInstance
187
187
  # @param [String] name The name of this category.
188
- # @param [String] token The Token HTTP request header
188
+ # @param [String] authorization The Authorization HTTP request header
189
189
  # @return [InsightsQuestionnairesCategoryInstance] Updated InsightsQuestionnairesCategoryInstance
190
190
  def update(
191
191
  name: nil,
192
- token: :unset
192
+ authorization: :unset
193
193
  )
194
194
 
195
195
  data = Twilio::Values.of({
196
196
  'Name' => name,
197
197
  })
198
198
 
199
- headers = Twilio::Values.of({ 'Token' => token, })
199
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
200
200
  payload = @version.update('POST', @uri, data: data, headers: headers)
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
  ##
@@ -312,30 +312,30 @@ module Twilio
312
312
 
313
313
  ##
314
314
  # Delete the InsightsQuestionnairesCategoryInstance
315
- # @param [String] token The Token HTTP request header
315
+ # @param [String] authorization The Authorization HTTP request header
316
316
  # @return [Boolean] True if delete succeeds, false otherwise
317
317
  def delete(
318
- token: :unset
318
+ authorization: :unset
319
319
  )
320
320
 
321
321
  context.delete(
322
- token: token,
322
+ authorization: authorization,
323
323
  )
324
324
  end
325
325
 
326
326
  ##
327
327
  # Update the InsightsQuestionnairesCategoryInstance
328
328
  # @param [String] name The name of this category.
329
- # @param [String] token The Token HTTP request header
329
+ # @param [String] authorization The Authorization HTTP request header
330
330
  # @return [InsightsQuestionnairesCategoryInstance] Updated InsightsQuestionnairesCategoryInstance
331
331
  def update(
332
332
  name: nil,
333
- token: :unset
333
+ authorization: :unset
334
334
  )
335
335
 
336
336
  context.update(
337
337
  name: name,
338
- token: token,
338
+ authorization: authorization,
339
339
  )
340
340
  end
341
341
 
@@ -26,36 +26,36 @@ 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.
38
38
  # @param [String] description The description for the question.
39
- # @param [String] token The Token HTTP request header
39
+ # @param [String] authorization The Authorization 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,
46
46
  description: :unset,
47
- token: :unset
47
+ authorization: :unset
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,
55
55
  'Description' => description,
56
56
  })
57
57
 
58
- headers = Twilio::Values.of({ 'Token' => token, })
58
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
59
59
  payload = @version.create('POST', @uri, data: data, headers: headers)
60
60
  InsightsQuestionnairesQuestionInstance.new(
61
61
  @version,
@@ -68,8 +68,8 @@ module Twilio
68
68
  # Lists InsightsQuestionnairesQuestionInstance records from the API as a list.
69
69
  # Unlike stream(), this operation is eager and will load `limit` records into
70
70
  # memory before returning.
71
- # @param [String] token The Token HTTP request header
72
- # @param [Array[String]] category_id The list of category IDs
71
+ # @param [String] authorization The Authorization HTTP request header
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(authorization: :unset, category_sid: :unset, limit: nil, page_size: nil)
81
81
  self.stream(
82
- token: token,
83
- category_id: category_id,
82
+ authorization: authorization,
83
+ category_sid: category_sid,
84
84
  limit: limit,
85
85
  page_size: page_size
86
86
  ).entries
@@ -90,8 +90,8 @@ module Twilio
90
90
  # Streams Instance records from the API as an Enumerable.
91
91
  # This operation lazily loads records as efficiently as possible until the limit
92
92
  # is reached.
93
- # @param [String] token The Token HTTP request header
94
- # @param [Array[String]] category_id The list of category IDs
93
+ # @param [String] authorization The Authorization HTTP request header
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(authorization: :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
- token: token,
107
- category_id: category_id,
106
+ authorization: authorization,
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])
@@ -127,18 +127,18 @@ module Twilio
127
127
  ##
128
128
  # Retrieve a single page of InsightsQuestionnairesQuestionInstance records from the API.
129
129
  # Request is executed immediately.
130
- # @param [String] token The Token HTTP request header
131
- # @param [Array[String]] category_id The list of category IDs
130
+ # @param [String] authorization The Authorization HTTP request header
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(authorization: :unset, category_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
137
137
  params = Twilio::Values.of({
138
138
 
139
- 'Token' => token,
139
+ 'Authorization' => authorization,
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,61 +178,61 @@ 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
192
192
  ##
193
193
  # Delete the InsightsQuestionnairesQuestionInstance
194
- # @param [String] token The Token HTTP request header
194
+ # @param [String] authorization The Authorization HTTP request header
195
195
  # @return [Boolean] True if delete succeeds, false otherwise
196
196
  def delete(
197
- token: :unset
197
+ authorization: :unset
198
198
  )
199
199
 
200
- headers = Twilio::Values.of({ 'Token' => token, })
200
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
201
201
  @version.delete('DELETE', @uri, headers: headers)
202
202
  end
203
203
 
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.
211
- # @param [String] token The Token HTTP request header
211
+ # @param [String] authorization The Authorization HTTP request header
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,
219
- token: :unset
219
+ authorization: :unset
220
220
  )
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,
228
228
  })
229
229
 
230
- headers = Twilio::Values.of({ 'Token' => token, })
230
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
231
231
  payload = @version.update('POST', @uri, data: data, headers: headers)
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
  ##
@@ -385,42 +385,42 @@ module Twilio
385
385
 
386
386
  ##
387
387
  # Delete the InsightsQuestionnairesQuestionInstance
388
- # @param [String] token The Token HTTP request header
388
+ # @param [String] authorization The Authorization HTTP request header
389
389
  # @return [Boolean] True if delete succeeds, false otherwise
390
390
  def delete(
391
- token: :unset
391
+ authorization: :unset
392
392
  )
393
393
 
394
394
  context.delete(
395
- token: token,
395
+ authorization: authorization,
396
396
  )
397
397
  end
398
398
 
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.
406
- # @param [String] token The Token HTTP request header
406
+ # @param [String] authorization The Authorization HTTP request header
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,
414
- token: :unset
414
+ authorization: :unset
415
415
  )
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,
423
- token: token,
423
+ authorization: authorization,
424
424
  )
425
425
  end
426
426