twilio-ruby 5.28.0 → 5.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +11 -6
- data/CHANGES.md +33 -0
- data/README.md +3 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -20
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -6
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +6 -3
- data/lib/twilio-ruby/rest/flex_api.rb +15 -15
- data/lib/twilio-ruby/rest/flex_api/v1.rb +20 -20
- data/lib/twilio-ruby/rest/messaging.rb +9 -9
- data/lib/twilio-ruby/rest/messaging/v1.rb +13 -13
- data/lib/twilio-ruby/rest/preview.rb +20 -20
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +38 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +298 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +232 -0
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +14 -14
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +40 -5
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +7 -7
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +51 -51
- data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +10 -10
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +96 -19
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +8 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +10 -6
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +10 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +271 -176
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +282 -137
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +15 -15
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +2 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +9 -7
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +3 -3
- data/lib/twilio-ruby/rest/wireless.rb +6 -6
- data/lib/twilio-ruby/rest/wireless/v1.rb +8 -8
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +5 -4
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -5
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +114 -98
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +4 -4
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +16 -10
- data/lib/twilio-ruby/security/request_validator.rb +61 -8
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/message_spec.rb +4 -4
- data/spec/integration/api/v2010/account/notification_spec.rb +0 -28
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +27 -0
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +129 -0
- data/spec/integration/preview/bulk_exports/export/job_spec.rb +77 -0
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +6 -1
- data/spec/integration/preview/trusted_comms/cps_spec.rb +1 -1
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +10 -10
- data/spec/integration/preview/trusted_comms/device_spec.rb +1 -1
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +15 -4
- data/spec/integration/wireless/v1/sim_spec.rb +84 -0
- data/spec/security/request_validator_spec.rb +41 -0
- 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
|
20
|
-
#
|
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
|
35
|
-
#
|
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
|
52
|
-
#
|
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
|
86
|
-
#
|
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
|
165
|
-
#
|
166
|
-
# @param [String]
|
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
|
200
|
-
#
|
201
|
-
#
|
202
|
-
# @param [String]
|
203
|
-
#
|
204
|
-
# @param [String]
|
205
|
-
# @param [String]
|
206
|
-
#
|
207
|
-
# @param [String]
|
208
|
-
#
|
209
|
-
# @param [String]
|
210
|
-
#
|
211
|
-
# @param [String]
|
212
|
-
#
|
213
|
-
# @param [String]
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
# @param [String]
|
218
|
-
#
|
219
|
-
# @param [String]
|
220
|
-
#
|
221
|
-
# @param [String]
|
222
|
-
#
|
223
|
-
# @param [String]
|
224
|
-
#
|
225
|
-
# @param [
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
# @param [String]
|
230
|
-
#
|
231
|
-
# @param [
|
232
|
-
#
|
233
|
-
# @param [
|
234
|
-
#
|
235
|
-
#
|
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
|
-
#
|
238
|
-
#
|
239
|
-
# @param [String]
|
240
|
-
#
|
241
|
-
#
|
242
|
-
# @param [String]
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
# @param [String]
|
250
|
-
#
|
251
|
-
#
|
252
|
-
# @param [String]
|
253
|
-
#
|
254
|
-
#
|
255
|
-
# @param [
|
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
|
348
|
-
#
|
349
|
-
# @param [String]
|
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
|
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
|
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
|
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]
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
470
|
-
#
|
471
|
-
#
|
472
|
-
# @param [String]
|
473
|
-
#
|
474
|
-
# @param [String]
|
475
|
-
# @param [String]
|
476
|
-
#
|
477
|
-
# @param [String]
|
478
|
-
#
|
479
|
-
# @param [String]
|
480
|
-
#
|
481
|
-
# @param [String]
|
482
|
-
#
|
483
|
-
# @param [String]
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# @param [String]
|
488
|
-
#
|
489
|
-
# @param [String]
|
490
|
-
#
|
491
|
-
# @param [String]
|
492
|
-
#
|
493
|
-
# @param [String]
|
494
|
-
#
|
495
|
-
# @param [
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# @param [String]
|
500
|
-
#
|
501
|
-
# @param [
|
502
|
-
#
|
503
|
-
# @param [
|
504
|
-
#
|
505
|
-
#
|
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
|
-
#
|
508
|
-
#
|
509
|
-
# @param [String]
|
510
|
-
#
|
511
|
-
#
|
512
|
-
# @param [String]
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
518
|
-
#
|
519
|
-
# @param [String]
|
520
|
-
#
|
521
|
-
#
|
522
|
-
# @param [String]
|
523
|
-
#
|
524
|
-
#
|
525
|
-
# @param [
|
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(
|