twilio-ruby 5.74.0 → 5.74.2
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 +4 -4
- data/CHANGES.md +30 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +16 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +16 -1
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +229 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +288 -0
- data/lib/twilio-ruby/rest/flex_api/v1/{good_data.rb → insights_session.rb} +28 -28
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/flex_api/v1/{user_roles.rb → insights_user_roles.rb} +28 -28
- data/lib/twilio-ruby/rest/flex_api/v1.rb +64 -18
- data/lib/twilio-ruby/rest/flex_api.rb +43 -15
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +151 -1
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +4 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +10 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +83 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +10 -6
@@ -30,7 +30,10 @@ module Twilio
|
|
30
30
|
# @param [String] sim The `sid` or `unique_name` of the {Super
|
31
31
|
# SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
|
32
32
|
# Command to.
|
33
|
-
# @param [String] payload The
|
33
|
+
# @param [String] payload The data that will be sent to the device. The payload
|
34
|
+
# cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is
|
35
|
+
# encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in
|
36
|
+
# Base64.
|
34
37
|
# @param [String] device_port The device port to which the IP Command will be
|
35
38
|
# sent.
|
36
39
|
# @param [ip_command.PayloadType] payload_type Indicates how the payload is
|
@@ -34,7 +34,7 @@ module Twilio
|
|
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. One of:
|
36
36
|
# {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp`, `call`,
|
37
|
-
# or `
|
37
|
+
# `sna` or `auto`.
|
38
38
|
# @param [String] custom_friendly_name A custom user defined friendly name that
|
39
39
|
# overwrites the existing one in the verification message
|
40
40
|
# @param [String] custom_message The text of a custom message to use for the
|
@@ -44,9 +44,11 @@ module Twilio
|
|
44
44
|
# Voice documentation of
|
45
45
|
# {sendDigits}[https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits].
|
46
46
|
# @param [String] locale Locale will automatically resolve based on phone number
|
47
|
-
# country code for SMS, WhatsApp and call channel verifications.
|
48
|
-
#
|
49
|
-
#
|
47
|
+
# country code for SMS, WhatsApp, and call channel verifications. It will fallback
|
48
|
+
# to English or the template’s default translation if the selected translation is
|
49
|
+
# not available. This parameter will override the automatic locale resolution.
|
50
|
+
# {See supported languages and more information
|
51
|
+
# here}[https://www.twilio.com/docs/verify/supported-languages].
|
50
52
|
# @param [String] custom_code A pre-generated code to use for verification. The
|
51
53
|
# code can be between 4 and 10 characters, inclusive.
|
52
54
|
# @param [String] amount The amount of the associated PSD2 compliant transaction.
|
@@ -72,8 +74,10 @@ module Twilio
|
|
72
74
|
# @param [String] template_custom_substitutions A stringified JSON object in which
|
73
75
|
# the keys are the template's special variables and the values are the variables
|
74
76
|
# substitutions.
|
77
|
+
# @param [String] device_ip The IP address of the client's device. If provided, it
|
78
|
+
# has to be a valid IPv4 or IPv6 address.
|
75
79
|
# @return [VerificationInstance] Created VerificationInstance
|
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)
|
80
|
+
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, device_ip: :unset)
|
77
81
|
data = Twilio::Values.of({
|
78
82
|
'To' => to,
|
79
83
|
'Channel' => channel,
|
@@ -89,6 +93,7 @@ module Twilio
|
|
89
93
|
'AppHash' => app_hash,
|
90
94
|
'TemplateSid' => template_sid,
|
91
95
|
'TemplateCustomSubstitutions' => template_custom_substitutions,
|
96
|
+
'DeviceIp' => device_ip,
|
92
97
|
})
|
93
98
|
|
94
99
|
payload = @version.create('POST', @uri, data: data)
|
@@ -114,7 +114,10 @@ module Twilio
|
|
114
114
|
# Create a new <Hangup> element
|
115
115
|
# keyword_args:: additional attributes
|
116
116
|
def hangup(**keyword_args)
|
117
|
-
|
117
|
+
hangup = Hangup.new(**keyword_args)
|
118
|
+
|
119
|
+
yield(hangup) if block_given?
|
120
|
+
append(hangup)
|
118
121
|
end
|
119
122
|
|
120
123
|
##
|
@@ -187,7 +190,10 @@ module Twilio
|
|
187
190
|
# reason:: Rejection reason
|
188
191
|
# keyword_args:: additional attributes
|
189
192
|
def reject(reason: nil, **keyword_args)
|
190
|
-
|
193
|
+
reject = Reject.new(reason: reason, **keyword_args)
|
194
|
+
|
195
|
+
yield(reject) if block_given?
|
196
|
+
append(reject)
|
191
197
|
end
|
192
198
|
|
193
199
|
##
|
@@ -1366,6 +1372,15 @@ module Twilio
|
|
1366
1372
|
|
1367
1373
|
yield(self) if block_given?
|
1368
1374
|
end
|
1375
|
+
|
1376
|
+
##
|
1377
|
+
# Create a new <Parameter> element
|
1378
|
+
# name:: The name of the custom parameter
|
1379
|
+
# value:: The value of the custom parameter
|
1380
|
+
# keyword_args:: additional attributes
|
1381
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
1382
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
1383
|
+
end
|
1369
1384
|
end
|
1370
1385
|
|
1371
1386
|
##
|
@@ -1421,6 +1436,15 @@ module Twilio
|
|
1421
1436
|
|
1422
1437
|
yield(self) if block_given?
|
1423
1438
|
end
|
1439
|
+
|
1440
|
+
##
|
1441
|
+
# Create a new <Parameter> element
|
1442
|
+
# name:: The name of the custom parameter
|
1443
|
+
# value:: The value of the custom parameter
|
1444
|
+
# keyword_args:: additional attributes
|
1445
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
1446
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
1447
|
+
end
|
1424
1448
|
end
|
1425
1449
|
|
1426
1450
|
##
|
@@ -1626,6 +1650,63 @@ module Twilio
|
|
1626
1650
|
def sip(sip_url, username: nil, password: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args)
|
1627
1651
|
append(Sip.new(sip_url, username: username, password: password, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, machine_detection: machine_detection, amd_status_callback_method: amd_status_callback_method, amd_status_callback: amd_status_callback, machine_detection_timeout: machine_detection_timeout, machine_detection_speech_threshold: machine_detection_speech_threshold, machine_detection_speech_end_threshold: machine_detection_speech_end_threshold, machine_detection_silence_timeout: machine_detection_silence_timeout, **keyword_args))
|
1628
1652
|
end
|
1653
|
+
|
1654
|
+
##
|
1655
|
+
# Create a new <Application> element
|
1656
|
+
# application_sid:: Application sid
|
1657
|
+
# url:: TwiML URL
|
1658
|
+
# method:: TwiML URL Method
|
1659
|
+
# status_callback_event:: Events to trigger status callback
|
1660
|
+
# status_callback:: Status Callback URL
|
1661
|
+
# status_callback_method:: Status Callback URL Method
|
1662
|
+
# customer_id:: Identity of the customer calling application
|
1663
|
+
# copy_parent_to:: Copy parent call To field to called application side, otherwise use the application sid as To field
|
1664
|
+
# keyword_args:: additional attributes
|
1665
|
+
def application(application_sid: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, customer_id: nil, copy_parent_to: nil, **keyword_args)
|
1666
|
+
application = Application.new(application_sid: application_sid, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, customer_id: customer_id, copy_parent_to: copy_parent_to, **keyword_args)
|
1667
|
+
|
1668
|
+
yield(application) if block_given?
|
1669
|
+
append(application)
|
1670
|
+
end
|
1671
|
+
end
|
1672
|
+
|
1673
|
+
##
|
1674
|
+
# <Application> TwiML Noun
|
1675
|
+
class Application < TwiML
|
1676
|
+
def initialize(application_sid: nil, **keyword_args)
|
1677
|
+
super(**keyword_args)
|
1678
|
+
@name = 'Application'
|
1679
|
+
@value = application_sid unless application_sid.nil?
|
1680
|
+
yield(self) if block_given?
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
##
|
1684
|
+
# Create a new <ApplicationSid> element
|
1685
|
+
# sid:: Application sid to dial
|
1686
|
+
# keyword_args:: additional attributes
|
1687
|
+
def application_sid(sid, **keyword_args)
|
1688
|
+
append(ApplicationSid.new(sid, **keyword_args))
|
1689
|
+
end
|
1690
|
+
|
1691
|
+
##
|
1692
|
+
# Create a new <Parameter> element
|
1693
|
+
# name:: The name of the custom parameter
|
1694
|
+
# value:: The value of the custom parameter
|
1695
|
+
# keyword_args:: additional attributes
|
1696
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
1697
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
1698
|
+
end
|
1699
|
+
end
|
1700
|
+
|
1701
|
+
##
|
1702
|
+
# <ApplicationSid> TwiML Noun
|
1703
|
+
class ApplicationSid < TwiML
|
1704
|
+
def initialize(sid, **keyword_args)
|
1705
|
+
super(**keyword_args)
|
1706
|
+
@name = 'ApplicationSid'
|
1707
|
+
@value = sid
|
1708
|
+
yield(self) if block_given?
|
1709
|
+
end
|
1629
1710
|
end
|
1630
1711
|
|
1631
1712
|
##
|
data/lib/twilio-ruby/version.rb
CHANGED
data/twilio-ruby.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.extra_rdoc_files = ['README.md', 'LICENSE']
|
25
25
|
spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'twilio-ruby', '--main', 'README.md']
|
26
26
|
|
27
|
-
spec.add_dependency('jwt', '>= 1.5', '<= 2.
|
27
|
+
spec.add_dependency('jwt', '>= 1.5', '<= 2.6')
|
28
28
|
spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
|
29
29
|
spec.add_dependency('faraday', '>= 0.9', '< 3.0')
|
30
30
|
# Workaround for RBX <= 2.2.1, should be fixed in next version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.74.
|
4
|
+
version: 5.74.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '1.5'
|
20
20
|
- - "<="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '2.
|
22
|
+
version: '2.6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '1.5'
|
30
30
|
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '2.
|
32
|
+
version: '2.6'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: nokogiri
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -430,12 +430,16 @@ files:
|
|
430
430
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
431
431
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
432
432
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
433
|
-
- lib/twilio-ruby/rest/flex_api/v1/
|
433
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb
|
434
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb
|
435
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_session.rb
|
436
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb
|
437
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb
|
438
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb
|
434
439
|
- lib/twilio-ruby/rest/flex_api/v1/interaction.rb
|
435
440
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
|
436
441
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
|
437
442
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
|
438
|
-
- lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
|
439
443
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
440
444
|
- lib/twilio-ruby/rest/flex_api/v2.rb
|
441
445
|
- lib/twilio-ruby/rest/flex_api/v2/web_channels.rb
|