twilio-ruby 7.2.0 → 7.2.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/CHANGES.md +19 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +901 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -0
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +7 -7
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +24 -7
- data/lib/twilio-ruby/rest/preview_iam.rb +6 -0
- data/lib/twilio-ruby/rest/preview_iam_base.rb +33 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +89 -14
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +5 -2
@@ -327,6 +327,7 @@ module Twilio
|
|
327
327
|
# Dependents
|
328
328
|
@events = nil
|
329
329
|
@user_defined_messages = nil
|
330
|
+
@transcriptions = nil
|
330
331
|
@siprec = nil
|
331
332
|
@user_defined_message_subscriptions = nil
|
332
333
|
@payments = nil
|
@@ -430,6 +431,25 @@ module Twilio
|
|
430
431
|
@user_defined_messages
|
431
432
|
end
|
432
433
|
##
|
434
|
+
# Access the transcriptions
|
435
|
+
# @return [TranscriptionList]
|
436
|
+
# @return [TranscriptionContext] if sid was passed.
|
437
|
+
def transcriptions(sid=:unset)
|
438
|
+
|
439
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
440
|
+
|
441
|
+
if sid != :unset
|
442
|
+
return TranscriptionContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
443
|
+
end
|
444
|
+
|
445
|
+
unless @transcriptions
|
446
|
+
@transcriptions = TranscriptionList.new(
|
447
|
+
@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
|
448
|
+
end
|
449
|
+
|
450
|
+
@transcriptions
|
451
|
+
end
|
452
|
+
##
|
433
453
|
# Access the siprec
|
434
454
|
# @return [SiprecList]
|
435
455
|
# @return [SiprecContext] if sid was passed.
|
@@ -869,6 +889,13 @@ module Twilio
|
|
869
889
|
context.user_defined_messages
|
870
890
|
end
|
871
891
|
|
892
|
+
##
|
893
|
+
# Access the transcriptions
|
894
|
+
# @return [transcriptions] transcriptions
|
895
|
+
def transcriptions
|
896
|
+
context.transcriptions
|
897
|
+
end
|
898
|
+
|
872
899
|
##
|
873
900
|
# Access the siprec
|
874
901
|
# @return [siprec] siprec
|
@@ -62,6 +62,11 @@ module Twilio
|
|
62
62
|
@frontline_api ||= FrontlineApi.new self
|
63
63
|
end
|
64
64
|
##
|
65
|
+
# Access the PreviewIam Twilio Domain
|
66
|
+
def preview_iam
|
67
|
+
@preview_iam ||= PreviewIam.new self
|
68
|
+
end
|
69
|
+
##
|
65
70
|
# Access the Insights Twilio Domain
|
66
71
|
def insights
|
67
72
|
@insights ||= Insights.new self
|
@@ -21,8 +21,8 @@ module Twilio
|
|
21
21
|
|
22
22
|
class InstalledAddOnUsageList < ListResource
|
23
23
|
|
24
|
-
class
|
25
|
-
# @param [billable_items]: [Array<InstalledAddOnUsageList.
|
24
|
+
class CreateBillingUsageRequest
|
25
|
+
# @param [billable_items]: [Array<InstalledAddOnUsageList.CreateBillingUsageRequestBillableItems>]
|
26
26
|
attr_accessor :billable_items
|
27
27
|
def initialize(payload)
|
28
28
|
@billable_items = payload["billable_items"]
|
@@ -34,7 +34,7 @@ module Twilio
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
class
|
37
|
+
class CreateBillingUsageRequestBillableItems
|
38
38
|
# @param [quantity]: [Float]
|
39
39
|
# @param [sid]: [String]
|
40
40
|
attr_accessor :quantity, :sid
|
@@ -63,14 +63,14 @@ module Twilio
|
|
63
63
|
end
|
64
64
|
##
|
65
65
|
# Create the InstalledAddOnUsageInstance
|
66
|
-
# @param [
|
66
|
+
# @param [CreateBillingUsageRequest] create_billing_usage_request
|
67
67
|
# @return [InstalledAddOnUsageInstance] Created InstalledAddOnUsageInstance
|
68
|
-
def create(
|
68
|
+
def create(create_billing_usage_request: nil
|
69
69
|
)
|
70
70
|
|
71
71
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
72
72
|
headers['Content-Type'] = 'application/json'
|
73
|
-
payload = @version.create('POST', @uri, headers: headers, data:
|
73
|
+
payload = @version.create('POST', @uri, headers: headers, data: create_billing_usage_request.to_json)
|
74
74
|
InstalledAddOnUsageInstance.new(
|
75
75
|
@version,
|
76
76
|
payload,
|
@@ -137,7 +137,7 @@ module Twilio
|
|
137
137
|
|
138
138
|
|
139
139
|
##
|
140
|
-
# @return [Array<
|
140
|
+
# @return [Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>]
|
141
141
|
def billable_items
|
142
142
|
@properties['billable_items']
|
143
143
|
end
|
@@ -40,6 +40,7 @@ module Twilio
|
|
40
40
|
# @param [EndUserType] end_user_type The type of End User the regulation requires - can be `individual` or `business`.
|
41
41
|
# @param [String] iso_country The ISO country code of the phone number's country.
|
42
42
|
# @param [String] number_type The type of phone number that the regulatory requiremnt is restricting.
|
43
|
+
# @param [Boolean] include_constraints A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields
|
43
44
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
44
45
|
# guarantees to never return more than limit. Default is no limit
|
45
46
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -47,11 +48,12 @@ module Twilio
|
|
47
48
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
48
49
|
# efficient page size, i.e. min(limit, 1000)
|
49
50
|
# @return [Array] Array of up to limit results
|
50
|
-
def list(end_user_type: :unset, iso_country: :unset, number_type: :unset, limit: nil, page_size: nil)
|
51
|
+
def list(end_user_type: :unset, iso_country: :unset, number_type: :unset, include_constraints: :unset, limit: nil, page_size: nil)
|
51
52
|
self.stream(
|
52
53
|
end_user_type: end_user_type,
|
53
54
|
iso_country: iso_country,
|
54
55
|
number_type: number_type,
|
56
|
+
include_constraints: include_constraints,
|
55
57
|
limit: limit,
|
56
58
|
page_size: page_size
|
57
59
|
).entries
|
@@ -64,6 +66,7 @@ module Twilio
|
|
64
66
|
# @param [EndUserType] end_user_type The type of End User the regulation requires - can be `individual` or `business`.
|
65
67
|
# @param [String] iso_country The ISO country code of the phone number's country.
|
66
68
|
# @param [String] number_type The type of phone number that the regulatory requiremnt is restricting.
|
69
|
+
# @param [Boolean] include_constraints A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields
|
67
70
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
68
71
|
# guarantees to never return more than limit. Default is no limit
|
69
72
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -71,13 +74,14 @@ module Twilio
|
|
71
74
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
72
75
|
# efficient page size, i.e. min(limit, 1000)
|
73
76
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
74
|
-
def stream(end_user_type: :unset, iso_country: :unset, number_type: :unset, limit: nil, page_size: nil)
|
77
|
+
def stream(end_user_type: :unset, iso_country: :unset, number_type: :unset, include_constraints: :unset, limit: nil, page_size: nil)
|
75
78
|
limits = @version.read_limits(limit, page_size)
|
76
79
|
|
77
80
|
page = self.page(
|
78
81
|
end_user_type: end_user_type,
|
79
82
|
iso_country: iso_country,
|
80
83
|
number_type: number_type,
|
84
|
+
include_constraints: include_constraints,
|
81
85
|
page_size: limits[:page_size], )
|
82
86
|
|
83
87
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -103,15 +107,17 @@ module Twilio
|
|
103
107
|
# @param [EndUserType] end_user_type The type of End User the regulation requires - can be `individual` or `business`.
|
104
108
|
# @param [String] iso_country The ISO country code of the phone number's country.
|
105
109
|
# @param [String] number_type The type of phone number that the regulatory requiremnt is restricting.
|
110
|
+
# @param [Boolean] include_constraints A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields
|
106
111
|
# @param [String] page_token PageToken provided by the API
|
107
112
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
108
113
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
109
114
|
# @return [Page] Page of RegulationInstance
|
110
|
-
def page(end_user_type: :unset, iso_country: :unset, number_type: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
115
|
+
def page(end_user_type: :unset, iso_country: :unset, number_type: :unset, include_constraints: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
111
116
|
params = Twilio::Values.of({
|
112
117
|
'EndUserType' => end_user_type,
|
113
118
|
'IsoCountry' => iso_country,
|
114
119
|
'NumberType' => number_type,
|
120
|
+
'IncludeConstraints' => include_constraints,
|
115
121
|
'PageToken' => page_token,
|
116
122
|
'Page' => page_number,
|
117
123
|
'PageSize' => page_size,
|
@@ -161,12 +167,18 @@ module Twilio
|
|
161
167
|
end
|
162
168
|
##
|
163
169
|
# Fetch the RegulationInstance
|
170
|
+
# @param [Boolean] include_constraints A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields
|
164
171
|
# @return [RegulationInstance] Fetched RegulationInstance
|
165
|
-
def fetch
|
172
|
+
def fetch(
|
173
|
+
include_constraints: :unset
|
174
|
+
)
|
166
175
|
|
176
|
+
params = Twilio::Values.of({
|
177
|
+
'IncludeConstraints' => include_constraints,
|
178
|
+
})
|
167
179
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
168
180
|
|
169
|
-
payload = @version.fetch('GET', @uri, headers: headers)
|
181
|
+
payload = @version.fetch('GET', @uri, params: params, headers: headers)
|
170
182
|
RegulationInstance.new(
|
171
183
|
@version,
|
172
184
|
payload,
|
@@ -302,10 +314,15 @@ module Twilio
|
|
302
314
|
|
303
315
|
##
|
304
316
|
# Fetch the RegulationInstance
|
317
|
+
# @param [Boolean] include_constraints A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields
|
305
318
|
# @return [RegulationInstance] Fetched RegulationInstance
|
306
|
-
def fetch
|
319
|
+
def fetch(
|
320
|
+
include_constraints: :unset
|
321
|
+
)
|
307
322
|
|
308
|
-
context.fetch
|
323
|
+
context.fetch(
|
324
|
+
include_constraints: include_constraints,
|
325
|
+
)
|
309
326
|
end
|
310
327
|
|
311
328
|
##
|
@@ -0,0 +1,33 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
8
|
+
# https://openapi-generator.tech
|
9
|
+
# Do not edit the class manually.
|
10
|
+
# frozen_string_literal: true
|
11
|
+
module Twilio
|
12
|
+
module REST
|
13
|
+
class PreviewIamBase < Domain
|
14
|
+
##
|
15
|
+
# Initialize previewIam domain
|
16
|
+
#
|
17
|
+
# @param twilio - The twilio client
|
18
|
+
#
|
19
|
+
def initialize(twilio)
|
20
|
+
super(twilio)
|
21
|
+
@base_url = "https://preview-iam.twilio.com"
|
22
|
+
@host = "preview-iam.twilio.com"
|
23
|
+
@port = 443
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Provide a user friendly representation
|
28
|
+
def to_s
|
29
|
+
'<Twilio::REST::PreviewIam>';
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -371,18 +371,50 @@ module Twilio
|
|
371
371
|
yield(siprec) if block_given?
|
372
372
|
append(siprec)
|
373
373
|
end
|
374
|
+
|
375
|
+
##
|
376
|
+
# Create a new <Transcription> element
|
377
|
+
# name:: Friendly name given to the Transcription
|
378
|
+
# track:: Track to be analyze by the provider
|
379
|
+
# status_callback_url:: Status Callback URL
|
380
|
+
# status_callback_method:: Status Callback URL method
|
381
|
+
# inbound_track_label:: Friendly name given to the Inbound Track
|
382
|
+
# outbound_track_label:: Friendly name given to the Outbound Track Label
|
383
|
+
# partial_results:: Indicates if partial results are going to be send to the customer
|
384
|
+
# language_code:: Language Code used by the transcription engine
|
385
|
+
# transcription_engine:: Transcription Engine to be used
|
386
|
+
# profanity_filter:: Enable Profanity Filter
|
387
|
+
# speech_model:: Speech Model used by the transcription engine
|
388
|
+
# hints:: Hints to be provided to the transcription engine
|
389
|
+
# enable_automatic_punctuation:: Enable Automatic Punctuation
|
390
|
+
# keyword_args:: additional attributes
|
391
|
+
def transcription(name: nil, track: nil, status_callback_url: nil, status_callback_method: nil, inbound_track_label: nil, outbound_track_label: nil, partial_results: nil, language_code: nil, transcription_engine: nil, profanity_filter: nil, speech_model: nil, hints: nil, enable_automatic_punctuation: nil, **keyword_args)
|
392
|
+
transcription = Transcription.new(name: name, track: track, status_callback_url: status_callback_url, status_callback_method: status_callback_method, inbound_track_label: inbound_track_label, outbound_track_label: outbound_track_label, partial_results: partial_results, language_code: language_code, transcription_engine: transcription_engine, profanity_filter: profanity_filter, speech_model: speech_model, hints: hints, enable_automatic_punctuation: enable_automatic_punctuation, **keyword_args)
|
393
|
+
|
394
|
+
yield(transcription) if block_given?
|
395
|
+
append(transcription)
|
396
|
+
end
|
374
397
|
end
|
375
398
|
|
376
399
|
##
|
377
|
-
# <
|
378
|
-
class
|
400
|
+
# <Transcription> TwiML Noun
|
401
|
+
class Transcription < TwiML
|
379
402
|
def initialize(**keyword_args)
|
380
403
|
super(**keyword_args)
|
381
|
-
@name = '
|
404
|
+
@name = 'Transcription'
|
382
405
|
|
383
406
|
yield(self) if block_given?
|
384
407
|
end
|
385
408
|
|
409
|
+
##
|
410
|
+
# Create a new <Config> element
|
411
|
+
# name:: The name of the custom config
|
412
|
+
# value:: The value of the custom config
|
413
|
+
# keyword_args:: additional attributes
|
414
|
+
def config(name: nil, value: nil, **keyword_args)
|
415
|
+
append(Config.new(name: name, value: value, **keyword_args))
|
416
|
+
end
|
417
|
+
|
386
418
|
##
|
387
419
|
# Create a new <Parameter> element
|
388
420
|
# name:: The name of the custom parameter
|
@@ -404,6 +436,37 @@ module Twilio
|
|
404
436
|
end
|
405
437
|
end
|
406
438
|
|
439
|
+
##
|
440
|
+
# <Config> TwiML Noun
|
441
|
+
class Config < TwiML
|
442
|
+
def initialize(**keyword_args)
|
443
|
+
super(**keyword_args)
|
444
|
+
@name = 'Config'
|
445
|
+
|
446
|
+
yield(self) if block_given?
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
450
|
+
##
|
451
|
+
# <Siprec> TwiML Noun
|
452
|
+
class Siprec < TwiML
|
453
|
+
def initialize(**keyword_args)
|
454
|
+
super(**keyword_args)
|
455
|
+
@name = 'Siprec'
|
456
|
+
|
457
|
+
yield(self) if block_given?
|
458
|
+
end
|
459
|
+
|
460
|
+
##
|
461
|
+
# Create a new <Parameter> element
|
462
|
+
# name:: The name of the custom parameter
|
463
|
+
# value:: The value of the custom parameter
|
464
|
+
# keyword_args:: additional attributes
|
465
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
466
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
407
470
|
##
|
408
471
|
# <Stream> TwiML Noun
|
409
472
|
class Stream < TwiML
|
@@ -464,6 +527,29 @@ module Twilio
|
|
464
527
|
yield(siprec) if block_given?
|
465
528
|
append(siprec)
|
466
529
|
end
|
530
|
+
|
531
|
+
##
|
532
|
+
# Create a new <Transcription> element
|
533
|
+
# name:: Friendly name given to the Transcription
|
534
|
+
# track:: Track to be analyze by the provider
|
535
|
+
# status_callback_url:: Status Callback URL
|
536
|
+
# status_callback_method:: Status Callback URL method
|
537
|
+
# inbound_track_label:: Friendly name given to the Inbound Track
|
538
|
+
# outbound_track_label:: Friendly name given to the Outbound Track Label
|
539
|
+
# partial_results:: Indicates if partial results are going to be send to the customer
|
540
|
+
# language_code:: Language Code used by the transcription engine
|
541
|
+
# transcription_engine:: Transcription Engine to be used
|
542
|
+
# profanity_filter:: Enable Profanity Filter
|
543
|
+
# speech_model:: Speech Model used by the transcription engine
|
544
|
+
# hints:: Hints to be provided to the transcription engine
|
545
|
+
# enable_automatic_punctuation:: Enable Automatic Punctuation
|
546
|
+
# keyword_args:: additional attributes
|
547
|
+
def transcription(name: nil, track: nil, status_callback_url: nil, status_callback_method: nil, inbound_track_label: nil, outbound_track_label: nil, partial_results: nil, language_code: nil, transcription_engine: nil, profanity_filter: nil, speech_model: nil, hints: nil, enable_automatic_punctuation: nil, **keyword_args)
|
548
|
+
transcription = Transcription.new(name: name, track: track, status_callback_url: status_callback_url, status_callback_method: status_callback_method, inbound_track_label: inbound_track_label, outbound_track_label: outbound_track_label, partial_results: partial_results, language_code: language_code, transcription_engine: transcription_engine, profanity_filter: profanity_filter, speech_model: speech_model, hints: hints, enable_automatic_punctuation: enable_automatic_punctuation, **keyword_args)
|
549
|
+
|
550
|
+
yield(transcription) if block_given?
|
551
|
+
append(transcription)
|
552
|
+
end
|
467
553
|
end
|
468
554
|
|
469
555
|
##
|
@@ -1916,17 +2002,6 @@ module Twilio
|
|
1916
2002
|
end
|
1917
2003
|
end
|
1918
2004
|
|
1919
|
-
##
|
1920
|
-
# <Config> TwiML Noun
|
1921
|
-
class Config < TwiML
|
1922
|
-
def initialize(**keyword_args)
|
1923
|
-
super(**keyword_args)
|
1924
|
-
@name = 'Config'
|
1925
|
-
|
1926
|
-
yield(self) if block_given?
|
1927
|
-
end
|
1928
|
-
end
|
1929
|
-
|
1930
2005
|
##
|
1931
2006
|
# <Autopilot> TwiML Noun
|
1932
2007
|
class Autopilot < TwiML
|
data/lib/twilio-ruby/version.rb
CHANGED
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.2.
|
4
|
+
version: 7.2.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: 2024-06-
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -275,6 +275,7 @@ files:
|
|
275
275
|
- lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
|
276
276
|
- lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
|
277
277
|
- lib/twilio-ruby/rest/api/v2010/account/call/stream.rb
|
278
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb
|
278
279
|
- lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb
|
279
280
|
- lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb
|
280
281
|
- lib/twilio-ruby/rest/api/v2010/account/conference.rb
|
@@ -635,6 +636,8 @@ files:
|
|
635
636
|
- lib/twilio-ruby/rest/preview/wireless/sim.rb
|
636
637
|
- lib/twilio-ruby/rest/preview/wireless/sim/usage.rb
|
637
638
|
- lib/twilio-ruby/rest/preview_base.rb
|
639
|
+
- lib/twilio-ruby/rest/preview_iam.rb
|
640
|
+
- lib/twilio-ruby/rest/preview_iam_base.rb
|
638
641
|
- lib/twilio-ruby/rest/pricing.rb
|
639
642
|
- lib/twilio-ruby/rest/pricing/v1.rb
|
640
643
|
- lib/twilio-ruby/rest/pricing/v1/messaging.rb
|