twilio-ruby 7.5.2 → 7.6.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 +4 -4
- data/.github/workflows/test-and-deploy.yml +2 -2
- data/CHANGES.md +33 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +3 -3
- data/lib/twilio-ruby/rest/content/v1/content.rb +11 -2
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -19
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +50 -1
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +556 -0
- data/lib/twilio-ruby/rest/messaging/v2.rb +49 -0
- data/lib/twilio-ruby/rest/messaging_base.rb +6 -1
- data/lib/twilio-ruby/rest/numbers/v1/{webhook.rb → porting_webhook_configuration_fetch.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room.rb +6 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +24 -14
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +0 -2
- metadata +5 -31
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Numbers < NumbersBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class PortingWebhookConfigurationFetchList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the PortingWebhookConfigurationFetchList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [PortingWebhookConfigurationFetchList] PortingWebhookConfigurationFetchList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,8 +31,8 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Fetch the
|
35
|
-
# @return [
|
34
|
+
# Fetch the PortingWebhookConfigurationFetchInstance
|
35
|
+
# @return [PortingWebhookConfigurationFetchInstance] Fetched PortingWebhookConfigurationFetchInstance
|
36
36
|
def fetch
|
37
37
|
|
38
38
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
|
43
43
|
|
44
44
|
payload = @version.fetch('GET', @uri, headers: headers)
|
45
|
-
|
45
|
+
PortingWebhookConfigurationFetchInstance.new(
|
46
46
|
@version,
|
47
47
|
payload,
|
48
48
|
)
|
@@ -53,17 +53,17 @@ module Twilio
|
|
53
53
|
|
54
54
|
# Provide a user friendly representation
|
55
55
|
def to_s
|
56
|
-
'#<Twilio.Numbers.V1.
|
56
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>'
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
class
|
60
|
+
class PortingWebhookConfigurationFetchPage < Page
|
61
61
|
##
|
62
|
-
# Initialize the
|
62
|
+
# Initialize the PortingWebhookConfigurationFetchPage
|
63
63
|
# @param [Version] version Version that contains the resource
|
64
64
|
# @param [Response] response Response from the API
|
65
65
|
# @param [Hash] solution Path solution for the resource
|
66
|
-
# @return [
|
66
|
+
# @return [PortingWebhookConfigurationFetchPage] PortingWebhookConfigurationFetchPage
|
67
67
|
def initialize(version, response, solution)
|
68
68
|
super(version, response)
|
69
69
|
|
@@ -72,29 +72,29 @@ module Twilio
|
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
75
|
-
# Build an instance of
|
75
|
+
# Build an instance of PortingWebhookConfigurationFetchInstance
|
76
76
|
# @param [Hash] payload Payload response from the API
|
77
|
-
# @return [
|
77
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
78
78
|
def get_instance(payload)
|
79
|
-
|
79
|
+
PortingWebhookConfigurationFetchInstance.new(@version, payload)
|
80
80
|
end
|
81
81
|
|
82
82
|
##
|
83
83
|
# Provide a user friendly representation
|
84
84
|
def to_s
|
85
|
-
'<Twilio.Numbers.V1.
|
85
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage>'
|
86
86
|
end
|
87
87
|
end
|
88
|
-
class
|
88
|
+
class PortingWebhookConfigurationFetchInstance < InstanceResource
|
89
89
|
##
|
90
|
-
# Initialize the
|
90
|
+
# Initialize the PortingWebhookConfigurationFetchInstance
|
91
91
|
# @param [Version] version Version that contains the resource
|
92
92
|
# @param [Hash] payload payload that contains response from Twilio
|
93
93
|
# @param [String] account_sid The SID of the
|
94
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
94
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationFetch
|
95
95
|
# resource.
|
96
96
|
# @param [String] sid The SID of the Call resource to fetch.
|
97
|
-
# @return [
|
97
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
98
98
|
def initialize(version, payload )
|
99
99
|
super(version)
|
100
100
|
|
@@ -149,13 +149,13 @@ module Twilio
|
|
149
149
|
##
|
150
150
|
# Provide a user friendly representation
|
151
151
|
def to_s
|
152
|
-
"<Twilio.Numbers.V1.
|
152
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
153
153
|
end
|
154
154
|
|
155
155
|
##
|
156
156
|
# Provide a detailed, user friendly representation
|
157
157
|
def inspect
|
158
|
-
"<Twilio.Numbers.V1.
|
158
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
@@ -28,8 +28,8 @@ module Twilio
|
|
28
28
|
@porting_portabilities = nil
|
29
29
|
@porting_webhook_configurations = nil
|
30
30
|
@porting_webhook_configurations_delete = nil
|
31
|
+
@porting_webhook_configuration_fetch = nil
|
31
32
|
@signing_request_configurations = nil
|
32
|
-
@webhook = nil
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -135,16 +135,16 @@ module Twilio
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
##
|
138
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
139
|
+
def porting_webhook_configuration_fetch
|
140
|
+
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
141
|
+
end
|
142
|
+
##
|
138
143
|
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
139
144
|
def signing_request_configurations
|
140
145
|
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
141
146
|
end
|
142
147
|
##
|
143
|
-
# @return [Twilio::REST::Numbers::V1::WebhookList]
|
144
|
-
def webhook
|
145
|
-
@webhook ||= WebhookList.new self
|
146
|
-
end
|
147
|
-
##
|
148
148
|
# Provide a user friendly representation
|
149
149
|
def to_s
|
150
150
|
'<Twilio::REST::Numbers::V1>';
|
@@ -194,7 +194,7 @@ module Twilio
|
|
194
194
|
end
|
195
195
|
|
196
196
|
##
|
197
|
-
# @return [
|
197
|
+
# @return [String] Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.
|
198
198
|
def conversion_rate_percentage
|
199
199
|
@properties['conversion_rate_percentage']
|
200
200
|
end
|
@@ -39,9 +39,11 @@ module Twilio
|
|
39
39
|
# @param [String] status_callback_method The HTTP method Twilio should use to call `status_callback`. Can be `POST` or `GET`.
|
40
40
|
# @param [String] max_participants The maximum number of concurrent Participants allowed in the room. The maximum allowed value is 50.
|
41
41
|
# @param [Boolean] record_participants_on_connect Whether to start recording when Participants connect.
|
42
|
+
# @param [Boolean] transcribe_participants_on_connect Whether to start transcriptions when Participants connect. If TranscriptionsConfiguration is not provided, default settings will be used.
|
42
43
|
# @param [Array[VideoCodec]] video_codecs An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`.
|
43
44
|
# @param [String] media_region The region for the Room's media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers).
|
44
45
|
# @param [Object] recording_rules A collection of Recording Rules that describe how to include or exclude matching tracks for recording
|
46
|
+
# @param [Object] transcriptions_configuration A collection of properties that describe transcription behaviour. If TranscribeParticipantsOnConnect is set to true and TranscriptionsConfiguration is not provided, default settings will be used.
|
45
47
|
# @param [Boolean] audio_only When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.
|
46
48
|
# @param [String] max_participant_duration The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).
|
47
49
|
# @param [String] empty_room_timeout Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions).
|
@@ -56,9 +58,11 @@ module Twilio
|
|
56
58
|
status_callback_method: :unset,
|
57
59
|
max_participants: :unset,
|
58
60
|
record_participants_on_connect: :unset,
|
61
|
+
transcribe_participants_on_connect: :unset,
|
59
62
|
video_codecs: :unset,
|
60
63
|
media_region: :unset,
|
61
64
|
recording_rules: :unset,
|
65
|
+
transcriptions_configuration: :unset,
|
62
66
|
audio_only: :unset,
|
63
67
|
max_participant_duration: :unset,
|
64
68
|
empty_room_timeout: :unset,
|
@@ -74,9 +78,11 @@ module Twilio
|
|
74
78
|
'StatusCallbackMethod' => status_callback_method,
|
75
79
|
'MaxParticipants' => max_participants,
|
76
80
|
'RecordParticipantsOnConnect' => record_participants_on_connect,
|
81
|
+
'TranscribeParticipantsOnConnect' => transcribe_participants_on_connect,
|
77
82
|
'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e },
|
78
83
|
'MediaRegion' => media_region,
|
79
84
|
'RecordingRules' => Twilio.serialize_object(recording_rules),
|
85
|
+
'TranscriptionsConfiguration' => Twilio.serialize_object(transcriptions_configuration),
|
80
86
|
'AudioOnly' => audio_only,
|
81
87
|
'MaxParticipantDuration' => max_participant_duration,
|
82
88
|
'EmptyRoomTimeout' => empty_room_timeout,
|
@@ -1978,13 +1978,18 @@ module Twilio
|
|
1978
1978
|
# dtmf_detection:: Whether DTMF tones should be detected and reported in speech transcription
|
1979
1979
|
# welcome_greeting:: The sentence to be played automatically when the session is connected
|
1980
1980
|
# partial_prompts:: Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
|
1981
|
-
#
|
1982
|
-
#
|
1983
|
-
#
|
1984
|
-
#
|
1985
|
-
#
|
1986
|
-
|
1987
|
-
|
1981
|
+
# welcome_greeting_interruptible:: "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
|
1982
|
+
# interruptible:: Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
|
1983
|
+
# preemptible:: Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
|
1984
|
+
# hints:: Phrases to help better accuracy in speech recognition of these pharases
|
1985
|
+
# intelligence_service:: The Conversational Intelligence Service id or unique name to be used for the session
|
1986
|
+
# report_input_during_agent_speech:: Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
|
1987
|
+
# elevenlabs_text_normalization:: When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
|
1988
|
+
# interrupt_sensitivity:: Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
|
1989
|
+
# debug:: Multiple debug options to be used for troubleshooting
|
1990
|
+
# keyword_args:: additional attributes
|
1991
|
+
def conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args)
|
1992
|
+
conversation_relay = ConversationRelay.new(url: url, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, welcome_greeting_interruptible: welcome_greeting_interruptible, interruptible: interruptible, preemptible: preemptible, hints: hints, intelligence_service: intelligence_service, report_input_during_agent_speech: report_input_during_agent_speech, elevenlabs_text_normalization: elevenlabs_text_normalization, interrupt_sensitivity: interrupt_sensitivity, debug: debug, **keyword_args)
|
1988
1993
|
|
1989
1994
|
yield(conversation_relay) if block_given?
|
1990
1995
|
append(conversation_relay)
|
@@ -2004,13 +2009,18 @@ module Twilio
|
|
2004
2009
|
# dtmf_detection:: Whether DTMF tones should be detected and reported in speech transcription
|
2005
2010
|
# welcome_greeting:: The sentence to be played automatically when the session is connected
|
2006
2011
|
# partial_prompts:: Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
|
2007
|
-
#
|
2008
|
-
#
|
2009
|
-
#
|
2010
|
-
#
|
2011
|
-
#
|
2012
|
-
|
2013
|
-
|
2012
|
+
# welcome_greeting_interruptible:: "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
|
2013
|
+
# interruptible:: Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
|
2014
|
+
# preemptible:: Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
|
2015
|
+
# hints:: Phrases to help better accuracy in speech recognition of these pharases
|
2016
|
+
# intelligence_service:: The Conversational Intelligence Service id or unique name to be used for the session
|
2017
|
+
# report_input_during_agent_speech:: Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
|
2018
|
+
# elevenlabs_text_normalization:: When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
|
2019
|
+
# interrupt_sensitivity:: Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
|
2020
|
+
# debug:: Multiple debug options to be used for troubleshooting
|
2021
|
+
# keyword_args:: additional attributes
|
2022
|
+
def assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, welcome_greeting_interruptible: nil, interruptible: nil, preemptible: nil, hints: nil, intelligence_service: nil, report_input_during_agent_speech: nil, elevenlabs_text_normalization: nil, interrupt_sensitivity: nil, debug: nil, **keyword_args)
|
2023
|
+
assistant = Assistant.new(id: id, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, welcome_greeting_interruptible: welcome_greeting_interruptible, interruptible: interruptible, preemptible: preemptible, hints: hints, intelligence_service: intelligence_service, report_input_during_agent_speech: report_input_during_agent_speech, elevenlabs_text_normalization: elevenlabs_text_normalization, interrupt_sensitivity: interrupt_sensitivity, debug: debug, **keyword_args)
|
2014
2024
|
|
2015
2025
|
yield(assistant) if block_given?
|
2016
2026
|
append(assistant)
|
data/lib/twilio-ruby/version.rb
CHANGED
data/twilio-ruby.gemspec
CHANGED
@@ -28,8 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency('jwt', '>= 1.5', '< 3.0')
|
29
29
|
spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
|
30
30
|
spec.add_dependency('faraday', '>= 0.9', '< 3.0')
|
31
|
-
spec.add_dependency 'ostruct'
|
32
|
-
spec.add_dependency 'benchmark'
|
33
31
|
# Workaround for RBX <= 2.2.1, should be fixed in next version
|
34
32
|
spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
35
33
|
|
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: 7.
|
4
|
+
version: 7.6.1
|
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: 2025-
|
11
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -70,34 +70,6 @@ dependencies:
|
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '3.0'
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: ostruct
|
75
|
-
requirement: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '0'
|
80
|
-
type: :runtime
|
81
|
-
prerelease: false
|
82
|
-
version_requirements: !ruby/object:Gem::Requirement
|
83
|
-
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: benchmark
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - ">="
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
type: :runtime
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '0'
|
101
73
|
- !ruby/object:Gem::Dependency
|
102
74
|
name: bundler
|
103
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -627,6 +599,8 @@ files:
|
|
627
599
|
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb
|
628
600
|
- lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb
|
629
601
|
- lib/twilio-ruby/rest/messaging/v1/usecase.rb
|
602
|
+
- lib/twilio-ruby/rest/messaging/v2.rb
|
603
|
+
- lib/twilio-ruby/rest/messaging/v2/channels_sender.rb
|
630
604
|
- lib/twilio-ruby/rest/messaging_base.rb
|
631
605
|
- lib/twilio-ruby/rest/microvisor.rb
|
632
606
|
- lib/twilio-ruby/rest/microvisor/v1.rb
|
@@ -659,8 +633,8 @@ files:
|
|
659
633
|
- lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
|
660
634
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb
|
661
635
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb
|
636
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb
|
662
637
|
- lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb
|
663
|
-
- lib/twilio-ruby/rest/numbers/v1/webhook.rb
|
664
638
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
665
639
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
|
666
640
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
|