twilio-ruby 5.20.1 → 5.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +22 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +4 -4
  5. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +21 -20
  6. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +21 -19
  7. data/lib/twilio-ruby/rest/api.rb +8 -7
  8. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +32 -28
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +56 -37
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +27 -27
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +248 -165
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +35 -35
  13. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +15 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +104 -114
  15. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +4 -4
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +48 -46
  17. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +29 -22
  18. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +36 -28
  19. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +35 -21
  20. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +24 -20
  21. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +27 -27
  22. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +7 -0
  23. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +7 -0
  24. data/lib/twilio-ruby/rest/client.rb +8 -7
  25. data/lib/twilio-ruby/rest/fax.rb +2 -1
  26. data/lib/twilio-ruby/rest/fax/v1.rb +2 -1
  27. data/lib/twilio-ruby/rest/fax/v1/fax.rb +85 -75
  28. data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +16 -16
  29. data/lib/twilio-ruby/rest/verify/v1/service.rb +8 -2
  30. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +120 -3
  31. data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
  32. data/lib/twilio-ruby/version.rb +1 -1
  33. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +5 -0
  34. data/spec/integration/authy/v1/service/entity/factor_spec.rb +4 -0
  35. data/spec/integration/verify/v1/service/verification_spec.rb +107 -1
  36. data/spec/integration/video/v1/composition_spec.rb +28 -3
  37. metadata +2 -2
@@ -16,8 +16,12 @@ module Twilio
16
16
  ##
17
17
  # Initialize the NotificationList
18
18
  # @param [Version] version Version that contains the resource
19
- # @param [String] account_sid The account_sid
20
- # @param [String] call_sid The call_sid
19
+ # @param [String] account_sid The SID of the
20
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Call
21
+ # Notification resource.
22
+ # @param [String] call_sid The SID of the
23
+ # [Call](https://www.twilio.com/docs/api/voice/call) the Call Notification
24
+ # resource is associated with.
21
25
  # @return [NotificationList] NotificationList
22
26
  def initialize(version, account_sid: nil, call_sid: nil)
23
27
  super(version)
@@ -31,10 +35,12 @@ module Twilio
31
35
  # Lists NotificationInstance records from the API as a list.
32
36
  # Unlike stream(), this operation is eager and will load `limit` records into
33
37
  # memory before returning.
34
- # @param [String] log The log
35
- # @param [Time] message_date_before The message_date
36
- # @param [Time] message_date The message_date
37
- # @param [Time] message_date_after The message_date
38
+ # @param [String] log Only read notifications of the specified log level. Can be:
39
+ # `0` to read only ERROR notifications or `1` to read only WARNING notifications.
40
+ # By default, all notifications are read.
41
+ # @param [Time] message_date_before Filter by date
42
+ # @param [Time] message_date Filter by date
43
+ # @param [Time] message_date_after Filter by date
38
44
  # @param [Integer] limit Upper limit for the number of records to return. stream()
39
45
  # guarantees to never return more than limit. Default is no limit
40
46
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -57,10 +63,12 @@ module Twilio
57
63
  # Streams NotificationInstance records from the API as an Enumerable.
58
64
  # This operation lazily loads records as efficiently as possible until the limit
59
65
  # is reached.
60
- # @param [String] log The log
61
- # @param [Time] message_date_before The message_date
62
- # @param [Time] message_date The message_date
63
- # @param [Time] message_date_after The message_date
66
+ # @param [String] log Only read notifications of the specified log level. Can be:
67
+ # `0` to read only ERROR notifications or `1` to read only WARNING notifications.
68
+ # By default, all notifications are read.
69
+ # @param [Time] message_date_before Filter by date
70
+ # @param [Time] message_date Filter by date
71
+ # @param [Time] message_date_after Filter by date
64
72
  # @param [Integer] limit Upper limit for the number of records to return. stream()
65
73
  # guarantees to never return more than limit. Default is no limit.
66
74
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -99,10 +107,12 @@ module Twilio
99
107
  ##
100
108
  # Retrieve a single page of NotificationInstance records from the API.
101
109
  # Request is executed immediately.
102
- # @param [String] log The log
103
- # @param [Time] message_date_before The message_date
104
- # @param [Time] message_date The message_date
105
- # @param [Time] message_date_after The message_date
110
+ # @param [String] log Only read notifications of the specified log level. Can be:
111
+ # `0` to read only ERROR notifications or `1` to read only WARNING notifications.
112
+ # By default, all notifications are read.
113
+ # @param [Time] message_date_before Filter by date
114
+ # @param [Time] message_date Filter by date
115
+ # @param [Time] message_date_after Filter by date
106
116
  # @param [String] page_token PageToken provided by the API
107
117
  # @param [Integer] page_number Page Number, this value is simply for client state
108
118
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -183,9 +193,13 @@ module Twilio
183
193
  ##
184
194
  # Initialize the NotificationContext
185
195
  # @param [Version] version Version that contains the resource
186
- # @param [String] account_sid The account_sid
187
- # @param [String] call_sid The call_sid
188
- # @param [String] sid The sid
196
+ # @param [String] account_sid The SID of the
197
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Call
198
+ # Notification resource to fetch.
199
+ # @param [String] call_sid The [Call](https://www.twilio.com/docs/api/voice/call)
200
+ # SID of the Call Notification resource to fetch.
201
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Call
202
+ # Notification resource to fetch.
189
203
  # @return [NotificationContext] NotificationContext
190
204
  def initialize(version, account_sid, call_sid, sid)
191
205
  super(version)
@@ -243,9 +257,14 @@ module Twilio
243
257
  # Initialize the NotificationInstance
244
258
  # @param [Version] version Version that contains the resource
245
259
  # @param [Hash] payload payload that contains response from Twilio
246
- # @param [String] account_sid The account_sid
247
- # @param [String] call_sid The call_sid
248
- # @param [String] sid The sid
260
+ # @param [String] account_sid The SID of the
261
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the Call
262
+ # Notification resource.
263
+ # @param [String] call_sid The SID of the
264
+ # [Call](https://www.twilio.com/docs/api/voice/call) the Call Notification
265
+ # resource is associated with.
266
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Call
267
+ # Notification resource to fetch.
249
268
  # @return [NotificationInstance] NotificationInstance
250
269
  def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
251
270
  super(version)
@@ -293,103 +312,103 @@ module Twilio
293
312
  end
294
313
 
295
314
  ##
296
- # @return [String] The account_sid
315
+ # @return [String] The SID of the Account that created the resource
297
316
  def account_sid
298
317
  @properties['account_sid']
299
318
  end
300
319
 
301
320
  ##
302
- # @return [String] The api_version
321
+ # @return [String] The API version used to create the Call Notification resource
303
322
  def api_version
304
323
  @properties['api_version']
305
324
  end
306
325
 
307
326
  ##
308
- # @return [String] The call_sid
327
+ # @return [String] The SID of the Call the resource is associated with
309
328
  def call_sid
310
329
  @properties['call_sid']
311
330
  end
312
331
 
313
332
  ##
314
- # @return [Time] The date_created
333
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
315
334
  def date_created
316
335
  @properties['date_created']
317
336
  end
318
337
 
319
338
  ##
320
- # @return [Time] The date_updated
339
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
321
340
  def date_updated
322
341
  @properties['date_updated']
323
342
  end
324
343
 
325
344
  ##
326
- # @return [String] The error_code
345
+ # @return [String] A unique error code corresponding to the notification
327
346
  def error_code
328
347
  @properties['error_code']
329
348
  end
330
349
 
331
350
  ##
332
- # @return [String] The log
351
+ # @return [String] An integer log level
333
352
  def log
334
353
  @properties['log']
335
354
  end
336
355
 
337
356
  ##
338
- # @return [Time] The message_date
357
+ # @return [Time] The date the notification was generated
339
358
  def message_date
340
359
  @properties['message_date']
341
360
  end
342
361
 
343
362
  ##
344
- # @return [String] The message_text
363
+ # @return [String] The text of the notification
345
364
  def message_text
346
365
  @properties['message_text']
347
366
  end
348
367
 
349
368
  ##
350
- # @return [String] The more_info
369
+ # @return [String] A URL for more information about the error code
351
370
  def more_info
352
371
  @properties['more_info']
353
372
  end
354
373
 
355
374
  ##
356
- # @return [String] The request_method
375
+ # @return [String] HTTP method used with the request url
357
376
  def request_method
358
377
  @properties['request_method']
359
378
  end
360
379
 
361
380
  ##
362
- # @return [String] The request_url
381
+ # @return [String] URL of the resource that generated the notification
363
382
  def request_url
364
383
  @properties['request_url']
365
384
  end
366
385
 
367
386
  ##
368
- # @return [String] The request_variables
387
+ # @return [String] Twilio-generated HTTP variables sent to the server
369
388
  def request_variables
370
389
  @properties['request_variables']
371
390
  end
372
391
 
373
392
  ##
374
- # @return [String] The response_body
393
+ # @return [String] The HTTP body returned by your server
375
394
  def response_body
376
395
  @properties['response_body']
377
396
  end
378
397
 
379
398
  ##
380
- # @return [String] The response_headers
399
+ # @return [String] The HTTP headers returned by your server
381
400
  def response_headers
382
401
  @properties['response_headers']
383
402
  end
384
403
 
385
404
  ##
386
- # @return [String] The sid
405
+ # @return [String] The unique string that identifies the resource
387
406
  def sid
388
407
  @properties['sid']
389
408
  end
390
409
 
391
410
  ##
392
- # @return [String] The uri
411
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
393
412
  def uri
394
413
  @properties['uri']
395
414
  end
@@ -17,10 +17,10 @@ module Twilio
17
17
  # Initialize the RecordingList
18
18
  # @param [Version] version Version that contains the resource
19
19
  # @param [String] account_sid The SID of the
20
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
20
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
21
21
  # Recording resource.
22
22
  # @param [String] call_sid The SID of the
23
- # [Call](https://www.twilio.com/docs/api/voice/call) this Recording resource is
23
+ # [Call](https://www.twilio.com/docs/api/voice/call) the Recording resource is
24
24
  # associated with.
25
25
  # @return [RecordingList] RecordingList
26
26
  def initialize(version, account_sid: nil, call_sid: nil)
@@ -37,15 +37,15 @@ module Twilio
37
37
  # @param [String] recording_status_callback_event The recording status events on
38
38
  # which we should call the `recording_status_callback` URL. Can be: `in-progress`,
39
39
  # `completed` and `absent` and the default is `completed`. Separate multiple event
40
- # values with a space.
41
- # @param [String] recording_status_callback The URL we call using the
40
+ # values with a space.
41
+ # @param [String] recording_status_callback The URL we should call using the
42
42
  # `recording_status_callback_method` on each recording event specified in
43
43
  # `recording_status_callback_event`. For more information, see
44
44
  # [RecordingStatusCallback
45
45
  # parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback).
46
46
  # @param [String] recording_status_callback_method The HTTP method we should use
47
- # when calling the `recording_status_callback` URL. Can be: `GET`, `POST` and the
48
- # default is `POST`.
47
+ # to call `recording_status_callback`. Can be: `GET` or `POST` and the default is
48
+ # `POST`.
49
49
  # @param [String] trim Whether to trim any leading and trailing silence in the
50
50
  # recording. Can be: `trim-silence` or `do-not-trim` and the default is
51
51
  # `do-not-trim`. `trim-silence` trims the silence from the beginning and end of
@@ -230,11 +230,11 @@ module Twilio
230
230
  # @param [Version] version Version that contains the resource
231
231
  # @param [String] account_sid The SID of the
232
232
  # [Account](https://www.twilio.com/docs/api/rest/account) that created the
233
- # Recording resource(s) to fetch.
233
+ # Recording resource to fetch.
234
234
  # @param [String] call_sid The [Call](https://www.twilio.com/docs/api/voice/call)
235
- # SID of the resource(s) to fetch.
235
+ # SID of the resource to fetch.
236
236
  # @param [String] sid The Twilio-provided string that uniquely identifies the
237
- # Recording resource to fetch
237
+ # Recording resource to fetch.
238
238
  # @return [RecordingContext] RecordingContext
239
239
  def initialize(version, account_sid, call_sid, sid)
240
240
  super(version)
@@ -247,7 +247,7 @@ module Twilio
247
247
  ##
248
248
  # Update the RecordingInstance
249
249
  # @param [recording.Status] status The new status of the recording. Can be:
250
- # `stopped`, `paused`, `in-progress`
250
+ # `stopped`, `paused`, `in-progress`.
251
251
  # @param [String] pause_behavior Whether to record during a pause. Can be: `skip`
252
252
  # or `silence` and the default is `silence`. `skip` does not record during the
253
253
  # pause period, while `silence` will replace the actual audio of the call with
@@ -321,13 +321,13 @@ module Twilio
321
321
  # @param [Version] version Version that contains the resource
322
322
  # @param [Hash] payload payload that contains response from Twilio
323
323
  # @param [String] account_sid The SID of the
324
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
324
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
325
325
  # Recording resource.
326
326
  # @param [String] call_sid The SID of the
327
- # [Call](https://www.twilio.com/docs/api/voice/call) this Recording resource is
327
+ # [Call](https://www.twilio.com/docs/api/voice/call) the Recording resource is
328
328
  # associated with.
329
329
  # @param [String] sid The Twilio-provided string that uniquely identifies the
330
- # Recording resource to fetch
330
+ # Recording resource to fetch.
331
331
  # @return [RecordingInstance] RecordingInstance
332
332
  def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
333
333
  super(version)
@@ -375,7 +375,7 @@ module Twilio
375
375
  end
376
376
 
377
377
  ##
378
- # @return [String] The SID of the Account that created this resource
378
+ # @return [String] The SID of the Account that created the resource
379
379
  def account_sid
380
380
  @properties['account_sid']
381
381
  end
@@ -387,7 +387,7 @@ module Twilio
387
387
  end
388
388
 
389
389
  ##
390
- # @return [String] The SID of the Call this resource is associated with
390
+ # @return [String] The SID of the Call the resource is associated with
391
391
  def call_sid
392
392
  @properties['call_sid']
393
393
  end
@@ -399,13 +399,13 @@ module Twilio
399
399
  end
400
400
 
401
401
  ##
402
- # @return [Time] The RFC 2822 date and time in GMT that this resource was created
402
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
403
403
  def date_created
404
404
  @properties['date_created']
405
405
  end
406
406
 
407
407
  ##
408
- # @return [Time] The RFC 2822 date and time in GMT that this resource was last updated
408
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
409
409
  def date_updated
410
410
  @properties['date_updated']
411
411
  end
@@ -423,55 +423,55 @@ module Twilio
423
423
  end
424
424
 
425
425
  ##
426
- # @return [String] The unique string that identifies this resource
426
+ # @return [String] The unique string that identifies the resource
427
427
  def sid
428
428
  @properties['sid']
429
429
  end
430
430
 
431
431
  ##
432
- # @return [String] The one-time cost of creating this recording.
432
+ # @return [String] The one-time cost of creating the recording.
433
433
  def price
434
434
  @properties['price']
435
435
  end
436
436
 
437
437
  ##
438
- # @return [String] The URI of this resource, relative to `https://api.twilio.com`
438
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
439
439
  def uri
440
440
  @properties['uri']
441
441
  end
442
442
 
443
443
  ##
444
- # @return [Hash] Details about how to decrypt the recording
444
+ # @return [Hash] How to decrypt the recording.
445
445
  def encryption_details
446
446
  @properties['encryption_details']
447
447
  end
448
448
 
449
449
  ##
450
- # @return [String] The currency used in the Price property
450
+ # @return [String] The currency used in the price property.
451
451
  def price_unit
452
452
  @properties['price_unit']
453
453
  end
454
454
 
455
455
  ##
456
- # @return [recording.Status] The status of this recording
456
+ # @return [recording.Status] The status of the recording
457
457
  def status
458
458
  @properties['status']
459
459
  end
460
460
 
461
461
  ##
462
- # @return [String] The number of channels in the final recording file as an integer
462
+ # @return [String] The number of channels in the final recording file
463
463
  def channels
464
464
  @properties['channels']
465
465
  end
466
466
 
467
467
  ##
468
- # @return [recording.Source] How this recording was created
468
+ # @return [recording.Source] How the recording was created
469
469
  def source
470
470
  @properties['source']
471
471
  end
472
472
 
473
473
  ##
474
- # @return [String] More information about why the recording is missing, if status is `absent`
474
+ # @return [String] More information about why the recording is missing, if status is `absent`.
475
475
  def error_code
476
476
  @properties['error_code']
477
477
  end
@@ -479,7 +479,7 @@ module Twilio
479
479
  ##
480
480
  # Update the RecordingInstance
481
481
  # @param [recording.Status] status The new status of the recording. Can be:
482
- # `stopped`, `paused`, `in-progress`
482
+ # `stopped`, `paused`, `in-progress`.
483
483
  # @param [String] pause_behavior Whether to record during a pause. Can be: `skip`
484
484
  # or `silence` and the default is `silence`. `skip` does not record during the
485
485
  # pause period, while `silence` will replace the actual audio of the call with
@@ -16,11 +16,10 @@ module Twilio
16
16
  ##
17
17
  # Initialize the ParticipantList
18
18
  # @param [Version] version Version that contains the resource
19
- # @param [String] account_sid The unique id of the
20
- # [Account](https://www.twilio.com/docs/iam/api/account) that created this
21
- # conference
22
- # @param [String] conference_sid A 34 character string that identifies the
23
- # conference this participant is in
19
+ # @param [String] account_sid The SID of the
20
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
21
+ # Participant resource.
22
+ # @param [String] conference_sid The SID of the conference the participant is in.
24
23
  # @return [ParticipantList] ParticipantList
25
24
  def initialize(version, account_sid: nil, conference_sid: nil)
26
25
  super(version)
@@ -34,98 +33,102 @@ module Twilio
34
33
  # Retrieve a single page of ParticipantInstance records from the API.
35
34
  # Request is executed immediately.
36
35
  # @param [String] from The `from` phone number that will dial the new conference
37
- # participant. Values may be a phone number or client id.
38
- # @param [String] to The phone number, client id, or sip address you are inviting
39
- # to this conference.
40
- # @param [String] status_callback The absolute URL where Twilio should send a
41
- # webhook with conference event information that you request with the
42
- # `StatusCallbackEvent` parameter.
43
- # @param [String] status_callback_method The method Twilio should use when
44
- # requesting your `StatusCallback` URL. Options are `GET` and `POST`. Defaults to
45
- # `POST`.
46
- # @param [String] status_callback_event Specifies which conference state changes
47
- # should generate a webhook to the `StatusCallback` URL. Options are `initiated`,
48
- # `ringing`, `answered`, and `completed`. To specify multiple values, separate
49
- # each with a space. Defaults to `completed`.
50
- # @param [String] timeout The number of seconds (integer) that Twilio should allow
51
- # the phone to ring before assuming there is no answer. Defaults to 60 seconds.
52
- # Minimum allowed timeout is `5`, max is `600`. Twilio always adds a 5-second
53
- # timeout buffer to outgoing calls, so if you enter a timeout value of 10 seconds,
54
- # you will see an actual timeout closer to 15 seconds.
55
- # @param [Boolean] record Records the agent and their conferences, including
56
- # downtime between conferences. Values may be `true` or `false`. Defaults to
57
- # `false`.
58
- # @param [Boolean] muted Specify whether the agent can speak in the conference.
59
- # Values can be `true` or `false`. Defaults to `false`.
60
- # @param [String] beep Play a notification beep to the conference when this
61
- # participant joins. Options are `true`, `false`, `onEnter`, or `onExit`. Defaults
62
- # to `true`.
63
- # @param [Boolean] start_conference_on_enter If the conference has not already
64
- # begun, `true` will start the conference when this participant joins. Specifying
65
- # `false` will mute the participant and play background music until the conference
66
- # begins. Defaults to `true`.
67
- # @param [Boolean] end_conference_on_exit If `true`, will end the conference when
68
- # this participant leaves. Defaults to `false`.
69
- # @param [String] wait_url Specify an absolute URL that hosts music to play before
70
- # the conference starts. Defualts to Twilio's standard [hold
36
+ # participant. Can be a phone number or a client id.
37
+ # @param [String] to The phone number, client id, or sip address to invite to the
38
+ # conference.
39
+ # @param [String] status_callback The URL we should call using the
40
+ # `status_callback_method` to send status information to your application.
41
+ # @param [String] status_callback_method The HTTP method we should use to call
42
+ # `status_callback`. Can be: `GET` and `POST` and defaults to `POST`.
43
+ # @param [String] status_callback_event The conference state changes that should
44
+ # generate a call to `status_callback`. Can be: `initiated`, `ringing`,
45
+ # `answered`, and `completed`. Separate multiple values with a space. The default
46
+ # value is `completed`.
47
+ # @param [String] timeout The number of seconds that we should allow the phone to
48
+ # ring before assuming there is no answer. Can be an integer between `5` and
49
+ # `600`, inclusive. The default value is `60`. We always add a 5-second timeout
50
+ # buffer to outgoing calls, so value of 10 would result in an actual timeout that
51
+ # was closer to 15 seconds.
52
+ # @param [Boolean] record Whether to record the participant and their conferences,
53
+ # including the time between conferences. Can be `true` or `false` and the default
54
+ # is `false`.
55
+ # @param [Boolean] muted Whether the agent is muted in the conference. Can be
56
+ # `true` or `false` and the default is `false`.
57
+ # @param [String] beep Whether to play a notification beep to the conference when
58
+ # the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The
59
+ # default value is `true`.
60
+ # @param [Boolean] start_conference_on_enter Whether to start the conference when
61
+ # the participant joins, if it has not already started. Can be: `true` or `false`
62
+ # and the default is `true`. If `false` and the conference has not started, the
63
+ # participant is muted and hears background music until another participant starts
64
+ # the conference.
65
+ # @param [Boolean] end_conference_on_exit Whether to end the conference when the
66
+ # participant leaves. Can be: `true` or `false` and defaults to `false`.
67
+ # @param [String] wait_url The URL we should call using the `wait_method` for the
68
+ # music to play while participants are waiting for the conference to start. The
69
+ # default value is the URL of our standard hold music. [Learn more about hold
71
70
  # music](https://www.twilio.com/labs/twimlets/holdmusic).
72
- # @param [String] wait_method Specify which method, `GET` or `POST`, Twilio should
73
- # use to request the `WaitUrl` for this conference. Be sure to use `GET` if you
74
- # are directly requesting static audio files so that Twilio properly caches the
75
- # files. Defaults to `POST`.
76
- # @param [Boolean] early_media Allow an agent to hear the state of the outbound
77
- # call, including ringing or disconnect messages. Can be `true` or `false`.
78
- # Defaults to `true`.
79
- # @param [String] max_participants The maximum number of participants within this
80
- # agent conference. Values can be positive integers from `2`-`10`. Defaults to
71
+ # @param [String] wait_method The HTTP method we should use to call `wait_url`.
72
+ # Can be `GET` or `POST` and the default is `POST`. When using a static audio
73
+ # file, this should be `GET` so that we can cache the file.
74
+ # @param [Boolean] early_media Whether to allow an agent to hear the state of the
75
+ # outbound call, including ringing or disconnect messages. Can be: `true` or
76
+ # `false` and defaults to `true`.
77
+ # @param [String] max_participants The maximum number of participants in the
78
+ # conference. Can be a positive integer from `2` to `10`. The default value is
81
79
  # `10`.
82
- # @param [String] conference_record Records the conference that this participant
83
- # is joining. Options are `true`, `false`, `record-from-start`, and
84
- # `do-not-record`. Deafults to `false`
85
- # @param [String] conference_trim Specify whether to trim leading and trailing
86
- # silence from your recorded conference audio files. Options are `trim-silence`
87
- # and `do-not-trim`. Defaults to `trim-silence`
88
- # @param [String] conference_status_callback The absolute URL Twilio should
89
- # request with conference events specified in `ConferenceStatusCallbackEvent`.
90
- # This value is set by the first Participant to join the conference, and
91
- # subsequent callback URLs will be ignored.
92
- # @param [String] conference_status_callback_method The HTTP method Twilio should
93
- # use when requesting the `ConferenceStatusCallback` URL. Either `GET` or `POST`.
94
- # Defaults to `POST`.
95
- # @param [String] conference_status_callback_event Specifies which conference
96
- # state changes should generate a webhook to the URL specified in the
97
- # `ConferenceStatusCallback` attribute. Available values are `start`, `end`,
98
- # `join`, `leave`, `mute`, `hold`, and `speaker`. To specify multiple values,
99
- # separate them with a space. Defaults to `start` and `end`.
100
- # @param [String] recording_channels Set the recording channels for the final
101
- # agent/conference recording. Either `mono` or `dual`. Defaults to `mono`.
102
- # @param [String] recording_status_callback Specifies the `absolute URL` that
103
- # Twilio should request when the recording is available if the agent and
104
- # conference are recorded.
105
- # @param [String] recording_status_callback_method The HTTP method Twilio should
106
- # use when requesting the `RecordingStatusCallback`. `GET` or `POST`. Defaults to
80
+ # @param [String] conference_record Whether to record the conference the
81
+ # participant is joining. Can be: `true`, `false`, `record-from-start`, and
82
+ # `do-not-record`. The default value is `false`.
83
+ # @param [String] conference_trim Whether to trim leading and trailing silence
84
+ # from your recorded conference audio files. Can be: `trim-silence` or
85
+ # `do-not-trim` and defaults to `trim-silence`.
86
+ # @param [String] conference_status_callback The URL we should call using the
87
+ # `conference_status_callback_method` when the conference events in
88
+ # `conference_status_callback_event` occur. Only the value set by the first
89
+ # participant to join the conference is used. Subsequent
90
+ # `conference_status_callback` values are ignored.
91
+ # @param [String] conference_status_callback_method The HTTP method we should use
92
+ # to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to
107
93
  # `POST`.
108
- # @param [String] sip_auth_username SIP username used for authenticating.
109
- # @param [String] sip_auth_password SIP password for authentication.
110
- # @param [String] region Specifies the
111
- # [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 Twilio should mix the recorded audio. Options are `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, `jp1`.
112
- # @param [String] conference_recording_status_callback The `absolute URL` Twilio
113
- # should request when the conference recording is available.
114
- # @param [String] conference_recording_status_callback_method The HTTP method
115
- # Twilio should use when requesting your recording status callback URL, either
116
- # `GET` or `POST`. Defaults to `POST`.
117
- # @param [String] recording_status_callback_event Specifies which recording state
118
- # changes should generate a webhook to the URL specified in the
119
- # `RecordingStatusCallback` attribute. Available values are `in-progress`,
120
- # `completed`, `failed`. To specify multiple values, separate them with a space.
121
- # Defaults to `in-progress`, `completed`, `failed`.
122
- # @param [String] conference_recording_status_callback_event Specifies which
123
- # conference recording state changes should generate a webhook to the URL
124
- # specified in the `ConferenceRecordingStatusCallback` attribute. Available values
125
- # are `in-progress`, `completed`, `failed`. To specify multiple values, separate
126
- # them with a space. Defaults to `in-progress`, `completed`, `failed`.
94
+ # @param [String] conference_status_callback_event The conference state changes
95
+ # that should generate a call to `conference_status_callback`. Can be: `start`,
96
+ # `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values
97
+ # with a space. Defaults to `start end`.
98
+ # @param [String] recording_channels The recording channels for the final
99
+ # recording. Can be: `mono` or `dual` and the default is `mono`.
100
+ # @param [String] recording_status_callback The URL that we should call using the
101
+ # `recording_status_callback_method` when the recording status changes.
102
+ # @param [String] recording_status_callback_method The HTTP method we should use
103
+ # when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults
104
+ # to `POST`.
105
+ # @param [String] sip_auth_username The SIP username used for authentication.
106
+ # @param [String] sip_auth_password The SIP password for authentication.
107
+ # @param [String] region The
108
+ # [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`.
109
+ # @param [String] conference_recording_status_callback The URL we should call
110
+ # using the `conference_recording_status_callback_method` when the conference
111
+ # recording is available.
112
+ # @param [String] conference_recording_status_callback_method The HTTP method we
113
+ # should use to call `conference_recording_status_callback`. Can be: `GET` or
114
+ # `POST` and defaults to `POST`.
115
+ # @param [String] recording_status_callback_event The recording state changes that
116
+ # should generate a call to `recording_status_callback`. Can be: `in-progress`,
117
+ # `completed`, and `failed`. Separate multiple values with a space. The default
118
+ # value is `in-progress completed failed`.
119
+ # @param [String] conference_recording_status_callback_event The conference
120
+ # recording state changes that generate a call to
121
+ # `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and
122
+ # `failed`. Separate multiple values with a space. The default value is
123
+ # `in-progress completed failed`.
124
+ # @param [Boolean] coaching Whether the participant is coaching another call. Can
125
+ # be: `true` or `false`. If not present, defaults to `false` unless
126
+ # `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
127
+ # @param [String] call_sid_to_coach The SID of the participant who is being
128
+ # `coached`. The participant being coached is the only participant who can hear
129
+ # the participant who is `coaching`.
127
130
  # @return [ParticipantInstance] Newly created ParticipantInstance
128
- def create(from: nil, to: nil, 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_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset)
131
+ def create(from: nil, to: nil, 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_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset)
129
132
  data = Twilio::Values.of({
130
133
  'From' => from,
131
134
  'To' => to,
@@ -157,6 +160,8 @@ module Twilio
157
160
  'ConferenceRecordingStatusCallbackMethod' => conference_recording_status_callback_method,
158
161
  'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
159
162
  'ConferenceRecordingStatusCallbackEvent' => Twilio.serialize_list(conference_recording_status_callback_event) { |e| e },
163
+ 'Coaching' => coaching,
164
+ 'CallSidToCoach' => call_sid_to_coach,
160
165
  })
161
166
 
162
167
  payload = @version.create(
@@ -177,10 +182,12 @@ module Twilio
177
182
  # Lists ParticipantInstance records from the API as a list.
178
183
  # Unlike stream(), this operation is eager and will load `limit` records into
179
184
  # memory before returning.
180
- # @param [Boolean] muted Only return participants that are muted or unmuted.
181
- # Either `true` or `false`.
182
- # @param [Boolean] hold Only return participants that are on hold or not on hold.
183
- # Either `true` or `false`.
185
+ # @param [Boolean] muted Whether to return only participants that are muted. Can
186
+ # be: `true` or `false`.
187
+ # @param [Boolean] hold Whether to return only participants that are on hold. Can
188
+ # be: `true` or `false`.
189
+ # @param [Boolean] coaching Whether to return only participants who are coaching
190
+ # another call. Can be: `true` or `false`.
184
191
  # @param [Integer] limit Upper limit for the number of records to return. stream()
185
192
  # guarantees to never return more than limit. Default is no limit
186
193
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -188,18 +195,26 @@ module Twilio
188
195
  # but a limit is defined, stream() will attempt to read the limit with the most
189
196
  # efficient page size, i.e. min(limit, 1000)
190
197
  # @return [Array] Array of up to limit results
191
- def list(muted: :unset, hold: :unset, limit: nil, page_size: nil)
192
- self.stream(muted: muted, hold: hold, limit: limit, page_size: page_size).entries
198
+ def list(muted: :unset, hold: :unset, coaching: :unset, limit: nil, page_size: nil)
199
+ self.stream(
200
+ muted: muted,
201
+ hold: hold,
202
+ coaching: coaching,
203
+ limit: limit,
204
+ page_size: page_size
205
+ ).entries
193
206
  end
194
207
 
195
208
  ##
196
209
  # Streams ParticipantInstance records from the API as an Enumerable.
197
210
  # This operation lazily loads records as efficiently as possible until the limit
198
211
  # is reached.
199
- # @param [Boolean] muted Only return participants that are muted or unmuted.
200
- # Either `true` or `false`.
201
- # @param [Boolean] hold Only return participants that are on hold or not on hold.
202
- # Either `true` or `false`.
212
+ # @param [Boolean] muted Whether to return only participants that are muted. Can
213
+ # be: `true` or `false`.
214
+ # @param [Boolean] hold Whether to return only participants that are on hold. Can
215
+ # be: `true` or `false`.
216
+ # @param [Boolean] coaching Whether to return only participants who are coaching
217
+ # another call. Can be: `true` or `false`.
203
218
  # @param [Integer] limit Upper limit for the number of records to return. stream()
204
219
  # guarantees to never return more than limit. Default is no limit.
205
220
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -207,10 +222,10 @@ module Twilio
207
222
  # but a limit is defined, stream() will attempt to read the limit with the most
208
223
  # efficient page size, i.e. min(limit, 1000)
209
224
  # @return [Enumerable] Enumerable that will yield up to limit results
210
- def stream(muted: :unset, hold: :unset, limit: nil, page_size: nil)
225
+ def stream(muted: :unset, hold: :unset, coaching: :unset, limit: nil, page_size: nil)
211
226
  limits = @version.read_limits(limit, page_size)
212
227
 
213
- page = self.page(muted: muted, hold: hold, page_size: limits[:page_size], )
228
+ page = self.page(muted: muted, hold: hold, coaching: coaching, page_size: limits[:page_size], )
214
229
 
215
230
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
216
231
  end
@@ -232,18 +247,21 @@ module Twilio
232
247
  ##
233
248
  # Retrieve a single page of ParticipantInstance records from the API.
234
249
  # Request is executed immediately.
235
- # @param [Boolean] muted Only return participants that are muted or unmuted.
236
- # Either `true` or `false`.
237
- # @param [Boolean] hold Only return participants that are on hold or not on hold.
238
- # Either `true` or `false`.
250
+ # @param [Boolean] muted Whether to return only participants that are muted. Can
251
+ # be: `true` or `false`.
252
+ # @param [Boolean] hold Whether to return only participants that are on hold. Can
253
+ # be: `true` or `false`.
254
+ # @param [Boolean] coaching Whether to return only participants who are coaching
255
+ # another call. Can be: `true` or `false`.
239
256
  # @param [String] page_token PageToken provided by the API
240
257
  # @param [Integer] page_number Page Number, this value is simply for client state
241
258
  # @param [Integer] page_size Number of records to return, defaults to 50
242
259
  # @return [Page] Page of ParticipantInstance
243
- def page(muted: :unset, hold: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
260
+ def page(muted: :unset, hold: :unset, coaching: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
244
261
  params = Twilio::Values.of({
245
262
  'Muted' => muted,
246
263
  'Hold' => hold,
264
+ 'Coaching' => coaching,
247
265
  'PageToken' => page_token,
248
266
  'Page' => page_number,
249
267
  'PageSize' => page_size,
@@ -314,12 +332,13 @@ module Twilio
314
332
  ##
315
333
  # Initialize the ParticipantContext
316
334
  # @param [Version] version Version that contains the resource
317
- # @param [String] account_sid The unique id of the
318
- # [Account](https://www.twilio.com/docs/iam/api/account) that created this
319
- # conference
320
- # @param [String] conference_sid The string that uniquely identifies the
321
- # conference this participant is in.
322
- # @param [String] call_sid The Participant's unique Call SID.
335
+ # @param [String] account_sid The SID of the
336
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
337
+ # Participant resource to fetch.
338
+ # @param [String] conference_sid The SID of the conference with the participant to
339
+ # fetch.
340
+ # @param [String] call_sid The [Call](https://www.twilio.com/docs/api/voice/call)
341
+ # SID of the resource to fetch.
323
342
  # @return [ParticipantContext] ParticipantContext
324
343
  def initialize(version, account_sid, conference_sid, call_sid)
325
344
  super(version)
@@ -352,23 +371,42 @@ module Twilio
352
371
 
353
372
  ##
354
373
  # Update the ParticipantInstance
355
- # @param [Boolean] muted Specifying `true` will mute the participant, while
356
- # `false` will un-mute. Anything other than `true` or `false` is interpreted as
357
- # `false`.
358
- # @param [Boolean] hold Specifying `true` will hold the participant, while `false`
359
- # will remove them from hold.
360
- # @param [String] hold_url The 'HoldUrl' attribute lets you specify a URL for
361
- # music that plays when a participant is on hold. The URL may be an MP3, a WAV or
362
- # a TwiML document that uses `<Play>`, `<Say>` or `<Redirect>`.
363
- # @param [String] hold_method Specify the HTTP method Twilio should use to request
364
- # your `HoldUrl`, either `GET` or `POST`. Defaults to `GET`.
365
- # @param [String] announce_url The 'AnnounceUrl' attribute lets you specify a URL
366
- # for announcing something to the participant. The URL may return an MP3, a WAV or
367
- # a TwiML document with `<Play>` or `<Say>`.
368
- # @param [String] announce_method Specify the HTTP method Twilio should use to
369
- # request your `AnnounceUrl`, either `GET` or `POST`. Defaults to `POST`.
374
+ # @param [Boolean] muted Whether the participant should be muted. Can be `true` or
375
+ # `false. `true` will mute the participant, and `false` will un-mute them.
376
+ # Anything value other than `true` or `false` is interpreted as `false`.
377
+ # @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
378
+ # or `false`. `true` puts the participant on hold, and `false` lets them rejoin
379
+ # the conference.
380
+ # @param [String] hold_url The URL we call using the `hold_method` for music that
381
+ # plays when the participant is on hold. The URL may return an MP3 file, a WAV
382
+ # file, or a TwiML document that contains the `<Play>`, `<Say>` or `<Redirect>`
383
+ # commands.
384
+ # @param [String] hold_method The HTTP method we should use to call `hold_url`.
385
+ # Can be: `GET` or `POST` and the default is `GET`.
386
+ # @param [String] announce_url The URL we call using the `announce_method` for an
387
+ # announcement to the participant. The URL must return an MP3 file, a WAV file, or
388
+ # a TwiML document that contains `<Play>` or `<Say>` commands.
389
+ # @param [String] announce_method The HTTP method we should use to call
390
+ # `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
391
+ # @param [String] wait_url The URL we should call using the `wait_method` for the
392
+ # music to play while participants are waiting for the conference to start. The
393
+ # default value is the URL of our standard hold music. [Learn more about hold
394
+ # music](https://www.twilio.com/labs/twimlets/holdmusic).
395
+ # @param [String] wait_method The HTTP method we should use to call `wait_url`.
396
+ # Can be `GET` or `POST` and the default is `POST`. When using a static audio
397
+ # file, this should be `GET` so that we can cache the file.
398
+ # @param [Boolean] beep_on_exit Whether to play a notification beep to the
399
+ # conference when the participant exits. Can be: `true` or `false`.
400
+ # @param [Boolean] end_conference_on_exit Whether to end the conference when the
401
+ # participant leaves. Can be: `true` or `false` and defaults to `false`.
402
+ # @param [Boolean] coaching Whether the participant is coaching another call. Can
403
+ # be: `true` or `false`. If not present, defaults to `false` unless
404
+ # `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
405
+ # @param [String] call_sid_to_coach The SID of the participant who is being
406
+ # `coached`. The participant being coached is the only participant who can hear
407
+ # the participant who is `coaching`.
370
408
  # @return [ParticipantInstance] Updated ParticipantInstance
371
- def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset)
409
+ def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset, wait_url: :unset, wait_method: :unset, beep_on_exit: :unset, end_conference_on_exit: :unset, coaching: :unset, call_sid_to_coach: :unset)
372
410
  data = Twilio::Values.of({
373
411
  'Muted' => muted,
374
412
  'Hold' => hold,
@@ -376,6 +414,12 @@ module Twilio
376
414
  'HoldMethod' => hold_method,
377
415
  'AnnounceUrl' => announce_url,
378
416
  'AnnounceMethod' => announce_method,
417
+ 'WaitUrl' => wait_url,
418
+ 'WaitMethod' => wait_method,
419
+ 'BeepOnExit' => beep_on_exit,
420
+ 'EndConferenceOnExit' => end_conference_on_exit,
421
+ 'Coaching' => coaching,
422
+ 'CallSidToCoach' => call_sid_to_coach,
379
423
  })
380
424
 
381
425
  payload = @version.update(
@@ -420,12 +464,12 @@ module Twilio
420
464
  # Initialize the ParticipantInstance
421
465
  # @param [Version] version Version that contains the resource
422
466
  # @param [Hash] payload payload that contains response from Twilio
423
- # @param [String] account_sid The unique id of the
424
- # [Account](https://www.twilio.com/docs/iam/api/account) that created this
425
- # conference
426
- # @param [String] conference_sid A 34 character string that identifies the
427
- # conference this participant is in
428
- # @param [String] call_sid The Participant's unique Call SID.
467
+ # @param [String] account_sid The SID of the
468
+ # [Account](https://www.twilio.com/docs/api/rest/account) that created the
469
+ # Participant resource.
470
+ # @param [String] conference_sid The SID of the conference the participant is in.
471
+ # @param [String] call_sid The [Call](https://www.twilio.com/docs/api/voice/call)
472
+ # SID of the resource to fetch.
429
473
  # @return [ParticipantInstance] ParticipantInstance
430
474
  def initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil)
431
475
  super(version)
@@ -434,6 +478,8 @@ module Twilio
434
478
  @properties = {
435
479
  'account_sid' => payload['account_sid'],
436
480
  'call_sid' => payload['call_sid'],
481
+ 'call_sid_to_coach' => payload['call_sid_to_coach'],
482
+ 'coaching' => payload['coaching'],
437
483
  'conference_sid' => payload['conference_sid'],
438
484
  'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
439
485
  'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
@@ -471,67 +517,79 @@ module Twilio
471
517
  end
472
518
 
473
519
  ##
474
- # @return [String] The unique sid that identifies this account
520
+ # @return [String] The SID of the Account that created the resource
475
521
  def account_sid
476
522
  @properties['account_sid']
477
523
  end
478
524
 
479
525
  ##
480
- # @return [String] A string that uniquely identifies this call
526
+ # @return [String] The SID of the Call the resource is associated with
481
527
  def call_sid
482
528
  @properties['call_sid']
483
529
  end
484
530
 
485
531
  ##
486
- # @return [String] A string that uniquely identifies this conference
532
+ # @return [String] The SID of the participant who is being `coached`
533
+ def call_sid_to_coach
534
+ @properties['call_sid_to_coach']
535
+ end
536
+
537
+ ##
538
+ # @return [Boolean] Indicates if the participant changed to coach
539
+ def coaching
540
+ @properties['coaching']
541
+ end
542
+
543
+ ##
544
+ # @return [String] The SID of the conference the participant is in
487
545
  def conference_sid
488
546
  @properties['conference_sid']
489
547
  end
490
548
 
491
549
  ##
492
- # @return [Time] The date this resource was created
550
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was created
493
551
  def date_created
494
552
  @properties['date_created']
495
553
  end
496
554
 
497
555
  ##
498
- # @return [Time] The date this resource was last updated
556
+ # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
499
557
  def date_updated
500
558
  @properties['date_updated']
501
559
  end
502
560
 
503
561
  ##
504
- # @return [Boolean] Indicates if the endConferenceOnExit was set
562
+ # @return [Boolean] Whether the conference ends when the participant leaves
505
563
  def end_conference_on_exit
506
564
  @properties['end_conference_on_exit']
507
565
  end
508
566
 
509
567
  ##
510
- # @return [Boolean] Indicates if the participant is muted
568
+ # @return [Boolean] Whether the participant is muted
511
569
  def muted
512
570
  @properties['muted']
513
571
  end
514
572
 
515
573
  ##
516
- # @return [Boolean] true if this participant is currently held.
574
+ # @return [Boolean] Whether the participant is on hold
517
575
  def hold
518
576
  @properties['hold']
519
577
  end
520
578
 
521
579
  ##
522
- # @return [Boolean] Indicates if the startConferenceOnEnter attribute was set
580
+ # @return [Boolean] Whether the conference starts when the participant joins the conference
523
581
  def start_conference_on_enter
524
582
  @properties['start_conference_on_enter']
525
583
  end
526
584
 
527
585
  ##
528
- # @return [participant.Status] The status
586
+ # @return [participant.Status] The status of the participant's call in a session
529
587
  def status
530
588
  @properties['status']
531
589
  end
532
590
 
533
591
  ##
534
- # @return [String] The URI for this resource
592
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`
535
593
  def uri
536
594
  @properties['uri']
537
595
  end
@@ -545,23 +603,42 @@ module Twilio
545
603
 
546
604
  ##
547
605
  # Update the ParticipantInstance
548
- # @param [Boolean] muted Specifying `true` will mute the participant, while
549
- # `false` will un-mute. Anything other than `true` or `false` is interpreted as
550
- # `false`.
551
- # @param [Boolean] hold Specifying `true` will hold the participant, while `false`
552
- # will remove them from hold.
553
- # @param [String] hold_url The 'HoldUrl' attribute lets you specify a URL for
554
- # music that plays when a participant is on hold. The URL may be an MP3, a WAV or
555
- # a TwiML document that uses `<Play>`, `<Say>` or `<Redirect>`.
556
- # @param [String] hold_method Specify the HTTP method Twilio should use to request
557
- # your `HoldUrl`, either `GET` or `POST`. Defaults to `GET`.
558
- # @param [String] announce_url The 'AnnounceUrl' attribute lets you specify a URL
559
- # for announcing something to the participant. The URL may return an MP3, a WAV or
560
- # a TwiML document with `<Play>` or `<Say>`.
561
- # @param [String] announce_method Specify the HTTP method Twilio should use to
562
- # request your `AnnounceUrl`, either `GET` or `POST`. Defaults to `POST`.
606
+ # @param [Boolean] muted Whether the participant should be muted. Can be `true` or
607
+ # `false. `true` will mute the participant, and `false` will un-mute them.
608
+ # Anything value other than `true` or `false` is interpreted as `false`.
609
+ # @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
610
+ # or `false`. `true` puts the participant on hold, and `false` lets them rejoin
611
+ # the conference.
612
+ # @param [String] hold_url The URL we call using the `hold_method` for music that
613
+ # plays when the participant is on hold. The URL may return an MP3 file, a WAV
614
+ # file, or a TwiML document that contains the `<Play>`, `<Say>` or `<Redirect>`
615
+ # commands.
616
+ # @param [String] hold_method The HTTP method we should use to call `hold_url`.
617
+ # Can be: `GET` or `POST` and the default is `GET`.
618
+ # @param [String] announce_url The URL we call using the `announce_method` for an
619
+ # announcement to the participant. The URL must return an MP3 file, a WAV file, or
620
+ # a TwiML document that contains `<Play>` or `<Say>` commands.
621
+ # @param [String] announce_method The HTTP method we should use to call
622
+ # `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
623
+ # @param [String] wait_url The URL we should call using the `wait_method` for the
624
+ # music to play while participants are waiting for the conference to start. The
625
+ # default value is the URL of our standard hold music. [Learn more about hold
626
+ # music](https://www.twilio.com/labs/twimlets/holdmusic).
627
+ # @param [String] wait_method The HTTP method we should use to call `wait_url`.
628
+ # Can be `GET` or `POST` and the default is `POST`. When using a static audio
629
+ # file, this should be `GET` so that we can cache the file.
630
+ # @param [Boolean] beep_on_exit Whether to play a notification beep to the
631
+ # conference when the participant exits. Can be: `true` or `false`.
632
+ # @param [Boolean] end_conference_on_exit Whether to end the conference when the
633
+ # participant leaves. Can be: `true` or `false` and defaults to `false`.
634
+ # @param [Boolean] coaching Whether the participant is coaching another call. Can
635
+ # be: `true` or `false`. If not present, defaults to `false` unless
636
+ # `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
637
+ # @param [String] call_sid_to_coach The SID of the participant who is being
638
+ # `coached`. The participant being coached is the only participant who can hear
639
+ # the participant who is `coaching`.
563
640
  # @return [ParticipantInstance] Updated ParticipantInstance
564
- def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset)
641
+ def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset, wait_url: :unset, wait_method: :unset, beep_on_exit: :unset, end_conference_on_exit: :unset, coaching: :unset, call_sid_to_coach: :unset)
565
642
  context.update(
566
643
  muted: muted,
567
644
  hold: hold,
@@ -569,6 +646,12 @@ module Twilio
569
646
  hold_method: hold_method,
570
647
  announce_url: announce_url,
571
648
  announce_method: announce_method,
649
+ wait_url: wait_url,
650
+ wait_method: wait_method,
651
+ beep_on_exit: beep_on_exit,
652
+ end_conference_on_exit: end_conference_on_exit,
653
+ coaching: coaching,
654
+ call_sid_to_coach: call_sid_to_coach,
572
655
  )
573
656
  end
574
657