twilio-ruby 5.58.0 → 5.59.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +90 -0
- data/README.md +3 -3
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +44 -38
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -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 +59 -14
- 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/taskrouter/v1/workspace/task/reservation.rb +7 -3
- 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.rb +30 -20
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -11
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
- data/lib/twilio-ruby/rest/verify.rb +6 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -3
@@ -322,8 +322,9 @@ module Twilio
|
|
322
322
|
# when the customer leaves.
|
323
323
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
324
324
|
# when the customer joins.
|
325
|
+
# @param [String] if_match The If-Match HTTP request header
|
325
326
|
# @return [ReservationInstance] Updated ReservationInstance
|
326
|
-
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)
|
327
|
+
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, if_match: :unset)
|
327
328
|
data = Twilio::Values.of({
|
328
329
|
'ReservationStatus' => reservation_status,
|
329
330
|
'WorkerActivitySid' => worker_activity_sid,
|
@@ -377,8 +378,9 @@ module Twilio
|
|
377
378
|
'EndConferenceOnCustomerExit' => end_conference_on_customer_exit,
|
378
379
|
'BeepOnCustomerEntrance' => beep_on_customer_entrance,
|
379
380
|
})
|
381
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
380
382
|
|
381
|
-
payload = @version.update('POST', @uri, data: data)
|
383
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
382
384
|
|
383
385
|
ReservationInstance.new(
|
384
386
|
@version,
|
@@ -660,8 +662,9 @@ module Twilio
|
|
660
662
|
# when the customer leaves.
|
661
663
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
662
664
|
# when the customer joins.
|
665
|
+
# @param [String] if_match The If-Match HTTP request header
|
663
666
|
# @return [ReservationInstance] Updated ReservationInstance
|
664
|
-
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)
|
667
|
+
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, if_match: :unset)
|
665
668
|
context.update(
|
666
669
|
reservation_status: reservation_status,
|
667
670
|
worker_activity_sid: worker_activity_sid,
|
@@ -714,6 +717,7 @@ module Twilio
|
|
714
717
|
post_work_activity_sid: post_work_activity_sid,
|
715
718
|
end_conference_on_customer_exit: end_conference_on_customer_exit,
|
716
719
|
beep_on_customer_entrance: beep_on_customer_entrance,
|
720
|
+
if_match: if_match,
|
717
721
|
)
|
718
722
|
end
|
719
723
|
|
@@ -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
|
##
|
@@ -124,12 +124,14 @@ module Twilio
|
|
124
124
|
# worker.activity.update`, then TaskRouter will call event_callback_url only when
|
125
125
|
# a task is created, canceled, or a Worker activity is updated.
|
126
126
|
# @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
|
-
#
|
127
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
128
|
+
# workspaces should be created as multi-tasking. The default is `true`.
|
129
|
+
# Multi-tasking allows Workers to handle multiple Tasks simultaneously. When
|
130
|
+
# enabled (`true`), each Worker can receive parallel reservations up to the
|
131
|
+
# per-channel maximums defined in the Workers section. In single-tasking mode
|
132
|
+
# (legacy mode), each Worker will only receive a new reservation when the previous
|
133
|
+
# task is completed. Learn more at
|
134
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
133
135
|
# @param [String] template An available template name. Can be: `NONE` or `FIFO`
|
134
136
|
# and the default is `NONE`. Pre-configures the Workspace with the Workflow and
|
135
137
|
# Activities specified in the template. `NONE` will create a Workspace with only a
|
@@ -243,17 +245,21 @@ module Twilio
|
|
243
245
|
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
|
244
246
|
# Team`.
|
245
247
|
# @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
|
-
#
|
248
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
249
|
+
# workspaces should be maintained as multi-tasking. There is no default when
|
250
|
+
# omitting this parameter. A multi-tasking Workspace can't be updated to
|
251
|
+
# single-tasking unless it is not a Flex Project and another (legacy)
|
252
|
+
# single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
|
253
|
+
# Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
|
254
|
+
# reservations up to the per-channel maximums defined in the Workers section. In
|
255
|
+
# single-tasking mode (legacy mode), each Worker will only receive a new
|
256
|
+
# reservation when the previous task is completed. Learn more at
|
257
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
252
258
|
# @param [String] timeout_activity_sid The SID of the Activity that will be
|
253
259
|
# assigned to a Worker when a Task reservation times out without a response.
|
254
260
|
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
|
255
261
|
# prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
|
256
|
-
# be: `LIFO` or `FIFO
|
262
|
+
# be: `LIFO` or `FIFO`. For more information, see {Queue
|
257
263
|
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
|
258
264
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
259
265
|
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)
|
@@ -602,17 +608,21 @@ module Twilio
|
|
602
608
|
# the Workspace resource. For example: `Sales Call Center` or `Customer Support
|
603
609
|
# Team`.
|
604
610
|
# @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
|
-
#
|
611
|
+
# `true` to enable multi-tasking, or `false` to disable it. However, all
|
612
|
+
# workspaces should be maintained as multi-tasking. There is no default when
|
613
|
+
# omitting this parameter. A multi-tasking Workspace can't be updated to
|
614
|
+
# single-tasking unless it is not a Flex Project and another (legacy)
|
615
|
+
# single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple
|
616
|
+
# Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel
|
617
|
+
# reservations up to the per-channel maximums defined in the Workers section. In
|
618
|
+
# single-tasking mode (legacy mode), each Worker will only receive a new
|
619
|
+
# reservation when the previous task is completed. Learn more at
|
620
|
+
# {Multitasking}[https://www.twilio.com/docs/taskrouter/multitasking].
|
611
621
|
# @param [String] timeout_activity_sid The SID of the Activity that will be
|
612
622
|
# assigned to a Worker when a Task reservation times out without a response.
|
613
623
|
# @param [workspace.QueueOrder] prioritize_queue_order The type of TaskQueue to
|
614
624
|
# prioritize when Workers are receiving Tasks from both types of TaskQueues. Can
|
615
|
-
# be: `LIFO` or `FIFO
|
625
|
+
# be: `LIFO` or `FIFO`. For more information, see {Queue
|
616
626
|
# Ordering}[https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
|
617
627
|
# @return [WorkspaceInstance] Updated WorkspaceInstance
|
618
628
|
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
|
|
@@ -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)
|
@@ -106,7 +108,9 @@ module Twilio
|
|
106
108
|
# @param [Hash] payload payload that contains response from Twilio
|
107
109
|
# @param [String] service_sid The unique SID identifier of the Service.
|
108
110
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
109
|
-
# 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.
|
110
114
|
# @param [String] challenge_sid The unique SID identifier of the Challenge.
|
111
115
|
# @return [NotificationInstance] NotificationInstance
|
112
116
|
def initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil)
|
@@ -20,7 +20,9 @@ module Twilio
|
|
20
20
|
# @param [Version] version Version that contains the resource
|
21
21
|
# @param [String] service_sid The unique SID identifier of the Service.
|
22
22
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
23
|
-
# Challenge. This
|
23
|
+
# Challenge. This identifier should be immutable, not PII, length between 8 and 64
|
24
|
+
# characters, and generated by your external system, such as your user's UUID,
|
25
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
24
26
|
# @return [ChallengeList] ChallengeList
|
25
27
|
def initialize(version, service_sid: nil, identity: nil)
|
26
28
|
super(version)
|
@@ -81,6 +83,9 @@ module Twilio
|
|
81
83
|
# @param [String] factor_sid The unique SID identifier of the Factor.
|
82
84
|
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
83
85
|
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
86
|
+
# @param [challenge.ListOrders] order The desired sort order of the Challenges
|
87
|
+
# list. One of `asc` or `desc` for ascending and descending respectively. Defaults
|
88
|
+
# to `asc`.
|
84
89
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
85
90
|
# guarantees to never return more than limit. Default is no limit
|
86
91
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -88,8 +93,14 @@ module Twilio
|
|
88
93
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
89
94
|
# efficient page size, i.e. min(limit, 1000)
|
90
95
|
# @return [Array] Array of up to limit results
|
91
|
-
def list(factor_sid: :unset, status: :unset, limit: nil, page_size: nil)
|
92
|
-
self.stream(
|
96
|
+
def list(factor_sid: :unset, status: :unset, order: :unset, limit: nil, page_size: nil)
|
97
|
+
self.stream(
|
98
|
+
factor_sid: factor_sid,
|
99
|
+
status: status,
|
100
|
+
order: order,
|
101
|
+
limit: limit,
|
102
|
+
page_size: page_size
|
103
|
+
).entries
|
93
104
|
end
|
94
105
|
|
95
106
|
##
|
@@ -99,6 +110,9 @@ module Twilio
|
|
99
110
|
# @param [String] factor_sid The unique SID identifier of the Factor.
|
100
111
|
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
101
112
|
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
113
|
+
# @param [challenge.ListOrders] order The desired sort order of the Challenges
|
114
|
+
# list. One of `asc` or `desc` for ascending and descending respectively. Defaults
|
115
|
+
# to `asc`.
|
102
116
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
103
117
|
# guarantees to never return more than limit. Default is no limit.
|
104
118
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -106,10 +120,15 @@ module Twilio
|
|
106
120
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
107
121
|
# efficient page size, i.e. min(limit, 1000)
|
108
122
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
109
|
-
def stream(factor_sid: :unset, status: :unset, limit: nil, page_size: nil)
|
123
|
+
def stream(factor_sid: :unset, status: :unset, order: :unset, limit: nil, page_size: nil)
|
110
124
|
limits = @version.read_limits(limit, page_size)
|
111
125
|
|
112
|
-
page = self.page(
|
126
|
+
page = self.page(
|
127
|
+
factor_sid: factor_sid,
|
128
|
+
status: status,
|
129
|
+
order: order,
|
130
|
+
page_size: limits[:page_size],
|
131
|
+
)
|
113
132
|
|
114
133
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
115
134
|
end
|
@@ -134,14 +153,18 @@ module Twilio
|
|
134
153
|
# @param [String] factor_sid The unique SID identifier of the Factor.
|
135
154
|
# @param [challenge.ChallengeStatuses] status The Status of the Challenges to
|
136
155
|
# fetch. One of `pending`, `expired`, `approved` or `denied`.
|
156
|
+
# @param [challenge.ListOrders] order The desired sort order of the Challenges
|
157
|
+
# list. One of `asc` or `desc` for ascending and descending respectively. Defaults
|
158
|
+
# to `asc`.
|
137
159
|
# @param [String] page_token PageToken provided by the API
|
138
160
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
139
161
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
140
162
|
# @return [Page] Page of ChallengeInstance
|
141
|
-
def page(factor_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
163
|
+
def page(factor_sid: :unset, status: :unset, order: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
142
164
|
params = Twilio::Values.of({
|
143
165
|
'FactorSid' => factor_sid,
|
144
166
|
'Status' => status,
|
167
|
+
'Order' => order,
|
145
168
|
'PageToken' => page_token,
|
146
169
|
'Page' => page_number,
|
147
170
|
'PageSize' => page_size,
|
@@ -215,10 +238,10 @@ module Twilio
|
|
215
238
|
# Initialize the ChallengeContext
|
216
239
|
# @param [Version] version Version that contains the resource
|
217
240
|
# @param [String] service_sid The unique SID identifier of the Service.
|
218
|
-
# @param [String] identity
|
219
|
-
#
|
220
|
-
# external system, such as your user's UUID,
|
221
|
-
#
|
241
|
+
# @param [String] identity Customer unique identity for the Entity owner of the
|
242
|
+
# Challenges. This identifier should be immutable, not PII, length between 8 and
|
243
|
+
# 64 characters, and generated by your external system, such as your user's UUID,
|
244
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
222
245
|
# @param [String] sid A 34 character string that uniquely identifies this
|
223
246
|
# Challenge.
|
224
247
|
# @return [ChallengeContext] ChallengeContext
|
@@ -310,7 +333,9 @@ module Twilio
|
|
310
333
|
# @param [Hash] payload payload that contains response from Twilio
|
311
334
|
# @param [String] service_sid The unique SID identifier of the Service.
|
312
335
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
313
|
-
# Challenge. This
|
336
|
+
# Challenge. This identifier should be immutable, not PII, length between 8 and 64
|
337
|
+
# characters, and generated by your external system, such as your user's UUID,
|
338
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
314
339
|
# @param [String] sid A 34 character string that uniquely identifies this
|
315
340
|
# Challenge.
|
316
341
|
# @return [ChallengeInstance] ChallengeInstance
|
@@ -19,10 +19,10 @@ module Twilio
|
|
19
19
|
# Initialize the FactorList
|
20
20
|
# @param [Version] version Version that contains the resource
|
21
21
|
# @param [String] service_sid The unique SID identifier of the Service.
|
22
|
-
# @param [String] identity
|
23
|
-
#
|
24
|
-
# external system, such as your user's UUID,
|
25
|
-
#
|
22
|
+
# @param [String] identity Customer unique identity for the Entity owner of the
|
23
|
+
# Factor. This identifier should be immutable, not PII, length between 8 and 64
|
24
|
+
# characters, and generated by your external system, such as your user's UUID,
|
25
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
26
26
|
# @return [FactorList] FactorList
|
27
27
|
def initialize(version, service_sid: nil, identity: nil)
|
28
28
|
super(version)
|
@@ -163,7 +163,9 @@ module Twilio
|
|
163
163
|
# @param [Version] version Version that contains the resource
|
164
164
|
# @param [String] service_sid The unique SID identifier of the Service.
|
165
165
|
# @param [String] identity Customer unique identity for the Entity owner of the
|
166
|
-
# Factor. This
|
166
|
+
# Factor. This identifier should be immutable, not PII, length between 8 and 64
|
167
|
+
# characters, and generated by your external system, such as your user's UUID,
|
168
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
167
169
|
# @param [String] sid A 34 character string that uniquely identifies this Factor.
|
168
170
|
# @return [FactorContext] FactorContext
|
169
171
|
def initialize(version, service_sid, identity, sid)
|
@@ -264,10 +266,10 @@ module Twilio
|
|
264
266
|
# @param [Version] version Version that contains the resource
|
265
267
|
# @param [Hash] payload payload that contains response from Twilio
|
266
268
|
# @param [String] service_sid The unique SID identifier of the Service.
|
267
|
-
# @param [String] identity
|
268
|
-
#
|
269
|
-
# external system, such as your user's UUID,
|
270
|
-
#
|
269
|
+
# @param [String] identity Customer unique identity for the Entity owner of the
|
270
|
+
# Factor. This identifier should be immutable, not PII, length between 8 and 64
|
271
|
+
# characters, and generated by your external system, such as your user's UUID,
|
272
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
271
273
|
# @param [String] sid A 34 character string that uniquely identifies this Factor.
|
272
274
|
# @return [FactorInstance] FactorInstance
|
273
275
|
def initialize(version, payload, service_sid: nil, identity: nil, sid: nil)
|
@@ -19,10 +19,10 @@ module Twilio
|
|
19
19
|
# Initialize the NewFactorList
|
20
20
|
# @param [Version] version Version that contains the resource
|
21
21
|
# @param [String] service_sid The unique SID identifier of the Service.
|
22
|
-
# @param [String] identity
|
23
|
-
#
|
24
|
-
# external system, such as your user's UUID,
|
25
|
-
#
|
22
|
+
# @param [String] identity Customer unique identity for the Entity owner of the
|
23
|
+
# Factor. This identifier should be immutable, not PII, length between 8 and 64
|
24
|
+
# characters, and generated by your external system, such as your user's UUID,
|
25
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
26
26
|
# @return [NewFactorList] NewFactorList
|
27
27
|
def initialize(version, service_sid: nil, identity: nil)
|
28
28
|
super(version)
|
@@ -175,10 +175,10 @@ module Twilio
|
|
175
175
|
# @param [Version] version Version that contains the resource
|
176
176
|
# @param [Hash] payload payload that contains response from Twilio
|
177
177
|
# @param [String] service_sid The unique SID identifier of the Service.
|
178
|
-
# @param [String] identity
|
179
|
-
#
|
180
|
-
# external system, such as your user's UUID,
|
181
|
-
#
|
178
|
+
# @param [String] identity Customer unique identity for the Entity owner of the
|
179
|
+
# Factor. This identifier should be immutable, not PII, length between 8 and 64
|
180
|
+
# characters, and generated by your external system, such as your user's UUID,
|
181
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
182
182
|
# @return [NewFactorInstance] NewFactorInstance
|
183
183
|
def initialize(version, payload, service_sid: nil, identity: nil)
|
184
184
|
super(version)
|
@@ -32,7 +32,7 @@ module Twilio
|
|
32
32
|
# @param [String] identity The unique external identifier for the Entity of the
|
33
33
|
# Service. This identifier should be immutable, not PII, length between 8 and 64
|
34
34
|
# characters, and generated by your external system, such as your user's UUID,
|
35
|
-
# GUID, or SID.
|
35
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
36
36
|
# @return [EntityInstance] Created EntityInstance
|
37
37
|
def create(identity: nil)
|
38
38
|
data = Twilio::Values.of({'Identity' => identity, })
|
@@ -168,7 +168,9 @@ module Twilio
|
|
168
168
|
# @param [Version] version Version that contains the resource
|
169
169
|
# @param [String] service_sid The unique SID identifier of the Service.
|
170
170
|
# @param [String] identity The unique external identifier for the Entity of the
|
171
|
-
# Service
|
171
|
+
# Service. This identifier should be immutable, not PII, length between 8 and 64
|
172
|
+
# characters, and generated by your external system, such as your user's UUID,
|
173
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
172
174
|
# @return [EntityContext] EntityContext
|
173
175
|
def initialize(version, service_sid, identity)
|
174
176
|
super(version)
|
@@ -288,7 +290,9 @@ module Twilio
|
|
288
290
|
# @param [Hash] payload payload that contains response from Twilio
|
289
291
|
# @param [String] service_sid The unique SID identifier of the Service.
|
290
292
|
# @param [String] identity The unique external identifier for the Entity of the
|
291
|
-
# Service
|
293
|
+
# Service. This identifier should be immutable, not PII, length between 8 and 64
|
294
|
+
# characters, and generated by your external system, such as your user's UUID,
|
295
|
+
# GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
|
292
296
|
# @return [EntityInstance] EntityInstance
|
293
297
|
def initialize(version, payload, service_sid: nil, identity: nil)
|
294
298
|
super(version)
|
@@ -33,7 +33,8 @@ module Twilio
|
|
33
33
|
# {email}[https://www.twilio.com/docs/verify/email] to verify. Phone numbers must
|
34
34
|
# be in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
35
35
|
# @param [String] channel The verification method to use. Can be:
|
36
|
-
# {`email`}[https://www.twilio.com/docs/verify/email], `sms` or
|
36
|
+
# {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp` or
|
37
|
+
# `call`.
|
37
38
|
# @param [String] custom_friendly_name A custom user defined friendly name that
|
38
39
|
# overwrites the existing one in the verification message
|
39
40
|
# @param [String] custom_message The text of a custom message to use for the
|
@@ -42,10 +43,11 @@ module Twilio
|
|
42
43
|
# for example, to dial an extension. For more information, see the Programmable
|
43
44
|
# Voice documentation of
|
44
45
|
# {sendDigits}[https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits].
|
45
|
-
# @param [String] locale The locale to use for the verification SMS or
|
46
|
-
# be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`,
|
47
|
-
# `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`,
|
48
|
-
# `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or
|
46
|
+
# @param [String] locale The locale to use for the verification SMS, WhatsApp or
|
47
|
+
# call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`,
|
48
|
+
# `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`,
|
49
|
+
# `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or
|
50
|
+
# `zh-HK.`
|
49
51
|
# @param [String] custom_code A pre-generated code to use for verification. The
|
50
52
|
# code can be between 4 and 10 characters, inclusive.
|
51
53
|
# @param [String] amount The amount of the associated PSD2 compliant transaction.
|
@@ -64,9 +66,8 @@ module Twilio
|
|
64
66
|
# Hash}[https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string]
|
65
67
|
# to be appended at the end of your verification SMS body. Applies only to SMS.
|
66
68
|
# Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
|
67
|
-
# @param [String] template_sid The SID of the custom template to be used.
|
68
69
|
# @return [VerificationInstance] Created VerificationInstance
|
69
|
-
def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset
|
70
|
+
def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset)
|
70
71
|
data = Twilio::Values.of({
|
71
72
|
'To' => to,
|
72
73
|
'Channel' => channel,
|
@@ -80,7 +81,6 @@ module Twilio
|
|
80
81
|
'RateLimits' => Twilio.serialize_object(rate_limits),
|
81
82
|
'ChannelConfiguration' => Twilio.serialize_object(channel_configuration),
|
82
83
|
'AppHash' => app_hash,
|
83
|
-
'TemplateSid' => template_sid,
|
84
84
|
})
|
85
85
|
|
86
86
|
payload = @version.create('POST', @uri, data: data)
|