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.
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,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 ID of the Workflow this worker is associated
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 Filter by workers that are in a particular
37
- # Activity by Friendly Name
38
- # @param [String] activity_sid Filter by workers that are in a particular Activity
39
- # by SID
40
- # @param [String] available Filter by workers that are available or unavailable.
41
- # (Note: This can be 'true', '1' or 'yes' to indicate a true value. All other
42
- # values will represent false)
43
- # @param [String] friendly_name Filter by a worker's friendly name
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
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 Filter by workers that are eligible for a
48
- # TaskQueue by Friendly Name
49
- # @param [String] task_queue_sid Filter by workers that are eligible for a
50
- # TaskQueue by SID
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 Filter by workers that are in a particular
77
- # Activity by Friendly Name
78
- # @param [String] activity_sid Filter by workers that are in a particular Activity
79
- # by SID
80
- # @param [String] available Filter by workers that are available or unavailable.
81
- # (Note: This can be 'true', '1' or 'yes' to indicate a true value. All other
82
- # values will represent false)
83
- # @param [String] friendly_name Filter by a worker's friendly name
84
- # @param [String] target_workers_expression Filter by workers that would match an
85
- # expression on a TaskQueue. This is helpful for debugging which workers would
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 Filter by workers that are eligible for a
88
- # TaskQueue by Friendly Name
89
- # @param [String] task_queue_sid Filter by workers that are eligible for a
90
- # TaskQueue by SID
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 Filter by workers that are in a particular
133
- # Activity by Friendly Name
134
- # @param [String] activity_sid Filter by workers that are in a particular Activity
135
- # by SID
136
- # @param [String] available Filter by workers that are available or unavailable.
137
- # (Note: This can be 'true', '1' or 'yes' to indicate a true value. All other
138
- # values will represent false)
139
- # @param [String] friendly_name Filter by a worker's friendly name
140
- # @param [String] target_workers_expression Filter by workers that would match an
141
- # expression on a TaskQueue. This is helpful for debugging which workers would
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 Filter by workers that are eligible for a
144
- # TaskQueue by Friendly Name
145
- # @param [String] task_queue_sid Filter by workers that are eligible for a
146
- # TaskQueue by SID
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 String representing user-friendly name for the
189
- # Worker.
190
- # @param [String] activity_sid A valid Activity describing the worker's initial
191
- # state. See Activities for more information. If not provided, new Workers will be
192
- # use the DefaultActivitySid configured on the Workspace.
193
- # @param [String] attributes JSON object describing this worker. For example: `{
194
- # 'email: 'Bob@foo.com', 'phone': '8675309' }`. This data will be passed to the
195
- # Assignment Callback URL whenever TaskRouter assigns a Task to this worker.
196
- # Defaults to {}.
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 workspace_sid
265
- # @param [String] sid The sid
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 activity_sid
305
- # @param [String] attributes The attributes
306
- # @param [String] friendly_name The friendly_name
307
- # @param [Boolean] reject_pending_reservations The reject_pending_reservations
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 ID of the Workflow this worker is associated
427
- # with
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 ID of the account that owns this worker
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] Filter by workers that are in a particular Activity by Friendly Name
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] Filter by workers that are in a particular Activity by SID
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 object describing this worker.
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] Filter by workers that are available or unavailable.
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] DateTime this worker was created
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] DateTime of the last change to the Worker's activity.
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] DateTime of the last update
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] Filter by a worker's friendly name
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 ID of the worker
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 ID of the Workflow this worker is associated with
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 url
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 links
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 activity_sid
554
- # @param [String] attributes The attributes
555
- # @param [String] friendly_name The friendly_name
556
- # @param [Boolean] reject_pending_reservations The reject_pending_reservations
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 unique ID of the Workspace that this
20
- # WorkerChannel belongs to.
21
- # @param [String] worker_sid The unique ID of the Worker that this WorkerChannel
22
- # belongs to.
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 workspace_sid
160
- # @param [String] worker_sid The worker_sid
161
- # @param [String] sid The sid
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 worker should handle for this
195
- # TaskChannel type. TaskRouter will only create reservations for Tasks of this
196
- # TaskChannel type up to the capacity configured. If the capacity is 0, no new
197
- # reservations will be created
198
- # @param [Boolean] available Toggle the availability of the WorkerChannel. Set
199
- # this to 'False' to make worker unavailable to receive any new Tasks of this
200
- # TaskChannel type.
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 unique ID of the Workspace that this
241
- # WorkerChannel belongs to.
242
- # @param [String] worker_sid The unique ID of the Worker that this WorkerChannel
243
- # belongs to.
244
- # @param [String] sid The sid
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 unique ID of the Account that owns this WorkerChannel.
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 tasks assigned to Worker for this TaskChannel type.
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] Boolean value indicating whether the worker should receive Tasks of this TaskChannel type.
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 this TaskChannel.
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 this Activity was created.
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 this Activity was updated.
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 ID for this WorkerChannel.
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 unique ID of the TaskChannel.
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', 'sms', etc.
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 unique ID of the Worker that this WorkerChannel belongs to.
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 unique ID of the Workspace that this WorkerChannel belongs to.
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 url
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 worker should handle for this
379
- # TaskChannel type. TaskRouter will only create reservations for Tasks of this
380
- # TaskChannel type up to the capacity configured. If the capacity is 0, no new
381
- # reservations will be created
382
- # @param [Boolean] available Toggle the availability of the WorkerChannel. Set
383
- # this to 'False' to make worker unavailable to receive any new Tasks of this
384
- # TaskChannel type.
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, )