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,7 @@ module Twilio
|
|
|
15
15
|
##
|
|
16
16
|
# Initialize the WorkerList
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
|
18
|
-
# @param [String] workspace_sid The
|
|
19
|
-
# with
|
|
18
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the Worker.
|
|
20
19
|
# @return [WorkerList] WorkerList
|
|
21
20
|
def initialize(version, workspace_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -33,21 +32,22 @@ module Twilio
|
|
|
33
32
|
# Lists WorkerInstance records from the API as a list.
|
|
34
33
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
35
34
|
# memory before returning.
|
|
36
|
-
# @param [String] activity_name
|
|
37
|
-
#
|
|
38
|
-
# @param [String] activity_sid
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
# @param [String] friendly_name
|
|
44
|
-
#
|
|
45
|
-
#
|
|
35
|
+
# @param [String] activity_name The `activity_name` of the Worker resources to
|
|
36
|
+
# read.
|
|
37
|
+
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
|
38
|
+
# @param [String] available Whether to return only Worker resources that are
|
|
39
|
+
# available or unavailable. Can be `true`, `1`, or `yes` to return Worker
|
|
40
|
+
# resources that are available, and `false`, or any value returns the Worker
|
|
41
|
+
# resources that are not available.
|
|
42
|
+
# @param [String] friendly_name The `friendly_name` of the Worker resources to
|
|
43
|
+
# read.
|
|
44
|
+
# @param [String] target_workers_expression Filter by Workers that would match an
|
|
45
|
+
# expression on a TaskQueue. This is helpful for debugging which Workers would
|
|
46
46
|
# match a potential queue.
|
|
47
|
-
# @param [String] task_queue_name
|
|
48
|
-
#
|
|
49
|
-
# @param [String] task_queue_sid
|
|
50
|
-
#
|
|
47
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the
|
|
48
|
+
# Workers to read are eligible for.
|
|
49
|
+
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
|
50
|
+
# are eligible for.
|
|
51
51
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
52
52
|
# guarantees to never return more than limit. Default is no limit
|
|
53
53
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -73,21 +73,22 @@ module Twilio
|
|
|
73
73
|
# Streams WorkerInstance records from the API as an Enumerable.
|
|
74
74
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
75
75
|
# is reached.
|
|
76
|
-
# @param [String] activity_name
|
|
77
|
-
#
|
|
78
|
-
# @param [String] activity_sid
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
# @param [String] friendly_name
|
|
84
|
-
#
|
|
85
|
-
#
|
|
76
|
+
# @param [String] activity_name The `activity_name` of the Worker resources to
|
|
77
|
+
# read.
|
|
78
|
+
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
|
79
|
+
# @param [String] available Whether to return only Worker resources that are
|
|
80
|
+
# available or unavailable. Can be `true`, `1`, or `yes` to return Worker
|
|
81
|
+
# resources that are available, and `false`, or any value returns the Worker
|
|
82
|
+
# resources that are not available.
|
|
83
|
+
# @param [String] friendly_name The `friendly_name` of the Worker resources to
|
|
84
|
+
# read.
|
|
85
|
+
# @param [String] target_workers_expression Filter by Workers that would match an
|
|
86
|
+
# expression on a TaskQueue. This is helpful for debugging which Workers would
|
|
86
87
|
# match a potential queue.
|
|
87
|
-
# @param [String] task_queue_name
|
|
88
|
-
#
|
|
89
|
-
# @param [String] task_queue_sid
|
|
90
|
-
#
|
|
88
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the
|
|
89
|
+
# Workers to read are eligible for.
|
|
90
|
+
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
|
91
|
+
# are eligible for.
|
|
91
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
92
93
|
# guarantees to never return more than limit. Default is no limit.
|
|
93
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -129,21 +130,22 @@ module Twilio
|
|
|
129
130
|
##
|
|
130
131
|
# Retrieve a single page of WorkerInstance records from the API.
|
|
131
132
|
# Request is executed immediately.
|
|
132
|
-
# @param [String] activity_name
|
|
133
|
-
#
|
|
134
|
-
# @param [String] activity_sid
|
|
135
|
-
#
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
# @param [String] friendly_name
|
|
140
|
-
#
|
|
141
|
-
#
|
|
133
|
+
# @param [String] activity_name The `activity_name` of the Worker resources to
|
|
134
|
+
# read.
|
|
135
|
+
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
|
136
|
+
# @param [String] available Whether to return only Worker resources that are
|
|
137
|
+
# available or unavailable. Can be `true`, `1`, or `yes` to return Worker
|
|
138
|
+
# resources that are available, and `false`, or any value returns the Worker
|
|
139
|
+
# resources that are not available.
|
|
140
|
+
# @param [String] friendly_name The `friendly_name` of the Worker resources to
|
|
141
|
+
# read.
|
|
142
|
+
# @param [String] target_workers_expression Filter by Workers that would match an
|
|
143
|
+
# expression on a TaskQueue. This is helpful for debugging which Workers would
|
|
142
144
|
# match a potential queue.
|
|
143
|
-
# @param [String] task_queue_name
|
|
144
|
-
#
|
|
145
|
-
# @param [String] task_queue_sid
|
|
146
|
-
#
|
|
145
|
+
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the
|
|
146
|
+
# Workers to read are eligible for.
|
|
147
|
+
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read
|
|
148
|
+
# are eligible for.
|
|
147
149
|
# @param [String] page_token PageToken provided by the API
|
|
148
150
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
149
151
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
@@ -185,15 +187,17 @@ module Twilio
|
|
|
185
187
|
##
|
|
186
188
|
# Retrieve a single page of WorkerInstance records from the API.
|
|
187
189
|
# Request is executed immediately.
|
|
188
|
-
# @param [String] friendly_name
|
|
189
|
-
# Worker.
|
|
190
|
-
# @param [String] activity_sid
|
|
191
|
-
#
|
|
192
|
-
#
|
|
193
|
-
#
|
|
194
|
-
#
|
|
195
|
-
#
|
|
196
|
-
#
|
|
190
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
191
|
+
# the new Worker. It can be up to 64 characters long.
|
|
192
|
+
# @param [String] activity_sid The SID of a valid Activity that will describe the
|
|
193
|
+
# new Worker's initial state. See
|
|
194
|
+
# [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more
|
|
195
|
+
# information. If not provided, the new Worker's initial state is the
|
|
196
|
+
# `default_activity_sid` configured on the Workspace.
|
|
197
|
+
# @param [String] attributes A valid JSON string that describes the new Worker.
|
|
198
|
+
# For example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data
|
|
199
|
+
# is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the
|
|
200
|
+
# Worker. Defaults to {}.
|
|
197
201
|
# @return [WorkerInstance] Newly created WorkerInstance
|
|
198
202
|
def create(friendly_name: nil, activity_sid: :unset, attributes: :unset)
|
|
199
203
|
data = Twilio::Values.of({
|
|
@@ -261,8 +265,8 @@ module Twilio
|
|
|
261
265
|
##
|
|
262
266
|
# Initialize the WorkerContext
|
|
263
267
|
# @param [Version] version Version that contains the resource
|
|
264
|
-
# @param [String] workspace_sid The
|
|
265
|
-
# @param [String] sid The
|
|
268
|
+
# @param [String] workspace_sid The SID of the Workspace with the Worker to fetch.
|
|
269
|
+
# @param [String] sid The SID of the Worker resource to fetch.
|
|
266
270
|
# @return [WorkerContext] WorkerContext
|
|
267
271
|
def initialize(version, workspace_sid, sid)
|
|
268
272
|
super(version)
|
|
@@ -301,10 +305,18 @@ module Twilio
|
|
|
301
305
|
|
|
302
306
|
##
|
|
303
307
|
# Update the WorkerInstance
|
|
304
|
-
# @param [String] activity_sid The
|
|
305
|
-
#
|
|
306
|
-
#
|
|
307
|
-
#
|
|
308
|
+
# @param [String] activity_sid The SID of a valid Activity that will describe the
|
|
309
|
+
# Worker's initial state. See
|
|
310
|
+
# [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more
|
|
311
|
+
# information.
|
|
312
|
+
# @param [String] attributes The JSON string that describes the Worker. For
|
|
313
|
+
# example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is
|
|
314
|
+
# passed to the `assignment_callback_url` when TaskRouter assigns a Task to the
|
|
315
|
+
# Worker. Defaults to {}.
|
|
316
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
317
|
+
# the Worker. It can be up to 64 characters long.
|
|
318
|
+
# @param [Boolean] reject_pending_reservations Whether to reject pending
|
|
319
|
+
# reservations.
|
|
308
320
|
# @return [WorkerInstance] Updated WorkerInstance
|
|
309
321
|
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
|
310
322
|
data = Twilio::Values.of({
|
|
@@ -423,9 +435,8 @@ module Twilio
|
|
|
423
435
|
# Initialize the WorkerInstance
|
|
424
436
|
# @param [Version] version Version that contains the resource
|
|
425
437
|
# @param [Hash] payload payload that contains response from Twilio
|
|
426
|
-
# @param [String] workspace_sid The
|
|
427
|
-
#
|
|
428
|
-
# @param [String] sid The sid
|
|
438
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the Worker.
|
|
439
|
+
# @param [String] sid The SID of the Worker resource to fetch.
|
|
429
440
|
# @return [WorkerInstance] WorkerInstance
|
|
430
441
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
431
442
|
super(version)
|
|
@@ -464,79 +475,79 @@ module Twilio
|
|
|
464
475
|
end
|
|
465
476
|
|
|
466
477
|
##
|
|
467
|
-
# @return [String] The
|
|
478
|
+
# @return [String] The SID of the Account that created the resource
|
|
468
479
|
def account_sid
|
|
469
480
|
@properties['account_sid']
|
|
470
481
|
end
|
|
471
482
|
|
|
472
483
|
##
|
|
473
|
-
# @return [String]
|
|
484
|
+
# @return [String] The friendly_name of the Worker's current Activity
|
|
474
485
|
def activity_name
|
|
475
486
|
@properties['activity_name']
|
|
476
487
|
end
|
|
477
488
|
|
|
478
489
|
##
|
|
479
|
-
# @return [String]
|
|
490
|
+
# @return [String] The SID of the Worker's current Activity
|
|
480
491
|
def activity_sid
|
|
481
492
|
@properties['activity_sid']
|
|
482
493
|
end
|
|
483
494
|
|
|
484
495
|
##
|
|
485
|
-
# @return [String] JSON
|
|
496
|
+
# @return [String] The JSON string that describes the Worker
|
|
486
497
|
def attributes
|
|
487
498
|
@properties['attributes']
|
|
488
499
|
end
|
|
489
500
|
|
|
490
501
|
##
|
|
491
|
-
# @return [Boolean]
|
|
502
|
+
# @return [Boolean] Whether the Worker is available to perform tasks
|
|
492
503
|
def available
|
|
493
504
|
@properties['available']
|
|
494
505
|
end
|
|
495
506
|
|
|
496
507
|
##
|
|
497
|
-
# @return [Time]
|
|
508
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
|
498
509
|
def date_created
|
|
499
510
|
@properties['date_created']
|
|
500
511
|
end
|
|
501
512
|
|
|
502
513
|
##
|
|
503
|
-
# @return [Time]
|
|
514
|
+
# @return [Time] The date and time in GMT of the last change to the Worker's activity
|
|
504
515
|
def date_status_changed
|
|
505
516
|
@properties['date_status_changed']
|
|
506
517
|
end
|
|
507
518
|
|
|
508
519
|
##
|
|
509
|
-
# @return [Time]
|
|
520
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
|
510
521
|
def date_updated
|
|
511
522
|
@properties['date_updated']
|
|
512
523
|
end
|
|
513
524
|
|
|
514
525
|
##
|
|
515
|
-
# @return [String]
|
|
526
|
+
# @return [String] The string that you assigned to describe the resource
|
|
516
527
|
def friendly_name
|
|
517
528
|
@properties['friendly_name']
|
|
518
529
|
end
|
|
519
530
|
|
|
520
531
|
##
|
|
521
|
-
# @return [String] The unique
|
|
532
|
+
# @return [String] The unique string that identifies the resource
|
|
522
533
|
def sid
|
|
523
534
|
@properties['sid']
|
|
524
535
|
end
|
|
525
536
|
|
|
526
537
|
##
|
|
527
|
-
# @return [String] The
|
|
538
|
+
# @return [String] The SID of the Workspace that contains the Worker
|
|
528
539
|
def workspace_sid
|
|
529
540
|
@properties['workspace_sid']
|
|
530
541
|
end
|
|
531
542
|
|
|
532
543
|
##
|
|
533
|
-
# @return [String] The
|
|
544
|
+
# @return [String] The absolute URL of the Worker resource
|
|
534
545
|
def url
|
|
535
546
|
@properties['url']
|
|
536
547
|
end
|
|
537
548
|
|
|
538
549
|
##
|
|
539
|
-
# @return [String] The
|
|
550
|
+
# @return [String] The URLs of related resources
|
|
540
551
|
def links
|
|
541
552
|
@properties['links']
|
|
542
553
|
end
|
|
@@ -550,10 +561,18 @@ module Twilio
|
|
|
550
561
|
|
|
551
562
|
##
|
|
552
563
|
# Update the WorkerInstance
|
|
553
|
-
# @param [String] activity_sid The
|
|
554
|
-
#
|
|
555
|
-
#
|
|
556
|
-
#
|
|
564
|
+
# @param [String] activity_sid The SID of a valid Activity that will describe the
|
|
565
|
+
# Worker's initial state. See
|
|
566
|
+
# [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more
|
|
567
|
+
# information.
|
|
568
|
+
# @param [String] attributes The JSON string that describes the Worker. For
|
|
569
|
+
# example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is
|
|
570
|
+
# passed to the `assignment_callback_url` when TaskRouter assigns a Task to the
|
|
571
|
+
# Worker. Defaults to {}.
|
|
572
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
573
|
+
# the Worker. It can be up to 64 characters long.
|
|
574
|
+
# @param [Boolean] reject_pending_reservations Whether to reject pending
|
|
575
|
+
# reservations.
|
|
557
576
|
# @return [WorkerInstance] Updated WorkerInstance
|
|
558
577
|
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
|
559
578
|
context.update(
|
|
@@ -16,10 +16,10 @@ module Twilio
|
|
|
16
16
|
##
|
|
17
17
|
# Initialize the WorkerChannelList
|
|
18
18
|
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @param [String] workspace_sid The
|
|
20
|
-
# WorkerChannel
|
|
21
|
-
# @param [String] worker_sid The
|
|
22
|
-
#
|
|
19
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
20
|
+
# WorkerChannel.
|
|
21
|
+
# @param [String] worker_sid The SID of the Worker that contains the
|
|
22
|
+
# WorkerChannel.
|
|
23
23
|
# @return [WorkerChannelList] WorkerChannelList
|
|
24
24
|
def initialize(version, workspace_sid: nil, worker_sid: nil)
|
|
25
25
|
super(version)
|
|
@@ -156,9 +156,11 @@ module Twilio
|
|
|
156
156
|
##
|
|
157
157
|
# Initialize the WorkerChannelContext
|
|
158
158
|
# @param [Version] version Version that contains the resource
|
|
159
|
-
# @param [String] workspace_sid The
|
|
160
|
-
#
|
|
161
|
-
# @param [String]
|
|
159
|
+
# @param [String] workspace_sid The SID of the Workspace with the WorkerChannel to
|
|
160
|
+
# fetch.
|
|
161
|
+
# @param [String] worker_sid The SID of the Worker with the WorkerChannel to
|
|
162
|
+
# fetch.
|
|
163
|
+
# @param [String] sid The SID of the WorkerChannel to fetch.
|
|
162
164
|
# @return [WorkerChannelContext] WorkerChannelContext
|
|
163
165
|
def initialize(version, workspace_sid, worker_sid, sid)
|
|
164
166
|
super(version)
|
|
@@ -191,13 +193,13 @@ module Twilio
|
|
|
191
193
|
|
|
192
194
|
##
|
|
193
195
|
# Update the WorkerChannelInstance
|
|
194
|
-
# @param [String] capacity The total number of Tasks
|
|
195
|
-
# TaskChannel type. TaskRouter
|
|
196
|
-
# TaskChannel type up to the capacity
|
|
197
|
-
# reservations will be created
|
|
198
|
-
# @param [Boolean] available
|
|
199
|
-
#
|
|
200
|
-
#
|
|
196
|
+
# @param [String] capacity The total number of Tasks that the Worker should handle
|
|
197
|
+
# for the TaskChannel type. TaskRouter creates reservations for Tasks of this
|
|
198
|
+
# TaskChannel type up to the specified capacity. If the capacity is 0, no new
|
|
199
|
+
# reservations will be created.
|
|
200
|
+
# @param [Boolean] available Whether the WorkerChannel is available. Set to
|
|
201
|
+
# `false` to prevent the Worker from receiving any new Tasks of this TaskChannel
|
|
202
|
+
# type.
|
|
201
203
|
# @return [WorkerChannelInstance] Updated WorkerChannelInstance
|
|
202
204
|
def update(capacity: :unset, available: :unset)
|
|
203
205
|
data = Twilio::Values.of({'Capacity' => capacity, 'Available' => available, })
|
|
@@ -237,11 +239,11 @@ module Twilio
|
|
|
237
239
|
# Initialize the WorkerChannelInstance
|
|
238
240
|
# @param [Version] version Version that contains the resource
|
|
239
241
|
# @param [Hash] payload payload that contains response from Twilio
|
|
240
|
-
# @param [String] workspace_sid The
|
|
241
|
-
# WorkerChannel
|
|
242
|
-
# @param [String] worker_sid The
|
|
243
|
-
#
|
|
244
|
-
# @param [String] sid The
|
|
242
|
+
# @param [String] workspace_sid The SID of the Workspace that contains the
|
|
243
|
+
# WorkerChannel.
|
|
244
|
+
# @param [String] worker_sid The SID of the Worker that contains the
|
|
245
|
+
# WorkerChannel.
|
|
246
|
+
# @param [String] sid The SID of the WorkerChannel to fetch.
|
|
245
247
|
# @return [WorkerChannelInstance] WorkerChannelInstance
|
|
246
248
|
def initialize(version, payload, workspace_sid: nil, worker_sid: nil, sid: nil)
|
|
247
249
|
super(version)
|
|
@@ -289,79 +291,79 @@ module Twilio
|
|
|
289
291
|
end
|
|
290
292
|
|
|
291
293
|
##
|
|
292
|
-
# @return [String] The
|
|
294
|
+
# @return [String] The SID of the Account that created the resource
|
|
293
295
|
def account_sid
|
|
294
296
|
@properties['account_sid']
|
|
295
297
|
end
|
|
296
298
|
|
|
297
299
|
##
|
|
298
|
-
# @return [String] The total number of
|
|
300
|
+
# @return [String] The total number of Tasks assigned to Worker for the TaskChannel type
|
|
299
301
|
def assigned_tasks
|
|
300
302
|
@properties['assigned_tasks']
|
|
301
303
|
end
|
|
302
304
|
|
|
303
305
|
##
|
|
304
|
-
# @return [Boolean]
|
|
306
|
+
# @return [Boolean] Whether the Worker should receive Tasks of the TaskChannel type
|
|
305
307
|
def available
|
|
306
308
|
@properties['available']
|
|
307
309
|
end
|
|
308
310
|
|
|
309
311
|
##
|
|
310
|
-
# @return [String] The current available capacity between 0 to 100 for
|
|
312
|
+
# @return [String] The current available capacity between 0 to 100 for the TaskChannel
|
|
311
313
|
def available_capacity_percentage
|
|
312
314
|
@properties['available_capacity_percentage']
|
|
313
315
|
end
|
|
314
316
|
|
|
315
317
|
##
|
|
316
|
-
# @return [String] The current configured capacity for the WorkerChannel
|
|
318
|
+
# @return [String] The current configured capacity for the WorkerChannel
|
|
317
319
|
def configured_capacity
|
|
318
320
|
@properties['configured_capacity']
|
|
319
321
|
end
|
|
320
322
|
|
|
321
323
|
##
|
|
322
|
-
# @return [Time] The date
|
|
324
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
|
323
325
|
def date_created
|
|
324
326
|
@properties['date_created']
|
|
325
327
|
end
|
|
326
328
|
|
|
327
329
|
##
|
|
328
|
-
# @return [Time] The date
|
|
330
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
|
329
331
|
def date_updated
|
|
330
332
|
@properties['date_updated']
|
|
331
333
|
end
|
|
332
334
|
|
|
333
335
|
##
|
|
334
|
-
# @return [String] The unique
|
|
336
|
+
# @return [String] The unique string that identifies the resource
|
|
335
337
|
def sid
|
|
336
338
|
@properties['sid']
|
|
337
339
|
end
|
|
338
340
|
|
|
339
341
|
##
|
|
340
|
-
# @return [String] The
|
|
342
|
+
# @return [String] The SID of the TaskChannel
|
|
341
343
|
def task_channel_sid
|
|
342
344
|
@properties['task_channel_sid']
|
|
343
345
|
end
|
|
344
346
|
|
|
345
347
|
##
|
|
346
|
-
# @return [String] The unique name of TaskChannel, such as 'voice'
|
|
348
|
+
# @return [String] The unique name of the TaskChannel, such as 'voice' or 'sms'
|
|
347
349
|
def task_channel_unique_name
|
|
348
350
|
@properties['task_channel_unique_name']
|
|
349
351
|
end
|
|
350
352
|
|
|
351
353
|
##
|
|
352
|
-
# @return [String] The
|
|
354
|
+
# @return [String] The SID of the Worker that contains the WorkerChannel
|
|
353
355
|
def worker_sid
|
|
354
356
|
@properties['worker_sid']
|
|
355
357
|
end
|
|
356
358
|
|
|
357
359
|
##
|
|
358
|
-
# @return [String] The
|
|
360
|
+
# @return [String] The SID of the Workspace that contains the WorkerChannel
|
|
359
361
|
def workspace_sid
|
|
360
362
|
@properties['workspace_sid']
|
|
361
363
|
end
|
|
362
364
|
|
|
363
365
|
##
|
|
364
|
-
# @return [String] The
|
|
366
|
+
# @return [String] The absolute URL of the WorkerChannel resource
|
|
365
367
|
def url
|
|
366
368
|
@properties['url']
|
|
367
369
|
end
|
|
@@ -375,13 +377,13 @@ module Twilio
|
|
|
375
377
|
|
|
376
378
|
##
|
|
377
379
|
# Update the WorkerChannelInstance
|
|
378
|
-
# @param [String] capacity The total number of Tasks
|
|
379
|
-
# TaskChannel type. TaskRouter
|
|
380
|
-
# TaskChannel type up to the capacity
|
|
381
|
-
# reservations will be created
|
|
382
|
-
# @param [Boolean] available
|
|
383
|
-
#
|
|
384
|
-
#
|
|
380
|
+
# @param [String] capacity The total number of Tasks that the Worker should handle
|
|
381
|
+
# for the TaskChannel type. TaskRouter creates reservations for Tasks of this
|
|
382
|
+
# TaskChannel type up to the specified capacity. If the capacity is 0, no new
|
|
383
|
+
# reservations will be created.
|
|
384
|
+
# @param [Boolean] available Whether the WorkerChannel is available. Set to
|
|
385
|
+
# `false` to prevent the Worker from receiving any new Tasks of this TaskChannel
|
|
386
|
+
# type.
|
|
385
387
|
# @return [WorkerChannelInstance] Updated WorkerChannelInstance
|
|
386
388
|
def update(capacity: :unset, available: :unset)
|
|
387
389
|
context.update(capacity: capacity, available: available, )
|