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.
- checksums.yaml +4 -4
- data/CHANGES.md +92 -40
- data/CONTRIBUTING.md +10 -8
- data/README.md +128 -46
- data/UPGRADE.md +7 -4
- data/advanced-examples/custom-http-client.md +170 -0
- data/lib/twilio-ruby/jwt/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
- data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
- data/lib/twilio-ruby/rest/client.rb +16 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +6 -36
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +6 -39
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
- data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +20 -20
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +23 -23
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +13 -13
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +31 -31
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +13 -86
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
- data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
- data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
- data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +2 -21
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
- data/lib/twilio-ruby/rest/messaging/v1.rb +0 -15
- data/lib/twilio-ruby/rest/messaging.rb +1 -1
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
- data/lib/twilio-ruby/rest/microvisor.rb +2 -1
- data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
- data/lib/twilio-ruby/rest/oauth.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
- data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
- data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
- data/lib/twilio-ruby/rest/verify/v2/service.rb +11 -33
- data/lib/twilio-ruby/rest/verify/v2/template.rb +5 -5
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
- data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +9 -9
- 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/
|
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]]
|
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
|
-
|
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
|
-
'
|
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]
|
178
|
+
# @param [String] questionnaire_sid The SID of the questionnaire
|
179
179
|
# @return [InsightsQuestionnairesContext] InsightsQuestionnairesContext
|
180
|
-
def initialize(version,
|
180
|
+
def initialize(version, questionnaire_sid)
|
181
181
|
super(version)
|
182
182
|
|
183
183
|
# Path Solution
|
184
|
-
@solution = {
|
185
|
-
@uri = "/Insights/
|
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
|
-
|
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]]
|
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
|
-
|
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
|
-
'
|
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
|
-
|
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 ,
|
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
|
-
'
|
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 = { '
|
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['
|
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
|
342
|
-
def
|
343
|
-
@properties['
|
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]]
|
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
|
-
|
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
|
-
|
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/
|
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]
|
162
|
+
# @param [String] category_sid The SID of the category to be updated
|
163
163
|
# @return [InsightsQuestionnairesCategoryContext] InsightsQuestionnairesCategoryContext
|
164
|
-
def initialize(version,
|
164
|
+
def initialize(version, category_sid)
|
165
165
|
super(version)
|
166
166
|
|
167
167
|
# Path Solution
|
168
|
-
@solution = {
|
169
|
-
@uri = "/Insights/
|
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
|
-
|
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 ,
|
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
|
-
'
|
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 = { '
|
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['
|
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
|
297
|
-
def
|
298
|
-
@properties['
|
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/
|
29
|
+
@uri = "/Insights/QualityManagement/Questions"
|
30
30
|
|
31
31
|
end
|
32
32
|
##
|
33
33
|
# Create the InsightsQuestionnairesQuestionInstance
|
34
|
-
# @param [String]
|
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
|
-
|
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
|
-
'
|
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]]
|
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,
|
80
|
+
def list(token: :unset, category_sid: :unset, limit: nil, page_size: nil)
|
81
81
|
self.stream(
|
82
82
|
token: token,
|
83
|
-
|
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]]
|
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,
|
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
|
-
|
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]]
|
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,
|
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
|
-
'
|
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]
|
181
|
+
# @param [String] question_sid The SID of the question
|
182
182
|
# @return [InsightsQuestionnairesQuestionContext] InsightsQuestionnairesQuestionContext
|
183
|
-
def initialize(version,
|
183
|
+
def initialize(version, question_sid)
|
184
184
|
super(version)
|
185
185
|
|
186
186
|
# Path Solution
|
187
|
-
@solution = {
|
188
|
-
@uri = "/Insights/
|
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]
|
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
|
-
|
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
|
-
'
|
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
|
-
|
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 ,
|
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
|
-
'
|
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 = { '
|
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['
|
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
|
334
|
-
def
|
335
|
-
@properties['
|
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]
|
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
|
-
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
430
|
-
"<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
|
357
|
+
"<Twilio.FlexApi.V1.InsightsSegmentsInstance>"
|
431
358
|
end
|
432
359
|
end
|
433
360
|
|