twilio-ruby 5.52.0 → 5.67.3
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/.github/workflows/pr-lint.yml +15 -0
- data/.github/workflows/test-and-deploy.yml +129 -0
- data/.gitignore +5 -1
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +91 -28
- data/CHANGES.md +563 -0
- data/Gemfile +1 -0
- data/Makefile +8 -11
- data/README.md +13 -6
- data/examples/examples.rb +1 -1
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/http/http_client.rb +20 -4
- data/lib/twilio-ruby/http.rb +5 -0
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
- data/lib/twilio-ruby/rest/chat.rb +16 -0
- data/lib/twilio-ruby/rest/client.rb +21 -12
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
- data/lib/twilio-ruby/rest/conversations.rb +15 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
- data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api.rb +9 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
- data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
- data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
- data/lib/twilio-ruby/rest/insights.rb +28 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
- data/lib/twilio-ruby/rest/lookups.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
- data/lib/twilio-ruby/rest/media/v1.rb +76 -0
- data/lib/twilio-ruby/rest/media.rb +65 -0
- data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
- data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
- data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
- data/lib/twilio-ruby/rest/supersim.rb +15 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
- data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
- data/lib/twilio-ruby/rest/verify.rb +14 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
- data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
- data/lib/twilio-ruby/rest/voice.rb +8 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/rest.rb +13 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +6 -16
- data/sonar-project.properties +13 -0
- data/twilio-ruby.gemspec +1 -2
- metadata +59 -32
- data/.travis.yml +0 -45
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
- /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
- /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
- /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
- /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
- /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
- /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
- /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -299,18 +299,22 @@ module Twilio
|
|
299
299
|
# Worker. Defaults to {}.
|
300
300
|
# @param [String] friendly_name A descriptive string that you create to describe
|
301
301
|
# the Worker. It can be up to 64 characters long.
|
302
|
-
# @param [Boolean] reject_pending_reservations Whether to reject
|
303
|
-
# reservations.
|
302
|
+
# @param [Boolean] reject_pending_reservations Whether to reject the Worker's
|
303
|
+
# pending reservations. This option is only valid if the Worker's new
|
304
|
+
# {Activity}[https://www.twilio.com/docs/taskrouter/api/activity] resource has its
|
305
|
+
# `availability` property set to `False`.
|
306
|
+
# @param [String] if_match The If-Match HTTP request header
|
304
307
|
# @return [WorkerInstance] Updated WorkerInstance
|
305
|
-
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
308
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset, if_match: :unset)
|
306
309
|
data = Twilio::Values.of({
|
307
310
|
'ActivitySid' => activity_sid,
|
308
311
|
'Attributes' => attributes,
|
309
312
|
'FriendlyName' => friendly_name,
|
310
313
|
'RejectPendingReservations' => reject_pending_reservations,
|
311
314
|
})
|
315
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
312
316
|
|
313
|
-
payload = @version.update('POST', @uri, data: data)
|
317
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
314
318
|
|
315
319
|
WorkerInstance.new(
|
316
320
|
@version,
|
@@ -322,9 +326,12 @@ module Twilio
|
|
322
326
|
|
323
327
|
##
|
324
328
|
# Delete the WorkerInstance
|
329
|
+
# @param [String] if_match The If-Match HTTP request header
|
325
330
|
# @return [Boolean] true if delete succeeds, false otherwise
|
326
|
-
def delete
|
327
|
-
|
331
|
+
def delete(if_match: :unset)
|
332
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
333
|
+
|
334
|
+
@version.delete('DELETE', @uri, headers: headers)
|
328
335
|
end
|
329
336
|
|
330
337
|
##
|
@@ -551,23 +558,28 @@ module Twilio
|
|
551
558
|
# Worker. Defaults to {}.
|
552
559
|
# @param [String] friendly_name A descriptive string that you create to describe
|
553
560
|
# the Worker. It can be up to 64 characters long.
|
554
|
-
# @param [Boolean] reject_pending_reservations Whether to reject
|
555
|
-
# reservations.
|
561
|
+
# @param [Boolean] reject_pending_reservations Whether to reject the Worker's
|
562
|
+
# pending reservations. This option is only valid if the Worker's new
|
563
|
+
# {Activity}[https://www.twilio.com/docs/taskrouter/api/activity] resource has its
|
564
|
+
# `availability` property set to `False`.
|
565
|
+
# @param [String] if_match The If-Match HTTP request header
|
556
566
|
# @return [WorkerInstance] Updated WorkerInstance
|
557
|
-
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
567
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset, if_match: :unset)
|
558
568
|
context.update(
|
559
569
|
activity_sid: activity_sid,
|
560
570
|
attributes: attributes,
|
561
571
|
friendly_name: friendly_name,
|
562
572
|
reject_pending_reservations: reject_pending_reservations,
|
573
|
+
if_match: if_match,
|
563
574
|
)
|
564
575
|
end
|
565
576
|
|
566
577
|
##
|
567
578
|
# Delete the WorkerInstance
|
579
|
+
# @param [String] if_match The If-Match HTTP request header
|
568
580
|
# @return [Boolean] true if delete succeeds, false otherwise
|
569
|
-
def delete
|
570
|
-
context.delete
|
581
|
+
def delete(if_match: :unset)
|
582
|
+
context.delete(if_match: if_match, )
|
571
583
|
end
|
572
584
|
|
573
585
|
##
|
data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb
CHANGED
@@ -105,7 +105,8 @@ module Twilio
|
|
105
105
|
# above and below the specified thresholds in seconds are computed. For example,
|
106
106
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
107
107
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
108
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
108
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
109
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
109
110
|
# @return [WorkflowCumulativeStatisticsInstance] Fetched WorkflowCumulativeStatisticsInstance
|
110
111
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
111
112
|
params = Twilio::Values.of({
|
@@ -351,7 +352,8 @@ module Twilio
|
|
351
352
|
# above and below the specified thresholds in seconds are computed. For example,
|
352
353
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
353
354
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
354
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
355
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
356
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
355
357
|
# @return [WorkflowCumulativeStatisticsInstance] Fetched WorkflowCumulativeStatisticsInstance
|
356
358
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
357
359
|
context.fetch(
|
@@ -97,7 +97,8 @@ module Twilio
|
|
97
97
|
# above and below the specified thresholds in seconds are computed. For example,
|
98
98
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
99
99
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
100
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
100
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
101
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
101
102
|
# @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
|
102
103
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
103
104
|
params = Twilio::Values.of({
|
@@ -328,7 +329,8 @@ module Twilio
|
|
328
329
|
# above and below the specified thresholds in seconds are computed. For example,
|
329
330
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
330
331
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
331
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
332
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
333
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
332
334
|
# @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
|
333
335
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
334
336
|
context.fetch(
|
@@ -119,17 +119,21 @@ module Twilio
|
|
119
119
|
# If provided, the Workspace will publish events to this URL, for example, to
|
120
120
|
# collect data for reporting. See {Workspace
|
121
121
|
# Events}[https://www.twilio.com/docs/taskrouter/api/event] for more information.
|
122
|
+
# This parameter supports Twilio's {Webhooks (HTTP callbacks) Connection
|
123
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
122
124
|
# @param [String] events_filter The list of Workspace events for which to call
|
123
125
|
# event_callback_url. For example, if `EventsFilter=task.created, task.canceled,
|
124
126
|
# worker.activity.update`, then TaskRouter will call event_callback_url only when
|
125
127
|
# a task is created, canceled, or a Worker activity is updated.
|
126
128
|
# @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
|
127
|
-
# `true` to enable multi-tasking, or `false` to disable it.
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
129
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
130
|
+
# workspaces should be created as multi-tasking. The default is `true`.
|
131
|
+
# Multi-tasking allows Workers to handle multiple Tasks simultaneously. When
|
132
|
+
# enabled (`true`), each Worker can receive parallel reservations up to the
|
133
|
+
# per-channel maximums defined in the Workers section. In single-tasking mode
|
134
|
+
# (legacy mode), each Worker will only receive a new reservation when the previous
|
135
|
+
# task is completed. Learn more at
|
136
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
133
137
|
# @param [String] template An available template name. Can be: `NONE` or `FIFO`
|
134
138
|
# and the default is `NONE`. Pre-configures the Workspace with the Workflow and
|
135
139
|
# Activities specified in the template. `NONE` will create a Workspace with only a
|
@@ -233,7 +237,9 @@ module Twilio
|
|
233
237
|
# when new Workers are created in the Workspace.
|
234
238
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
235
239
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
236
|
-
# more information.
|
240
|
+
# more information. This parameter supports Twilio's {Webhooks (HTTP callbacks)
|
241
|
+
# Connection
|
242
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
237
243
|
# @param [String] events_filter The list of Workspace events for which to call
|
238
244
|
# event_callback_url. For example if
|
239
245
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -243,17 +249,21 @@ module Twilio
|
|
243
249
|
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
|
244
250
|
# Team`.
|
245
251
|
# @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
|
246
|
-
# `true` to enable multi-tasking, or `false` to disable it.
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
253
|
+
# workspaces should be maintained as multi-tasking. There is no default when
|
254
|
+
# omitting this parameter. A multi-tasking Workspace can't be updated to
|
255
|
+
# single-tasking unless it is not a Flex Project and another (legacy)
|
256
|
+
# single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
|
257
|
+
# Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
|
258
|
+
# reservations up to the per-channel maximums defined in the Workers section. In
|
259
|
+
# single-tasking mode (legacy mode), each Worker will only receive a new
|
260
|
+
# reservation when the previous task is completed. Learn more at
|
261
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
252
262
|
# @param [String] timeout_activity_sid The SID of the Activity that will be
|
253
263
|
# assigned to a Worker when a Task reservation times out without a response.
|
254
264
|
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
|
255
265
|
# prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
|
256
|
-
# be: `LIFO` or `FIFO
|
266
|
+
# be: `LIFO` or `FIFO`. For more information, see {Queue
|
257
267
|
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
|
258
268
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
259
269
|
def update(default_activity_sid: :unset, event_callback_url: :unset, events_filter: :unset, friendly_name: :unset, multi_task_enabled: :unset, timeout_activity_sid: :unset, prioritize_queue_order: :unset)
|
@@ -592,7 +602,9 @@ module Twilio
|
|
592
602
|
# when new Workers are created in the Workspace.
|
593
603
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
594
604
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
595
|
-
# more information.
|
605
|
+
# more information. This parameter supports Twilio's {Webhooks (HTTP callbacks)
|
606
|
+
# Connection
|
607
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
596
608
|
# @param [String] events_filter The list of Workspace events for which to call
|
597
609
|
# event_callback_url. For example if
|
598
610
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -602,17 +614,21 @@ module Twilio
|
|
602
614
|
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
|
603
615
|
# Team`.
|
604
616
|
# @param [Boolean] multi_task_enabled Whether to enable multi-tasking. Can be:
|
605
|
-
# `true` to enable multi-tasking, or `false` to disable it.
|
606
|
-
#
|
607
|
-
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
617
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
618
|
+
# workspaces should be maintained as multi-tasking. There is no default when
|
619
|
+
# omitting this parameter. A multi-tasking Workspace can't be updated to
|
620
|
+
# single-tasking unless it is not a Flex Project and another (legacy)
|
621
|
+
# single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
|
622
|
+
# Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
|
623
|
+
# reservations up to the per-channel maximums defined in the Workers section. In
|
624
|
+
# single-tasking mode (legacy mode), each Worker will only receive a new
|
625
|
+
# reservation when the previous task is completed. Learn more at
|
626
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
611
627
|
# @param [String] timeout_activity_sid The SID of the Activity that will be
|
612
628
|
# assigned to a Worker when a Task reservation times out without a response.
|
613
629
|
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
|
614
630
|
# prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
|
615
|
-
# be: `LIFO` or `FIFO
|
631
|
+
# be: `LIFO` or `FIFO`. For more information, see {Queue
|
616
632
|
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
|
617
633
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
618
634
|
def update(default_activity_sid: :unset, event_callback_url: :unset, events_filter: :unset, friendly_name: :unset, multi_task_enabled: :unset, timeout_activity_sid: :unset, prioritize_queue_order: :unset)
|
@@ -54,8 +54,10 @@ module Twilio
|
|
54
54
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
55
55
|
# Caller ID data on your phone. See {CNAM
|
56
56
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
57
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
58
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
57
59
|
# @return [TrunkInstance] Created TrunkInstance
|
58
|
-
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
60
|
+
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
59
61
|
data = Twilio::Values.of({
|
60
62
|
'FriendlyName' => friendly_name,
|
61
63
|
'DomainName' => domain_name,
|
@@ -64,6 +66,7 @@ module Twilio
|
|
64
66
|
'TransferMode' => transfer_mode,
|
65
67
|
'Secure' => secure,
|
66
68
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
69
|
+
'TransferCallerId' => transfer_caller_id,
|
67
70
|
})
|
68
71
|
|
69
72
|
payload = @version.create('POST', @uri, data: data)
|
@@ -256,8 +259,10 @@ module Twilio
|
|
256
259
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
257
260
|
# Caller ID data on your phone. See {CNAM
|
258
261
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
262
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
263
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
259
264
|
# @return [TrunkInstance] Updated TrunkInstance
|
260
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
265
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
261
266
|
data = Twilio::Values.of({
|
262
267
|
'FriendlyName' => friendly_name,
|
263
268
|
'DomainName' => domain_name,
|
@@ -266,6 +271,7 @@ module Twilio
|
|
266
271
|
'TransferMode' => transfer_mode,
|
267
272
|
'Secure' => secure,
|
268
273
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
274
|
+
'TransferCallerId' => transfer_caller_id,
|
269
275
|
})
|
270
276
|
|
271
277
|
payload = @version.update('POST', @uri, data: data)
|
@@ -389,6 +395,7 @@ module Twilio
|
|
389
395
|
'secure' => payload['secure'],
|
390
396
|
'recording' => payload['recording'],
|
391
397
|
'transfer_mode' => payload['transfer_mode'],
|
398
|
+
'transfer_caller_id' => payload['transfer_caller_id'],
|
392
399
|
'cnam_lookup_enabled' => payload['cnam_lookup_enabled'],
|
393
400
|
'auth_type' => payload['auth_type'],
|
394
401
|
'auth_type_set' => payload['auth_type_set'],
|
@@ -463,6 +470,12 @@ module Twilio
|
|
463
470
|
@properties['transfer_mode']
|
464
471
|
end
|
465
472
|
|
473
|
+
##
|
474
|
+
# @return [trunk.TransferCallerId] Caller Id for transfer target
|
475
|
+
def transfer_caller_id
|
476
|
+
@properties['transfer_caller_id']
|
477
|
+
end
|
478
|
+
|
466
479
|
##
|
467
480
|
# @return [Boolean] Whether Caller ID Name (CNAM) lookup is enabled for the trunk
|
468
481
|
def cnam_lookup_enabled
|
@@ -556,8 +569,10 @@ module Twilio
|
|
556
569
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
557
570
|
# Caller ID data on your phone. See {CNAM
|
558
571
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
572
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
573
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
559
574
|
# @return [TrunkInstance] Updated TrunkInstance
|
560
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
575
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
561
576
|
context.update(
|
562
577
|
friendly_name: friendly_name,
|
563
578
|
domain_name: domain_name,
|
@@ -566,6 +581,7 @@ module Twilio
|
|
566
581
|
transfer_mode: transfer_mode,
|
567
582
|
secure: secure,
|
568
583
|
cnam_lookup_enabled: cnam_lookup_enabled,
|
584
|
+
transfer_caller_id: transfer_caller_id,
|
569
585
|
)
|
570
586
|
end
|
571
587
|
|
@@ -17,8 +17,7 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the AccessTokenList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] service_sid The unique
|
21
|
-
# Service resource.
|
20
|
+
# @param [String] service_sid The unique SID identifier of the Verify Service.
|
22
21
|
# @return [AccessTokenList] AccessTokenList
|
23
22
|
def initialize(version, service_sid: nil)
|
24
23
|
super(version)
|
@@ -35,9 +34,18 @@ module Twilio
|
|
35
34
|
# external system, such as your user's UUID, GUID, or SID.
|
36
35
|
# @param [access_token.FactorTypes] factor_type The Type of this Factor. Eg.
|
37
36
|
# `push`
|
37
|
+
# @param [String] factor_friendly_name The friendly name of the factor that is
|
38
|
+
# going to be created with this access token
|
39
|
+
# @param [String] ttl How long, in seconds, the access token is valid. Can be an
|
40
|
+
# integer between 60 and 300. Default is 60.
|
38
41
|
# @return [AccessTokenInstance] Created AccessTokenInstance
|
39
|
-
def create(identity: nil, factor_type: nil)
|
40
|
-
data = Twilio::Values.of({
|
42
|
+
def create(identity: nil, factor_type: nil, factor_friendly_name: :unset, ttl: :unset)
|
43
|
+
data = Twilio::Values.of({
|
44
|
+
'Identity' => identity,
|
45
|
+
'FactorType' => factor_type,
|
46
|
+
'FactorFriendlyName' => factor_friendly_name,
|
47
|
+
'Ttl' => ttl,
|
48
|
+
})
|
41
49
|
|
42
50
|
payload = @version.create('POST', @uri, data: data)
|
43
51
|
|
@@ -82,6 +90,53 @@ module Twilio
|
|
82
90
|
end
|
83
91
|
end
|
84
92
|
|
93
|
+
##
|
94
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
95
|
+
class AccessTokenContext < InstanceContext
|
96
|
+
##
|
97
|
+
# Initialize the AccessTokenContext
|
98
|
+
# @param [Version] version Version that contains the resource
|
99
|
+
# @param [String] service_sid The unique SID identifier of the Service.
|
100
|
+
# @param [String] sid A 34 character string that uniquely identifies this Access
|
101
|
+
# Token.
|
102
|
+
# @return [AccessTokenContext] AccessTokenContext
|
103
|
+
def initialize(version, service_sid, sid)
|
104
|
+
super(version)
|
105
|
+
|
106
|
+
# Path Solution
|
107
|
+
@solution = {service_sid: service_sid, sid: sid, }
|
108
|
+
@uri = "/Services/#{@solution[:service_sid]}/AccessTokens/#{@solution[:sid]}"
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Fetch the AccessTokenInstance
|
113
|
+
# @return [AccessTokenInstance] Fetched AccessTokenInstance
|
114
|
+
def fetch
|
115
|
+
payload = @version.fetch('GET', @uri)
|
116
|
+
|
117
|
+
AccessTokenInstance.new(
|
118
|
+
@version,
|
119
|
+
payload,
|
120
|
+
service_sid: @solution[:service_sid],
|
121
|
+
sid: @solution[:sid],
|
122
|
+
)
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Provide a user friendly representation
|
127
|
+
def to_s
|
128
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
129
|
+
"#<Twilio.Verify.V2.AccessTokenContext #{context}>"
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Provide a detailed, user friendly representation
|
134
|
+
def inspect
|
135
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
136
|
+
"#<Twilio.Verify.V2.AccessTokenContext #{context}>"
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
85
140
|
##
|
86
141
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
87
142
|
class AccessTokenInstance < InstanceResource
|
@@ -89,14 +144,77 @@ module Twilio
|
|
89
144
|
# Initialize the AccessTokenInstance
|
90
145
|
# @param [Version] version Version that contains the resource
|
91
146
|
# @param [Hash] payload payload that contains response from Twilio
|
92
|
-
# @param [String] service_sid The unique
|
93
|
-
#
|
147
|
+
# @param [String] service_sid The unique SID identifier of the Verify Service.
|
148
|
+
# @param [String] sid A 34 character string that uniquely identifies this Access
|
149
|
+
# Token.
|
94
150
|
# @return [AccessTokenInstance] AccessTokenInstance
|
95
|
-
def initialize(version, payload, service_sid: nil)
|
151
|
+
def initialize(version, payload, service_sid: nil, sid: nil)
|
96
152
|
super(version)
|
97
153
|
|
98
154
|
# Marshaled Properties
|
99
|
-
@properties = {
|
155
|
+
@properties = {
|
156
|
+
'sid' => payload['sid'],
|
157
|
+
'account_sid' => payload['account_sid'],
|
158
|
+
'service_sid' => payload['service_sid'],
|
159
|
+
'entity_identity' => payload['entity_identity'],
|
160
|
+
'factor_type' => payload['factor_type'],
|
161
|
+
'factor_friendly_name' => payload['factor_friendly_name'],
|
162
|
+
'token' => payload['token'],
|
163
|
+
'url' => payload['url'],
|
164
|
+
'ttl' => payload['ttl'].to_i,
|
165
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
166
|
+
}
|
167
|
+
|
168
|
+
# Context
|
169
|
+
@instance_context = nil
|
170
|
+
@params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], }
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Generate an instance context for the instance, the context is capable of
|
175
|
+
# performing various actions. All instance actions are proxied to the context
|
176
|
+
# @return [AccessTokenContext] AccessTokenContext for this AccessTokenInstance
|
177
|
+
def context
|
178
|
+
unless @instance_context
|
179
|
+
@instance_context = AccessTokenContext.new(@version, @params['service_sid'], @params['sid'], )
|
180
|
+
end
|
181
|
+
@instance_context
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [String] A string that uniquely identifies this Access Token.
|
186
|
+
def sid
|
187
|
+
@properties['sid']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [String] Account Sid.
|
192
|
+
def account_sid
|
193
|
+
@properties['account_sid']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] Verify Service Sid.
|
198
|
+
def service_sid
|
199
|
+
@properties['service_sid']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [String] Unique external identifier of the Entity
|
204
|
+
def entity_identity
|
205
|
+
@properties['entity_identity']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [access_token.FactorTypes] The Type of the Factor
|
210
|
+
def factor_type
|
211
|
+
@properties['factor_type']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [String] A human readable description of this factor.
|
216
|
+
def factor_friendly_name
|
217
|
+
@properties['factor_friendly_name']
|
100
218
|
end
|
101
219
|
|
102
220
|
##
|
@@ -105,16 +223,43 @@ module Twilio
|
|
105
223
|
@properties['token']
|
106
224
|
end
|
107
225
|
|
226
|
+
##
|
227
|
+
# @return [String] The URL of this resource.
|
228
|
+
def url
|
229
|
+
@properties['url']
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# @return [String] How long, in seconds, the access token is valid.
|
234
|
+
def ttl
|
235
|
+
@properties['ttl']
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# @return [Time] The date this access token was created
|
240
|
+
def date_created
|
241
|
+
@properties['date_created']
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# Fetch the AccessTokenInstance
|
246
|
+
# @return [AccessTokenInstance] Fetched AccessTokenInstance
|
247
|
+
def fetch
|
248
|
+
context.fetch
|
249
|
+
end
|
250
|
+
|
108
251
|
##
|
109
252
|
# Provide a user friendly representation
|
110
253
|
def to_s
|
111
|
-
"
|
254
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
255
|
+
"<Twilio.Verify.V2.AccessTokenInstance #{values}>"
|
112
256
|
end
|
113
257
|
|
114
258
|
##
|
115
259
|
# Provide a detailed, user friendly representation
|
116
260
|
def inspect
|
117
|
-
"
|
261
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
262
|
+
"<Twilio.Verify.V2.AccessTokenInstance #{values}>"
|
118
263
|
end
|
119
264
|
end
|
120
265
|
end
|
@@ -21,7 +21,9 @@ module Twilio
|
|
21
21
|
# @param [Version] version Version that contains the resource
|
22
22
|
# @param [String] service_sid The unique SID identifier of the Service.
|
23
23
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
24
|
-
# Challenge. This
|
24
|
+
# Challenge. This identifier should be immutable, not PII, length between 8 and 64
|
25
|
+
# characters, and generated by your external system, such as your user's UUID,
|
26
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
25
27
|
# @param [String] challenge_sid The unique SID identifier of the Challenge.
|
26
28
|
# @return [NotificationList] NotificationList
|
27
29
|
def initialize(version, service_sid: nil, identity: nil, challenge_sid: nil)
|
@@ -34,11 +36,10 @@ module Twilio
|
|
34
36
|
|
35
37
|
##
|
36
38
|
# Create the NotificationInstance
|
37
|
-
# @param [String] ttl How long, in seconds, the
|
38
|
-
#
|
39
|
-
# the
|
40
|
-
#
|
41
|
-
# Defaults to 300 seconds.
|
39
|
+
# @param [String] ttl How long, in seconds, the notification is valid. Can be an
|
40
|
+
# integer between 0 and 300. Default is 300. Delivery is attempted until the TTL
|
41
|
+
# elapses, even if the device is offline. 0 means that the notification delivery
|
42
|
+
# is attempted immediately, only once, and is not stored for future delivery.
|
42
43
|
# @return [NotificationInstance] Created NotificationInstance
|
43
44
|
def create(ttl: :unset)
|
44
45
|
data = Twilio::Values.of({'Ttl' => ttl, })
|
@@ -107,7 +108,9 @@ module Twilio
|
|
107
108
|
# @param [Hash] payload payload that contains response from Twilio
|
108
109
|
# @param [String] service_sid The unique SID identifier of the Service.
|
109
110
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
110
|
-
# Challenge. This
|
111
|
+
# Challenge. This identifier should be immutable, not PII, length between 8 and 64
|
112
|
+
# characters, and generated by your external system, such as your user's UUID,
|
113
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
111
114
|
# @param [String] challenge_sid The unique SID identifier of the Challenge.
|
112
115
|
# @return [NotificationInstance] NotificationInstance
|
113
116
|
def initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil)
|
@@ -164,13 +167,13 @@ module Twilio
|
|
164
167
|
end
|
165
168
|
|
166
169
|
##
|
167
|
-
# @return [String] The priority of the
|
170
|
+
# @return [String] The priority of the notification.
|
168
171
|
def priority
|
169
172
|
@properties['priority']
|
170
173
|
end
|
171
174
|
|
172
175
|
##
|
173
|
-
# @return [String] How long, in seconds, the
|
176
|
+
# @return [String] How long, in seconds, the notification is valid.
|
174
177
|
def ttl
|
175
178
|
@properties['ttl']
|
176
179
|
end
|