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.
- checksums.yaml +4 -4
- data/CHANGES.md +103 -47
- 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/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/conversations/v1/address_configuration.rb +11 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +3 -12
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +3 -15
- 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 +38 -44
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +17 -23
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +9 -9
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +53 -53
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +37 -37
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +52 -52
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +19 -92
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +4 -4
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +4 -4
- 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/call_summaries.rb +31 -3
- 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 +28 -2
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
- data/lib/twilio-ruby/rest/messaging/v1.rb +15 -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/v1/bulk_eligibility.rb +224 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +49 -0
- 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 +7 -29
- 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/rest.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +12 -9
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -42,6 +42,7 @@ module Twilio
|
|
42
42
|
# @param [Array[String]] auto_creation_webhook_filters The list of events, firing webhook event for this Conversation. Values can be any of the following: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onDeliveryUpdated`
|
43
43
|
# @param [String] auto_creation_studio_flow_sid For type `studio`, the studio flow SID where the webhook should be sent to.
|
44
44
|
# @param [String] auto_creation_studio_retry_count For type `studio`, number of times to retry the webhook request
|
45
|
+
# @param [String] address_country An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
|
45
46
|
# @return [AddressConfigurationInstance] Created AddressConfigurationInstance
|
46
47
|
def create(
|
47
48
|
type: nil,
|
@@ -54,7 +55,8 @@ module Twilio
|
|
54
55
|
auto_creation_webhook_method: :unset,
|
55
56
|
auto_creation_webhook_filters: :unset,
|
56
57
|
auto_creation_studio_flow_sid: :unset,
|
57
|
-
auto_creation_studio_retry_count: :unset
|
58
|
+
auto_creation_studio_retry_count: :unset,
|
59
|
+
address_country: :unset
|
58
60
|
)
|
59
61
|
|
60
62
|
data = Twilio::Values.of({
|
@@ -69,6 +71,7 @@ module Twilio
|
|
69
71
|
'AutoCreation.WebhookFilters' => Twilio.serialize_list(auto_creation_webhook_filters) { |e| e },
|
70
72
|
'AutoCreation.StudioFlowSid' => auto_creation_studio_flow_sid,
|
71
73
|
'AutoCreation.StudioRetryCount' => auto_creation_studio_retry_count,
|
74
|
+
'AddressCountry' => address_country,
|
72
75
|
})
|
73
76
|
|
74
77
|
payload = @version.create('POST', @uri, data: data)
|
@@ -328,6 +331,7 @@ module Twilio
|
|
328
331
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
329
332
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
330
333
|
'url' => payload['url'],
|
334
|
+
'address_country' => payload['address_country'],
|
331
335
|
}
|
332
336
|
|
333
337
|
# Context
|
@@ -400,6 +404,12 @@ module Twilio
|
|
400
404
|
@properties['url']
|
401
405
|
end
|
402
406
|
|
407
|
+
##
|
408
|
+
# @return [String] An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
|
409
|
+
def address_country
|
410
|
+
@properties['address_country']
|
411
|
+
end
|
412
|
+
|
403
413
|
##
|
404
414
|
# Delete the AddressConfigurationInstance
|
405
415
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -270,11 +270,7 @@ module Twilio
|
|
270
270
|
|
271
271
|
unless @delivery_receipts
|
272
272
|
@delivery_receipts = DeliveryReceiptList.new(
|
273
|
-
@version,
|
274
|
-
conversation_sid: @solution[:conversation_sid],
|
275
|
-
message_sid: @solution[:sid]
|
276
|
-
|
277
|
-
)
|
273
|
+
@version, conversation_sid: @solution[:conversation_sid], message_sid: @solution[:sid], )
|
278
274
|
end
|
279
275
|
|
280
276
|
@delivery_receipts
|
@@ -295,10 +295,7 @@ module Twilio
|
|
295
295
|
|
296
296
|
unless @webhooks
|
297
297
|
@webhooks = WebhookList.new(
|
298
|
-
@version,
|
299
|
-
conversation_sid: @solution[:sid]
|
300
|
-
|
301
|
-
)
|
298
|
+
@version, conversation_sid: @solution[:sid], )
|
302
299
|
end
|
303
300
|
|
304
301
|
@webhooks
|
@@ -317,10 +314,7 @@ module Twilio
|
|
317
314
|
|
318
315
|
unless @messages
|
319
316
|
@messages = MessageList.new(
|
320
|
-
@version,
|
321
|
-
conversation_sid: @solution[:sid]
|
322
|
-
|
323
|
-
)
|
317
|
+
@version, conversation_sid: @solution[:sid], )
|
324
318
|
end
|
325
319
|
|
326
320
|
@messages
|
@@ -339,10 +333,7 @@ module Twilio
|
|
339
333
|
|
340
334
|
unless @participants
|
341
335
|
@participants = ParticipantList.new(
|
342
|
-
@version,
|
343
|
-
conversation_sid: @solution[:sid]
|
344
|
-
|
345
|
-
)
|
336
|
+
@version, conversation_sid: @solution[:sid], )
|
346
337
|
end
|
347
338
|
|
348
339
|
@participants
|
@@ -275,12 +275,7 @@ module Twilio
|
|
275
275
|
|
276
276
|
unless @delivery_receipts
|
277
277
|
@delivery_receipts = DeliveryReceiptList.new(
|
278
|
-
@version,
|
279
|
-
chat_service_sid: @solution[:chat_service_sid],
|
280
|
-
conversation_sid: @solution[:conversation_sid],
|
281
|
-
message_sid: @solution[:sid]
|
282
|
-
|
283
|
-
)
|
278
|
+
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:conversation_sid], message_sid: @solution[:sid], )
|
284
279
|
end
|
285
280
|
|
286
281
|
@delivery_receipts
|
@@ -301,11 +301,7 @@ module Twilio
|
|
301
301
|
|
302
302
|
unless @participants
|
303
303
|
@participants = ParticipantList.new(
|
304
|
-
@version,
|
305
|
-
chat_service_sid: @solution[:chat_service_sid],
|
306
|
-
conversation_sid: @solution[:sid]
|
307
|
-
|
308
|
-
)
|
304
|
+
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], )
|
309
305
|
end
|
310
306
|
|
311
307
|
@participants
|
@@ -324,11 +320,7 @@ module Twilio
|
|
324
320
|
|
325
321
|
unless @messages
|
326
322
|
@messages = MessageList.new(
|
327
|
-
@version,
|
328
|
-
chat_service_sid: @solution[:chat_service_sid],
|
329
|
-
conversation_sid: @solution[:sid]
|
330
|
-
|
331
|
-
)
|
323
|
+
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], )
|
332
324
|
end
|
333
325
|
|
334
326
|
@messages
|
@@ -347,11 +339,7 @@ module Twilio
|
|
347
339
|
|
348
340
|
unless @webhooks
|
349
341
|
@webhooks = WebhookList.new(
|
350
|
-
@version,
|
351
|
-
chat_service_sid: @solution[:chat_service_sid],
|
352
|
-
conversation_sid: @solution[:sid]
|
353
|
-
|
354
|
-
)
|
342
|
+
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], )
|
355
343
|
end
|
356
344
|
|
357
345
|
@webhooks
|
@@ -245,11 +245,7 @@ module Twilio
|
|
245
245
|
|
246
246
|
unless @user_conversations
|
247
247
|
@user_conversations = UserConversationList.new(
|
248
|
-
@version,
|
249
|
-
chat_service_sid: @solution[:chat_service_sid],
|
250
|
-
user_sid: @solution[:sid]
|
251
|
-
|
252
|
-
)
|
248
|
+
@version, chat_service_sid: @solution[:chat_service_sid], user_sid: @solution[:sid], )
|
253
249
|
end
|
254
250
|
|
255
251
|
@user_conversations
|
@@ -192,12 +192,8 @@ module Twilio
|
|
192
192
|
def participant_conversations
|
193
193
|
unless @participant_conversations
|
194
194
|
@participant_conversations = ParticipantConversationList.new(
|
195
|
-
@version,
|
196
|
-
service_sid: @solution[:sid]
|
197
|
-
|
198
|
-
)
|
195
|
+
@version, chat_service_sid: @solution[:sid], )
|
199
196
|
end
|
200
|
-
|
201
197
|
@participant_conversations
|
202
198
|
end
|
203
199
|
##
|
@@ -214,10 +210,7 @@ module Twilio
|
|
214
210
|
|
215
211
|
unless @users
|
216
212
|
@users = UserList.new(
|
217
|
-
@version,
|
218
|
-
service_sid: @solution[:sid]
|
219
|
-
|
220
|
-
)
|
213
|
+
@version, chat_service_sid: @solution[:sid], )
|
221
214
|
end
|
222
215
|
|
223
216
|
@users
|
@@ -236,10 +229,7 @@ module Twilio
|
|
236
229
|
|
237
230
|
unless @roles
|
238
231
|
@roles = RoleList.new(
|
239
|
-
@version,
|
240
|
-
service_sid: @solution[:sid]
|
241
|
-
|
242
|
-
)
|
232
|
+
@version, chat_service_sid: @solution[:sid], )
|
243
233
|
end
|
244
234
|
|
245
235
|
@roles
|
@@ -268,10 +258,7 @@ module Twilio
|
|
268
258
|
|
269
259
|
unless @bindings
|
270
260
|
@bindings = BindingList.new(
|
271
|
-
@version,
|
272
|
-
service_sid: @solution[:sid]
|
273
|
-
|
274
|
-
)
|
261
|
+
@version, chat_service_sid: @solution[:sid], )
|
275
262
|
end
|
276
263
|
|
277
264
|
@bindings
|
@@ -290,10 +277,7 @@ module Twilio
|
|
290
277
|
|
291
278
|
unless @conversations
|
292
279
|
@conversations = ConversationList.new(
|
293
|
-
@version,
|
294
|
-
service_sid: @solution[:sid]
|
295
|
-
|
296
|
-
)
|
280
|
+
@version, chat_service_sid: @solution[:sid], )
|
297
281
|
end
|
298
282
|
|
299
283
|
@conversations
|
@@ -230,12 +230,8 @@ module Twilio
|
|
230
230
|
def sink_test
|
231
231
|
unless @sink_test
|
232
232
|
@sink_test = SinkTestList.new(
|
233
|
-
@version,
|
234
|
-
sink_sid: @solution[:sid]
|
235
|
-
|
236
|
-
)
|
233
|
+
@version, sid: @solution[:sid], )
|
237
234
|
end
|
238
|
-
|
239
235
|
@sink_test
|
240
236
|
end
|
241
237
|
##
|
@@ -245,12 +241,8 @@ module Twilio
|
|
245
241
|
def sink_validate
|
246
242
|
unless @sink_validate
|
247
243
|
@sink_validate = SinkValidateList.new(
|
248
|
-
@version,
|
249
|
-
sink_sid: @solution[:sid]
|
250
|
-
|
251
|
-
)
|
244
|
+
@version, sid: @solution[:sid], )
|
252
245
|
end
|
253
|
-
|
254
246
|
@sink_validate
|
255
247
|
end
|
256
248
|
|
@@ -232,10 +232,7 @@ module Twilio
|
|
232
232
|
|
233
233
|
unless @subscribed_events
|
234
234
|
@subscribed_events = SubscribedEventList.new(
|
235
|
-
@version,
|
236
|
-
subscription_sid: @solution[:sid]
|
237
|
-
|
238
|
-
)
|
235
|
+
@version, subscription_sid: @solution[:sid], )
|
239
236
|
end
|
240
237
|
|
241
238
|
@subscribed_events
|
@@ -26,57 +26,51 @@ module Twilio
|
|
26
26
|
super(version)
|
27
27
|
# Path Solution
|
28
28
|
@solution = { }
|
29
|
-
@uri = "/Insights/
|
29
|
+
@uri = "/Insights/QualityManagement/Assessments"
|
30
30
|
|
31
31
|
end
|
32
32
|
##
|
33
33
|
# Create the AssessmentsInstance
|
34
|
-
# @param [String]
|
34
|
+
# @param [String] category_sid The SID of the category
|
35
35
|
# @param [String] category_name The name of the category
|
36
36
|
# @param [String] segment_id Segment Id of the conversation
|
37
|
-
# @param [String] user_name Name of the user assessing conversation
|
38
|
-
# @param [String] user_email Email of the user assessing conversation
|
39
37
|
# @param [String] agent_id The id of the Agent
|
40
38
|
# @param [Float] offset The offset of the conversation.
|
41
|
-
# @param [String] metric_id The question
|
39
|
+
# @param [String] metric_id The question SID selected for assessment
|
42
40
|
# @param [String] metric_name The question name of the assessment
|
43
41
|
# @param [String] answer_text The answer text selected by user
|
44
42
|
# @param [String] answer_id The id of the answer selected by user
|
45
|
-
# @param [String]
|
46
|
-
# @param [String]
|
43
|
+
# @param [String] questionnaire_sid Questionnaire SID of the associated question
|
44
|
+
# @param [String] authorization The Authorization HTTP request header
|
47
45
|
# @return [AssessmentsInstance] Created AssessmentsInstance
|
48
46
|
def create(
|
49
|
-
|
47
|
+
category_sid: nil,
|
50
48
|
category_name: nil,
|
51
49
|
segment_id: nil,
|
52
|
-
user_name: nil,
|
53
|
-
user_email: nil,
|
54
50
|
agent_id: nil,
|
55
51
|
offset: nil,
|
56
52
|
metric_id: nil,
|
57
53
|
metric_name: nil,
|
58
54
|
answer_text: nil,
|
59
55
|
answer_id: nil,
|
60
|
-
|
61
|
-
|
56
|
+
questionnaire_sid: nil,
|
57
|
+
authorization: :unset
|
62
58
|
)
|
63
59
|
|
64
60
|
data = Twilio::Values.of({
|
65
|
-
'
|
61
|
+
'CategorySid' => category_sid,
|
66
62
|
'CategoryName' => category_name,
|
67
63
|
'SegmentId' => segment_id,
|
68
|
-
'UserName' => user_name,
|
69
|
-
'UserEmail' => user_email,
|
70
64
|
'AgentId' => agent_id,
|
71
65
|
'Offset' => offset,
|
72
66
|
'MetricId' => metric_id,
|
73
67
|
'MetricName' => metric_name,
|
74
68
|
'AnswerText' => answer_text,
|
75
69
|
'AnswerId' => answer_id,
|
76
|
-
'
|
70
|
+
'QuestionnaireSid' => questionnaire_sid,
|
77
71
|
})
|
78
72
|
|
79
|
-
headers = Twilio::Values.of({ '
|
73
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
80
74
|
payload = @version.create('POST', @uri, data: data, headers: headers)
|
81
75
|
AssessmentsInstance.new(
|
82
76
|
@version,
|
@@ -89,7 +83,7 @@ module Twilio
|
|
89
83
|
# Lists AssessmentsInstance records from the API as a list.
|
90
84
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
91
85
|
# memory before returning.
|
92
|
-
# @param [String]
|
86
|
+
# @param [String] authorization The Authorization HTTP request header
|
93
87
|
# @param [String] segment_id The id of the segment.
|
94
88
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
95
89
|
# guarantees to never return more than limit. Default is no limit
|
@@ -98,9 +92,9 @@ module Twilio
|
|
98
92
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
99
93
|
# efficient page size, i.e. min(limit, 1000)
|
100
94
|
# @return [Array] Array of up to limit results
|
101
|
-
def list(
|
95
|
+
def list(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
|
102
96
|
self.stream(
|
103
|
-
|
97
|
+
authorization: authorization,
|
104
98
|
segment_id: segment_id,
|
105
99
|
limit: limit,
|
106
100
|
page_size: page_size
|
@@ -111,7 +105,7 @@ module Twilio
|
|
111
105
|
# Streams Instance records from the API as an Enumerable.
|
112
106
|
# This operation lazily loads records as efficiently as possible until the limit
|
113
107
|
# is reached.
|
114
|
-
# @param [String]
|
108
|
+
# @param [String] authorization The Authorization HTTP request header
|
115
109
|
# @param [String] segment_id The id of the segment.
|
116
110
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
117
111
|
# guarantees to never return more than limit. Default is no limit
|
@@ -120,11 +114,11 @@ module Twilio
|
|
120
114
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
121
115
|
# efficient page size, i.e. min(limit, 1000)
|
122
116
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
123
|
-
def stream(
|
117
|
+
def stream(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
|
124
118
|
limits = @version.read_limits(limit, page_size)
|
125
119
|
|
126
120
|
page = self.page(
|
127
|
-
|
121
|
+
authorization: authorization,
|
128
122
|
segment_id: segment_id,
|
129
123
|
page_size: limits[:page_size], )
|
130
124
|
|
@@ -148,16 +142,16 @@ module Twilio
|
|
148
142
|
##
|
149
143
|
# Retrieve a single page of AssessmentsInstance records from the API.
|
150
144
|
# Request is executed immediately.
|
151
|
-
# @param [String]
|
145
|
+
# @param [String] authorization The Authorization HTTP request header
|
152
146
|
# @param [String] segment_id The id of the segment.
|
153
147
|
# @param [String] page_token PageToken provided by the API
|
154
148
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
155
149
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
156
150
|
# @return [Page] Page of AssessmentsInstance
|
157
|
-
def page(
|
151
|
+
def page(authorization: :unset, segment_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
158
152
|
params = Twilio::Values.of({
|
159
153
|
|
160
|
-
'
|
154
|
+
'Authorization' => authorization,
|
161
155
|
|
162
156
|
'SegmentId' => segment_id,
|
163
157
|
|
@@ -199,14 +193,14 @@ module Twilio
|
|
199
193
|
##
|
200
194
|
# Initialize the AssessmentsContext
|
201
195
|
# @param [Version] version Version that contains the resource
|
202
|
-
# @param [String]
|
196
|
+
# @param [String] assessment_sid The SID of the assessment to be modified
|
203
197
|
# @return [AssessmentsContext] AssessmentsContext
|
204
|
-
def initialize(version,
|
198
|
+
def initialize(version, assessment_sid)
|
205
199
|
super(version)
|
206
200
|
|
207
201
|
# Path Solution
|
208
|
-
@solution = {
|
209
|
-
@uri = "/Insights/
|
202
|
+
@solution = { assessment_sid: assessment_sid, }
|
203
|
+
@uri = "/Insights/QualityManagement/Assessments/#{@solution[:assessment_sid]}"
|
210
204
|
|
211
205
|
|
212
206
|
end
|
@@ -215,13 +209,13 @@ module Twilio
|
|
215
209
|
# @param [Float] offset The offset of the conversation
|
216
210
|
# @param [String] answer_text The answer text selected by user
|
217
211
|
# @param [String] answer_id The id of the answer selected by user
|
218
|
-
# @param [String]
|
212
|
+
# @param [String] authorization The Authorization HTTP request header
|
219
213
|
# @return [AssessmentsInstance] Updated AssessmentsInstance
|
220
214
|
def update(
|
221
215
|
offset: nil,
|
222
216
|
answer_text: nil,
|
223
217
|
answer_id: nil,
|
224
|
-
|
218
|
+
authorization: :unset
|
225
219
|
)
|
226
220
|
|
227
221
|
data = Twilio::Values.of({
|
@@ -230,12 +224,12 @@ module Twilio
|
|
230
224
|
'AnswerId' => answer_id,
|
231
225
|
})
|
232
226
|
|
233
|
-
headers = Twilio::Values.of({ '
|
227
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
234
228
|
payload = @version.update('POST', @uri, data: data, headers: headers)
|
235
229
|
AssessmentsInstance.new(
|
236
230
|
@version,
|
237
231
|
payload,
|
238
|
-
|
232
|
+
assessment_sid: @solution[:assessment_sid],
|
239
233
|
)
|
240
234
|
end
|
241
235
|
|
@@ -293,13 +287,13 @@ module Twilio
|
|
293
287
|
# resource.
|
294
288
|
# @param [String] sid The SID of the Call resource to fetch.
|
295
289
|
# @return [AssessmentsInstance] AssessmentsInstance
|
296
|
-
def initialize(version, payload ,
|
290
|
+
def initialize(version, payload , assessment_sid: nil)
|
297
291
|
super(version)
|
298
292
|
|
299
293
|
# Marshaled Properties
|
300
294
|
@properties = {
|
301
295
|
'account_sid' => payload['account_sid'],
|
302
|
-
'
|
296
|
+
'assessment_sid' => payload['assessment_sid'],
|
303
297
|
'offset' => payload['offset'],
|
304
298
|
'report' => payload['report'],
|
305
299
|
'weight' => payload['weight'],
|
@@ -316,7 +310,7 @@ module Twilio
|
|
316
310
|
|
317
311
|
# Context
|
318
312
|
@instance_context = nil
|
319
|
-
@params = { '
|
313
|
+
@params = { 'assessment_sid' => assessment_sid || @properties['assessment_sid'] , }
|
320
314
|
end
|
321
315
|
|
322
316
|
##
|
@@ -325,7 +319,7 @@ module Twilio
|
|
325
319
|
# @return [AssessmentsContext] CallContext for this CallInstance
|
326
320
|
def context
|
327
321
|
unless @instance_context
|
328
|
-
@instance_context = AssessmentsContext.new(@version , @params['
|
322
|
+
@instance_context = AssessmentsContext.new(@version , @params['assessment_sid'])
|
329
323
|
end
|
330
324
|
@instance_context
|
331
325
|
end
|
@@ -337,9 +331,9 @@ module Twilio
|
|
337
331
|
end
|
338
332
|
|
339
333
|
##
|
340
|
-
# @return [String] The
|
341
|
-
def
|
342
|
-
@properties['
|
334
|
+
# @return [String] The SID of the assessment
|
335
|
+
def assessment_sid
|
336
|
+
@properties['assessment_sid']
|
343
337
|
end
|
344
338
|
|
345
339
|
##
|
@@ -419,20 +413,20 @@ module Twilio
|
|
419
413
|
# @param [Float] offset The offset of the conversation
|
420
414
|
# @param [String] answer_text The answer text selected by user
|
421
415
|
# @param [String] answer_id The id of the answer selected by user
|
422
|
-
# @param [String]
|
416
|
+
# @param [String] authorization The Authorization HTTP request header
|
423
417
|
# @return [AssessmentsInstance] Updated AssessmentsInstance
|
424
418
|
def update(
|
425
419
|
offset: nil,
|
426
420
|
answer_text: nil,
|
427
421
|
answer_id: nil,
|
428
|
-
|
422
|
+
authorization: :unset
|
429
423
|
)
|
430
424
|
|
431
425
|
context.update(
|
432
426
|
offset: offset,
|
433
427
|
answer_text: answer_text,
|
434
428
|
answer_id: answer_id,
|
435
|
-
|
429
|
+
authorization: authorization,
|
436
430
|
)
|
437
431
|
end
|
438
432
|
|