twilio-ruby 5.58.3 → 5.61.1
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/deploy.yml +65 -0
- data/.github/workflows/test.yml +51 -0
- data/.gitignore +3 -1
- data/CHANGES.md +99 -0
- data/Makefile +3 -4
- data/README.md +4 -4
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +30 -4
- 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/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -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 +390 -0
- data/lib/twilio-ruby/rest/media/v1.rb +60 -0
- data/lib/twilio-ruby/rest/media.rb +56 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +353 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
- 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 +40 -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 +8 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
- data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
- data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
- data/lib/twilio-ruby/rest/verify.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
- 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/twiml/voice_response.rb +613 -36
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +16 -5
- data/.travis.yml +0 -56
@@ -119,6 +119,8 @@ 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
|
@@ -235,7 +237,9 @@ module Twilio
|
|
235
237
|
# when new Workers are created in the Workspace.
|
236
238
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
237
239
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
238
|
-
# 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].
|
239
243
|
# @param [String] events_filter The list of Workspace events for which to call
|
240
244
|
# event_callback_url. For example if
|
241
245
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -598,7 +602,9 @@ module Twilio
|
|
598
602
|
# when new Workers are created in the Workspace.
|
599
603
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
600
604
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
601
|
-
# 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].
|
602
608
|
# @param [String] events_filter The list of Workspace events for which to call
|
603
609
|
# event_callback_url. For example if
|
604
610
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -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
|
|
@@ -204,8 +204,8 @@ module Twilio
|
|
204
204
|
# for the first time. E.g. for a TOTP, the numeric code.
|
205
205
|
# @param [String] friendly_name The new friendly name of this Factor. It can be up
|
206
206
|
# to 64 characters.
|
207
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
208
|
-
# registration token. It used to send the push notifications. Required when
|
207
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
208
|
+
# the registration token. It is used to send the push notifications. Required when
|
209
209
|
# `factor_type` is `push`. If specified, this value must be between 32 and 255
|
210
210
|
# characters long.
|
211
211
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -219,8 +219,12 @@ module Twilio
|
|
219
219
|
# Must be between 3 and 8, inclusive
|
220
220
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
221
221
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
222
|
+
# @param [String] config_notification_platform The transport technology used to
|
223
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
224
|
+
#
|
225
|
+
# Required when `factor_type` is `push`.
|
222
226
|
# @return [FactorInstance] Updated FactorInstance
|
223
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
227
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
224
228
|
data = Twilio::Values.of({
|
225
229
|
'AuthPayload' => auth_payload,
|
226
230
|
'FriendlyName' => friendly_name,
|
@@ -230,6 +234,7 @@ module Twilio
|
|
230
234
|
'Config.Skew' => config_skew,
|
231
235
|
'Config.CodeLength' => config_code_length,
|
232
236
|
'Config.Alg' => config_alg,
|
237
|
+
'Config.NotificationPlatform' => config_notification_platform,
|
233
238
|
})
|
234
239
|
|
235
240
|
payload = @version.update('POST', @uri, data: data)
|
@@ -404,8 +409,8 @@ module Twilio
|
|
404
409
|
# for the first time. E.g. for a TOTP, the numeric code.
|
405
410
|
# @param [String] friendly_name The new friendly name of this Factor. It can be up
|
406
411
|
# to 64 characters.
|
407
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
408
|
-
# registration token. It used to send the push notifications. Required when
|
412
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
413
|
+
# the registration token. It is used to send the push notifications. Required when
|
409
414
|
# `factor_type` is `push`. If specified, this value must be between 32 and 255
|
410
415
|
# characters long.
|
411
416
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -419,8 +424,12 @@ module Twilio
|
|
419
424
|
# Must be between 3 and 8, inclusive
|
420
425
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
421
426
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
427
|
+
# @param [String] config_notification_platform The transport technology used to
|
428
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
429
|
+
#
|
430
|
+
# Required when `factor_type` is `push`.
|
422
431
|
# @return [FactorInstance] Updated FactorInstance
|
423
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
432
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
424
433
|
context.update(
|
425
434
|
auth_payload: auth_payload,
|
426
435
|
friendly_name: friendly_name,
|
@@ -430,6 +439,7 @@ module Twilio
|
|
430
439
|
config_skew: config_skew,
|
431
440
|
config_code_length: config_code_length,
|
432
441
|
config_alg: config_alg,
|
442
|
+
config_notification_platform: config_notification_platform,
|
433
443
|
)
|
434
444
|
end
|
435
445
|
|
@@ -56,13 +56,13 @@ module Twilio
|
|
56
56
|
#
|
57
57
|
# Required when `factor_type` is `push`.
|
58
58
|
# @param [new_factor.NotificationPlatforms] config_notification_platform The
|
59
|
-
# transport technology used to generate the Notification Token. Can be `apn
|
60
|
-
# `fcm`.
|
59
|
+
# transport technology used to generate the Notification Token. Can be `apn`,
|
60
|
+
# `fcm` or `none`.
|
61
61
|
#
|
62
62
|
# Required when `factor_type` is `push`.
|
63
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
64
|
-
# registration token. It used to send the push notifications. Must be
|
65
|
-
# and 255 characters long.
|
63
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
64
|
+
# the registration token. It is used to send the push notifications. Must be
|
65
|
+
# between 32 and 255 characters long.
|
66
66
|
#
|
67
67
|
# Required when `factor_type` is `push`.
|
68
68
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -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,8 +66,14 @@ 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`.
|
69
|
+
# @param [String] template_sid The message
|
70
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. If provided, will
|
71
|
+
# override the default template for the Service. SMS channel only.
|
72
|
+
# @param [String] template_custom_substitutions A stringified JSON object in which
|
73
|
+
# the keys are the template's special variables and the values are the variables
|
74
|
+
# substitutions.
|
67
75
|
# @return [VerificationInstance] Created VerificationInstance
|
68
|
-
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)
|
76
|
+
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, template_sid: :unset, template_custom_substitutions: :unset)
|
69
77
|
data = Twilio::Values.of({
|
70
78
|
'To' => to,
|
71
79
|
'Channel' => channel,
|
@@ -79,6 +87,8 @@ module Twilio
|
|
79
87
|
'RateLimits' => Twilio.serialize_object(rate_limits),
|
80
88
|
'ChannelConfiguration' => Twilio.serialize_object(channel_configuration),
|
81
89
|
'AppHash' => app_hash,
|
90
|
+
'TemplateSid' => template_sid,
|
91
|
+
'TemplateCustomSubstitutions' => template_custom_substitutions,
|
82
92
|
})
|
83
93
|
|
84
94
|
payload = @version.create('POST', @uri, data: data)
|
@@ -73,8 +73,11 @@ module Twilio
|
|
73
73
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
74
74
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
75
75
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
76
|
+
# @param [String] default_template_sid The default message
|
77
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
78
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
76
79
|
# @return [ServiceInstance] Created ServiceInstance
|
77
|
-
def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
80
|
+
def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
78
81
|
data = Twilio::Values.of({
|
79
82
|
'FriendlyName' => friendly_name,
|
80
83
|
'CodeLength' => code_length,
|
@@ -92,6 +95,7 @@ module Twilio
|
|
92
95
|
'Totp.TimeStep' => totp_time_step,
|
93
96
|
'Totp.CodeLength' => totp_code_length,
|
94
97
|
'Totp.Skew' => totp_skew,
|
98
|
+
'DefaultTemplateSid' => default_template_sid,
|
95
99
|
})
|
96
100
|
|
97
101
|
payload = @version.create('POST', @uri, data: data)
|
@@ -303,8 +307,11 @@ module Twilio
|
|
303
307
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
304
308
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
305
309
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
310
|
+
# @param [String] default_template_sid The default message
|
311
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
312
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
306
313
|
# @return [ServiceInstance] Updated ServiceInstance
|
307
|
-
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
314
|
+
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
308
315
|
data = Twilio::Values.of({
|
309
316
|
'FriendlyName' => friendly_name,
|
310
317
|
'CodeLength' => code_length,
|
@@ -322,6 +329,7 @@ module Twilio
|
|
322
329
|
'Totp.TimeStep' => totp_time_step,
|
323
330
|
'Totp.CodeLength' => totp_code_length,
|
324
331
|
'Totp.Skew' => totp_skew,
|
332
|
+
'DefaultTemplateSid' => default_template_sid,
|
325
333
|
})
|
326
334
|
|
327
335
|
payload = @version.update('POST', @uri, data: data)
|
@@ -484,6 +492,7 @@ module Twilio
|
|
484
492
|
'custom_code_enabled' => payload['custom_code_enabled'],
|
485
493
|
'push' => payload['push'],
|
486
494
|
'totp' => payload['totp'],
|
495
|
+
'default_template_sid' => payload['default_template_sid'],
|
487
496
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
488
497
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
489
498
|
'url' => payload['url'],
|
@@ -584,6 +593,12 @@ module Twilio
|
|
584
593
|
@properties['totp']
|
585
594
|
end
|
586
595
|
|
596
|
+
##
|
597
|
+
# @return [String] The default_template_sid
|
598
|
+
def default_template_sid
|
599
|
+
@properties['default_template_sid']
|
600
|
+
end
|
601
|
+
|
587
602
|
##
|
588
603
|
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
589
604
|
def date_created
|
@@ -670,8 +685,11 @@ module Twilio
|
|
670
685
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
671
686
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
672
687
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
688
|
+
# @param [String] default_template_sid The default message
|
689
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
690
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
673
691
|
# @return [ServiceInstance] Updated ServiceInstance
|
674
|
-
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
692
|
+
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
675
693
|
context.update(
|
676
694
|
friendly_name: friendly_name,
|
677
695
|
code_length: code_length,
|
@@ -689,6 +707,7 @@ module Twilio
|
|
689
707
|
totp_time_step: totp_time_step,
|
690
708
|
totp_code_length: totp_code_length,
|
691
709
|
totp_skew: totp_skew,
|
710
|
+
default_template_sid: default_template_sid,
|
692
711
|
)
|
693
712
|
end
|
694
713
|
|
@@ -10,11 +10,11 @@ module Twilio
|
|
10
10
|
module REST
|
11
11
|
class Verify < Domain
|
12
12
|
class V2 < Version
|
13
|
-
class
|
13
|
+
class TemplateList < ListResource
|
14
14
|
##
|
15
|
-
# Initialize the
|
15
|
+
# Initialize the TemplateList
|
16
16
|
# @param [Version] version Version that contains the resource
|
17
|
-
# @return [
|
17
|
+
# @return [TemplateList] TemplateList
|
18
18
|
def initialize(version)
|
19
19
|
super(version)
|
20
20
|
|
@@ -24,7 +24,7 @@ module Twilio
|
|
24
24
|
end
|
25
25
|
|
26
26
|
##
|
27
|
-
# Lists
|
27
|
+
# Lists TemplateInstance records from the API as a list.
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
30
|
# @param [String] friendly_name String filter used to query templates with a given
|
@@ -41,7 +41,7 @@ module Twilio
|
|
41
41
|
end
|
42
42
|
|
43
43
|
##
|
44
|
-
# Streams
|
44
|
+
# Streams TemplateInstance records from the API as an Enumerable.
|
45
45
|
# This operation lazily loads records as efficiently as possible until the limit
|
46
46
|
# is reached.
|
47
47
|
# @param [String] friendly_name String filter used to query templates with a given
|
@@ -62,7 +62,7 @@ module Twilio
|
|
62
62
|
end
|
63
63
|
|
64
64
|
##
|
65
|
-
# When passed a block, yields
|
65
|
+
# When passed a block, yields TemplateInstance records from the API.
|
66
66
|
# This operation lazily loads records as efficiently as possible until the limit
|
67
67
|
# is reached.
|
68
68
|
def each
|
@@ -76,14 +76,14 @@ module Twilio
|
|
76
76
|
end
|
77
77
|
|
78
78
|
##
|
79
|
-
# Retrieve a single page of
|
79
|
+
# Retrieve a single page of TemplateInstance records from the API.
|
80
80
|
# Request is executed immediately.
|
81
81
|
# @param [String] friendly_name String filter used to query templates with a given
|
82
82
|
# friendly name
|
83
83
|
# @param [String] page_token PageToken provided by the API
|
84
84
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
85
85
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
86
|
-
# @return [Page] Page of
|
86
|
+
# @return [Page] Page of TemplateInstance
|
87
87
|
def page(friendly_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
88
88
|
params = Twilio::Values.of({
|
89
89
|
'FriendlyName' => friendly_name,
|
@@ -94,36 +94,36 @@ module Twilio
|
|
94
94
|
|
95
95
|
response = @version.page('GET', @uri, params: params)
|
96
96
|
|
97
|
-
|
97
|
+
TemplatePage.new(@version, response, @solution)
|
98
98
|
end
|
99
99
|
|
100
100
|
##
|
101
|
-
# Retrieve a single page of
|
101
|
+
# Retrieve a single page of TemplateInstance records from the API.
|
102
102
|
# Request is executed immediately.
|
103
103
|
# @param [String] target_url API-generated URL for the requested results page
|
104
|
-
# @return [Page] Page of
|
104
|
+
# @return [Page] Page of TemplateInstance
|
105
105
|
def get_page(target_url)
|
106
106
|
response = @version.domain.request(
|
107
107
|
'GET',
|
108
108
|
target_url
|
109
109
|
)
|
110
|
-
|
110
|
+
TemplatePage.new(@version, response, @solution)
|
111
111
|
end
|
112
112
|
|
113
113
|
##
|
114
114
|
# Provide a user friendly representation
|
115
115
|
def to_s
|
116
|
-
'#<Twilio.Verify.V2.
|
116
|
+
'#<Twilio.Verify.V2.TemplateList>'
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
class
|
120
|
+
class TemplatePage < Page
|
121
121
|
##
|
122
|
-
# Initialize the
|
122
|
+
# Initialize the TemplatePage
|
123
123
|
# @param [Version] version Version that contains the resource
|
124
124
|
# @param [Response] response Response from the API
|
125
125
|
# @param [Hash] solution Path solution for the resource
|
126
|
-
# @return [
|
126
|
+
# @return [TemplatePage] TemplatePage
|
127
127
|
def initialize(version, response, solution)
|
128
128
|
super(version, response)
|
129
129
|
|
@@ -132,26 +132,26 @@ module Twilio
|
|
132
132
|
end
|
133
133
|
|
134
134
|
##
|
135
|
-
# Build an instance of
|
135
|
+
# Build an instance of TemplateInstance
|
136
136
|
# @param [Hash] payload Payload response from the API
|
137
|
-
# @return [
|
137
|
+
# @return [TemplateInstance] TemplateInstance
|
138
138
|
def get_instance(payload)
|
139
|
-
|
139
|
+
TemplateInstance.new(@version, payload, )
|
140
140
|
end
|
141
141
|
|
142
142
|
##
|
143
143
|
# Provide a user friendly representation
|
144
144
|
def to_s
|
145
|
-
'<Twilio.Verify.V2.
|
145
|
+
'<Twilio.Verify.V2.TemplatePage>'
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
class
|
149
|
+
class TemplateInstance < InstanceResource
|
150
150
|
##
|
151
|
-
# Initialize the
|
151
|
+
# Initialize the TemplateInstance
|
152
152
|
# @param [Version] version Version that contains the resource
|
153
153
|
# @param [Hash] payload payload that contains response from Twilio
|
154
|
-
# @return [
|
154
|
+
# @return [TemplateInstance] TemplateInstance
|
155
155
|
def initialize(version, payload)
|
156
156
|
super(version)
|
157
157
|
|
@@ -191,13 +191,13 @@ module Twilio
|
|
191
191
|
##
|
192
192
|
# Provide a user friendly representation
|
193
193
|
def to_s
|
194
|
-
"<Twilio.Verify.V2.
|
194
|
+
"<Twilio.Verify.V2.TemplateInstance>"
|
195
195
|
end
|
196
196
|
|
197
197
|
##
|
198
198
|
# Provide a detailed, user friendly representation
|
199
199
|
def inspect
|
200
|
-
"<Twilio.Verify.V2.
|
200
|
+
"<Twilio.Verify.V2.TemplateInstance>"
|
201
201
|
end
|
202
202
|
end
|
203
203
|
end
|
@@ -18,7 +18,7 @@ module Twilio
|
|
18
18
|
@forms = nil
|
19
19
|
@services = nil
|
20
20
|
@verification_attempts = nil
|
21
|
-
@
|
21
|
+
@templates = nil
|
22
22
|
end
|
23
23
|
|
24
24
|
##
|
@@ -69,9 +69,9 @@ module Twilio
|
|
69
69
|
end
|
70
70
|
|
71
71
|
##
|
72
|
-
# @return [Twilio::REST::Verify::V2::
|
73
|
-
def
|
74
|
-
@
|
72
|
+
# @return [Twilio::REST::Verify::V2::TemplateContext]
|
73
|
+
def templates
|
74
|
+
@templates ||= TemplateList.new self
|
75
75
|
end
|
76
76
|
|
77
77
|
##
|
@@ -56,9 +56,9 @@ module Twilio
|
|
56
56
|
end
|
57
57
|
|
58
58
|
##
|
59
|
-
# @return [Twilio::REST::Verify::V2::
|
60
|
-
def
|
61
|
-
self.v2.
|
59
|
+
# @return [Twilio::REST::Verify::V2::TemplateInstance]
|
60
|
+
def templates
|
61
|
+
self.v2.templates()
|
62
62
|
end
|
63
63
|
|
64
64
|
##
|
@@ -57,8 +57,11 @@ module Twilio
|
|
57
57
|
# ***This feature is not available in `peer-to-peer` rooms.***
|
58
58
|
# @param [Hash] recording_rules A collection of Recording Rules that describe how
|
59
59
|
# to include or exclude matching tracks for recording
|
60
|
+
# @param [Boolean] audio_only When set to true, indicates that the participants in
|
61
|
+
# the room will only publish audio. No video tracks will be allowed. Group rooms
|
62
|
+
# only.
|
60
63
|
# @return [RoomInstance] Created RoomInstance
|
61
|
-
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset)
|
64
|
+
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset)
|
62
65
|
data = Twilio::Values.of({
|
63
66
|
'EnableTurn' => enable_turn,
|
64
67
|
'Type' => type,
|
@@ -70,6 +73,7 @@ module Twilio
|
|
70
73
|
'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e },
|
71
74
|
'MediaRegion' => media_region,
|
72
75
|
'RecordingRules' => Twilio.serialize_object(recording_rules),
|
76
|
+
'AudioOnly' => audio_only,
|
73
77
|
})
|
74
78
|
|
75
79
|
payload = @version.create('POST', @uri, data: data)
|
@@ -364,6 +368,7 @@ module Twilio
|
|
364
368
|
'record_participants_on_connect' => payload['record_participants_on_connect'],
|
365
369
|
'video_codecs' => payload['video_codecs'],
|
366
370
|
'media_region' => payload['media_region'],
|
371
|
+
'audio_only' => payload['audio_only'],
|
367
372
|
'url' => payload['url'],
|
368
373
|
'links' => payload['links'],
|
369
374
|
}
|
@@ -486,6 +491,12 @@ module Twilio
|
|
486
491
|
@properties['media_region']
|
487
492
|
end
|
488
493
|
|
494
|
+
##
|
495
|
+
# @return [Boolean] Indicates whether the room will only contain audio track participants for group rooms.
|
496
|
+
def audio_only
|
497
|
+
@properties['audio_only']
|
498
|
+
end
|
499
|
+
|
489
500
|
##
|
490
501
|
# @return [String] The absolute URL of the resource
|
491
502
|
def url
|
@@ -123,13 +123,13 @@ module Twilio
|
|
123
123
|
# models}[https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans].
|
124
124
|
# @param [Boolean] messaging_enabled Whether SIMs can make, send, and receive SMS
|
125
125
|
# using {Commands}[https://www.twilio.com/docs/wireless/api/command-resource].
|
126
|
-
# @param [Boolean] voice_enabled
|
126
|
+
# @param [Boolean] voice_enabled Deprecated.
|
127
127
|
# @param [Boolean] national_roaming_enabled Whether SIMs can roam on networks
|
128
128
|
# other than the home network (T-Mobile USA) in the United States. See {national
|
129
129
|
# roaming}[https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming].
|
130
130
|
# @param [Array[String]] international_roaming The list of services that SIMs
|
131
131
|
# capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United
|
132
|
-
# States. Can
|
132
|
+
# States. Can contain: `data` and `messaging`.
|
133
133
|
# @param [String] national_roaming_data_limit The total data usage (download and
|
134
134
|
# upload combined) in Megabytes that the Network allows during one month on
|
135
135
|
# non-home networks in the United States. The metering period begins the day of
|
@@ -353,7 +353,7 @@ module Twilio
|
|
353
353
|
end
|
354
354
|
|
355
355
|
##
|
356
|
-
# @return [Boolean] Whether SIMs can make and receive voice calls
|
356
|
+
# @return [Boolean] Deprecated. Whether SIMs can make and receive voice calls
|
357
357
|
def voice_enabled
|
358
358
|
@properties['voice_enabled']
|
359
359
|
end
|