twilio-ruby 5.27.0 → 5.27.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,7 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the TaskList
|
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 Task.
|
19
19
|
# @return [TaskList] TaskList
|
20
20
|
def initialize(version, workspace_sid: nil)
|
21
21
|
super(version)
|
@@ -29,29 +29,33 @@ module Twilio
|
|
29
29
|
# Lists TaskInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
-
# @param [String] priority
|
33
|
-
# the specified priority.
|
34
|
-
# @param [String] assignment_status
|
35
|
-
#
|
36
|
-
#
|
37
|
-
# @param [String] workflow_sid
|
38
|
-
# by the Workflow
|
39
|
-
# @param [String] workflow_name
|
40
|
-
# controlled by the Workflow
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# @param [String]
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# `
|
53
|
-
#
|
54
|
-
#
|
32
|
+
# @param [String] priority The priority value of the Tasks to read. Returns the
|
33
|
+
# list of all Tasks in the Workspace with the specified priority.
|
34
|
+
# @param [String] assignment_status The `assignment_status` of the Tasks to read.
|
35
|
+
# Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
|
36
|
+
# all Tasks in the Workspace with the specified `assignment_status`.
|
37
|
+
# @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
|
38
|
+
# Returns the Tasks controlled by the Workflow identified by this SID.
|
39
|
+
# @param [String] workflow_name The friendly name of the Workflow with the Tasks
|
40
|
+
# to read. Returns the Tasks controlled by the Workflow identified by this
|
41
|
+
# friendly name.
|
42
|
+
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
|
43
|
+
# Returns the Tasks waiting in the TaskQueue identified by this SID.
|
44
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
|
45
|
+
# Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
|
46
|
+
# friendly name.
|
47
|
+
# @param [String] evaluate_task_attributes The attributes of the Tasks to read.
|
48
|
+
# Returns the Tasks that match the attributes specified in this parameter.
|
49
|
+
# @param [String] ordering How to order the returned Task resources. y default,
|
50
|
+
# Tasks are sorted by ascending DateCreated. This value is specified as:
|
51
|
+
# `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
|
52
|
+
# and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
|
53
|
+
# Tasks ordered in descending order of their Priority. Multiple sort orders can be
|
54
|
+
# specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
|
55
|
+
# which returns the Tasks in descending Priority order and ascending DateCreated
|
56
|
+
# Order.
|
57
|
+
# @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
|
58
|
+
# returns only Tasks with addons. If `false`, returns only Tasks without addons.
|
55
59
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
56
60
|
# guarantees to never return more than limit. Default is no limit
|
57
61
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -79,29 +83,33 @@ module Twilio
|
|
79
83
|
# Streams TaskInstance records from the API as an Enumerable.
|
80
84
|
# This operation lazily loads records as efficiently as possible until the limit
|
81
85
|
# is reached.
|
82
|
-
# @param [String] priority
|
83
|
-
# the specified priority.
|
84
|
-
# @param [String] assignment_status
|
85
|
-
#
|
86
|
-
#
|
87
|
-
# @param [String] workflow_sid
|
88
|
-
# by the Workflow
|
89
|
-
# @param [String] workflow_name
|
90
|
-
# controlled by the Workflow
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
# @param [String]
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
# `
|
103
|
-
#
|
104
|
-
#
|
86
|
+
# @param [String] priority The priority value of the Tasks to read. Returns the
|
87
|
+
# list of all Tasks in the Workspace with the specified priority.
|
88
|
+
# @param [String] assignment_status The `assignment_status` of the Tasks to read.
|
89
|
+
# Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
|
90
|
+
# all Tasks in the Workspace with the specified `assignment_status`.
|
91
|
+
# @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
|
92
|
+
# Returns the Tasks controlled by the Workflow identified by this SID.
|
93
|
+
# @param [String] workflow_name The friendly name of the Workflow with the Tasks
|
94
|
+
# to read. Returns the Tasks controlled by the Workflow identified by this
|
95
|
+
# friendly name.
|
96
|
+
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
|
97
|
+
# Returns the Tasks waiting in the TaskQueue identified by this SID.
|
98
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
|
99
|
+
# Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
|
100
|
+
# friendly name.
|
101
|
+
# @param [String] evaluate_task_attributes The attributes of the Tasks to read.
|
102
|
+
# Returns the Tasks that match the attributes specified in this parameter.
|
103
|
+
# @param [String] ordering How to order the returned Task resources. y default,
|
104
|
+
# Tasks are sorted by ascending DateCreated. This value is specified as:
|
105
|
+
# `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
|
106
|
+
# and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
|
107
|
+
# Tasks ordered in descending order of their Priority. Multiple sort orders can be
|
108
|
+
# specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
|
109
|
+
# which returns the Tasks in descending Priority order and ascending DateCreated
|
110
|
+
# Order.
|
111
|
+
# @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
|
112
|
+
# returns only Tasks with addons. If `false`, returns only Tasks without addons.
|
105
113
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
106
114
|
# guarantees to never return more than limit. Default is no limit.
|
107
115
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -145,29 +153,33 @@ module Twilio
|
|
145
153
|
##
|
146
154
|
# Retrieve a single page of TaskInstance records from the API.
|
147
155
|
# Request is executed immediately.
|
148
|
-
# @param [String] priority
|
149
|
-
# the specified priority.
|
150
|
-
# @param [String] assignment_status
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# @param [String] workflow_sid
|
154
|
-
# by the Workflow
|
155
|
-
# @param [String] workflow_name
|
156
|
-
# controlled by the Workflow
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
# @param [String]
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
# `
|
169
|
-
#
|
170
|
-
#
|
156
|
+
# @param [String] priority The priority value of the Tasks to read. Returns the
|
157
|
+
# list of all Tasks in the Workspace with the specified priority.
|
158
|
+
# @param [String] assignment_status The `assignment_status` of the Tasks to read.
|
159
|
+
# Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
|
160
|
+
# all Tasks in the Workspace with the specified `assignment_status`.
|
161
|
+
# @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
|
162
|
+
# Returns the Tasks controlled by the Workflow identified by this SID.
|
163
|
+
# @param [String] workflow_name The friendly name of the Workflow with the Tasks
|
164
|
+
# to read. Returns the Tasks controlled by the Workflow identified by this
|
165
|
+
# friendly name.
|
166
|
+
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
|
167
|
+
# Returns the Tasks waiting in the TaskQueue identified by this SID.
|
168
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
|
169
|
+
# Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
|
170
|
+
# friendly name.
|
171
|
+
# @param [String] evaluate_task_attributes The attributes of the Tasks to read.
|
172
|
+
# Returns the Tasks that match the attributes specified in this parameter.
|
173
|
+
# @param [String] ordering How to order the returned Task resources. y default,
|
174
|
+
# Tasks are sorted by ascending DateCreated. This value is specified as:
|
175
|
+
# `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
|
176
|
+
# and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
|
177
|
+
# Tasks ordered in descending order of their Priority. Multiple sort orders can be
|
178
|
+
# specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
|
179
|
+
# which returns the Tasks in descending Priority order and ascending DateCreated
|
180
|
+
# Order.
|
181
|
+
# @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
|
182
|
+
# returns only Tasks with addons. If `false`, returns only Tasks without addons.
|
171
183
|
# @param [String] page_token PageToken provided by the API
|
172
184
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
173
185
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -211,24 +223,24 @@ module Twilio
|
|
211
223
|
##
|
212
224
|
# Retrieve a single page of TaskInstance records from the API.
|
213
225
|
# Request is executed immediately.
|
214
|
-
# @param [String] timeout The amount of time in seconds the task is allowed to
|
215
|
-
# live up to a maximum of 2 weeks
|
216
|
-
# `task.canceled` event will fire
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
# value is
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
# @param [String] attributes
|
229
|
-
#
|
230
|
-
#
|
231
|
-
# "twilio_call_sid": "CAxxx", "customer_ticket_number": "12345" }
|
226
|
+
# @param [String] timeout The amount of time in seconds the new task is allowed to
|
227
|
+
# live. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value
|
228
|
+
# is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire
|
229
|
+
# with description `Task TTL Exceeded`.
|
230
|
+
# @param [String] priority The priority to assign the new task and override the
|
231
|
+
# default. When supplied, the new Task will have this priority unless it matches a
|
232
|
+
# Workflow Target with a Priority set. When not supplied, the new Task will have
|
233
|
+
# the priority of the matching Workflow Target.
|
234
|
+
# @param [String] task_channel When MultiTasking is enabled, specify the
|
235
|
+
# TaskChannel by passing either its `unique_name` or `sid`. Default value is
|
236
|
+
# `default`.
|
237
|
+
# @param [String] workflow_sid The SID of the Workflow that you would like to
|
238
|
+
# handle routing for the new Task. If there is only one Workflow defined for the
|
239
|
+
# Workspace that you are posting the new task to, this parameter is optional.
|
240
|
+
# @param [String] attributes A URL-encoded JSON string with the attributes of the
|
241
|
+
# new task. This value is passed to the Workflow's `assignment_callback_url` when
|
242
|
+
# the Task is assigned to a Worker. For example: `{ "task_type": "call",
|
243
|
+
# "twilio_call_sid": "CAxxx", "customer_ticket_number": "12345" }`.
|
232
244
|
# @return [TaskInstance] Newly created TaskInstance
|
233
245
|
def create(timeout: :unset, priority: :unset, task_channel: :unset, workflow_sid: :unset, attributes: :unset)
|
234
246
|
data = Twilio::Values.of({
|
@@ -288,8 +300,8 @@ module Twilio
|
|
288
300
|
##
|
289
301
|
# Initialize the TaskContext
|
290
302
|
# @param [Version] version Version that contains the resource
|
291
|
-
# @param [String] workspace_sid The
|
292
|
-
# @param [String] sid The
|
303
|
+
# @param [String] workspace_sid The SID of the Workspace with the Task to fetch.
|
304
|
+
# @param [String] sid The SID of the Task resource to fetch.
|
293
305
|
# @return [TaskContext] TaskContext
|
294
306
|
def initialize(version, workspace_sid, sid)
|
295
307
|
super(version)
|
@@ -319,19 +331,21 @@ module Twilio
|
|
319
331
|
|
320
332
|
##
|
321
333
|
# Update the TaskInstance
|
322
|
-
# @param [String] attributes The
|
323
|
-
#
|
324
|
-
# @param [task.Status] assignment_status
|
325
|
-
# canceled
|
326
|
-
#
|
327
|
-
#
|
328
|
-
# @param [String] reason
|
329
|
-
#
|
330
|
-
# queues the task for deletion
|
331
|
-
# @param [String] priority
|
332
|
-
#
|
334
|
+
# @param [String] attributes The JSON string that describes the custom attributes
|
335
|
+
# of the task.
|
336
|
+
# @param [task.Status] assignment_status The new status of the task. Can be:
|
337
|
+
# `canceled`, to cancel a Task that is currently `pending` or `reserved`;
|
338
|
+
# `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to
|
339
|
+
# the completed state.
|
340
|
+
# @param [String] reason The reason that the Task was canceled or completed. This
|
341
|
+
# parameter is required only if the Task is canceled or completed. Setting this
|
342
|
+
# value queues the task for deletion and logs the reason.
|
343
|
+
# @param [String] priority The Task's new priority value. When supplied, the Task
|
344
|
+
# takes on the specified priority unless it matches a Workflow Target with a
|
333
345
|
# Priority set.
|
334
|
-
# @param [String] task_channel
|
346
|
+
# @param [String] task_channel When MultiTasking is enabled, specify the
|
347
|
+
# TaskChannel with the task to update. Can be the TaskChannel's SID or its
|
348
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
335
349
|
# @return [TaskInstance] Updated TaskInstance
|
336
350
|
def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset)
|
337
351
|
data = Twilio::Values.of({
|
@@ -400,8 +414,8 @@ module Twilio
|
|
400
414
|
# Initialize the TaskInstance
|
401
415
|
# @param [Version] version Version that contains the resource
|
402
416
|
# @param [Hash] payload payload that contains response from Twilio
|
403
|
-
# @param [String] workspace_sid The
|
404
|
-
# @param [String] sid The
|
417
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the Task.
|
418
|
+
# @param [String] sid The SID of the Task resource to fetch.
|
405
419
|
# @return [TaskInstance] TaskInstance
|
406
420
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
407
421
|
super(version)
|
@@ -447,121 +461,121 @@ module Twilio
|
|
447
461
|
end
|
448
462
|
|
449
463
|
##
|
450
|
-
# @return [String] The
|
464
|
+
# @return [String] The SID of the Account that created the resource
|
451
465
|
def account_sid
|
452
466
|
@properties['account_sid']
|
453
467
|
end
|
454
468
|
|
455
469
|
##
|
456
|
-
# @return [String] The number of seconds since
|
470
|
+
# @return [String] The number of seconds since the task was created
|
457
471
|
def age
|
458
472
|
@properties['age']
|
459
473
|
end
|
460
474
|
|
461
475
|
##
|
462
|
-
# @return [task.Status]
|
476
|
+
# @return [task.Status] The current status of the Task's assignment
|
463
477
|
def assignment_status
|
464
478
|
@properties['assignment_status']
|
465
479
|
end
|
466
480
|
|
467
481
|
##
|
468
|
-
# @return [String] The
|
482
|
+
# @return [String] The JSON string with custom attributes of the work
|
469
483
|
def attributes
|
470
484
|
@properties['attributes']
|
471
485
|
end
|
472
486
|
|
473
487
|
##
|
474
|
-
# @return [String]
|
488
|
+
# @return [String] An object that contains the addon data for all installed addons
|
475
489
|
def addons
|
476
490
|
@properties['addons']
|
477
491
|
end
|
478
492
|
|
479
493
|
##
|
480
|
-
# @return [Time]
|
494
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
481
495
|
def date_created
|
482
496
|
@properties['date_created']
|
483
497
|
end
|
484
498
|
|
485
499
|
##
|
486
|
-
# @return [Time]
|
500
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
487
501
|
def date_updated
|
488
502
|
@properties['date_updated']
|
489
503
|
end
|
490
504
|
|
491
505
|
##
|
492
|
-
# @return [String] Retrieve the list of all Tasks in the
|
506
|
+
# @return [String] Retrieve the list of all Tasks in the Workspace with the specified priority
|
493
507
|
def priority
|
494
508
|
@properties['priority']
|
495
509
|
end
|
496
510
|
|
497
511
|
##
|
498
|
-
# @return [String] The reason the task was canceled
|
512
|
+
# @return [String] The reason the task was canceled or completed
|
499
513
|
def reason
|
500
514
|
@properties['reason']
|
501
515
|
end
|
502
516
|
|
503
517
|
##
|
504
|
-
# @return [String] The unique
|
518
|
+
# @return [String] The unique string that identifies the resource
|
505
519
|
def sid
|
506
520
|
@properties['sid']
|
507
521
|
end
|
508
522
|
|
509
523
|
##
|
510
|
-
# @return [String]
|
524
|
+
# @return [String] The SID of the TaskQueue
|
511
525
|
def task_queue_sid
|
512
526
|
@properties['task_queue_sid']
|
513
527
|
end
|
514
528
|
|
515
529
|
##
|
516
|
-
# @return [String] The
|
530
|
+
# @return [String] The friendly name of the TaskQueue
|
517
531
|
def task_queue_friendly_name
|
518
532
|
@properties['task_queue_friendly_name']
|
519
533
|
end
|
520
534
|
|
521
535
|
##
|
522
|
-
# @return [String] The
|
536
|
+
# @return [String] The SID of the TaskChannel
|
523
537
|
def task_channel_sid
|
524
538
|
@properties['task_channel_sid']
|
525
539
|
end
|
526
540
|
|
527
541
|
##
|
528
|
-
# @return [String] The unique name of the
|
542
|
+
# @return [String] The unique name of the TaskChannel
|
529
543
|
def task_channel_unique_name
|
530
544
|
@properties['task_channel_unique_name']
|
531
545
|
end
|
532
546
|
|
533
547
|
##
|
534
|
-
# @return [String] The amount of time in seconds the task is allowed to live
|
548
|
+
# @return [String] The amount of time in seconds that the task is allowed to live
|
535
549
|
def timeout
|
536
550
|
@properties['timeout']
|
537
551
|
end
|
538
552
|
|
539
553
|
##
|
540
|
-
# @return [String]
|
554
|
+
# @return [String] The SID of the Workflow that is controlling the Task
|
541
555
|
def workflow_sid
|
542
556
|
@properties['workflow_sid']
|
543
557
|
end
|
544
558
|
|
545
559
|
##
|
546
|
-
# @return [String] The
|
560
|
+
# @return [String] The friendly name of the Workflow that is controlling the Task
|
547
561
|
def workflow_friendly_name
|
548
562
|
@properties['workflow_friendly_name']
|
549
563
|
end
|
550
564
|
|
551
565
|
##
|
552
|
-
# @return [String] The
|
566
|
+
# @return [String] The SID of the Workspace that contains the Task
|
553
567
|
def workspace_sid
|
554
568
|
@properties['workspace_sid']
|
555
569
|
end
|
556
570
|
|
557
571
|
##
|
558
|
-
# @return [String] The
|
572
|
+
# @return [String] The absolute URL of the Task resource
|
559
573
|
def url
|
560
574
|
@properties['url']
|
561
575
|
end
|
562
576
|
|
563
577
|
##
|
564
|
-
# @return [String] The
|
578
|
+
# @return [String] The URLs of related resources
|
565
579
|
def links
|
566
580
|
@properties['links']
|
567
581
|
end
|
@@ -575,19 +589,21 @@ module Twilio
|
|
575
589
|
|
576
590
|
##
|
577
591
|
# Update the TaskInstance
|
578
|
-
# @param [String] attributes The
|
579
|
-
#
|
580
|
-
# @param [task.Status] assignment_status
|
581
|
-
# canceled
|
582
|
-
#
|
583
|
-
#
|
584
|
-
# @param [String] reason
|
585
|
-
#
|
586
|
-
# queues the task for deletion
|
587
|
-
# @param [String] priority
|
588
|
-
#
|
592
|
+
# @param [String] attributes The JSON string that describes the custom attributes
|
593
|
+
# of the task.
|
594
|
+
# @param [task.Status] assignment_status The new status of the task. Can be:
|
595
|
+
# `canceled`, to cancel a Task that is currently `pending` or `reserved`;
|
596
|
+
# `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to
|
597
|
+
# the completed state.
|
598
|
+
# @param [String] reason The reason that the Task was canceled or completed. This
|
599
|
+
# parameter is required only if the Task is canceled or completed. Setting this
|
600
|
+
# value queues the task for deletion and logs the reason.
|
601
|
+
# @param [String] priority The Task's new priority value. When supplied, the Task
|
602
|
+
# takes on the specified priority unless it matches a Workflow Target with a
|
589
603
|
# Priority set.
|
590
|
-
# @param [String] task_channel
|
604
|
+
# @param [String] task_channel When MultiTasking is enabled, specify the
|
605
|
+
# TaskChannel with the task to update. Can be the TaskChannel's SID or its
|
606
|
+
# `unique_name`, such as `voice`, `sms`, or `default`.
|
591
607
|
# @return [TaskInstance] Updated TaskInstance
|
592
608
|
def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset)
|
593
609
|
context.update(
|
@@ -15,8 +15,8 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the TaskChannelList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] workspace_sid The
|
19
|
-
# TaskChannel
|
18
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
19
|
+
# TaskChannel.
|
20
20
|
# @return [TaskChannelList] TaskChannelList
|
21
21
|
def initialize(version, workspace_sid: nil)
|
22
22
|
super(version)
|
@@ -111,11 +111,13 @@ module Twilio
|
|
111
111
|
##
|
112
112
|
# Retrieve a single page of TaskChannelInstance records from the API.
|
113
113
|
# Request is executed immediately.
|
114
|
-
# @param [String] friendly_name
|
115
|
-
# TaskChannel
|
116
|
-
# @param [String] unique_name
|
117
|
-
#
|
118
|
-
#
|
114
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
115
|
+
# the TaskChannel. It can be up to 64 characters long.
|
116
|
+
# @param [String] unique_name An application-defined string that uniquely
|
117
|
+
# identifies the TaskChannel, such as `voice` or `sms`.
|
118
|
+
# @param [Boolean] channel_optimized_routing Whether the TaskChannel should
|
119
|
+
# prioritize Workers that have been idle. If `true`, Workers that have been idle
|
120
|
+
# the longest are prioritized.
|
119
121
|
# @return [TaskChannelInstance] Newly created TaskChannelInstance
|
120
122
|
def create(friendly_name: nil, unique_name: nil, channel_optimized_routing: :unset)
|
121
123
|
data = Twilio::Values.of({
|
@@ -173,9 +175,9 @@ module Twilio
|
|
173
175
|
##
|
174
176
|
# Initialize the TaskChannelContext
|
175
177
|
# @param [Version] version Version that contains the resource
|
176
|
-
# @param [String] workspace_sid The
|
177
|
-
#
|
178
|
-
# @param [String] sid The
|
178
|
+
# @param [String] workspace_sid The SID of the Workspace with the TaskChannel to
|
179
|
+
# fetch.
|
180
|
+
# @param [String] sid The SID of the TaskChannel resource to fetch.
|
179
181
|
# @return [TaskChannelContext] TaskChannelContext
|
180
182
|
def initialize(version, workspace_sid, sid)
|
181
183
|
super(version)
|
@@ -207,9 +209,11 @@ module Twilio
|
|
207
209
|
|
208
210
|
##
|
209
211
|
# Update the TaskChannelInstance
|
210
|
-
# @param [String] friendly_name
|
211
|
-
#
|
212
|
-
#
|
212
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
213
|
+
# the TaskChannel. It can be up to 64 characters long.
|
214
|
+
# @param [Boolean] channel_optimized_routing Whether the TaskChannel should
|
215
|
+
# prioritize Workers that have been idle. If `true`, Workers that have been idle
|
216
|
+
# the longest are prioritized.
|
213
217
|
# @return [TaskChannelInstance] Updated TaskChannelInstance
|
214
218
|
def update(friendly_name: :unset, channel_optimized_routing: :unset)
|
215
219
|
data = Twilio::Values.of({
|
@@ -258,9 +262,9 @@ module Twilio
|
|
258
262
|
# Initialize the TaskChannelInstance
|
259
263
|
# @param [Version] version Version that contains the resource
|
260
264
|
# @param [Hash] payload payload that contains response from Twilio
|
261
|
-
# @param [String] workspace_sid The
|
262
|
-
# TaskChannel
|
263
|
-
# @param [String] sid The
|
265
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
266
|
+
# TaskChannel.
|
267
|
+
# @param [String] sid The SID of the TaskChannel resource to fetch.
|
264
268
|
# @return [TaskChannelInstance] TaskChannelInstance
|
265
269
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
266
270
|
super(version)
|
@@ -296,61 +300,61 @@ module Twilio
|
|
296
300
|
end
|
297
301
|
|
298
302
|
##
|
299
|
-
# @return [String] The
|
303
|
+
# @return [String] The SID of the Account that created the resource
|
300
304
|
def account_sid
|
301
305
|
@properties['account_sid']
|
302
306
|
end
|
303
307
|
|
304
308
|
##
|
305
|
-
# @return [Time] The date
|
309
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
306
310
|
def date_created
|
307
311
|
@properties['date_created']
|
308
312
|
end
|
309
313
|
|
310
314
|
##
|
311
|
-
# @return [Time] The date
|
315
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
312
316
|
def date_updated
|
313
317
|
@properties['date_updated']
|
314
318
|
end
|
315
319
|
|
316
320
|
##
|
317
|
-
# @return [String] The
|
321
|
+
# @return [String] The string that you assigned to describe the resource
|
318
322
|
def friendly_name
|
319
323
|
@properties['friendly_name']
|
320
324
|
end
|
321
325
|
|
322
326
|
##
|
323
|
-
# @return [String] The unique
|
327
|
+
# @return [String] The unique string that identifies the resource
|
324
328
|
def sid
|
325
329
|
@properties['sid']
|
326
330
|
end
|
327
331
|
|
328
332
|
##
|
329
|
-
# @return [String]
|
333
|
+
# @return [String] An application-defined string that uniquely identifies the TaskChannel
|
330
334
|
def unique_name
|
331
335
|
@properties['unique_name']
|
332
336
|
end
|
333
337
|
|
334
338
|
##
|
335
|
-
# @return [String] The
|
339
|
+
# @return [String] The SID of the Workspace that contains the TaskChannel
|
336
340
|
def workspace_sid
|
337
341
|
@properties['workspace_sid']
|
338
342
|
end
|
339
343
|
|
340
344
|
##
|
341
|
-
# @return [Boolean]
|
345
|
+
# @return [Boolean] Whether the TaskChannel will prioritize Workers that have been idle
|
342
346
|
def channel_optimized_routing
|
343
347
|
@properties['channel_optimized_routing']
|
344
348
|
end
|
345
349
|
|
346
350
|
##
|
347
|
-
# @return [String] The
|
351
|
+
# @return [String] The absolute URL of the TaskChannel resource
|
348
352
|
def url
|
349
353
|
@properties['url']
|
350
354
|
end
|
351
355
|
|
352
356
|
##
|
353
|
-
# @return [String] The
|
357
|
+
# @return [String] The URLs of related resources
|
354
358
|
def links
|
355
359
|
@properties['links']
|
356
360
|
end
|
@@ -364,9 +368,11 @@ module Twilio
|
|
364
368
|
|
365
369
|
##
|
366
370
|
# Update the TaskChannelInstance
|
367
|
-
# @param [String] friendly_name
|
368
|
-
#
|
369
|
-
#
|
371
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
372
|
+
# the TaskChannel. It can be up to 64 characters long.
|
373
|
+
# @param [Boolean] channel_optimized_routing Whether the TaskChannel should
|
374
|
+
# prioritize Workers that have been idle. If `true`, Workers that have been idle
|
375
|
+
# the longest are prioritized.
|
370
376
|
# @return [TaskChannelInstance] Updated TaskChannelInstance
|
371
377
|
def update(friendly_name: :unset, channel_optimized_routing: :unset)
|
372
378
|
context.update(friendly_name: friendly_name, channel_optimized_routing: channel_optimized_routing, )
|