twilio-ruby 5.28.0 → 5.29.0

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 (63) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +11 -6
  3. data/CHANGES.md +33 -0
  4. data/README.md +3 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -20
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +7 -6
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +7 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -14
  10. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +6 -4
  12. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -6
  13. data/lib/twilio-ruby/rest/authy.rb +8 -8
  14. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +6 -3
  16. data/lib/twilio-ruby/rest/flex_api.rb +15 -15
  17. data/lib/twilio-ruby/rest/flex_api/v1.rb +20 -20
  18. data/lib/twilio-ruby/rest/messaging.rb +9 -9
  19. data/lib/twilio-ruby/rest/messaging/v1.rb +13 -13
  20. data/lib/twilio-ruby/rest/preview.rb +20 -20
  21. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +38 -0
  22. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +298 -0
  23. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +232 -0
  24. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  25. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +14 -14
  26. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +40 -5
  27. data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +7 -7
  28. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +51 -51
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +10 -10
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +96 -19
  31. data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
  32. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +8 -2
  33. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +10 -6
  34. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +10 -6
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +271 -176
  36. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +282 -137
  37. data/lib/twilio-ruby/rest/video.rb +9 -9
  38. data/lib/twilio-ruby/rest/video/v1.rb +15 -15
  39. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +2 -1
  40. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +9 -7
  41. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +3 -3
  42. data/lib/twilio-ruby/rest/wireless.rb +6 -6
  43. data/lib/twilio-ruby/rest/wireless/v1.rb +8 -8
  44. data/lib/twilio-ruby/rest/wireless/v1/command.rb +5 -4
  45. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -5
  46. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +114 -98
  47. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +4 -4
  48. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +16 -10
  49. data/lib/twilio-ruby/security/request_validator.rb +61 -8
  50. data/lib/twilio-ruby/version.rb +1 -1
  51. data/spec/integration/api/v2010/account/message_spec.rb +4 -4
  52. data/spec/integration/api/v2010/account/notification_spec.rb +0 -28
  53. data/spec/integration/conversations/v1/conversation/participant_spec.rb +27 -0
  54. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +129 -0
  55. data/spec/integration/preview/bulk_exports/export/job_spec.rb +77 -0
  56. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +6 -1
  57. data/spec/integration/preview/trusted_comms/cps_spec.rb +1 -1
  58. data/spec/integration/preview/trusted_comms/current_call_spec.rb +10 -10
  59. data/spec/integration/preview/trusted_comms/device_spec.rb +1 -1
  60. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +15 -4
  61. data/spec/integration/wireless/v1/sim_spec.rb +84 -0
  62. data/spec/security/request_validator_spec.rb +41 -0
  63. metadata +9 -4
@@ -16,8 +16,9 @@ module Twilio
16
16
  ##
17
17
  # Initialize the ReservationList
18
18
  # @param [Version] version Version that contains the resource
19
- # @param [String] workspace_sid The workspace_sid
20
- # @param [String] worker_sid The worker_sid
19
+ # @param [String] workspace_sid The SID of the Workspace that this worker is
20
+ # contained within.
21
+ # @param [String] worker_sid The SID of the reserved Worker resource.
21
22
  # @return [ReservationList] ReservationList
22
23
  def initialize(version, workspace_sid: nil, worker_sid: nil)
23
24
  super(version)
@@ -31,8 +32,9 @@ module Twilio
31
32
  # Lists ReservationInstance records from the API as a list.
32
33
  # Unlike stream(), this operation is eager and will load `limit` records into
33
34
  # memory before returning.
34
- # @param [reservation.Status] reservation_status Filter by a worker's reservation
35
- # status (pending, accepted, rejected, timeout, canceled, rescinded)
35
+ # @param [reservation.Status] reservation_status Returns the list of reservations
36
+ # for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`,
37
+ # `rejected`, `timeout`, `canceled`, or `rescinded`.
36
38
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
39
  # guarantees to never return more than limit. Default is no limit
38
40
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -48,8 +50,9 @@ module Twilio
48
50
  # Streams ReservationInstance records from the API as an Enumerable.
49
51
  # This operation lazily loads records as efficiently as possible until the limit
50
52
  # is reached.
51
- # @param [reservation.Status] reservation_status Filter by a worker's reservation
52
- # status (pending, accepted, rejected, timeout, canceled, rescinded)
53
+ # @param [reservation.Status] reservation_status Returns the list of reservations
54
+ # for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`,
55
+ # `rejected`, `timeout`, `canceled`, or `rescinded`.
53
56
  # @param [Integer] limit Upper limit for the number of records to return. stream()
54
57
  # guarantees to never return more than limit. Default is no limit.
55
58
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -82,8 +85,9 @@ module Twilio
82
85
  ##
83
86
  # Retrieve a single page of ReservationInstance records from the API.
84
87
  # Request is executed immediately.
85
- # @param [reservation.Status] reservation_status Filter by a worker's reservation
86
- # status (pending, accepted, rejected, timeout, canceled, rescinded)
88
+ # @param [reservation.Status] reservation_status Returns the list of reservations
89
+ # for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`,
90
+ # `rejected`, `timeout`, `canceled`, or `rescinded`.
87
91
  # @param [String] page_token PageToken provided by the API
88
92
  # @param [Integer] page_number Page Number, this value is simply for client state
89
93
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -161,9 +165,11 @@ module Twilio
161
165
  ##
162
166
  # Initialize the ReservationContext
163
167
  # @param [Version] version Version that contains the resource
164
- # @param [String] workspace_sid The workspace_sid
165
- # @param [String] worker_sid The worker_sid
166
- # @param [String] sid The sid
168
+ # @param [String] workspace_sid The SID of the Workspace with the
169
+ # WorkerReservation resource to fetch.
170
+ # @param [String] worker_sid The SID of the reserved Worker resource with the
171
+ # WorkerReservation resource to fetch.
172
+ # @param [String] sid The SID of the WorkerReservation resource to fetch.
167
173
  # @return [ReservationContext] ReservationContext
168
174
  def initialize(version, workspace_sid, worker_sid, sid)
169
175
  super(version)
@@ -196,63 +202,132 @@ module Twilio
196
202
 
197
203
  ##
198
204
  # Update the ReservationInstance
199
- # @param [reservation.Status] reservation_status Yes
200
- # @param [String] worker_activity_sid No
201
- # @param [String] instruction Yes
202
- # @param [String] dequeue_post_work_activity_sid No
203
- # @param [String] dequeue_from Yes
204
- # @param [String] dequeue_record The dequeue_record
205
- # @param [String] dequeue_timeout The dequeue_timeout
206
- # @param [String] dequeue_to The dequeue_to
207
- # @param [String] dequeue_status_callback_url The dequeue_status_callback_url
208
- # @param [String] call_from Yes
209
- # @param [String] call_record The call_record
210
- # @param [String] call_timeout The call_timeout
211
- # @param [String] call_to The call_to
212
- # @param [String] call_url Yes
213
- # @param [String] call_status_callback_url No
214
- # @param [Boolean] call_accept No
215
- # @param [String] redirect_call_sid The redirect_call_sid
216
- # @param [Boolean] redirect_accept The redirect_accept
217
- # @param [String] redirect_url The redirect_url
218
- # @param [String] to The to
219
- # @param [String] from The from
220
- # @param [String] status_callback The status_callback
221
- # @param [String] status_callback_method The status_callback_method
222
- # @param [reservation.CallStatus] status_callback_event The status_callback_event
223
- # @param [String] timeout The timeout
224
- # @param [Boolean] record The record
225
- # @param [Boolean] muted The muted
226
- # @param [String] beep The beep
227
- # @param [Boolean] start_conference_on_enter The start_conference_on_enter
228
- # @param [Boolean] end_conference_on_exit The end_conference_on_exit
229
- # @param [String] wait_url The wait_url
230
- # @param [String] wait_method The wait_method
231
- # @param [Boolean] early_media The early_media
232
- # @param [String] max_participants The max_participants
233
- # @param [String] conference_status_callback The conference_status_callback
234
- # @param [String] conference_status_callback_method The
235
- # conference_status_callback_method
205
+ # @param [reservation.Status] reservation_status The new status of the
206
+ # reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`,
207
+ # or `rescinded`.
208
+ # @param [String] worker_activity_sid The new worker activity SID if rejecting a
209
+ # reservation.
210
+ # @param [String] instruction The assignment instruction for the reservation.
211
+ # @param [String] dequeue_post_work_activity_sid The SID of the Activity resource
212
+ # to start after executing a Dequeue instruction.
213
+ # @param [String] dequeue_from The caller ID of the call to the worker when
214
+ # executing a Dequeue instruction.
215
+ # @param [String] dequeue_record Whether to record both legs of a call when
216
+ # executing a Dequeue instruction or which leg to record.
217
+ # @param [String] dequeue_timeout The timeout for call when executing a Dequeue
218
+ # instruction.
219
+ # @param [String] dequeue_to The contact URI of the worker when executing a
220
+ # Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for
221
+ # Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164)
222
+ # formatted phone number, depending on the destination.
223
+ # @param [String] dequeue_status_callback_url The callback URL for completed call
224
+ # event when executing a Dequeue instruction.
225
+ # @param [String] call_from The Caller ID of the outbound call when executing a
226
+ # Call instruction.
227
+ # @param [String] call_record Whether to record both legs of a call when executing
228
+ # a Call instruction.
229
+ # @param [String] call_timeout The timeout for a call when executing a Call
230
+ # instruction.
231
+ # @param [String] call_to The contact URI of the worker when executing a Call
232
+ # instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
233
+ # SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
234
+ # phone number, depending on the destination.
235
+ # @param [String] call_url TwiML URI executed on answering the worker's leg as a
236
+ # result of the Call instruction.
237
+ # @param [String] call_status_callback_url The URL to call for the completed call
238
+ # event when executing a Call instruction.
239
+ # @param [Boolean] call_accept Whether to accept a reservation when executing a
240
+ # Call instruction.
241
+ # @param [String] redirect_call_sid The Call SID of the call parked in the queue
242
+ # when executing a Redirect instruction.
243
+ # @param [Boolean] redirect_accept Whether the reservation should be accepted when
244
+ # executing a Redirect instruction.
245
+ # @param [String] redirect_url TwiML URI to redirect the call to when executing
246
+ # the Redirect instruction.
247
+ # @param [String] to The Contact URI of the worker when executing a Conference
248
+ # instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
249
+ # SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
250
+ # phone number, depending on the destination.
251
+ # @param [String] from The caller ID of the call to the worker when executing a
252
+ # Conference instruction.
253
+ # @param [String] status_callback The URL we should call using the
254
+ # `status_callback_method` to send status information to your application.
255
+ # @param [String] status_callback_method The HTTP method we should use to call
256
+ # `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
257
+ # @param [reservation.CallStatus] status_callback_event The call progress events
258
+ # that we will send to `status_callback`. Can be: `initiated`, `ringing`,
259
+ # `answered`, or `completed`.
260
+ # @param [String] timeout The timeout for a call when executing a Conference
261
+ # instruction.
262
+ # @param [Boolean] record Whether to record the participant and their conferences,
263
+ # including the time between conferences. Can be `true` or `false` and the default
264
+ # is `false`.
265
+ # @param [Boolean] muted Whether the agent is muted in the conference. Defaults to
266
+ # `false`.
267
+ # @param [String] beep Whether to play a notification beep when the participant
268
+ # joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`.
269
+ # The default value is `true`.
270
+ # @param [Boolean] start_conference_on_enter Whether to start the conference when
271
+ # the participant joins, if it has not already started. Can be: `true` or `false`
272
+ # and the default is `true`. If `false` and the conference has not started, the
273
+ # participant is muted and hears background music until another participant starts
274
+ # the conference.
275
+ # @param [Boolean] end_conference_on_exit Whether to end the conference when the
276
+ # agent leaves.
277
+ # @param [String] wait_url The URL we should call using the `wait_method` for the
278
+ # music to play while participants are waiting for the conference to start. The
279
+ # default value is the URL of our standard hold music. [Learn more about hold
280
+ # music](https://www.twilio.com/labs/twimlets/holdmusic).
281
+ # @param [String] wait_method The HTTP method we should use to call `wait_url`.
282
+ # Can be `GET` or `POST` and the default is `POST`. When using a static audio
283
+ # file, this should be `GET` so that we can cache the file.
284
+ # @param [Boolean] early_media Whether to allow an agent to hear the state of the
285
+ # outbound call, including ringing or disconnect messages. The default is `true`.
286
+ # @param [String] max_participants The maximum number of participants allowed in
287
+ # the conference. Can be a positive integer from `2` to `250`. The default value
288
+ # is `250`.
289
+ # @param [String] conference_status_callback The URL we should call using the
290
+ # `conference_status_callback_method` when the conference events in
291
+ # `conference_status_callback_event` occur. Only the value set by the first
292
+ # participant to join the conference is used. Subsequent
293
+ # `conference_status_callback` values are ignored.
294
+ # @param [String] conference_status_callback_method The HTTP method we should use
295
+ # to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to
296
+ # `POST`.
236
297
  # @param [reservation.ConferenceEvent] conference_status_callback_event The
237
- # conference_status_callback_event
238
- # @param [String] conference_record The conference_record
239
- # @param [String] conference_trim The conference_trim
240
- # @param [String] recording_channels The recording_channels
241
- # @param [String] recording_status_callback The recording_status_callback
242
- # @param [String] recording_status_callback_method The
243
- # recording_status_callback_method
244
- # @param [String] conference_recording_status_callback The
245
- # conference_recording_status_callback
246
- # @param [String] conference_recording_status_callback_method The
247
- # conference_recording_status_callback_method
248
- # @param [String] region The region
249
- # @param [String] sip_auth_username The sip_auth_username
250
- # @param [String] sip_auth_password The sip_auth_password
251
- # @param [String] dequeue_status_callback_event The dequeue_status_callback_event
252
- # @param [String] post_work_activity_sid The post_work_activity_sid
253
- # @param [Boolean] end_conference_on_customer_exit The
254
- # end_conference_on_customer_exit
255
- # @param [Boolean] beep_on_customer_entrance The beep_on_customer_entrance
298
+ # conference status events that we will send to `conference_status_callback`. Can
299
+ # be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
300
+ # @param [String] conference_record Whether to record the conference the
301
+ # participant is joining or when to record the conference. Can be: `true`,
302
+ # `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
303
+ # @param [String] conference_trim Whether to trim leading and trailing silence
304
+ # from your recorded conference audio files. Can be: `trim-silence` or
305
+ # `do-not-trim` and defaults to `trim-silence`.
306
+ # @param [String] recording_channels The recording channels for the final
307
+ # recording. Can be: `mono` or `dual` and the default is `mono`.
308
+ # @param [String] recording_status_callback The URL that we should call using the
309
+ # `recording_status_callback_method` when the recording status changes.
310
+ # @param [String] recording_status_callback_method The HTTP method we should use
311
+ # when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults
312
+ # to `POST`.
313
+ # @param [String] conference_recording_status_callback The URL we should call
314
+ # using the `conference_recording_status_callback_method` when the conference
315
+ # recording is available.
316
+ # @param [String] conference_recording_status_callback_method The HTTP method we
317
+ # should use to call `conference_recording_status_callback`. Can be: `GET` or
318
+ # `POST` and defaults to `POST`.
319
+ # @param [String] region The
320
+ # [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
321
+ # @param [String] sip_auth_username The SIP username used for authentication.
322
+ # @param [String] sip_auth_password The SIP password for authentication.
323
+ # @param [String] dequeue_status_callback_event The call progress events sent via
324
+ # webhooks as a result of a Dequeue instruction.
325
+ # @param [String] post_work_activity_sid The new worker activity SID after
326
+ # executing a Conference instruction.
327
+ # @param [Boolean] end_conference_on_customer_exit Whether to end the conference
328
+ # when the customer leaves.
329
+ # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
330
+ # when the customer joins.
256
331
  # @return [ReservationInstance] Updated ReservationInstance
257
332
  def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
258
333
  data = Twilio::Values.of({
@@ -344,9 +419,10 @@ module Twilio
344
419
  # Initialize the ReservationInstance
345
420
  # @param [Version] version Version that contains the resource
346
421
  # @param [Hash] payload payload that contains response from Twilio
347
- # @param [String] workspace_sid The workspace_sid
348
- # @param [String] worker_sid The worker_sid
349
- # @param [String] sid The sid
422
+ # @param [String] workspace_sid The SID of the Workspace that this worker is
423
+ # contained within.
424
+ # @param [String] worker_sid The SID of the reserved Worker resource.
425
+ # @param [String] sid The SID of the WorkerReservation resource to fetch.
350
426
  # @return [ReservationInstance] ReservationInstance
351
427
  def initialize(version, payload, workspace_sid: nil, worker_sid: nil, sid: nil)
352
428
  super(version)
@@ -392,67 +468,67 @@ module Twilio
392
468
  end
393
469
 
394
470
  ##
395
- # @return [String] The account_sid
471
+ # @return [String] The SID of the Account that created the resource
396
472
  def account_sid
397
473
  @properties['account_sid']
398
474
  end
399
475
 
400
476
  ##
401
- # @return [Time] The date_created
477
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
402
478
  def date_created
403
479
  @properties['date_created']
404
480
  end
405
481
 
406
482
  ##
407
- # @return [Time] The date_updated
483
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
408
484
  def date_updated
409
485
  @properties['date_updated']
410
486
  end
411
487
 
412
488
  ##
413
- # @return [reservation.Status] Filter by a worker's reservation status
489
+ # @return [reservation.Status] The current status of the reservation
414
490
  def reservation_status
415
491
  @properties['reservation_status']
416
492
  end
417
493
 
418
494
  ##
419
- # @return [String] The sid
495
+ # @return [String] The unique string that identifies the resource
420
496
  def sid
421
497
  @properties['sid']
422
498
  end
423
499
 
424
500
  ##
425
- # @return [String] The task_sid
501
+ # @return [String] The SID of the reserved Task resource
426
502
  def task_sid
427
503
  @properties['task_sid']
428
504
  end
429
505
 
430
506
  ##
431
- # @return [String] The worker_name
507
+ # @return [String] The friendly_name of the Worker that is reserved
432
508
  def worker_name
433
509
  @properties['worker_name']
434
510
  end
435
511
 
436
512
  ##
437
- # @return [String] The worker_sid
513
+ # @return [String] The SID of the reserved Worker resource
438
514
  def worker_sid
439
515
  @properties['worker_sid']
440
516
  end
441
517
 
442
518
  ##
443
- # @return [String] The workspace_sid
519
+ # @return [String] The SID of the Workspace that this worker is contained within.
444
520
  def workspace_sid
445
521
  @properties['workspace_sid']
446
522
  end
447
523
 
448
524
  ##
449
- # @return [String] The url
525
+ # @return [String] The absolute URL of the WorkerReservation resource
450
526
  def url
451
527
  @properties['url']
452
528
  end
453
529
 
454
530
  ##
455
- # @return [String] The links
531
+ # @return [String] The URLs of related resources
456
532
  def links
457
533
  @properties['links']
458
534
  end
@@ -466,63 +542,132 @@ module Twilio
466
542
 
467
543
  ##
468
544
  # Update the ReservationInstance
469
- # @param [reservation.Status] reservation_status Yes
470
- # @param [String] worker_activity_sid No
471
- # @param [String] instruction Yes
472
- # @param [String] dequeue_post_work_activity_sid No
473
- # @param [String] dequeue_from Yes
474
- # @param [String] dequeue_record The dequeue_record
475
- # @param [String] dequeue_timeout The dequeue_timeout
476
- # @param [String] dequeue_to The dequeue_to
477
- # @param [String] dequeue_status_callback_url The dequeue_status_callback_url
478
- # @param [String] call_from Yes
479
- # @param [String] call_record The call_record
480
- # @param [String] call_timeout The call_timeout
481
- # @param [String] call_to The call_to
482
- # @param [String] call_url Yes
483
- # @param [String] call_status_callback_url No
484
- # @param [Boolean] call_accept No
485
- # @param [String] redirect_call_sid The redirect_call_sid
486
- # @param [Boolean] redirect_accept The redirect_accept
487
- # @param [String] redirect_url The redirect_url
488
- # @param [String] to The to
489
- # @param [String] from The from
490
- # @param [String] status_callback The status_callback
491
- # @param [String] status_callback_method The status_callback_method
492
- # @param [reservation.CallStatus] status_callback_event The status_callback_event
493
- # @param [String] timeout The timeout
494
- # @param [Boolean] record The record
495
- # @param [Boolean] muted The muted
496
- # @param [String] beep The beep
497
- # @param [Boolean] start_conference_on_enter The start_conference_on_enter
498
- # @param [Boolean] end_conference_on_exit The end_conference_on_exit
499
- # @param [String] wait_url The wait_url
500
- # @param [String] wait_method The wait_method
501
- # @param [Boolean] early_media The early_media
502
- # @param [String] max_participants The max_participants
503
- # @param [String] conference_status_callback The conference_status_callback
504
- # @param [String] conference_status_callback_method The
505
- # conference_status_callback_method
545
+ # @param [reservation.Status] reservation_status The new status of the
546
+ # reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`,
547
+ # or `rescinded`.
548
+ # @param [String] worker_activity_sid The new worker activity SID if rejecting a
549
+ # reservation.
550
+ # @param [String] instruction The assignment instruction for the reservation.
551
+ # @param [String] dequeue_post_work_activity_sid The SID of the Activity resource
552
+ # to start after executing a Dequeue instruction.
553
+ # @param [String] dequeue_from The caller ID of the call to the worker when
554
+ # executing a Dequeue instruction.
555
+ # @param [String] dequeue_record Whether to record both legs of a call when
556
+ # executing a Dequeue instruction or which leg to record.
557
+ # @param [String] dequeue_timeout The timeout for call when executing a Dequeue
558
+ # instruction.
559
+ # @param [String] dequeue_to The contact URI of the worker when executing a
560
+ # Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for
561
+ # Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164)
562
+ # formatted phone number, depending on the destination.
563
+ # @param [String] dequeue_status_callback_url The callback URL for completed call
564
+ # event when executing a Dequeue instruction.
565
+ # @param [String] call_from The Caller ID of the outbound call when executing a
566
+ # Call instruction.
567
+ # @param [String] call_record Whether to record both legs of a call when executing
568
+ # a Call instruction.
569
+ # @param [String] call_timeout The timeout for a call when executing a Call
570
+ # instruction.
571
+ # @param [String] call_to The contact URI of the worker when executing a Call
572
+ # instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
573
+ # SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
574
+ # phone number, depending on the destination.
575
+ # @param [String] call_url TwiML URI executed on answering the worker's leg as a
576
+ # result of the Call instruction.
577
+ # @param [String] call_status_callback_url The URL to call for the completed call
578
+ # event when executing a Call instruction.
579
+ # @param [Boolean] call_accept Whether to accept a reservation when executing a
580
+ # Call instruction.
581
+ # @param [String] redirect_call_sid The Call SID of the call parked in the queue
582
+ # when executing a Redirect instruction.
583
+ # @param [Boolean] redirect_accept Whether the reservation should be accepted when
584
+ # executing a Redirect instruction.
585
+ # @param [String] redirect_url TwiML URI to redirect the call to when executing
586
+ # the Redirect instruction.
587
+ # @param [String] to The Contact URI of the worker when executing a Conference
588
+ # instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
589
+ # SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
590
+ # phone number, depending on the destination.
591
+ # @param [String] from The caller ID of the call to the worker when executing a
592
+ # Conference instruction.
593
+ # @param [String] status_callback The URL we should call using the
594
+ # `status_callback_method` to send status information to your application.
595
+ # @param [String] status_callback_method The HTTP method we should use to call
596
+ # `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
597
+ # @param [reservation.CallStatus] status_callback_event The call progress events
598
+ # that we will send to `status_callback`. Can be: `initiated`, `ringing`,
599
+ # `answered`, or `completed`.
600
+ # @param [String] timeout The timeout for a call when executing a Conference
601
+ # instruction.
602
+ # @param [Boolean] record Whether to record the participant and their conferences,
603
+ # including the time between conferences. Can be `true` or `false` and the default
604
+ # is `false`.
605
+ # @param [Boolean] muted Whether the agent is muted in the conference. Defaults to
606
+ # `false`.
607
+ # @param [String] beep Whether to play a notification beep when the participant
608
+ # joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`.
609
+ # The default value is `true`.
610
+ # @param [Boolean] start_conference_on_enter Whether to start the conference when
611
+ # the participant joins, if it has not already started. Can be: `true` or `false`
612
+ # and the default is `true`. If `false` and the conference has not started, the
613
+ # participant is muted and hears background music until another participant starts
614
+ # the conference.
615
+ # @param [Boolean] end_conference_on_exit Whether to end the conference when the
616
+ # agent leaves.
617
+ # @param [String] wait_url The URL we should call using the `wait_method` for the
618
+ # music to play while participants are waiting for the conference to start. The
619
+ # default value is the URL of our standard hold music. [Learn more about hold
620
+ # music](https://www.twilio.com/labs/twimlets/holdmusic).
621
+ # @param [String] wait_method The HTTP method we should use to call `wait_url`.
622
+ # Can be `GET` or `POST` and the default is `POST`. When using a static audio
623
+ # file, this should be `GET` so that we can cache the file.
624
+ # @param [Boolean] early_media Whether to allow an agent to hear the state of the
625
+ # outbound call, including ringing or disconnect messages. The default is `true`.
626
+ # @param [String] max_participants The maximum number of participants allowed in
627
+ # the conference. Can be a positive integer from `2` to `250`. The default value
628
+ # is `250`.
629
+ # @param [String] conference_status_callback The URL we should call using the
630
+ # `conference_status_callback_method` when the conference events in
631
+ # `conference_status_callback_event` occur. Only the value set by the first
632
+ # participant to join the conference is used. Subsequent
633
+ # `conference_status_callback` values are ignored.
634
+ # @param [String] conference_status_callback_method The HTTP method we should use
635
+ # to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to
636
+ # `POST`.
506
637
  # @param [reservation.ConferenceEvent] conference_status_callback_event The
507
- # conference_status_callback_event
508
- # @param [String] conference_record The conference_record
509
- # @param [String] conference_trim The conference_trim
510
- # @param [String] recording_channels The recording_channels
511
- # @param [String] recording_status_callback The recording_status_callback
512
- # @param [String] recording_status_callback_method The
513
- # recording_status_callback_method
514
- # @param [String] conference_recording_status_callback The
515
- # conference_recording_status_callback
516
- # @param [String] conference_recording_status_callback_method The
517
- # conference_recording_status_callback_method
518
- # @param [String] region The region
519
- # @param [String] sip_auth_username The sip_auth_username
520
- # @param [String] sip_auth_password The sip_auth_password
521
- # @param [String] dequeue_status_callback_event The dequeue_status_callback_event
522
- # @param [String] post_work_activity_sid The post_work_activity_sid
523
- # @param [Boolean] end_conference_on_customer_exit The
524
- # end_conference_on_customer_exit
525
- # @param [Boolean] beep_on_customer_entrance The beep_on_customer_entrance
638
+ # conference status events that we will send to `conference_status_callback`. Can
639
+ # be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
640
+ # @param [String] conference_record Whether to record the conference the
641
+ # participant is joining or when to record the conference. Can be: `true`,
642
+ # `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
643
+ # @param [String] conference_trim Whether to trim leading and trailing silence
644
+ # from your recorded conference audio files. Can be: `trim-silence` or
645
+ # `do-not-trim` and defaults to `trim-silence`.
646
+ # @param [String] recording_channels The recording channels for the final
647
+ # recording. Can be: `mono` or `dual` and the default is `mono`.
648
+ # @param [String] recording_status_callback The URL that we should call using the
649
+ # `recording_status_callback_method` when the recording status changes.
650
+ # @param [String] recording_status_callback_method The HTTP method we should use
651
+ # when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults
652
+ # to `POST`.
653
+ # @param [String] conference_recording_status_callback The URL we should call
654
+ # using the `conference_recording_status_callback_method` when the conference
655
+ # recording is available.
656
+ # @param [String] conference_recording_status_callback_method The HTTP method we
657
+ # should use to call `conference_recording_status_callback`. Can be: `GET` or
658
+ # `POST` and defaults to `POST`.
659
+ # @param [String] region The
660
+ # [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
661
+ # @param [String] sip_auth_username The SIP username used for authentication.
662
+ # @param [String] sip_auth_password The SIP password for authentication.
663
+ # @param [String] dequeue_status_callback_event The call progress events sent via
664
+ # webhooks as a result of a Dequeue instruction.
665
+ # @param [String] post_work_activity_sid The new worker activity SID after
666
+ # executing a Conference instruction.
667
+ # @param [Boolean] end_conference_on_customer_exit Whether to end the conference
668
+ # when the customer leaves.
669
+ # @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
670
+ # when the customer joins.
526
671
  # @return [ReservationInstance] Updated ReservationInstance
527
672
  def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
528
673
  context.update(