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.
Files changed (115) hide show
  1. checksums.yaml +5 -5
  2. data/.dockerignore +1 -0
  3. data/CHANGES.md +13 -0
  4. data/CONTRIBUTING.md +2 -0
  5. data/Dockerfile +2 -2
  6. data/README.md +2 -2
  7. data/lib/twilio-ruby/http/http_client.rb +1 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -18
  9. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -9
  10. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -9
  11. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +5 -5
  12. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -1
  13. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +1 -1
  14. data/lib/twilio-ruby/rest/fax/v1/fax.rb +12 -12
  15. data/lib/twilio-ruby/rest/flex_api.rb +6 -3
  16. data/lib/twilio-ruby/rest/flex_api/v1.rb +3 -3
  17. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +23 -23
  18. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +39 -37
  19. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +102 -96
  20. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +20 -20
  21. data/lib/twilio-ruby/rest/messaging.rb +3 -2
  22. data/lib/twilio-ruby/rest/messaging/v1.rb +2 -3
  23. data/lib/twilio-ruby/rest/messaging/v1/service.rb +124 -91
  24. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +22 -18
  25. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +22 -16
  26. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +18 -20
  27. data/lib/twilio-ruby/rest/messaging/v1/session.rb +48 -44
  28. data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +46 -48
  29. data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +55 -62
  30. data/lib/twilio-ruby/rest/messaging/v1/session/webhook.rb +61 -65
  31. data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +30 -36
  32. data/lib/twilio-ruby/rest/monitor.rb +4 -2
  33. data/lib/twilio-ruby/rest/monitor/v1.rb +2 -2
  34. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +45 -57
  35. data/lib/twilio-ruby/rest/monitor/v1/event.rb +47 -50
  36. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +8 -8
  37. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -3
  38. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +6 -6
  39. data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +1 -1
  40. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +55 -55
  41. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +2 -2
  42. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +4 -4
  43. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  44. data/lib/twilio-ruby/rest/serverless.rb +2 -1
  45. data/lib/twilio-ruby/rest/serverless/v1.rb +1 -2
  46. data/lib/twilio-ruby/rest/serverless/v1/service.rb +27 -28
  47. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +22 -22
  48. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +22 -22
  49. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +25 -24
  50. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +26 -24
  51. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +21 -24
  52. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +31 -31
  53. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +35 -35
  54. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +22 -22
  55. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +22 -22
  56. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +12 -12
  57. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +7 -4
  58. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +6 -3
  59. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +15 -9
  60. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +6 -3
  61. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +15 -9
  62. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -6
  63. data/lib/twilio-ruby/rest/taskrouter.rb +2 -1
  64. data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
  65. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +102 -95
  66. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +52 -44
  67. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +90 -81
  68. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +152 -136
  69. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +35 -29
  70. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +96 -89
  71. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +61 -61
  72. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +27 -21
  73. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +46 -46
  74. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +57 -64
  75. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +98 -79
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +41 -39
  77. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +39 -33
  78. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +32 -31
  79. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +16 -11
  80. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +42 -42
  81. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +75 -72
  82. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +59 -51
  83. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +24 -18
  84. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +54 -46
  85. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +48 -46
  86. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +17 -17
  87. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +44 -42
  88. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +24 -18
  89. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +3 -3
  90. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +1 -2
  91. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +1 -2
  92. data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +12 -12
  93. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +6 -6
  94. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +6 -6
  95. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -1
  96. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +2 -1
  97. data/lib/twilio-ruby/rest/video.rb +8 -8
  98. data/lib/twilio-ruby/rest/video/v1.rb +4 -7
  99. data/lib/twilio-ruby/rest/video/v1/composition.rb +89 -98
  100. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +224 -195
  101. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +34 -34
  102. data/lib/twilio-ruby/rest/video/v1/recording.rb +53 -55
  103. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +32 -32
  104. data/lib/twilio-ruby/rest/video/v1/room.rb +71 -61
  105. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +45 -33
  106. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +56 -57
  107. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +25 -22
  108. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +10 -10
  109. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +24 -23
  110. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -1
  111. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +5 -5
  112. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +2 -2
  113. data/lib/twilio-ruby/version.rb +1 -1
  114. data/spec/integration/conversations/v1/conversation/message_spec.rb +58 -0
  115. 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 ID of the Workspace that holds this Task
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 Retrieve the list of all Tasks in the workspace with
33
- # the specified priority.
34
- # @param [String] assignment_status Returns the list of all Tasks in the workspace
35
- # with the specified AssignmentStatus. Allowed AssignmentStatus values are
36
- # pending, reserved, assigned, canceled, and completed.
37
- # @param [String] workflow_sid Returns the list of Tasks that are being controlled
38
- # by the Workflow with the specified Sid value.
39
- # @param [String] workflow_name Returns the list of Tasks that are being
40
- # controlled by the Workflow with the specified FriendlyName value.
41
- # @param [String] task_queue_sid Returns the list of Tasks that are currently
42
- # waiting in the TaskQueue identified by the Sid specified.
43
- # @param [String] task_queue_name Returns the list of Tasks that are currently
44
- # waiting in the TaskQueue identified by the FriendlyName specified.
45
- # @param [String] evaluate_task_attributes Provide a task attributes expression,
46
- # and this will return tasks which match the attributes.
47
- # @param [String] ordering Use this parameter to control the order of the Tasks
48
- # returned. The value should be passed in `Attribute:Order` format, where
49
- # Attribute can be either `Priority` or `DateCreated` and Order can be either
50
- # `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered by Priority
51
- # in descending order. To sort the Tasks by Priority and DateCreated pass
52
- # `Priority:desc,DateCreated:asc`. By Default Tasks are returned sorted by
53
- # DateCreated in ascending order.
54
- # @param [Boolean] has_addons The has_addons
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 Retrieve the list of all Tasks in the workspace with
83
- # the specified priority.
84
- # @param [String] assignment_status Returns the list of all Tasks in the workspace
85
- # with the specified AssignmentStatus. Allowed AssignmentStatus values are
86
- # pending, reserved, assigned, canceled, and completed.
87
- # @param [String] workflow_sid Returns the list of Tasks that are being controlled
88
- # by the Workflow with the specified Sid value.
89
- # @param [String] workflow_name Returns the list of Tasks that are being
90
- # controlled by the Workflow with the specified FriendlyName value.
91
- # @param [String] task_queue_sid Returns the list of Tasks that are currently
92
- # waiting in the TaskQueue identified by the Sid specified.
93
- # @param [String] task_queue_name Returns the list of Tasks that are currently
94
- # waiting in the TaskQueue identified by the FriendlyName specified.
95
- # @param [String] evaluate_task_attributes Provide a task attributes expression,
96
- # and this will return tasks which match the attributes.
97
- # @param [String] ordering Use this parameter to control the order of the Tasks
98
- # returned. The value should be passed in `Attribute:Order` format, where
99
- # Attribute can be either `Priority` or `DateCreated` and Order can be either
100
- # `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered by Priority
101
- # in descending order. To sort the Tasks by Priority and DateCreated pass
102
- # `Priority:desc,DateCreated:asc`. By Default Tasks are returned sorted by
103
- # DateCreated in ascending order.
104
- # @param [Boolean] has_addons The has_addons
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 Retrieve the list of all Tasks in the workspace with
149
- # the specified priority.
150
- # @param [String] assignment_status Returns the list of all Tasks in the workspace
151
- # with the specified AssignmentStatus. Allowed AssignmentStatus values are
152
- # pending, reserved, assigned, canceled, and completed.
153
- # @param [String] workflow_sid Returns the list of Tasks that are being controlled
154
- # by the Workflow with the specified Sid value.
155
- # @param [String] workflow_name Returns the list of Tasks that are being
156
- # controlled by the Workflow with the specified FriendlyName value.
157
- # @param [String] task_queue_sid Returns the list of Tasks that are currently
158
- # waiting in the TaskQueue identified by the Sid specified.
159
- # @param [String] task_queue_name Returns the list of Tasks that are currently
160
- # waiting in the TaskQueue identified by the FriendlyName specified.
161
- # @param [String] evaluate_task_attributes Provide a task attributes expression,
162
- # and this will return tasks which match the attributes.
163
- # @param [String] ordering Use this parameter to control the order of the Tasks
164
- # returned. The value should be passed in `Attribute:Order` format, where
165
- # Attribute can be either `Priority` or `DateCreated` and Order can be either
166
- # `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered by Priority
167
- # in descending order. To sort the Tasks by Priority and DateCreated pass
168
- # `Priority:desc,DateCreated:asc`. By Default Tasks are returned sorted by
169
- # DateCreated in ascending order.
170
- # @param [Boolean] has_addons The has_addons
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. Defaults to 24 hours. On timeout,
216
- # `task.canceled` event will fire with description "Task TTL Exceeded".
217
- # @param [String] priority Override priority for the Task. When supplied, the Task
218
- # will take on the given priority unless it matches a Workflow Target with a
219
- # Priority set. When not supplied, the Task will take on the priority of the
220
- # matching Workflow Target.
221
- # @param [String] task_channel When MultiTasking is enabled specify the type of
222
- # the task by passing either TaskChannel Unique Name or Task Channel Sid. Default
223
- # value is "default"
224
- # @param [String] workflow_sid The WorkflowSid for the Workflow that you would
225
- # like to handle routing for this Task. If there is only one Workflow defined for
226
- # the Workspace that you are posting a task to, then this is an optional
227
- # parameter, and that single workflow will be used.
228
- # @param [String] attributes Url-encoded JSON string describing the attributes of
229
- # this task. This data will be passed back to the Workflow's AssignmentCallbackURL
230
- # when the Task is assigned to a Worker. An example task: `{ "task_type": "call",
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 workspace_sid
292
- # @param [String] sid The sid
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 user-defined JSON data describing the custom
323
- # attributes of this task.
324
- # @param [task.Status] assignment_status A 'pending' or 'reserved' Task may be
325
- # canceled by posting AssignmentStatus='canceled'. Post
326
- # AssignmentStatus='wrapping' to move Task to 'wrapup' state and
327
- # AssignmentStatus='completed' to move a Task to 'completed' state.
328
- # @param [String] reason This is only required if the Task is canceled or
329
- # completed. This logs the reason the task was either canceled or completed and
330
- # queues the task for deletion after 5 minutes.
331
- # @param [String] priority Override priority for the Task. When supplied, the Task
332
- # will take on the given priority unless it matches a Workflow Target with a
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 The 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 ID of the Workspace that holds this Task
404
- # @param [String] sid The sid
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 ID of the account that owns this Task
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 this task was created.
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] Returns the list of all Tasks in the workspace with the specified AssignmentStatus.
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 user-defined JSON string describing the custom attributes of this work.
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] The addon data for all installed addons is returned with this attribute
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] Date this task was created, given as ISO 8601 format.
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] Date this task was updated, given as ISO 8601 format.
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 workspace with the specified priority.
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 or completed
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 ID of the Task
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] Returns the list of Tasks that are currently waiting in the TaskQueue identified by the Sid specified.
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 task_queue_friendly_name
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 ID of the Task Channel
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 Task Channel
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] Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.
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 workflow_friendly_name
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 ID of the Workspace that holds this Task
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 url
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 links
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 user-defined JSON data describing the custom
579
- # attributes of this task.
580
- # @param [task.Status] assignment_status A 'pending' or 'reserved' Task may be
581
- # canceled by posting AssignmentStatus='canceled'. Post
582
- # AssignmentStatus='wrapping' to move Task to 'wrapup' state and
583
- # AssignmentStatus='completed' to move a Task to 'completed' state.
584
- # @param [String] reason This is only required if the Task is canceled or
585
- # completed. This logs the reason the task was either canceled or completed and
586
- # queues the task for deletion after 5 minutes.
587
- # @param [String] priority Override priority for the Task. When supplied, the Task
588
- # will take on the given priority unless it matches a Workflow Target with a
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 The 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 unique ID of the Workspace that this
19
- # TaskChannel belongs to.
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 String representing user-friendly name for the
115
- # TaskChannel
116
- # @param [String] unique_name String representing unique name for the TaskChannel
117
- # @param [Boolean] channel_optimized_routing A boolean that if true; mean that the
118
- # channel will prioritize workers that have been idle
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 unique ID of the Workspace that this
177
- # TaskChannel belongs to.
178
- # @param [String] sid The unique ID for this TaskChannel.
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 Toggle the FriendlyName for the TaskChannel
211
- # @param [Boolean] channel_optimized_routing A boolean that if true; mean that the
212
- # channel will prioritize workers that have been idle
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 unique ID of the Workspace that this
262
- # TaskChannel belongs to.
263
- # @param [String] sid The unique ID for this TaskChannel.
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 unique ID of the Account that owns this TaskChannel.
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 this TaskChannel was created.
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 this TaskChannel was updated.
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 friendly name of this TaskChannel
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 ID for this TaskChannel.
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] The unique name of TaskChannel, such as 'voice', 'sms', etc.
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 unique ID of the Workspace that this TaskChannel belongs to.
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] If true then prioritize longest idle workers
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 url
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 links
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 Toggle the FriendlyName for the TaskChannel
368
- # @param [Boolean] channel_optimized_routing A boolean that if true; mean that the
369
- # channel will prioritize workers that have been idle
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, )