twilio-ruby 7.6.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c84f48a652b0a72ebf4e7b6654813a215f94ed7
4
- data.tar.gz: '04808d5c430749e3a35f0b5098b250a0fab1d476'
3
+ metadata.gz: 9801d32feca1e5815f61daea7c635f2015bdffc7
4
+ data.tar.gz: b8f56c410606ddf5046b82cec5e6458e6aad04c0
5
5
  SHA512:
6
- metadata.gz: 3e9e6004baa7bb7d91fbec42f3dfbe73d1bf094d5c7452cdc64e078a4510ee2909da7778209b37061b8331455ddd058604cdefb062394256ecd8d3ebb15bfa3c
7
- data.tar.gz: 11bb382b74ad1a2327aacfe4f1a061e8bce8056f0bb6c0b8cc425fb3d8769ec6db7c1cf258289ae8186c8113bf76a224bb4d81b95221c6bf64c3cc5d78f72bd7
6
+ metadata.gz: b6403cb1a081c5fa6c65159825ca31a13020794471fa67065fd8e4d6c56e193d45cfd9cba92734c950c8d0c87352102bda8ce5b4dcb08da11c999bbd04918842
7
+ data.tar.gz: 2f022baa0ddbda5ad073ecbec9a218e00dda29f0140c578b432e4db463b6ba153ce066075e8cf81b9a95bc21e606e1f9488f4d4b848ba9225e9e4d55a7c4f109
@@ -17,7 +17,7 @@ jobs:
17
17
  timeout-minutes: 20
18
18
  strategy:
19
19
  matrix:
20
- ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head', 'jruby-9.3', 'jruby-9.4' ]
20
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ]
21
21
  steps:
22
22
  - name: Checkout twilio-ruby
23
23
  uses: actions/checkout@v3
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  - name: Run linter
42
42
  run: bundle exec rubocop -d --cache true --parallel
43
- if: ${{ matrix.ruby != '2.4' }}
43
+ if: ${{ matrix.ruby != '2.4'}}
44
44
 
45
45
  - name: Run Unit Tests
46
46
  run: make test
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-05-13] Version 7.6.1
5
+ --------------------------
6
+ **Accounts**
7
+ - Changes to add date_of_consent param in Bulk Consent API
8
+
9
+ **Api**
10
+ - Change `friendly_name`, `date_created` and `date_updated` properties to type `string`.
11
+
12
+ **Twiml**
13
+ - Update twiml definition for `<ConversationRelay>` and `<Assistant>`
14
+
15
+
4
16
  [2025-05-05] Version 7.6.0
5
17
  --------------------------
6
18
  **Library - Chore**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.6.0'
42
+ gem 'twilio-ruby', '~> 7.6.1'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.6.0
48
+ gem install twilio-ruby -v 7.6.1
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
  ##
34
34
  # Create the BulkConsentsInstance
35
- # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
35
+ # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]; `date_of_consent`, an optional datetime string field in ISO-8601 format that captures the exact date and time when the user gave or revoked consent. If not provided, it will be empty.
36
36
  # @return [BulkConsentsInstance] Created BulkConsentsInstance
37
37
  def create(
38
38
  items: nil
@@ -181,8 +181,8 @@ module Twilio
181
181
  'voice_fallback_method' => payload['voice_fallback_method'],
182
182
  'voice_fallback_url' => payload['voice_fallback_url'],
183
183
  'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
184
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
185
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
184
+ 'date_created' => payload['date_created'],
185
+ 'date_updated' => payload['date_updated'],
186
186
  'sms_fallback_method' => payload['sms_fallback_method'],
187
187
  'sms_fallback_url' => payload['sms_fallback_url'],
188
188
  'sms_method' => payload['sms_method'],
@@ -257,13 +257,13 @@ module Twilio
257
257
  end
258
258
 
259
259
  ##
260
- # @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
260
+ # @return [String] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
261
261
  def date_created
262
262
  @properties['date_created']
263
263
  end
264
264
 
265
265
  ##
266
- # @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
266
+ # @return [String] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
267
267
  def date_updated
268
268
  @properties['date_updated']
269
269
  end
@@ -299,7 +299,7 @@ module Twilio
299
299
  end
300
300
 
301
301
  ##
302
- # @return [Hash] The set of Boolean properties that indicates whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`.
302
+ # @return [ApiV2010AccountAddressDependentPhoneNumberCapabilities]
303
303
  def capabilities
304
304
  @properties['capabilities']
305
305
  end
@@ -48,7 +48,7 @@ module Twilio
48
48
  # @param [String] speech_model Recognition model used by the transcription engine, among those supported by the provider
49
49
  # @param [String] hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
50
50
  # @param [Boolean] enable_automatic_punctuation The provider will add punctuation to recognition result
51
- # @param [String] intelligence_service The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
51
+ # @param [String] intelligence_service The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
52
52
  # @return [TranscriptionInstance] Created TranscriptionInstance
53
53
  def create(
54
54
  name: :unset,
@@ -41,13 +41,15 @@ module Twilio
41
41
  # @param [url]: [String]
42
42
  # @param [phone]: [String]
43
43
  # @param [code]: [String]
44
- attr_accessor :type, :title, :url, :phone, :code
44
+ # @param [id]: [String]
45
+ attr_accessor :type, :title, :url, :phone, :code, :id
45
46
  def initialize(payload)
46
47
  @type = payload["type"]
47
48
  @title = payload["title"]
48
49
  @url = payload["url"]
49
50
  @phone = payload["phone"]
50
51
  @code = payload["code"]
52
+ @id = payload["id"]
51
53
  end
52
54
  def to_json(options = {})
53
55
  {
@@ -56,6 +58,7 @@ module Twilio
56
58
  "url": @url,
57
59
  "phone": @phone,
58
60
  "code": @code,
61
+ "id": @id,
59
62
  }.to_json(options)
60
63
  end
61
64
  end
@@ -397,17 +400,23 @@ module Twilio
397
400
  # @param [latitude]: [Float]
398
401
  # @param [longitude]: [Float]
399
402
  # @param [label]: [String]
400
- attr_accessor :latitude, :longitude, :label
403
+ # @param [id]: [String]
404
+ # @param [address]: [String]
405
+ attr_accessor :latitude, :longitude, :label, :id, :address
401
406
  def initialize(payload)
402
407
  @latitude = payload["latitude"]
403
408
  @longitude = payload["longitude"]
404
409
  @label = payload["label"]
410
+ @id = payload["id"]
411
+ @address = payload["address"]
405
412
  end
406
413
  def to_json(options = {})
407
414
  {
408
415
  "latitude": @latitude,
409
416
  "longitude": @longitude,
410
417
  "label": @label,
418
+ "id": @id,
419
+ "address": @address,
411
420
  }.to_json(options)
412
421
  end
413
422
  end
@@ -35,20 +35,17 @@ module Twilio
35
35
  # @param [String] description A human readable description for the Subscription **This value should not contain PII.**
36
36
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
37
37
  # @param [Array[Hash]] types An array of objects containing the subscribed Event Types
38
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
39
38
  # @return [SubscriptionInstance] Created SubscriptionInstance
40
39
  def create(
41
40
  description: nil,
42
41
  sink_sid: nil,
43
- types: nil,
44
- receive_events_from_subaccounts: :unset
42
+ types: nil
45
43
  )
46
44
 
47
45
  data = Twilio::Values.of({
48
46
  'Description' => description,
49
47
  'SinkSid' => sink_sid,
50
48
  'Types' => Twilio.serialize_list(types) { |e| Twilio.serialize_object(e) },
51
- 'ReceiveEventsFromSubaccounts' => receive_events_from_subaccounts,
52
49
  })
53
50
 
54
51
  headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
@@ -218,18 +215,15 @@ module Twilio
218
215
  # Update the SubscriptionInstance
219
216
  # @param [String] description A human readable description for the Subscription.
220
217
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
221
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
222
218
  # @return [SubscriptionInstance] Updated SubscriptionInstance
223
219
  def update(
224
220
  description: :unset,
225
- sink_sid: :unset,
226
- receive_events_from_subaccounts: :unset
221
+ sink_sid: :unset
227
222
  )
228
223
 
229
224
  data = Twilio::Values.of({
230
225
  'Description' => description,
231
226
  'SinkSid' => sink_sid,
232
- 'ReceiveEventsFromSubaccounts' => receive_events_from_subaccounts,
233
227
  })
234
228
 
235
229
  headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
@@ -332,7 +326,6 @@ module Twilio
332
326
  'sink_sid' => payload['sink_sid'],
333
327
  'url' => payload['url'],
334
328
  'links' => payload['links'],
335
- 'receive_events_from_subaccounts' => payload['receive_events_from_subaccounts'],
336
329
  }
337
330
 
338
331
  # Context
@@ -399,12 +392,6 @@ module Twilio
399
392
  @properties['links']
400
393
  end
401
394
 
402
- ##
403
- # @return [Boolean] Receive events from all children accounts in the parent account subscription.
404
- def receive_events_from_subaccounts
405
- @properties['receive_events_from_subaccounts']
406
- end
407
-
408
395
  ##
409
396
  # Delete the SubscriptionInstance
410
397
  # @return [Boolean] True if delete succeeds, false otherwise
@@ -425,18 +412,15 @@ module Twilio
425
412
  # Update the SubscriptionInstance
426
413
  # @param [String] description A human readable description for the Subscription.
427
414
  # @param [String] sink_sid The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
428
- # @param [Boolean] receive_events_from_subaccounts Receive events from all children accounts in the parent account subscription.
429
415
  # @return [SubscriptionInstance] Updated SubscriptionInstance
430
416
  def update(
431
417
  description: :unset,
432
- sink_sid: :unset,
433
- receive_events_from_subaccounts: :unset
418
+ sink_sid: :unset
434
419
  )
435
420
 
436
421
  context.update(
437
422
  description: description,
438
423
  sink_sid: sink_sid,
439
- receive_events_from_subaccounts: receive_events_from_subaccounts,
440
424
  )
441
425
  end
442
426
 
@@ -194,7 +194,7 @@ module Twilio
194
194
  end
195
195
 
196
196
  ##
197
- # @return [Float] Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.
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
@@ -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
- # interruptible:: Whether caller's speaking can interrupt the play of text-to-speech
1982
- # interrupt_by_dtmf:: Whether DTMF tone can interrupt the play of text-to-speech
1983
- # welcome_greeting_interruptible:: Whether caller's speaking can interrupt the welcome greeting
1984
- # debug:: Whether debugging on the session is enabled
1985
- # keyword_args:: additional attributes
1986
- 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, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args)
1987
- 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, interruptible: interruptible, interrupt_by_dtmf: interrupt_by_dtmf, welcome_greeting_interruptible: welcome_greeting_interruptible, debug: debug, **keyword_args)
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
- # interruptible:: Whether caller's speaking can interrupt the play of text-to-speech
2008
- # interrupt_by_dtmf:: Whether DTMF tone can interrupt the play of text-to-speech
2009
- # welcome_greeting_interruptible:: Whether caller's speaking can interrupt the welcome greeting
2010
- # debug:: Whether debugging on the session is enabled
2011
- # keyword_args:: additional attributes
2012
- 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, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args)
2013
- 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, interruptible: interruptible, interrupt_by_dtmf: interrupt_by_dtmf, welcome_greeting_interruptible: welcome_greeting_interruptible, debug: debug, **keyword_args)
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)
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.6.0'
2
+ VERSION = '7.6.1'
3
3
  end
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.6.0
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-05-05 00:00:00.000000000 Z
11
+ date: 2025-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt