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,8 +15,8 @@ module Twilio
|
|
|
15
15
|
##
|
|
16
16
|
# Initialize the WorkflowList
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
|
18
|
-
# @param [String] workspace_sid The
|
|
19
|
-
# Workflow
|
|
18
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
19
|
+
# Workflow.
|
|
20
20
|
# @return [WorkflowList] WorkflowList
|
|
21
21
|
def initialize(version, workspace_sid: nil)
|
|
22
22
|
super(version)
|
|
@@ -30,8 +30,8 @@ module Twilio
|
|
|
30
30
|
# Lists WorkflowInstance records from the API as a list.
|
|
31
31
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
32
32
|
# memory before returning.
|
|
33
|
-
# @param [String] friendly_name
|
|
34
|
-
#
|
|
33
|
+
# @param [String] friendly_name The `friendly_name` of the Workflow resources to
|
|
34
|
+
# read.
|
|
35
35
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
36
36
|
# guarantees to never return more than limit. Default is no limit
|
|
37
37
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -47,8 +47,8 @@ module Twilio
|
|
|
47
47
|
# Streams WorkflowInstance records from the API as an Enumerable.
|
|
48
48
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
49
49
|
# is reached.
|
|
50
|
-
# @param [String] friendly_name
|
|
51
|
-
#
|
|
50
|
+
# @param [String] friendly_name The `friendly_name` of the Workflow resources to
|
|
51
|
+
# read.
|
|
52
52
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
53
53
|
# guarantees to never return more than limit. Default is no limit.
|
|
54
54
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -81,8 +81,8 @@ module Twilio
|
|
|
81
81
|
##
|
|
82
82
|
# Retrieve a single page of WorkflowInstance records from the API.
|
|
83
83
|
# Request is executed immediately.
|
|
84
|
-
# @param [String] friendly_name
|
|
85
|
-
#
|
|
84
|
+
# @param [String] friendly_name The `friendly_name` of the Workflow resources to
|
|
85
|
+
# read.
|
|
86
86
|
# @param [String] page_token PageToken provided by the API
|
|
87
87
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
88
88
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
@@ -118,22 +118,22 @@ module Twilio
|
|
|
118
118
|
##
|
|
119
119
|
# Retrieve a single page of WorkflowInstance records from the API.
|
|
120
120
|
# Request is executed immediately.
|
|
121
|
-
# @param [String] friendly_name A string
|
|
122
|
-
#
|
|
123
|
-
# Campaign
|
|
124
|
-
# @param [String] configuration JSON
|
|
125
|
-
# Workflow. See [Configuring
|
|
126
|
-
# Workflows](https://www.twilio.com/docs/
|
|
127
|
-
#
|
|
128
|
-
# @param [String] assignment_callback_url
|
|
129
|
-
#
|
|
130
|
-
# Callback](https://www.twilio.com/docs/
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
135
|
-
# application after
|
|
136
|
-
#
|
|
121
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
122
|
+
# the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound
|
|
123
|
+
# Campaign`.
|
|
124
|
+
# @param [String] configuration A JSON string that contains the rules to apply to
|
|
125
|
+
# the Workflow. See [Configuring
|
|
126
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for
|
|
127
|
+
# more information.
|
|
128
|
+
# @param [String] assignment_callback_url The URL from your application that will
|
|
129
|
+
# process task assignment events. See [Handling Task Assignment
|
|
130
|
+
# Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks)
|
|
131
|
+
# for more details.
|
|
132
|
+
# @param [String] fallback_assignment_callback_url The URL that we should call
|
|
133
|
+
# when a call to the `assignment_callback_url` fails.
|
|
134
|
+
# @param [String] task_reservation_timeout How long TaskRouter will wait for a
|
|
135
|
+
# confirmation response from your application after it assigns a Task to a Worker.
|
|
136
|
+
# Can be up to `86,400` (24 hours) and the default is `120`.
|
|
137
137
|
# @return [WorkflowInstance] Newly created WorkflowInstance
|
|
138
138
|
def create(friendly_name: nil, configuration: nil, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, task_reservation_timeout: :unset)
|
|
139
139
|
data = Twilio::Values.of({
|
|
@@ -193,8 +193,9 @@ module Twilio
|
|
|
193
193
|
##
|
|
194
194
|
# Initialize the WorkflowContext
|
|
195
195
|
# @param [Version] version Version that contains the resource
|
|
196
|
-
# @param [String] workspace_sid The
|
|
197
|
-
#
|
|
196
|
+
# @param [String] workspace_sid The SID of the Workspace with the Workflow to
|
|
197
|
+
# fetch.
|
|
198
|
+
# @param [String] sid The SID of the Workflow resource to fetch.
|
|
198
199
|
# @return [WorkflowContext] WorkflowContext
|
|
199
200
|
def initialize(version, workspace_sid, sid)
|
|
200
201
|
super(version)
|
|
@@ -231,21 +232,22 @@ module Twilio
|
|
|
231
232
|
|
|
232
233
|
##
|
|
233
234
|
# Update the WorkflowInstance
|
|
234
|
-
# @param [String] friendly_name A string
|
|
235
|
-
#
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
# @param [String]
|
|
242
|
-
#
|
|
243
|
-
#
|
|
244
|
-
#
|
|
245
|
-
#
|
|
246
|
-
#
|
|
247
|
-
#
|
|
248
|
-
#
|
|
235
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
236
|
+
# the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound
|
|
237
|
+
# Campaign`.
|
|
238
|
+
# @param [String] assignment_callback_url The URL from your application that will
|
|
239
|
+
# process task assignment events. See [Handling Task Assignment
|
|
240
|
+
# Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks)
|
|
241
|
+
# for more details.
|
|
242
|
+
# @param [String] fallback_assignment_callback_url The URL that we should call
|
|
243
|
+
# when a call to the `assignment_callback_url` fails.
|
|
244
|
+
# @param [String] configuration A JSON string that contains the rules to apply to
|
|
245
|
+
# the Workflow. See [Configuring
|
|
246
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for
|
|
247
|
+
# more information.
|
|
248
|
+
# @param [String] task_reservation_timeout How long TaskRouter will wait for a
|
|
249
|
+
# confirmation response from your application after it assigns a Task to a Worker.
|
|
250
|
+
# Can be up to `86,400` (24 hours) and the default is `120`.
|
|
249
251
|
# @return [WorkflowInstance] Updated WorkflowInstance
|
|
250
252
|
def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset)
|
|
251
253
|
data = Twilio::Values.of({
|
|
@@ -321,9 +323,9 @@ module Twilio
|
|
|
321
323
|
# Initialize the WorkflowInstance
|
|
322
324
|
# @param [Version] version Version that contains the resource
|
|
323
325
|
# @param [Hash] payload payload that contains response from Twilio
|
|
324
|
-
# @param [String] workspace_sid The
|
|
325
|
-
# Workflow
|
|
326
|
-
# @param [String] sid The
|
|
326
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
327
|
+
# Workflow.
|
|
328
|
+
# @param [String] sid The SID of the Workflow resource to fetch.
|
|
327
329
|
# @return [WorkflowInstance] WorkflowInstance
|
|
328
330
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
329
331
|
super(version)
|
|
@@ -362,79 +364,79 @@ module Twilio
|
|
|
362
364
|
end
|
|
363
365
|
|
|
364
366
|
##
|
|
365
|
-
# @return [String] The
|
|
367
|
+
# @return [String] The SID of the Account that created the resource
|
|
366
368
|
def account_sid
|
|
367
369
|
@properties['account_sid']
|
|
368
370
|
end
|
|
369
371
|
|
|
370
372
|
##
|
|
371
|
-
# @return [String] The URL that
|
|
373
|
+
# @return [String] The URL that we call when a task managed by the Workflow is assigned to a Worker
|
|
372
374
|
def assignment_callback_url
|
|
373
375
|
@properties['assignment_callback_url']
|
|
374
376
|
end
|
|
375
377
|
|
|
376
378
|
##
|
|
377
|
-
# @return [String] JSON
|
|
379
|
+
# @return [String] A JSON string that contains the Workflow's configuration
|
|
378
380
|
def configuration
|
|
379
381
|
@properties['configuration']
|
|
380
382
|
end
|
|
381
383
|
|
|
382
384
|
##
|
|
383
|
-
# @return [Time] The date
|
|
385
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
|
384
386
|
def date_created
|
|
385
387
|
@properties['date_created']
|
|
386
388
|
end
|
|
387
389
|
|
|
388
390
|
##
|
|
389
|
-
# @return [Time] The date
|
|
391
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
|
390
392
|
def date_updated
|
|
391
393
|
@properties['date_updated']
|
|
392
394
|
end
|
|
393
395
|
|
|
394
396
|
##
|
|
395
|
-
# @return [String] The
|
|
397
|
+
# @return [String] The MIME type of the document
|
|
396
398
|
def document_content_type
|
|
397
399
|
@properties['document_content_type']
|
|
398
400
|
end
|
|
399
401
|
|
|
400
402
|
##
|
|
401
|
-
# @return [String]
|
|
403
|
+
# @return [String] The URL that we call when a call to the `assignment_callback_url` fails
|
|
402
404
|
def fallback_assignment_callback_url
|
|
403
405
|
@properties['fallback_assignment_callback_url']
|
|
404
406
|
end
|
|
405
407
|
|
|
406
408
|
##
|
|
407
|
-
# @return [String]
|
|
409
|
+
# @return [String] The string that you assigned to describe the Workflow resource
|
|
408
410
|
def friendly_name
|
|
409
411
|
@properties['friendly_name']
|
|
410
412
|
end
|
|
411
413
|
|
|
412
414
|
##
|
|
413
|
-
# @return [String] The unique
|
|
415
|
+
# @return [String] The unique string that identifies the resource
|
|
414
416
|
def sid
|
|
415
417
|
@properties['sid']
|
|
416
418
|
end
|
|
417
419
|
|
|
418
420
|
##
|
|
419
|
-
# @return [String]
|
|
421
|
+
# @return [String] How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker
|
|
420
422
|
def task_reservation_timeout
|
|
421
423
|
@properties['task_reservation_timeout']
|
|
422
424
|
end
|
|
423
425
|
|
|
424
426
|
##
|
|
425
|
-
# @return [String] The
|
|
427
|
+
# @return [String] The SID of the Workspace that contains the Workflow
|
|
426
428
|
def workspace_sid
|
|
427
429
|
@properties['workspace_sid']
|
|
428
430
|
end
|
|
429
431
|
|
|
430
432
|
##
|
|
431
|
-
# @return [String] The
|
|
433
|
+
# @return [String] The absolute URL of the Workflow resource
|
|
432
434
|
def url
|
|
433
435
|
@properties['url']
|
|
434
436
|
end
|
|
435
437
|
|
|
436
438
|
##
|
|
437
|
-
# @return [String] The
|
|
439
|
+
# @return [String] The URLs of related resources
|
|
438
440
|
def links
|
|
439
441
|
@properties['links']
|
|
440
442
|
end
|
|
@@ -448,21 +450,22 @@ module Twilio
|
|
|
448
450
|
|
|
449
451
|
##
|
|
450
452
|
# Update the WorkflowInstance
|
|
451
|
-
# @param [String] friendly_name A string
|
|
452
|
-
#
|
|
453
|
-
#
|
|
454
|
-
#
|
|
455
|
-
#
|
|
456
|
-
#
|
|
457
|
-
#
|
|
458
|
-
# @param [String]
|
|
459
|
-
#
|
|
460
|
-
#
|
|
461
|
-
#
|
|
462
|
-
#
|
|
463
|
-
#
|
|
464
|
-
#
|
|
465
|
-
#
|
|
453
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
454
|
+
# the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound
|
|
455
|
+
# Campaign`.
|
|
456
|
+
# @param [String] assignment_callback_url The URL from your application that will
|
|
457
|
+
# process task assignment events. See [Handling Task Assignment
|
|
458
|
+
# Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks)
|
|
459
|
+
# for more details.
|
|
460
|
+
# @param [String] fallback_assignment_callback_url The URL that we should call
|
|
461
|
+
# when a call to the `assignment_callback_url` fails.
|
|
462
|
+
# @param [String] configuration A JSON string that contains the rules to apply to
|
|
463
|
+
# the Workflow. See [Configuring
|
|
464
|
+
# Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for
|
|
465
|
+
# more information.
|
|
466
|
+
# @param [String] task_reservation_timeout How long TaskRouter will wait for a
|
|
467
|
+
# confirmation response from your application after it assigns a Task to a Worker.
|
|
468
|
+
# Can be up to `86,400` (24 hours) and the default is `120`.
|
|
466
469
|
# @return [WorkflowInstance] Updated WorkflowInstance
|
|
467
470
|
def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset)
|
|
468
471
|
context.update(
|
data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb
CHANGED
|
@@ -16,8 +16,10 @@ module Twilio
|
|
|
16
16
|
##
|
|
17
17
|
# Initialize the WorkflowCumulativeStatisticsList
|
|
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
|
+
# Workflow.
|
|
21
|
+
# @param [String] workflow_sid Returns the list of Tasks that are being controlled
|
|
22
|
+
# by the Workflow with the specified Sid value.
|
|
21
23
|
# @return [WorkflowCumulativeStatisticsList] WorkflowCumulativeStatisticsList
|
|
22
24
|
def initialize(version, workspace_sid: nil, workflow_sid: nil)
|
|
23
25
|
super(version)
|
|
@@ -71,8 +73,10 @@ module Twilio
|
|
|
71
73
|
##
|
|
72
74
|
# Initialize the WorkflowCumulativeStatisticsContext
|
|
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 resource to
|
|
77
|
+
# fetch.
|
|
78
|
+
# @param [String] workflow_sid Returns the list of Tasks that are being controlled
|
|
79
|
+
# by the Workflow with the specified Sid value.
|
|
76
80
|
# @return [WorkflowCumulativeStatisticsContext] WorkflowCumulativeStatisticsContext
|
|
77
81
|
def initialize(version, workspace_sid, workflow_sid)
|
|
78
82
|
super(version)
|
|
@@ -84,23 +88,24 @@ module Twilio
|
|
|
84
88
|
|
|
85
89
|
##
|
|
86
90
|
# Fetch a WorkflowCumulativeStatisticsInstance
|
|
87
|
-
# @param [Time] end_date
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
# @param [String] minutes
|
|
91
|
-
# past. This is helpful for statistics for the
|
|
92
|
-
# hours), and 480 minutes (8 hours) to see trends.
|
|
93
|
-
# @param [Time] start_date
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
91
|
+
# @param [Time] end_date Only include usage that occurred on or before this date,
|
|
92
|
+
# specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
93
|
+
# date-time.
|
|
94
|
+
# @param [String] minutes Only calculate statistics since this many minutes in the
|
|
95
|
+
# past. The default 15 minutes. This is helpful for displaying statistics for the
|
|
96
|
+
# last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
|
|
97
|
+
# @param [Time] start_date Only calculate statistics from this date and time and
|
|
98
|
+
# later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
99
|
+
# @param [String] task_channel Only calculate cumulative statistics on this
|
|
100
|
+
# TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`,
|
|
101
|
+
# `sms`, or `default`.
|
|
102
|
+
# @param [String] split_by_wait_time A comma separated list of values that
|
|
103
|
+
# describes the thresholds, in seconds, to calculate statistics on. For each
|
|
104
|
+
# threshold specified, the number of Tasks canceled and reservations accepted
|
|
105
|
+
# above and below the specified thresholds in seconds are computed. For example,
|
|
106
|
+
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
|
107
|
+
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
|
108
|
+
# abandoned Tasks or Tasks that failed to meet an SLA.
|
|
104
109
|
# @return [WorkflowCumulativeStatisticsInstance] Fetched WorkflowCumulativeStatisticsInstance
|
|
105
110
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
|
106
111
|
params = Twilio::Values.of({
|
|
@@ -145,8 +150,10 @@ module Twilio
|
|
|
145
150
|
# Initialize the WorkflowCumulativeStatisticsInstance
|
|
146
151
|
# @param [Version] version Version that contains the resource
|
|
147
152
|
# @param [Hash] payload payload that contains response from Twilio
|
|
148
|
-
# @param [String] workspace_sid The
|
|
149
|
-
#
|
|
153
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
154
|
+
# Workflow.
|
|
155
|
+
# @param [String] workflow_sid Returns the list of Tasks that are being controlled
|
|
156
|
+
# by the Workflow with the specified Sid value.
|
|
150
157
|
# @return [WorkflowCumulativeStatisticsInstance] WorkflowCumulativeStatisticsInstance
|
|
151
158
|
def initialize(version, payload, workspace_sid: nil, workflow_sid: nil)
|
|
152
159
|
super(version)
|
|
@@ -198,25 +205,25 @@ module Twilio
|
|
|
198
205
|
end
|
|
199
206
|
|
|
200
207
|
##
|
|
201
|
-
# @return [String] The
|
|
208
|
+
# @return [String] The SID of the Account that created the resource
|
|
202
209
|
def account_sid
|
|
203
210
|
@properties['account_sid']
|
|
204
211
|
end
|
|
205
212
|
|
|
206
213
|
##
|
|
207
|
-
# @return [String] The average time
|
|
214
|
+
# @return [String] The average time in seconds between Task creation and acceptance
|
|
208
215
|
def avg_task_acceptance_time
|
|
209
216
|
@properties['avg_task_acceptance_time']
|
|
210
217
|
end
|
|
211
218
|
|
|
212
219
|
##
|
|
213
|
-
# @return [Time] The
|
|
220
|
+
# @return [Time] The beginning of the interval during which these statistics were calculated
|
|
214
221
|
def start_time
|
|
215
222
|
@properties['start_time']
|
|
216
223
|
end
|
|
217
224
|
|
|
218
225
|
##
|
|
219
|
-
# @return [Time] The
|
|
226
|
+
# @return [Time] The end of the interval during which these statistics were calculated
|
|
220
227
|
def end_time
|
|
221
228
|
@properties['end_time']
|
|
222
229
|
end
|
|
@@ -258,19 +265,19 @@ module Twilio
|
|
|
258
265
|
end
|
|
259
266
|
|
|
260
267
|
##
|
|
261
|
-
# @return [Hash]
|
|
268
|
+
# @return [Hash] A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds
|
|
262
269
|
def split_by_wait_time
|
|
263
270
|
@properties['split_by_wait_time']
|
|
264
271
|
end
|
|
265
272
|
|
|
266
273
|
##
|
|
267
|
-
# @return [Hash] The wait duration
|
|
274
|
+
# @return [Hash] The wait duration statistics for Tasks that were accepted
|
|
268
275
|
def wait_duration_until_accepted
|
|
269
276
|
@properties['wait_duration_until_accepted']
|
|
270
277
|
end
|
|
271
278
|
|
|
272
279
|
##
|
|
273
|
-
# @return [Hash] The wait duration
|
|
280
|
+
# @return [Hash] The wait duration statistics for Tasks that were canceled
|
|
274
281
|
def wait_duration_until_canceled
|
|
275
282
|
@properties['wait_duration_until_canceled']
|
|
276
283
|
end
|
|
@@ -288,7 +295,7 @@ module Twilio
|
|
|
288
295
|
end
|
|
289
296
|
|
|
290
297
|
##
|
|
291
|
-
# @return [String] The total number of Tasks that entered
|
|
298
|
+
# @return [String] The total number of Tasks that entered the Workflow
|
|
292
299
|
def tasks_entered
|
|
293
300
|
@properties['tasks_entered']
|
|
294
301
|
end
|
|
@@ -312,42 +319,43 @@ module Twilio
|
|
|
312
319
|
end
|
|
313
320
|
|
|
314
321
|
##
|
|
315
|
-
# @return [String]
|
|
322
|
+
# @return [String] Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value
|
|
316
323
|
def workflow_sid
|
|
317
324
|
@properties['workflow_sid']
|
|
318
325
|
end
|
|
319
326
|
|
|
320
327
|
##
|
|
321
|
-
# @return [String] The
|
|
328
|
+
# @return [String] The SID of the Workspace that contains the Workflow.
|
|
322
329
|
def workspace_sid
|
|
323
330
|
@properties['workspace_sid']
|
|
324
331
|
end
|
|
325
332
|
|
|
326
333
|
##
|
|
327
|
-
# @return [String] The
|
|
334
|
+
# @return [String] The absolute URL of the Workflow statistics resource
|
|
328
335
|
def url
|
|
329
336
|
@properties['url']
|
|
330
337
|
end
|
|
331
338
|
|
|
332
339
|
##
|
|
333
340
|
# Fetch a WorkflowCumulativeStatisticsInstance
|
|
334
|
-
# @param [Time] end_date
|
|
335
|
-
#
|
|
336
|
-
#
|
|
337
|
-
# @param [String] minutes
|
|
338
|
-
# past. This is helpful for statistics for the
|
|
339
|
-
# hours), and 480 minutes (8 hours) to see trends.
|
|
340
|
-
# @param [Time] start_date
|
|
341
|
-
#
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
345
|
-
#
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
#
|
|
349
|
-
#
|
|
350
|
-
#
|
|
341
|
+
# @param [Time] end_date Only include usage that occurred on or before this date,
|
|
342
|
+
# specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
343
|
+
# date-time.
|
|
344
|
+
# @param [String] minutes Only calculate statistics since this many minutes in the
|
|
345
|
+
# past. The default 15 minutes. This is helpful for displaying statistics for the
|
|
346
|
+
# last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
|
|
347
|
+
# @param [Time] start_date Only calculate statistics from this date and time and
|
|
348
|
+
# later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
349
|
+
# @param [String] task_channel Only calculate cumulative statistics on this
|
|
350
|
+
# TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`,
|
|
351
|
+
# `sms`, or `default`.
|
|
352
|
+
# @param [String] split_by_wait_time A comma separated list of values that
|
|
353
|
+
# describes the thresholds, in seconds, to calculate statistics on. For each
|
|
354
|
+
# threshold specified, the number of Tasks canceled and reservations accepted
|
|
355
|
+
# above and below the specified thresholds in seconds are computed. For example,
|
|
356
|
+
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
|
357
|
+
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
|
358
|
+
# abandoned Tasks or Tasks that failed to meet an SLA.
|
|
351
359
|
# @return [WorkflowCumulativeStatisticsInstance] Fetched WorkflowCumulativeStatisticsInstance
|
|
352
360
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
|
353
361
|
context.fetch(
|