twilio-ruby 5.28.0 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,9 +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
|
19
|
+
# @param [String] workspace_sid The SID of the Workspace that this task is
|
20
20
|
# contained within.
|
21
|
-
# @param [String] task_sid The
|
21
|
+
# @param [String] task_sid The SID of the reserved Task resource.
|
22
22
|
# @return [ReservationList] ReservationList
|
23
23
|
def initialize(version, workspace_sid: nil, task_sid: nil)
|
24
24
|
super(version)
|
@@ -33,7 +33,8 @@ module Twilio
|
|
33
33
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
34
34
|
# memory before returning.
|
35
35
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
36
|
-
# for a task with a specified ReservationStatus
|
36
|
+
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
37
|
+
# `rejected`, or `timeout`.
|
37
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
38
39
|
# guarantees to never return more than limit. Default is no limit
|
39
40
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -50,7 +51,8 @@ module Twilio
|
|
50
51
|
# This operation lazily loads records as efficiently as possible until the limit
|
51
52
|
# is reached.
|
52
53
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
53
|
-
# for a task with a specified ReservationStatus
|
54
|
+
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
55
|
+
# `rejected`, or `timeout`.
|
54
56
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
55
57
|
# guarantees to never return more than limit. Default is no limit.
|
56
58
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -84,7 +86,8 @@ module Twilio
|
|
84
86
|
# Retrieve a single page of ReservationInstance records from the API.
|
85
87
|
# Request is executed immediately.
|
86
88
|
# @param [reservation.Status] reservation_status Returns the list of reservations
|
87
|
-
# for a task with a specified ReservationStatus
|
89
|
+
# for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
|
90
|
+
# `rejected`, or `timeout`.
|
88
91
|
# @param [String] page_token PageToken provided by the API
|
89
92
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
90
93
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -162,9 +165,11 @@ module Twilio
|
|
162
165
|
##
|
163
166
|
# Initialize the ReservationContext
|
164
167
|
# @param [Version] version Version that contains the resource
|
165
|
-
# @param [String] workspace_sid The
|
166
|
-
#
|
167
|
-
# @param [String]
|
168
|
+
# @param [String] workspace_sid The SID of the Workspace with the TaskReservation
|
169
|
+
# resource to fetch.
|
170
|
+
# @param [String] task_sid The SID of the reserved Task resource with the
|
171
|
+
# TaskReservation resource to fetch.
|
172
|
+
# @param [String] sid The SID of the TaskReservation resource to fetch.
|
168
173
|
# @return [ReservationContext] ReservationContext
|
169
174
|
def initialize(version, workspace_sid, task_sid, sid)
|
170
175
|
super(version)
|
@@ -197,87 +202,132 @@ module Twilio
|
|
197
202
|
|
198
203
|
##
|
199
204
|
# Update the ReservationInstance
|
200
|
-
# @param [reservation.Status] reservation_status
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
# @param [String]
|
205
|
-
#
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
205
|
+
# @param [reservation.Status] reservation_status The new status of the
|
206
|
+
# reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`.
|
207
|
+
# @param [String] worker_activity_sid The new worker activity SID if rejecting a
|
208
|
+
# reservation.
|
209
|
+
# @param [String] instruction The assignment instruction for reservation.
|
210
|
+
# @param [String] dequeue_post_work_activity_sid The SID of the Activity resource
|
211
|
+
# to start after executing a Dequeue instruction.
|
212
|
+
# @param [String] dequeue_from The Caller ID of the call to the worker when
|
213
|
+
# executing a Dequeue instruction.
|
214
|
+
# @param [String] dequeue_record Whether to record both legs of a call when
|
215
|
+
# executing a Dequeue instruction or which leg to record.
|
210
216
|
# @param [String] dequeue_timeout Timeout for call when executing a Dequeue
|
211
|
-
# instruction
|
212
|
-
# @param [String] dequeue_to Contact URI of the worker when executing a
|
213
|
-
# instruction
|
214
|
-
#
|
215
|
-
#
|
216
|
-
# @param [String]
|
217
|
-
# instruction
|
218
|
-
# @param [String]
|
219
|
-
#
|
220
|
-
# @param [String]
|
221
|
-
#
|
222
|
-
#
|
217
|
+
# instruction.
|
218
|
+
# @param [String] dequeue_to The Contact URI of the worker when executing a
|
219
|
+
# Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for
|
220
|
+
# Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164)
|
221
|
+
# formatted phone number, depending on the destination.
|
222
|
+
# @param [String] dequeue_status_callback_url The Callback URL for completed call
|
223
|
+
# event when executing a Dequeue instruction.
|
224
|
+
# @param [String] call_from The Caller ID of the outbound call when executing a
|
225
|
+
# Call instruction.
|
226
|
+
# @param [String] call_record Whether to record both legs of a call when executing
|
227
|
+
# a Call instruction or which leg to record.
|
228
|
+
# @param [String] call_timeout Timeout for call when executing a Call instruction.
|
229
|
+
# @param [String] call_to The Contact URI of the worker when executing a Call
|
230
|
+
# instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
|
231
|
+
# SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
|
232
|
+
# phone number, depending on the destination.
|
223
233
|
# @param [String] call_url TwiML URI executed on answering the worker's leg as a
|
224
|
-
# result of the Call instruction
|
225
|
-
# @param [String] call_status_callback_url
|
226
|
-
# when executing a Call instruction
|
227
|
-
# @param [Boolean] call_accept
|
228
|
-
#
|
229
|
-
# @param [String] redirect_call_sid Call
|
230
|
-
# executing a Redirect instruction
|
231
|
-
# @param [Boolean] redirect_accept
|
232
|
-
#
|
234
|
+
# result of the Call instruction.
|
235
|
+
# @param [String] call_status_callback_url The URL to call for the completed call
|
236
|
+
# event when executing a Call instruction.
|
237
|
+
# @param [Boolean] call_accept Whether to accept a reservation when executing a
|
238
|
+
# Call instruction.
|
239
|
+
# @param [String] redirect_call_sid The Call SID of the call parked in the queue
|
240
|
+
# when executing a Redirect instruction.
|
241
|
+
# @param [Boolean] redirect_accept Whether the reservation should be accepted when
|
242
|
+
# executing a Redirect instruction.
|
233
243
|
# @param [String] redirect_url TwiML URI to redirect the call to when executing
|
234
|
-
# the Redirect instruction
|
235
|
-
# @param [String] to Contact URI of the worker when executing a Conference
|
236
|
-
# instruction
|
237
|
-
#
|
238
|
-
#
|
239
|
-
# @param [String]
|
240
|
-
#
|
241
|
-
# @param [
|
242
|
-
#
|
243
|
-
# @param [
|
244
|
-
#
|
245
|
-
# @param [
|
246
|
-
#
|
247
|
-
#
|
248
|
-
# @param [String]
|
249
|
-
#
|
250
|
-
# @param [Boolean]
|
251
|
-
#
|
252
|
-
# @param [
|
253
|
-
#
|
254
|
-
#
|
244
|
+
# the Redirect instruction.
|
245
|
+
# @param [String] to The Contact URI of the worker when executing a Conference
|
246
|
+
# instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable
|
247
|
+
# SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted
|
248
|
+
# phone number, depending on the destination.
|
249
|
+
# @param [String] from The Caller ID of the call to the worker when executing a
|
250
|
+
# Conference instruction.
|
251
|
+
# @param [String] status_callback The URL we should call using the
|
252
|
+
# `status_callback_method` to send status information to your application.
|
253
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
254
|
+
# `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
|
255
|
+
# @param [reservation.CallStatus] status_callback_event The call progress events
|
256
|
+
# that we will send to `status_callback`. Can be: `initiated`, `ringing`,
|
257
|
+
# `answered`, or `completed`.
|
258
|
+
# @param [String] timeout Timeout for call when executing a Conference
|
259
|
+
# instruction.
|
260
|
+
# @param [Boolean] record Whether to record the participant and their conferences,
|
261
|
+
# including the time between conferences. The default is `false`.
|
262
|
+
# @param [Boolean] muted Whether the agent is muted in the conference. The default
|
263
|
+
# is `false`.
|
264
|
+
# @param [String] beep Whether to play a notification beep when the participant
|
265
|
+
# joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`.
|
266
|
+
# The default value is `true`.
|
267
|
+
# @param [Boolean] start_conference_on_enter Whether to start the conference when
|
268
|
+
# the participant joins, if it has not already started. The default is `true`. If
|
269
|
+
# `false` and the conference has not started, the participant is muted and hears
|
270
|
+
# background music until another participant starts the conference.
|
271
|
+
# @param [Boolean] end_conference_on_exit Whether to end the conference when the
|
272
|
+
# agent leaves.
|
273
|
+
# @param [String] wait_url The URL we should call using the `wait_method` for the
|
274
|
+
# music to play while participants are waiting for the conference to start. The
|
275
|
+
# default value is the URL of our standard hold music. [Learn more about hold
|
276
|
+
# music](https://www.twilio.com/labs/twimlets/holdmusic).
|
277
|
+
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
278
|
+
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
279
|
+
# file, this should be `GET` so that we can cache the file.
|
280
|
+
# @param [Boolean] early_media Whether to allow an agent to hear the state of the
|
281
|
+
# outbound call, including ringing or disconnect messages. The default is `true`.
|
282
|
+
# @param [String] max_participants The maximum number of participants in the
|
283
|
+
# conference. Can be a positive integer from `2` to `250`. The default value is
|
284
|
+
# `250`.
|
285
|
+
# @param [String] conference_status_callback The URL we should call using the
|
286
|
+
# `conference_status_callback_method` when the conference events in
|
287
|
+
# `conference_status_callback_event` occur. Only the value set by the first
|
288
|
+
# participant to join the conference is used. Subsequent
|
289
|
+
# `conference_status_callback` values are ignored.
|
290
|
+
# @param [String] conference_status_callback_method The HTTP method we should use
|
291
|
+
# to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to
|
292
|
+
# `POST`.
|
255
293
|
# @param [reservation.ConferenceEvent] conference_status_callback_event The
|
256
|
-
#
|
257
|
-
#
|
258
|
-
# @param [String]
|
259
|
-
#
|
260
|
-
#
|
261
|
-
# @param [String]
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
# @param [String]
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
# @param [
|
275
|
-
#
|
276
|
-
#
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
# @param [
|
294
|
+
# conference status events that we will send to `conference_status_callback`. Can
|
295
|
+
# be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
|
296
|
+
# @param [String] conference_record Whether to record the conference the
|
297
|
+
# participant is joining or when to record the conference. Can be: `true`,
|
298
|
+
# `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
|
299
|
+
# @param [String] conference_trim How to trim the leading and trailing silence
|
300
|
+
# from your recorded conference audio files. Can be: `trim-silence` or
|
301
|
+
# `do-not-trim` and defaults to `trim-silence`.
|
302
|
+
# @param [String] recording_channels The recording channels for the final
|
303
|
+
# recording. Can be: `mono` or `dual` and the default is `mono`.
|
304
|
+
# @param [String] recording_status_callback The URL that we should call using the
|
305
|
+
# `recording_status_callback_method` when the recording status changes.
|
306
|
+
# @param [String] recording_status_callback_method The HTTP method we should use
|
307
|
+
# when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults
|
308
|
+
# to `POST`.
|
309
|
+
# @param [String] conference_recording_status_callback The URL we should call
|
310
|
+
# using the `conference_recording_status_callback_method` when the conference
|
311
|
+
# recording is available.
|
312
|
+
# @param [String] conference_recording_status_callback_method The HTTP method we
|
313
|
+
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
314
|
+
# `POST` and defaults to `POST`.
|
315
|
+
# @param [String] region The
|
316
|
+
# [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`.
|
317
|
+
# @param [String] sip_auth_username The SIP username used for authentication.
|
318
|
+
# @param [String] sip_auth_password The SIP password for authentication.
|
319
|
+
# @param [String] dequeue_status_callback_event The Call progress events sent via
|
320
|
+
# webhooks as a result of a Dequeue instruction.
|
321
|
+
# @param [String] post_work_activity_sid The new worker activity SID after
|
322
|
+
# executing a Conference instruction.
|
323
|
+
# @param [reservation.SupervisorMode] supervisor_mode The Supervisor mode when
|
324
|
+
# executing the Supervise instruction.
|
325
|
+
# @param [String] supervisor The Supervisor SID/URI when executing the Supervise
|
326
|
+
# 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.
|
281
331
|
# @return [ReservationInstance] Updated ReservationInstance
|
282
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, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
283
333
|
data = Twilio::Values.of({
|
@@ -371,10 +421,10 @@ module Twilio
|
|
371
421
|
# Initialize the ReservationInstance
|
372
422
|
# @param [Version] version Version that contains the resource
|
373
423
|
# @param [Hash] payload payload that contains response from Twilio
|
374
|
-
# @param [String] workspace_sid The
|
424
|
+
# @param [String] workspace_sid The SID of the Workspace that this task is
|
375
425
|
# contained within.
|
376
|
-
# @param [String] task_sid The
|
377
|
-
# @param [String] sid The
|
426
|
+
# @param [String] task_sid The SID of the reserved Task resource.
|
427
|
+
# @param [String] sid The SID of the TaskReservation resource to fetch.
|
378
428
|
# @return [ReservationInstance] ReservationInstance
|
379
429
|
def initialize(version, payload, workspace_sid: nil, task_sid: nil, sid: nil)
|
380
430
|
super(version)
|
@@ -420,67 +470,67 @@ module Twilio
|
|
420
470
|
end
|
421
471
|
|
422
472
|
##
|
423
|
-
# @return [String] The
|
473
|
+
# @return [String] The SID of the Account that created the resource
|
424
474
|
def account_sid
|
425
475
|
@properties['account_sid']
|
426
476
|
end
|
427
477
|
|
428
478
|
##
|
429
|
-
# @return [Time] The
|
479
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
430
480
|
def date_created
|
431
481
|
@properties['date_created']
|
432
482
|
end
|
433
483
|
|
434
484
|
##
|
435
|
-
# @return [Time] The
|
485
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
436
486
|
def date_updated
|
437
487
|
@properties['date_updated']
|
438
488
|
end
|
439
489
|
|
440
490
|
##
|
441
|
-
# @return [reservation.Status] The current status of the reservation
|
491
|
+
# @return [reservation.Status] The current status of the reservation
|
442
492
|
def reservation_status
|
443
493
|
@properties['reservation_status']
|
444
494
|
end
|
445
495
|
|
446
496
|
##
|
447
|
-
# @return [String] The unique
|
497
|
+
# @return [String] The unique string that identifies the resource
|
448
498
|
def sid
|
449
499
|
@properties['sid']
|
450
500
|
end
|
451
501
|
|
452
502
|
##
|
453
|
-
# @return [String] The
|
503
|
+
# @return [String] The SID of the reserved Task resource
|
454
504
|
def task_sid
|
455
505
|
@properties['task_sid']
|
456
506
|
end
|
457
507
|
|
458
508
|
##
|
459
|
-
# @return [String]
|
509
|
+
# @return [String] The friendly_name of the Worker that is reserved
|
460
510
|
def worker_name
|
461
511
|
@properties['worker_name']
|
462
512
|
end
|
463
513
|
|
464
514
|
##
|
465
|
-
# @return [String] The
|
515
|
+
# @return [String] The SID of the reserved Worker resource
|
466
516
|
def worker_sid
|
467
517
|
@properties['worker_sid']
|
468
518
|
end
|
469
519
|
|
470
520
|
##
|
471
|
-
# @return [String] The
|
521
|
+
# @return [String] The SID of the Workspace that this task is contained within.
|
472
522
|
def workspace_sid
|
473
523
|
@properties['workspace_sid']
|
474
524
|
end
|
475
525
|
|
476
526
|
##
|
477
|
-
# @return [String] The
|
527
|
+
# @return [String] The absolute URL of the TaskReservation reservation
|
478
528
|
def url
|
479
529
|
@properties['url']
|
480
530
|
end
|
481
531
|
|
482
532
|
##
|
483
|
-
# @return [String] The
|
533
|
+
# @return [String] The URLs of related resources
|
484
534
|
def links
|
485
535
|
@properties['links']
|
486
536
|
end
|
@@ -494,87 +544,132 @@ module Twilio
|
|
494
544
|
|
495
545
|
##
|
496
546
|
# Update the ReservationInstance
|
497
|
-
# @param [reservation.Status] reservation_status
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
# @param [String]
|
502
|
-
#
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
547
|
+
# @param [reservation.Status] reservation_status The new status of the
|
548
|
+
# reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`.
|
549
|
+
# @param [String] worker_activity_sid The new worker activity SID if rejecting a
|
550
|
+
# reservation.
|
551
|
+
# @param [String] instruction The assignment instruction for reservation.
|
552
|
+
# @param [String] dequeue_post_work_activity_sid The SID of the Activity resource
|
553
|
+
# to start after executing a Dequeue instruction.
|
554
|
+
# @param [String] dequeue_from The Caller ID of the call to the worker when
|
555
|
+
# executing a Dequeue instruction.
|
556
|
+
# @param [String] dequeue_record Whether to record both legs of a call when
|
557
|
+
# executing a Dequeue instruction or which leg to record.
|
507
558
|
# @param [String] dequeue_timeout Timeout for call when executing a Dequeue
|
508
|
-
# instruction
|
509
|
-
# @param [String] dequeue_to Contact URI of the worker when executing a
|
510
|
-
# instruction
|
511
|
-
#
|
512
|
-
#
|
513
|
-
# @param [String]
|
514
|
-
# instruction
|
515
|
-
# @param [String]
|
516
|
-
#
|
517
|
-
# @param [String]
|
518
|
-
#
|
519
|
-
#
|
559
|
+
# instruction.
|
560
|
+
# @param [String] dequeue_to The Contact URI of the worker when executing a
|
561
|
+
# Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for
|
562
|
+
# Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164)
|
563
|
+
# formatted phone number, depending on the destination.
|
564
|
+
# @param [String] dequeue_status_callback_url The Callback URL for completed call
|
565
|
+
# event when executing a Dequeue instruction.
|
566
|
+
# @param [String] call_from The Caller ID of the outbound call when executing a
|
567
|
+
# Call instruction.
|
568
|
+
# @param [String] call_record Whether to record both legs of a call when executing
|
569
|
+
# a Call instruction or which leg to record.
|
570
|
+
# @param [String] call_timeout Timeout for call when executing a Call 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.
|
520
575
|
# @param [String] call_url TwiML URI executed on answering the worker's leg as a
|
521
|
-
# result of the Call instruction
|
522
|
-
# @param [String] call_status_callback_url
|
523
|
-
# when executing a Call instruction
|
524
|
-
# @param [Boolean] call_accept
|
525
|
-
#
|
526
|
-
# @param [String] redirect_call_sid Call
|
527
|
-
# executing a Redirect instruction
|
528
|
-
# @param [Boolean] redirect_accept
|
529
|
-
#
|
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.
|
530
585
|
# @param [String] redirect_url TwiML URI to redirect the call to when executing
|
531
|
-
# the Redirect instruction
|
532
|
-
# @param [String] to Contact URI of the worker when executing a Conference
|
533
|
-
# instruction
|
534
|
-
#
|
535
|
-
#
|
536
|
-
# @param [String]
|
537
|
-
#
|
538
|
-
# @param [
|
539
|
-
#
|
540
|
-
# @param [
|
541
|
-
#
|
542
|
-
# @param [
|
543
|
-
#
|
544
|
-
#
|
545
|
-
# @param [String]
|
546
|
-
#
|
547
|
-
# @param [Boolean]
|
548
|
-
#
|
549
|
-
# @param [
|
550
|
-
#
|
551
|
-
#
|
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 Timeout for 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. The default is `false`.
|
604
|
+
# @param [Boolean] muted Whether the agent is muted in the conference. The default
|
605
|
+
# is `false`.
|
606
|
+
# @param [String] beep Whether to play a notification beep when the participant
|
607
|
+
# joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`.
|
608
|
+
# The default value is `true`.
|
609
|
+
# @param [Boolean] start_conference_on_enter Whether to start the conference when
|
610
|
+
# the participant joins, if it has not already started. The default is `true`. If
|
611
|
+
# `false` and the conference has not started, the participant is muted and hears
|
612
|
+
# background music until another participant starts the conference.
|
613
|
+
# @param [Boolean] end_conference_on_exit Whether to end the conference when the
|
614
|
+
# agent leaves.
|
615
|
+
# @param [String] wait_url The URL we should call using the `wait_method` for the
|
616
|
+
# music to play while participants are waiting for the conference to start. The
|
617
|
+
# default value is the URL of our standard hold music. [Learn more about hold
|
618
|
+
# music](https://www.twilio.com/labs/twimlets/holdmusic).
|
619
|
+
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
620
|
+
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
621
|
+
# file, this should be `GET` so that we can cache the file.
|
622
|
+
# @param [Boolean] early_media Whether to allow an agent to hear the state of the
|
623
|
+
# outbound call, including ringing or disconnect messages. The default is `true`.
|
624
|
+
# @param [String] max_participants The maximum number of participants in the
|
625
|
+
# conference. Can be a positive integer from `2` to `250`. The default value is
|
626
|
+
# `250`.
|
627
|
+
# @param [String] conference_status_callback The URL we should call using the
|
628
|
+
# `conference_status_callback_method` when the conference events in
|
629
|
+
# `conference_status_callback_event` occur. Only the value set by the first
|
630
|
+
# participant to join the conference is used. Subsequent
|
631
|
+
# `conference_status_callback` values are ignored.
|
632
|
+
# @param [String] conference_status_callback_method The HTTP method we should use
|
633
|
+
# to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to
|
634
|
+
# `POST`.
|
552
635
|
# @param [reservation.ConferenceEvent] conference_status_callback_event The
|
553
|
-
#
|
554
|
-
#
|
555
|
-
# @param [String]
|
556
|
-
#
|
557
|
-
#
|
558
|
-
# @param [String]
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
# @param [String]
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
# @param [
|
572
|
-
#
|
573
|
-
#
|
574
|
-
#
|
575
|
-
#
|
576
|
-
#
|
577
|
-
# @param [
|
636
|
+
# conference status events that we will send to `conference_status_callback`. Can
|
637
|
+
# be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
|
638
|
+
# @param [String] conference_record Whether to record the conference the
|
639
|
+
# participant is joining or when to record the conference. Can be: `true`,
|
640
|
+
# `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
|
641
|
+
# @param [String] conference_trim How to trim the leading and trailing silence
|
642
|
+
# from your recorded conference audio files. Can be: `trim-silence` or
|
643
|
+
# `do-not-trim` and defaults to `trim-silence`.
|
644
|
+
# @param [String] recording_channels The recording channels for the final
|
645
|
+
# recording. Can be: `mono` or `dual` and the default is `mono`.
|
646
|
+
# @param [String] recording_status_callback The URL that we should call using the
|
647
|
+
# `recording_status_callback_method` when the recording status changes.
|
648
|
+
# @param [String] recording_status_callback_method The HTTP method we should use
|
649
|
+
# when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults
|
650
|
+
# to `POST`.
|
651
|
+
# @param [String] conference_recording_status_callback The URL we should call
|
652
|
+
# using the `conference_recording_status_callback_method` when the conference
|
653
|
+
# recording is available.
|
654
|
+
# @param [String] conference_recording_status_callback_method The HTTP method we
|
655
|
+
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
656
|
+
# `POST` and defaults to `POST`.
|
657
|
+
# @param [String] region The
|
658
|
+
# [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`.
|
659
|
+
# @param [String] sip_auth_username The SIP username used for authentication.
|
660
|
+
# @param [String] sip_auth_password The SIP password for authentication.
|
661
|
+
# @param [String] dequeue_status_callback_event The Call progress events sent via
|
662
|
+
# webhooks as a result of a Dequeue instruction.
|
663
|
+
# @param [String] post_work_activity_sid The new worker activity SID after
|
664
|
+
# executing a Conference instruction.
|
665
|
+
# @param [reservation.SupervisorMode] supervisor_mode The Supervisor mode when
|
666
|
+
# executing the Supervise instruction.
|
667
|
+
# @param [String] supervisor The Supervisor SID/URI when executing the Supervise
|
668
|
+
# instruction.
|
669
|
+
# @param [Boolean] end_conference_on_customer_exit Whether to end the conference
|
670
|
+
# when the customer leaves.
|
671
|
+
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
672
|
+
# when the customer joins.
|
578
673
|
# @return [ReservationInstance] Updated ReservationInstance
|
579
674
|
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, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
580
675
|
context.update(
|