twilio-ruby 5.27.0 → 5.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.dockerignore +1 -0
- data/CHANGES.md +13 -0
- data/CONTRIBUTING.md +2 -0
- data/Dockerfile +2 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -9
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +5 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +1 -1
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +12 -12
- data/lib/twilio-ruby/rest/flex_api.rb +6 -3
- data/lib/twilio-ruby/rest/flex_api/v1.rb +3 -3
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +23 -23
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +39 -37
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +102 -96
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +20 -20
- data/lib/twilio-ruby/rest/messaging.rb +3 -2
- data/lib/twilio-ruby/rest/messaging/v1.rb +2 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +124 -91
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +22 -18
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +22 -16
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +18 -20
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +48 -44
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +46 -48
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +55 -62
- data/lib/twilio-ruby/rest/messaging/v1/session/webhook.rb +61 -65
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +30 -36
- data/lib/twilio-ruby/rest/monitor.rb +4 -2
- data/lib/twilio-ruby/rest/monitor/v1.rb +2 -2
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +45 -57
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +47 -50
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -3
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +6 -6
- data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +1 -1
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +55 -55
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +4 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/serverless.rb +2 -1
- data/lib/twilio-ruby/rest/serverless/v1.rb +1 -2
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +27 -28
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +25 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +26 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +21 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +31 -31
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +35 -35
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +22 -22
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +12 -12
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +7 -4
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +6 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +15 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +6 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +15 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -6
- data/lib/twilio-ruby/rest/taskrouter.rb +2 -1
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +102 -95
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +52 -44
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +90 -81
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +152 -136
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +35 -29
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +96 -89
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +61 -61
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +27 -21
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +46 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +57 -64
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +98 -79
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +41 -39
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +39 -33
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +32 -31
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +16 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +42 -42
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +75 -72
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +59 -51
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +24 -18
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +54 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +48 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +17 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +44 -42
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +24 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +1 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +1 -2
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +12 -12
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +6 -6
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +6 -6
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +2 -1
- data/lib/twilio-ruby/rest/video.rb +8 -8
- data/lib/twilio-ruby/rest/video/v1.rb +4 -7
- data/lib/twilio-ruby/rest/video/v1/composition.rb +89 -98
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +224 -195
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +34 -34
- data/lib/twilio-ruby/rest/video/v1/recording.rb +53 -55
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +32 -32
- data/lib/twilio-ruby/rest/video/v1/room.rb +71 -61
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +45 -33
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +56 -57
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +25 -22
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +10 -10
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +24 -23
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +5 -5
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/conversations/v1/conversation/message_spec.rb +58 -0
- metadata +4 -4
|
@@ -15,7 +15,8 @@ module Twilio
|
|
|
15
15
|
##
|
|
16
16
|
# Initialize the TaskQueueList
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
|
18
|
-
# @param [String] workspace_sid The
|
|
18
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
19
|
+
# TaskQueue.
|
|
19
20
|
# @return [TaskQueueList] TaskQueueList
|
|
20
21
|
def initialize(version, workspace_sid: nil)
|
|
21
22
|
super(version)
|
|
@@ -32,12 +33,13 @@ module Twilio
|
|
|
32
33
|
# Lists TaskQueueInstance records from the API as a list.
|
|
33
34
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
34
35
|
# memory before returning.
|
|
35
|
-
# @param [String] friendly_name
|
|
36
|
-
#
|
|
37
|
-
# @param [String] evaluate_worker_attributes
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# @param [String] worker_sid The
|
|
36
|
+
# @param [String] friendly_name The `friendly_name` of the TaskQueue resources to
|
|
37
|
+
# read.
|
|
38
|
+
# @param [String] evaluate_worker_attributes The attributes of the Workers to
|
|
39
|
+
# read. Returns the TaskQueues with Workers that match the attributes specified in
|
|
40
|
+
# this parameter.
|
|
41
|
+
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
|
42
|
+
# read.
|
|
41
43
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
42
44
|
# guarantees to never return more than limit. Default is no limit
|
|
43
45
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -59,12 +61,13 @@ module Twilio
|
|
|
59
61
|
# Streams TaskQueueInstance records from the API as an Enumerable.
|
|
60
62
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
61
63
|
# is reached.
|
|
62
|
-
# @param [String] friendly_name
|
|
63
|
-
#
|
|
64
|
-
# @param [String] evaluate_worker_attributes
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
# @param [String] worker_sid The
|
|
64
|
+
# @param [String] friendly_name The `friendly_name` of the TaskQueue resources to
|
|
65
|
+
# read.
|
|
66
|
+
# @param [String] evaluate_worker_attributes The attributes of the Workers to
|
|
67
|
+
# read. Returns the TaskQueues with Workers that match the attributes specified in
|
|
68
|
+
# this parameter.
|
|
69
|
+
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
|
70
|
+
# read.
|
|
68
71
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
69
72
|
# guarantees to never return more than limit. Default is no limit.
|
|
70
73
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -102,12 +105,13 @@ module Twilio
|
|
|
102
105
|
##
|
|
103
106
|
# Retrieve a single page of TaskQueueInstance records from the API.
|
|
104
107
|
# Request is executed immediately.
|
|
105
|
-
# @param [String] friendly_name
|
|
106
|
-
#
|
|
107
|
-
# @param [String] evaluate_worker_attributes
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
# @param [String] worker_sid The
|
|
108
|
+
# @param [String] friendly_name The `friendly_name` of the TaskQueue resources to
|
|
109
|
+
# read.
|
|
110
|
+
# @param [String] evaluate_worker_attributes The attributes of the Workers to
|
|
111
|
+
# read. Returns the TaskQueues with Workers that match the attributes specified in
|
|
112
|
+
# this parameter.
|
|
113
|
+
# @param [String] worker_sid The SID of the Worker with the TaskQueue resources to
|
|
114
|
+
# read.
|
|
111
115
|
# @param [String] page_token PageToken provided by the API
|
|
112
116
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
113
117
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
@@ -145,25 +149,26 @@ module Twilio
|
|
|
145
149
|
##
|
|
146
150
|
# Retrieve a single page of TaskQueueInstance records from the API.
|
|
147
151
|
# Request is executed immediately.
|
|
148
|
-
# @param [String] friendly_name
|
|
149
|
-
# example
|
|
150
|
-
# @param [String] target_workers A string
|
|
151
|
-
# for any Tasks that enter
|
|
152
|
-
#
|
|
153
|
-
# until they are
|
|
154
|
-
#
|
|
155
|
-
#
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
#
|
|
152
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
153
|
+
# the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
|
|
154
|
+
# @param [String] target_workers A string that describes the Worker selection
|
|
155
|
+
# criteria for any Tasks that enter the TaskQueue. For example, `'"language" ==
|
|
156
|
+
# "spanish"'`. The default value is `1==1`. If this value is empty, Tasks will
|
|
157
|
+
# wait in the TaskQueue until they are deleted or moved to another TaskQueue. For
|
|
158
|
+
# more information about Worker selection, see [Describing Worker selection
|
|
159
|
+
# criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers).
|
|
160
|
+
# @param [String] max_reserved_workers The maximum number of Workers to reserve
|
|
161
|
+
# for the assignment of a Task in the queue. Can be an integer between 1 and 50,
|
|
162
|
+
# inclusive and defaults to 1.
|
|
163
|
+
# @param [task_queue.TaskOrder] task_order How Tasks will be assigned to Workers.
|
|
164
|
+
# Set this parameter to `LIFO` to assign most recently created Task first or FIFO
|
|
165
|
+
# to assign the oldest Task first. Default is `FIFO`. [Click
|
|
166
|
+
# here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo)
|
|
167
|
+
# to learn more.
|
|
168
|
+
# @param [String] reservation_activity_sid The SID of the Activity to assign
|
|
169
|
+
# Workers when a task is reserved for them.
|
|
170
|
+
# @param [String] assignment_activity_sid The SID of the Activity to assign
|
|
171
|
+
# Workers when a task is assigned to them.
|
|
167
172
|
# @return [TaskQueueInstance] Newly created TaskQueueInstance
|
|
168
173
|
def create(friendly_name: nil, target_workers: :unset, max_reserved_workers: :unset, task_order: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset)
|
|
169
174
|
data = Twilio::Values.of({
|
|
@@ -232,8 +237,9 @@ module Twilio
|
|
|
232
237
|
##
|
|
233
238
|
# Initialize the TaskQueueContext
|
|
234
239
|
# @param [Version] version Version that contains the resource
|
|
235
|
-
# @param [String] workspace_sid The
|
|
236
|
-
#
|
|
240
|
+
# @param [String] workspace_sid The SID of the Workspace with the TaskQueue to
|
|
241
|
+
# fetch.
|
|
242
|
+
# @param [String] sid The SID of the TaskQueue resource to fetch.
|
|
237
243
|
# @return [TaskQueueContext] TaskQueueContext
|
|
238
244
|
def initialize(version, workspace_sid, sid)
|
|
239
245
|
super(version)
|
|
@@ -270,24 +276,24 @@ module Twilio
|
|
|
270
276
|
|
|
271
277
|
##
|
|
272
278
|
# Update the TaskQueueInstance
|
|
273
|
-
# @param [String] friendly_name
|
|
274
|
-
# example
|
|
279
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
280
|
+
# the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
|
|
275
281
|
# @param [String] target_workers A string describing the Worker selection criteria
|
|
276
|
-
# for any Tasks that enter
|
|
277
|
-
#
|
|
278
|
-
#
|
|
282
|
+
# for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If
|
|
283
|
+
# no TargetWorkers parameter is provided, Tasks will wait in the queue until they
|
|
284
|
+
# are either deleted or moved to another queue. Additional examples on how to
|
|
279
285
|
# describing Worker selection criteria below.
|
|
280
|
-
# @param [String] reservation_activity_sid
|
|
281
|
-
# Workers when
|
|
282
|
-
# @param [String] assignment_activity_sid
|
|
283
|
-
# Workers when
|
|
284
|
-
# @param [String] max_reserved_workers The maximum
|
|
285
|
-
# reservations for the assignment of a task while in
|
|
286
|
-
# @param [task_queue.TaskOrder] task_order
|
|
287
|
-
#
|
|
288
|
-
#
|
|
289
|
-
#
|
|
290
|
-
#
|
|
286
|
+
# @param [String] reservation_activity_sid The SID of the Activity to assign
|
|
287
|
+
# Workers when a task is reserved for them.
|
|
288
|
+
# @param [String] assignment_activity_sid The SID of the Activity to assign
|
|
289
|
+
# Workers when a task is assigned for them.
|
|
290
|
+
# @param [String] max_reserved_workers The maximum number of Workers to create
|
|
291
|
+
# reservations for the assignment of a task while in the queue. Maximum of 50.
|
|
292
|
+
# @param [task_queue.TaskOrder] task_order How Tasks will be assigned to Workers.
|
|
293
|
+
# Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the
|
|
294
|
+
# oldest task first and `LIFO` to assign the most recent task first. For more
|
|
295
|
+
# information, see [Queue
|
|
296
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo).
|
|
291
297
|
# @return [TaskQueueInstance] Updated TaskQueueInstance
|
|
292
298
|
def update(friendly_name: :unset, target_workers: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset, max_reserved_workers: :unset, task_order: :unset)
|
|
293
299
|
data = Twilio::Values.of({
|
|
@@ -364,8 +370,9 @@ module Twilio
|
|
|
364
370
|
# Initialize the TaskQueueInstance
|
|
365
371
|
# @param [Version] version Version that contains the resource
|
|
366
372
|
# @param [Hash] payload payload that contains response from Twilio
|
|
367
|
-
# @param [String] workspace_sid The
|
|
368
|
-
#
|
|
373
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
374
|
+
# TaskQueue.
|
|
375
|
+
# @param [String] sid The SID of the TaskQueue resource to fetch.
|
|
369
376
|
# @return [TaskQueueInstance] TaskQueueInstance
|
|
370
377
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
371
378
|
super(version)
|
|
@@ -406,91 +413,91 @@ module Twilio
|
|
|
406
413
|
end
|
|
407
414
|
|
|
408
415
|
##
|
|
409
|
-
# @return [String] The
|
|
416
|
+
# @return [String] The SID of the Account that created the resource
|
|
410
417
|
def account_sid
|
|
411
418
|
@properties['account_sid']
|
|
412
419
|
end
|
|
413
420
|
|
|
414
421
|
##
|
|
415
|
-
# @return [String]
|
|
422
|
+
# @return [String] The SID of the Activity to assign Workers when a task is assigned for them
|
|
416
423
|
def assignment_activity_sid
|
|
417
424
|
@properties['assignment_activity_sid']
|
|
418
425
|
end
|
|
419
426
|
|
|
420
427
|
##
|
|
421
|
-
# @return [String] The
|
|
428
|
+
# @return [String] The name of the Activity to assign Workers when a task is assigned for them
|
|
422
429
|
def assignment_activity_name
|
|
423
430
|
@properties['assignment_activity_name']
|
|
424
431
|
end
|
|
425
432
|
|
|
426
433
|
##
|
|
427
|
-
# @return [Time] The
|
|
434
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
|
428
435
|
def date_created
|
|
429
436
|
@properties['date_created']
|
|
430
437
|
end
|
|
431
438
|
|
|
432
439
|
##
|
|
433
|
-
# @return [Time] The
|
|
440
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
|
434
441
|
def date_updated
|
|
435
442
|
@properties['date_updated']
|
|
436
443
|
end
|
|
437
444
|
|
|
438
445
|
##
|
|
439
|
-
# @return [String]
|
|
446
|
+
# @return [String] The string that you assigned to describe the resource
|
|
440
447
|
def friendly_name
|
|
441
448
|
@properties['friendly_name']
|
|
442
449
|
end
|
|
443
450
|
|
|
444
451
|
##
|
|
445
|
-
# @return [String] The maximum
|
|
452
|
+
# @return [String] The maximum number of Workers to reserve
|
|
446
453
|
def max_reserved_workers
|
|
447
454
|
@properties['max_reserved_workers']
|
|
448
455
|
end
|
|
449
456
|
|
|
450
457
|
##
|
|
451
|
-
# @return [String]
|
|
458
|
+
# @return [String] The SID of the Activity to assign Workers once a task is reserved for them
|
|
452
459
|
def reservation_activity_sid
|
|
453
460
|
@properties['reservation_activity_sid']
|
|
454
461
|
end
|
|
455
462
|
|
|
456
463
|
##
|
|
457
|
-
# @return [String] The
|
|
464
|
+
# @return [String] The name of the Activity to assign Workers once a task is reserved for them
|
|
458
465
|
def reservation_activity_name
|
|
459
466
|
@properties['reservation_activity_name']
|
|
460
467
|
end
|
|
461
468
|
|
|
462
469
|
##
|
|
463
|
-
# @return [String] The unique
|
|
470
|
+
# @return [String] The unique string that identifies the resource
|
|
464
471
|
def sid
|
|
465
472
|
@properties['sid']
|
|
466
473
|
end
|
|
467
474
|
|
|
468
475
|
##
|
|
469
|
-
# @return [String] A string describing the Worker selection criteria for any Tasks that enter
|
|
476
|
+
# @return [String] A string describing the Worker selection criteria for any Tasks that enter the TaskQueue
|
|
470
477
|
def target_workers
|
|
471
478
|
@properties['target_workers']
|
|
472
479
|
end
|
|
473
480
|
|
|
474
481
|
##
|
|
475
|
-
# @return [task_queue.TaskOrder]
|
|
482
|
+
# @return [task_queue.TaskOrder] How Tasks will be assigned to Workers
|
|
476
483
|
def task_order
|
|
477
484
|
@properties['task_order']
|
|
478
485
|
end
|
|
479
486
|
|
|
480
487
|
##
|
|
481
|
-
# @return [String] The
|
|
488
|
+
# @return [String] The absolute URL of the TaskQueue resource
|
|
482
489
|
def url
|
|
483
490
|
@properties['url']
|
|
484
491
|
end
|
|
485
492
|
|
|
486
493
|
##
|
|
487
|
-
# @return [String] The
|
|
494
|
+
# @return [String] The SID of the Workspace that contains the TaskQueue
|
|
488
495
|
def workspace_sid
|
|
489
496
|
@properties['workspace_sid']
|
|
490
497
|
end
|
|
491
498
|
|
|
492
499
|
##
|
|
493
|
-
# @return [String] The
|
|
500
|
+
# @return [String] The URLs of related resources
|
|
494
501
|
def links
|
|
495
502
|
@properties['links']
|
|
496
503
|
end
|
|
@@ -504,24 +511,24 @@ module Twilio
|
|
|
504
511
|
|
|
505
512
|
##
|
|
506
513
|
# Update the TaskQueueInstance
|
|
507
|
-
# @param [String] friendly_name
|
|
508
|
-
# example
|
|
514
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
515
|
+
# the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
|
|
509
516
|
# @param [String] target_workers A string describing the Worker selection criteria
|
|
510
|
-
# for any Tasks that enter
|
|
511
|
-
#
|
|
512
|
-
#
|
|
517
|
+
# for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If
|
|
518
|
+
# no TargetWorkers parameter is provided, Tasks will wait in the queue until they
|
|
519
|
+
# are either deleted or moved to another queue. Additional examples on how to
|
|
513
520
|
# describing Worker selection criteria below.
|
|
514
|
-
# @param [String] reservation_activity_sid
|
|
515
|
-
# Workers when
|
|
516
|
-
# @param [String] assignment_activity_sid
|
|
517
|
-
# Workers when
|
|
518
|
-
# @param [String] max_reserved_workers The maximum
|
|
519
|
-
# reservations for the assignment of a task while in
|
|
520
|
-
# @param [task_queue.TaskOrder] task_order
|
|
521
|
-
#
|
|
522
|
-
#
|
|
523
|
-
#
|
|
524
|
-
#
|
|
521
|
+
# @param [String] reservation_activity_sid The SID of the Activity to assign
|
|
522
|
+
# Workers when a task is reserved for them.
|
|
523
|
+
# @param [String] assignment_activity_sid The SID of the Activity to assign
|
|
524
|
+
# Workers when a task is assigned for them.
|
|
525
|
+
# @param [String] max_reserved_workers The maximum number of Workers to create
|
|
526
|
+
# reservations for the assignment of a task while in the queue. Maximum of 50.
|
|
527
|
+
# @param [task_queue.TaskOrder] task_order How Tasks will be assigned to Workers.
|
|
528
|
+
# Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the
|
|
529
|
+
# oldest task first and `LIFO` to assign the most recent task first. For more
|
|
530
|
+
# information, see [Queue
|
|
531
|
+
# Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo).
|
|
525
532
|
# @return [TaskQueueInstance] Updated TaskQueueInstance
|
|
526
533
|
def update(friendly_name: :unset, target_workers: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset, max_reserved_workers: :unset, task_order: :unset)
|
|
527
534
|
context.update(
|
data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb
CHANGED
|
@@ -16,8 +16,10 @@ module Twilio
|
|
|
16
16
|
##
|
|
17
17
|
# Initialize the TaskQueueCumulativeStatisticsList
|
|
18
18
|
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @param [String] workspace_sid The
|
|
20
|
-
#
|
|
19
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
20
|
+
# TaskQueue.
|
|
21
|
+
# @param [String] task_queue_sid The SID of the TaskQueue from which these
|
|
22
|
+
# statistics were calculated.
|
|
21
23
|
# @return [TaskQueueCumulativeStatisticsList] TaskQueueCumulativeStatisticsList
|
|
22
24
|
def initialize(version, workspace_sid: nil, task_queue_sid: nil)
|
|
23
25
|
super(version)
|
|
@@ -71,8 +73,10 @@ module Twilio
|
|
|
71
73
|
##
|
|
72
74
|
# Initialize the TaskQueueCumulativeStatisticsContext
|
|
73
75
|
# @param [Version] version Version that contains the resource
|
|
74
|
-
# @param [String] workspace_sid The
|
|
75
|
-
#
|
|
76
|
+
# @param [String] workspace_sid The SID of the Workspace with the TaskQueue to
|
|
77
|
+
# fetch.
|
|
78
|
+
# @param [String] task_queue_sid The SID of the TaskQueue for which to fetch
|
|
79
|
+
# statistics.
|
|
76
80
|
# @return [TaskQueueCumulativeStatisticsContext] TaskQueueCumulativeStatisticsContext
|
|
77
81
|
def initialize(version, workspace_sid, task_queue_sid)
|
|
78
82
|
super(version)
|
|
@@ -84,23 +88,20 @@ module Twilio
|
|
|
84
88
|
|
|
85
89
|
##
|
|
86
90
|
# Fetch a TaskQueueCumulativeStatisticsInstance
|
|
87
|
-
# @param [Time] end_date
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
# @param [String] minutes
|
|
91
|
-
# past.
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
101
|
-
# would show splits of tasks that were canceled or accepted before or after 5
|
|
102
|
-
# seconds and respectively, 30 seconds. This is great for showing short abandoned
|
|
103
|
-
# tasks or tasks that failed to meet your SLA.
|
|
91
|
+
# @param [Time] end_date Only calculate statistics from this date and time and
|
|
92
|
+
# earlier, specified in GMT as an [ISO
|
|
93
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
94
|
+
# @param [String] minutes Only calculate statistics since this many minutes in the
|
|
95
|
+
# past. The default is 15 minutes.
|
|
96
|
+
# @param [Time] start_date Only calculate statistics from this date and time and
|
|
97
|
+
# later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
98
|
+
# @param [String] task_channel Only calculate cumulative statistics on this
|
|
99
|
+
# TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`,
|
|
100
|
+
# `sms`, or `default`.
|
|
101
|
+
# @param [String] split_by_wait_time A comma separated list of values that
|
|
102
|
+
# describes the thresholds, in seconds, to calculate statistics on. For each
|
|
103
|
+
# threshold specified, the number of Tasks canceled and reservations accepted
|
|
104
|
+
# above and below the specified thresholds in seconds are computed.
|
|
104
105
|
# @return [TaskQueueCumulativeStatisticsInstance] Fetched TaskQueueCumulativeStatisticsInstance
|
|
105
106
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
|
106
107
|
params = Twilio::Values.of({
|
|
@@ -145,8 +146,10 @@ module Twilio
|
|
|
145
146
|
# Initialize the TaskQueueCumulativeStatisticsInstance
|
|
146
147
|
# @param [Version] version Version that contains the resource
|
|
147
148
|
# @param [Hash] payload payload that contains response from Twilio
|
|
148
|
-
# @param [String] workspace_sid The
|
|
149
|
-
#
|
|
149
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
150
|
+
# TaskQueue.
|
|
151
|
+
# @param [String] task_queue_sid The SID of the TaskQueue from which these
|
|
152
|
+
# statistics were calculated.
|
|
150
153
|
# @return [TaskQueueCumulativeStatisticsInstance] TaskQueueCumulativeStatisticsInstance
|
|
151
154
|
def initialize(version, payload, workspace_sid: nil, task_queue_sid: nil)
|
|
152
155
|
super(version)
|
|
@@ -197,150 +200,147 @@ module Twilio
|
|
|
197
200
|
end
|
|
198
201
|
|
|
199
202
|
##
|
|
200
|
-
# @return [String] The
|
|
203
|
+
# @return [String] The SID of the Account that created the resource
|
|
201
204
|
def account_sid
|
|
202
205
|
@properties['account_sid']
|
|
203
206
|
end
|
|
204
207
|
|
|
205
208
|
##
|
|
206
|
-
# @return [String] The average time
|
|
209
|
+
# @return [String] The average time in seconds between Task creation and acceptance
|
|
207
210
|
def avg_task_acceptance_time
|
|
208
211
|
@properties['avg_task_acceptance_time']
|
|
209
212
|
end
|
|
210
213
|
|
|
211
214
|
##
|
|
212
|
-
# @return [Time] The
|
|
215
|
+
# @return [Time] The beginning of the interval during which these statistics were calculated
|
|
213
216
|
def start_time
|
|
214
217
|
@properties['start_time']
|
|
215
218
|
end
|
|
216
219
|
|
|
217
220
|
##
|
|
218
|
-
# @return [Time] The
|
|
221
|
+
# @return [Time] The end of the interval during which these statistics were calculated
|
|
219
222
|
def end_time
|
|
220
223
|
@properties['end_time']
|
|
221
224
|
end
|
|
222
225
|
|
|
223
226
|
##
|
|
224
|
-
# @return [String] The total number of Reservations
|
|
227
|
+
# @return [String] The total number of Reservations created for Tasks in the TaskQueue
|
|
225
228
|
def reservations_created
|
|
226
229
|
@properties['reservations_created']
|
|
227
230
|
end
|
|
228
231
|
|
|
229
232
|
##
|
|
230
|
-
# @return [String] The total number of Reservations
|
|
233
|
+
# @return [String] The total number of Reservations accepted for Tasks in the TaskQueue
|
|
231
234
|
def reservations_accepted
|
|
232
235
|
@properties['reservations_accepted']
|
|
233
236
|
end
|
|
234
237
|
|
|
235
238
|
##
|
|
236
|
-
# @return [String] The total number of Reservations
|
|
239
|
+
# @return [String] The total number of Reservations rejected for Tasks in the TaskQueue
|
|
237
240
|
def reservations_rejected
|
|
238
241
|
@properties['reservations_rejected']
|
|
239
242
|
end
|
|
240
243
|
|
|
241
244
|
##
|
|
242
|
-
# @return [String] The total number of Reservations that
|
|
245
|
+
# @return [String] The total number of Reservations that timed out for Tasks in the TaskQueue
|
|
243
246
|
def reservations_timed_out
|
|
244
247
|
@properties['reservations_timed_out']
|
|
245
248
|
end
|
|
246
249
|
|
|
247
250
|
##
|
|
248
|
-
# @return [String] The total number of Reservations
|
|
251
|
+
# @return [String] The total number of Reservations canceled for Tasks in the TaskQueue
|
|
249
252
|
def reservations_canceled
|
|
250
253
|
@properties['reservations_canceled']
|
|
251
254
|
end
|
|
252
255
|
|
|
253
256
|
##
|
|
254
|
-
# @return [String] The total number of Reservations
|
|
257
|
+
# @return [String] The total number of Reservations rescinded
|
|
255
258
|
def reservations_rescinded
|
|
256
259
|
@properties['reservations_rescinded']
|
|
257
260
|
end
|
|
258
261
|
|
|
259
262
|
##
|
|
260
|
-
# @return [Hash]
|
|
263
|
+
# @return [Hash] A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds
|
|
261
264
|
def split_by_wait_time
|
|
262
265
|
@properties['split_by_wait_time']
|
|
263
266
|
end
|
|
264
267
|
|
|
265
268
|
##
|
|
266
|
-
# @return [String] The
|
|
269
|
+
# @return [String] The SID of the TaskQueue from which these statistics were calculated
|
|
267
270
|
def task_queue_sid
|
|
268
271
|
@properties['task_queue_sid']
|
|
269
272
|
end
|
|
270
273
|
|
|
271
274
|
##
|
|
272
|
-
# @return [Hash] The wait duration
|
|
275
|
+
# @return [Hash] The wait duration statistics for Tasks accepted while in the TaskQueue
|
|
273
276
|
def wait_duration_until_accepted
|
|
274
277
|
@properties['wait_duration_until_accepted']
|
|
275
278
|
end
|
|
276
279
|
|
|
277
280
|
##
|
|
278
|
-
# @return [Hash] The wait duration
|
|
281
|
+
# @return [Hash] The wait duration statistics for Tasks canceled while in the TaskQueue
|
|
279
282
|
def wait_duration_until_canceled
|
|
280
283
|
@properties['wait_duration_until_canceled']
|
|
281
284
|
end
|
|
282
285
|
|
|
283
286
|
##
|
|
284
|
-
# @return [String] The total number of Tasks canceled
|
|
287
|
+
# @return [String] The total number of Tasks canceled in the TaskQueue
|
|
285
288
|
def tasks_canceled
|
|
286
289
|
@properties['tasks_canceled']
|
|
287
290
|
end
|
|
288
291
|
|
|
289
292
|
##
|
|
290
|
-
# @return [String] The total number of Tasks completed
|
|
293
|
+
# @return [String] The total number of Tasks completed in the TaskQueue
|
|
291
294
|
def tasks_completed
|
|
292
295
|
@properties['tasks_completed']
|
|
293
296
|
end
|
|
294
297
|
|
|
295
298
|
##
|
|
296
|
-
# @return [String] The total number of Tasks
|
|
299
|
+
# @return [String] The total number of Tasks deleted in the TaskQueue
|
|
297
300
|
def tasks_deleted
|
|
298
301
|
@properties['tasks_deleted']
|
|
299
302
|
end
|
|
300
303
|
|
|
301
304
|
##
|
|
302
|
-
# @return [String] The total number of Tasks entered into
|
|
305
|
+
# @return [String] The total number of Tasks entered into the TaskQueue
|
|
303
306
|
def tasks_entered
|
|
304
307
|
@properties['tasks_entered']
|
|
305
308
|
end
|
|
306
309
|
|
|
307
310
|
##
|
|
308
|
-
# @return [String] The total number of Tasks moved
|
|
311
|
+
# @return [String] The total number of Tasks that were moved from one queue to another
|
|
309
312
|
def tasks_moved
|
|
310
313
|
@properties['tasks_moved']
|
|
311
314
|
end
|
|
312
315
|
|
|
313
316
|
##
|
|
314
|
-
# @return [String] The
|
|
317
|
+
# @return [String] The SID of the Workspace that contains the TaskQueue
|
|
315
318
|
def workspace_sid
|
|
316
319
|
@properties['workspace_sid']
|
|
317
320
|
end
|
|
318
321
|
|
|
319
322
|
##
|
|
320
|
-
# @return [String] The
|
|
323
|
+
# @return [String] The absolute URL of the TaskQueue statistics resource
|
|
321
324
|
def url
|
|
322
325
|
@properties['url']
|
|
323
326
|
end
|
|
324
327
|
|
|
325
328
|
##
|
|
326
329
|
# Fetch a TaskQueueCumulativeStatisticsInstance
|
|
327
|
-
# @param [Time] end_date
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
# @param [String] minutes
|
|
331
|
-
# past.
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
#
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
# would show splits of tasks that were canceled or accepted before or after 5
|
|
342
|
-
# seconds and respectively, 30 seconds. This is great for showing short abandoned
|
|
343
|
-
# tasks or tasks that failed to meet your SLA.
|
|
330
|
+
# @param [Time] end_date Only calculate statistics from this date and time and
|
|
331
|
+
# earlier, specified in GMT as an [ISO
|
|
332
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
|
|
333
|
+
# @param [String] minutes Only calculate statistics since this many minutes in the
|
|
334
|
+
# past. The default is 15 minutes.
|
|
335
|
+
# @param [Time] start_date Only calculate statistics from this date and time and
|
|
336
|
+
# later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
337
|
+
# @param [String] task_channel Only calculate cumulative statistics on this
|
|
338
|
+
# TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`,
|
|
339
|
+
# `sms`, or `default`.
|
|
340
|
+
# @param [String] split_by_wait_time A comma separated list of values that
|
|
341
|
+
# describes the thresholds, in seconds, to calculate statistics on. For each
|
|
342
|
+
# threshold specified, the number of Tasks canceled and reservations accepted
|
|
343
|
+
# above and below the specified thresholds in seconds are computed.
|
|
344
344
|
# @return [TaskQueueCumulativeStatisticsInstance] Fetched TaskQueueCumulativeStatisticsInstance
|
|
345
345
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
|
346
346
|
context.fetch(
|