twilio-ruby 5.67.2 → 5.67.3
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 +14 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +6 -6
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
- data/lib/twilio-ruby/rest/lookups.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +4 -4
- data/lib/twilio-ruby/twiml/voice_response.rb +68 -5
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d37fa716f009ccbc9d5ee9811fc3189a03e7bcb
|
4
|
+
data.tar.gz: 6b6131fc2557ddc198144eb055c7fad105e53d8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bcc67be6b13ac0862a1940c6efaeb8d4ce9a16d6f087d52c07e936ab041ca2557a35b2373358e2788a96c6d80f8fb70f313d09fb8eaffb50e809c5c68367cd8
|
7
|
+
data.tar.gz: 30b767d5f2657da4388f0f1dfee239d4badf1c516c0e4736094507c017c9a58603f75750c558730d5ab74604141c175ef4474b1bd726555a8c423d5157499487
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-06-15] Version 5.67.3
|
5
|
+
---------------------------
|
6
|
+
**Lookups**
|
7
|
+
- Adding support for Lookup V2 API
|
8
|
+
|
9
|
+
**Studio**
|
10
|
+
- Corrected PII labels to be 30 days and added context to be PII
|
11
|
+
|
12
|
+
**Twiml**
|
13
|
+
- Add `statusCallbackMethod` attribute, nested `<Config` and `<Parameter>` elements to `<VirtualAgent>` noun.
|
14
|
+
- Add support for new Amazon Polly voices (Q2 2022) for `Say` verb
|
15
|
+
- Add support for `<Conversation>` noun
|
16
|
+
|
17
|
+
|
4
18
|
[2022-06-01] Version 5.67.2
|
5
19
|
---------------------------
|
6
20
|
**Library - Chore**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.67.
|
37
|
+
gem 'twilio-ruby', '~> 5.67.3'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.67.
|
43
|
+
gem install twilio-ruby -v 5.67.3
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -52,7 +52,7 @@ module Twilio
|
|
52
52
|
# overwritten with `currency` field. Leave blank or set to 0 to tokenize.
|
53
53
|
# @param [String] currency The currency of the `charge_amount`, formatted as {ISO
|
54
54
|
# 4127}[http://www.iso.org/iso/home/standards/currency_codes.htm] format. The
|
55
|
-
# default value is `USD` and all values allowed from the
|
55
|
+
# default value is `USD` and all values allowed from the Pay Connector are
|
56
56
|
# accepted.
|
57
57
|
# @param [String] description The description can be used to provide more details
|
58
58
|
# regarding the transaction. This information is submitted along with the payment
|
@@ -68,9 +68,9 @@ module Twilio
|
|
68
68
|
# that has to be included here depends on the <Pay> Connector. {Read
|
69
69
|
# more}[https://www.twilio.com/console/voice/pay-connectors].
|
70
70
|
# @param [String] payment_connector This is the unique name corresponding to the
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
71
|
+
# Pay Connector installed in the Twilio Add-ons. Learn more about {<Pay>
|
72
|
+
# Connectors}[https://www.twilio.com/console/voice/pay-connectors]. The default
|
73
|
+
# value is `Default`.
|
74
74
|
# @param [payment.PaymentMethod] payment_method Type of payment being captured.
|
75
75
|
# One of `credit-card` or `ach-debit`. The default value is `credit-card`.
|
76
76
|
# @param [Boolean] postal_code Indicates whether the credit card postal code (zip
|
@@ -202,7 +202,7 @@ module Twilio
|
|
202
202
|
# @param [payment.Status] status Indicates whether the current payment session
|
203
203
|
# should be cancelled or completed. When `cancel` the payment session is
|
204
204
|
# cancelled. When `complete`, Twilio sends the payment information to the selected
|
205
|
-
#
|
205
|
+
# Pay Connector for processing.
|
206
206
|
# @return [PaymentInstance] Updated PaymentInstance
|
207
207
|
def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
|
208
208
|
data = Twilio::Values.of({
|
@@ -342,7 +342,7 @@ module Twilio
|
|
342
342
|
# @param [payment.Status] status Indicates whether the current payment session
|
343
343
|
# should be cancelled or completed. When `cancel` the payment session is
|
344
344
|
# cancelled. When `complete`, Twilio sends the payment information to the selected
|
345
|
-
#
|
345
|
+
# Pay Connector for processing.
|
346
346
|
# @return [PaymentInstance] Updated PaymentInstance
|
347
347
|
def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
|
348
348
|
context.update(
|
@@ -0,0 +1,268 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Lookups < Domain
|
12
|
+
class V2 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class PhoneNumberList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the PhoneNumberList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [PhoneNumberList] PhoneNumberList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Lookups.V2.PhoneNumberList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class PhoneNumberPage < Page
|
37
|
+
##
|
38
|
+
# Initialize the PhoneNumberPage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [PhoneNumberPage] PhoneNumberPage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of PhoneNumberInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [PhoneNumberInstance] PhoneNumberInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
PhoneNumberInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Lookups.V2.PhoneNumberPage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class PhoneNumberContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the PhoneNumberContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [String] phone_number The phone number to lookup in E.164 or national
|
72
|
+
# format. Default country code is +1 (North America).
|
73
|
+
# @return [PhoneNumberContext] PhoneNumberContext
|
74
|
+
def initialize(version, phone_number)
|
75
|
+
super(version)
|
76
|
+
|
77
|
+
# Path Solution
|
78
|
+
@solution = {phone_number: phone_number, }
|
79
|
+
@uri = "/PhoneNumbers/#{@solution[:phone_number]}"
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Fetch the PhoneNumberInstance
|
84
|
+
# @param [String] fields A comma-separated list of fields to return. Possible
|
85
|
+
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
86
|
+
# enhanced_line_type or line_type_intelligence.
|
87
|
+
# @param [String] country_code The {country
|
88
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
89
|
+
# provided is in national format.
|
90
|
+
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
91
|
+
def fetch(fields: :unset, country_code: :unset)
|
92
|
+
params = Twilio::Values.of({'Fields' => fields, 'CountryCode' => country_code, })
|
93
|
+
|
94
|
+
payload = @version.fetch('GET', @uri, params: params)
|
95
|
+
|
96
|
+
PhoneNumberInstance.new(@version, payload, phone_number: @solution[:phone_number], )
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# Provide a user friendly representation
|
101
|
+
def to_s
|
102
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
103
|
+
"#<Twilio.Lookups.V2.PhoneNumberContext #{context}>"
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Provide a detailed, user friendly representation
|
108
|
+
def inspect
|
109
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
110
|
+
"#<Twilio.Lookups.V2.PhoneNumberContext #{context}>"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
116
|
+
class PhoneNumberInstance < InstanceResource
|
117
|
+
##
|
118
|
+
# Initialize the PhoneNumberInstance
|
119
|
+
# @param [Version] version Version that contains the resource
|
120
|
+
# @param [Hash] payload payload that contains response from Twilio
|
121
|
+
# @param [String] phone_number The phone number to lookup in E.164 or national
|
122
|
+
# format. Default country code is +1 (North America).
|
123
|
+
# @return [PhoneNumberInstance] PhoneNumberInstance
|
124
|
+
def initialize(version, payload, phone_number: nil)
|
125
|
+
super(version)
|
126
|
+
|
127
|
+
# Marshaled Properties
|
128
|
+
@properties = {
|
129
|
+
'calling_country_code' => payload['calling_country_code'],
|
130
|
+
'country_code' => payload['country_code'],
|
131
|
+
'phone_number' => payload['phone_number'],
|
132
|
+
'national_format' => payload['national_format'],
|
133
|
+
'valid' => payload['valid'],
|
134
|
+
'validation_errors' => payload['validation_errors'],
|
135
|
+
'caller_name' => payload['caller_name'],
|
136
|
+
'sim_swap' => payload['sim_swap'],
|
137
|
+
'call_forwarding' => payload['call_forwarding'],
|
138
|
+
'live_activity' => payload['live_activity'],
|
139
|
+
'enhanced_line_type' => payload['enhanced_line_type'],
|
140
|
+
'line_type_intelligence' => payload['line_type_intelligence'],
|
141
|
+
'url' => payload['url'],
|
142
|
+
}
|
143
|
+
|
144
|
+
# Context
|
145
|
+
@instance_context = nil
|
146
|
+
@params = {'phone_number' => phone_number || @properties['phone_number'], }
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Generate an instance context for the instance, the context is capable of
|
151
|
+
# performing various actions. All instance actions are proxied to the context
|
152
|
+
# @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance
|
153
|
+
def context
|
154
|
+
unless @instance_context
|
155
|
+
@instance_context = PhoneNumberContext.new(@version, @params['phone_number'], )
|
156
|
+
end
|
157
|
+
@instance_context
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [String] International dialing prefix
|
162
|
+
def calling_country_code
|
163
|
+
@properties['calling_country_code']
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [String] Phone number's ISO country code
|
168
|
+
def country_code
|
169
|
+
@properties['country_code']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] Phone number in E.164 format
|
174
|
+
def phone_number
|
175
|
+
@properties['phone_number']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [String] Phone number in national format
|
180
|
+
def national_format
|
181
|
+
@properties['national_format']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [Boolean] Boolean which indicates if the phone number is valid
|
186
|
+
def valid
|
187
|
+
@properties['valid']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [Array[phone_number.ValidationError]] Contains reasons why a phone number is invalid
|
192
|
+
def validation_errors
|
193
|
+
@properties['validation_errors']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [Hash] An object that contains caller name information
|
198
|
+
def caller_name
|
199
|
+
@properties['caller_name']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [Hash] An object that contains SIM swap information
|
204
|
+
def sim_swap
|
205
|
+
@properties['sim_swap']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [Hash] An object that contains call forwarding status information
|
210
|
+
def call_forwarding
|
211
|
+
@properties['call_forwarding']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Hash] An object that contains live activity information
|
216
|
+
def live_activity
|
217
|
+
@properties['live_activity']
|
218
|
+
end
|
219
|
+
|
220
|
+
##
|
221
|
+
# @return [Hash] An object that contains line type information
|
222
|
+
def enhanced_line_type
|
223
|
+
@properties['enhanced_line_type']
|
224
|
+
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# @return [Hash] An object that contains line type information
|
228
|
+
def line_type_intelligence
|
229
|
+
@properties['line_type_intelligence']
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# @return [String] The absolute URL of the resource
|
234
|
+
def url
|
235
|
+
@properties['url']
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# Fetch the PhoneNumberInstance
|
240
|
+
# @param [String] fields A comma-separated list of fields to return. Possible
|
241
|
+
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
242
|
+
# enhanced_line_type or line_type_intelligence.
|
243
|
+
# @param [String] country_code The {country
|
244
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
245
|
+
# provided is in national format.
|
246
|
+
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
247
|
+
def fetch(fields: :unset, country_code: :unset)
|
248
|
+
context.fetch(fields: fields, country_code: country_code, )
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# Provide a user friendly representation
|
253
|
+
def to_s
|
254
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
255
|
+
"<Twilio.Lookups.V2.PhoneNumberInstance #{values}>"
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# Provide a detailed, user friendly representation
|
260
|
+
def inspect
|
261
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
262
|
+
"<Twilio.Lookups.V2.PhoneNumberInstance #{values}>"
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Lookups
|
12
|
+
class V2 < Version
|
13
|
+
##
|
14
|
+
# Initialize the V2 version of Lookups
|
15
|
+
def initialize(domain)
|
16
|
+
super
|
17
|
+
@version = 'v2'
|
18
|
+
@phone_numbers = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# @param [String] phone_number The phone number to lookup in E.164 or national
|
23
|
+
# format. Default country code is +1 (North America).
|
24
|
+
# @return [Twilio::REST::Lookups::V2::PhoneNumberContext] if phone_number was passed.
|
25
|
+
# @return [Twilio::REST::Lookups::V2::PhoneNumberList]
|
26
|
+
def phone_numbers(phone_number=:unset)
|
27
|
+
if phone_number.nil?
|
28
|
+
raise ArgumentError, 'phone_number cannot be nil'
|
29
|
+
end
|
30
|
+
if phone_number == :unset
|
31
|
+
@phone_numbers ||= PhoneNumberList.new self
|
32
|
+
else
|
33
|
+
PhoneNumberContext.new(self, phone_number)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Provide a user friendly representation
|
39
|
+
def to_s
|
40
|
+
'<Twilio::REST::Lookups::V2>'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -20,6 +20,7 @@ module Twilio
|
|
20
20
|
|
21
21
|
# Versions
|
22
22
|
@v1 = nil
|
23
|
+
@v2 = nil
|
23
24
|
end
|
24
25
|
|
25
26
|
##
|
@@ -28,6 +29,12 @@ module Twilio
|
|
28
29
|
@v1 ||= V1.new self
|
29
30
|
end
|
30
31
|
|
32
|
+
##
|
33
|
+
# Version v2 of lookups
|
34
|
+
def v2
|
35
|
+
@v2 ||= V2.new self
|
36
|
+
end
|
37
|
+
|
31
38
|
##
|
32
39
|
# @param [String] phone_number The phone number in
|
33
40
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, which consists
|
@@ -27,7 +27,7 @@ module Twilio
|
|
27
27
|
# Create the MediaProcessorInstance
|
28
28
|
# @param [String] extension The {Media
|
29
29
|
# Extension}[/docs/live/api/media-extensions-overview] name or URL. Ex:
|
30
|
-
# `video-composer-
|
30
|
+
# `video-composer-v2`
|
31
31
|
# @param [String] extension_context The context of the Media Extension,
|
32
32
|
# represented as a JSON dictionary. See the documentation for the specific {Media
|
33
33
|
# Extension}[/docs/live/api/media-extensions-overview] you are using for more
|
@@ -253,7 +253,7 @@ module Twilio
|
|
253
253
|
'resolution' => payload['resolution'],
|
254
254
|
'source_sid' => payload['source_sid'],
|
255
255
|
'sid' => payload['sid'],
|
256
|
-
'
|
256
|
+
'media_size' => payload['media_size'].to_i,
|
257
257
|
'status' => payload['status'],
|
258
258
|
'status_callback' => payload['status_callback'],
|
259
259
|
'status_callback_method' => payload['status_callback_method'],
|
@@ -343,9 +343,9 @@ module Twilio
|
|
343
343
|
end
|
344
344
|
|
345
345
|
##
|
346
|
-
# @return [String] The size of the recording
|
347
|
-
def
|
348
|
-
@properties['
|
346
|
+
# @return [String] The size of the recording media
|
347
|
+
def media_size
|
348
|
+
@properties['media_size']
|
349
349
|
end
|
350
350
|
|
351
351
|
##
|
@@ -194,7 +194,7 @@ module Twilio
|
|
194
194
|
# message:: Message to say
|
195
195
|
# voice:: Voice to use
|
196
196
|
# loop:: Times to loop message
|
197
|
-
# language:: Message
|
197
|
+
# language:: Message language
|
198
198
|
# keyword_args:: additional attributes
|
199
199
|
def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
|
200
200
|
say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
|
@@ -469,7 +469,7 @@ module Twilio
|
|
469
469
|
# message:: Message to say
|
470
470
|
# voice:: Voice to use
|
471
471
|
# loop:: Times to loop message
|
472
|
-
# language:: Message
|
472
|
+
# language:: Message language
|
473
473
|
# keyword_args:: additional attributes
|
474
474
|
def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
|
475
475
|
say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
|
@@ -1435,7 +1435,7 @@ module Twilio
|
|
1435
1435
|
# message:: Message to say
|
1436
1436
|
# voice:: Voice to use
|
1437
1437
|
# loop:: Times to loop message
|
1438
|
-
# language:: Message
|
1438
|
+
# language:: Message language
|
1439
1439
|
# keyword_args:: additional attributes
|
1440
1440
|
def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
|
1441
1441
|
say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
|
@@ -1743,9 +1743,43 @@ module Twilio
|
|
1743
1743
|
# language:: Language to be used by Dialogflow to transcribe speech
|
1744
1744
|
# sentiment_analysis:: Whether sentiment analysis needs to be enabled or not
|
1745
1745
|
# status_callback:: URL to post status callbacks from Twilio
|
1746
|
+
# status_callback_method:: HTTP method to use when requesting the status callback URL
|
1746
1747
|
# keyword_args:: additional attributes
|
1747
|
-
def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, **keyword_args)
|
1748
|
-
|
1748
|
+
def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
|
1749
|
+
virtual_agent = VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)
|
1750
|
+
|
1751
|
+
yield(virtual_agent) if block_given?
|
1752
|
+
append(virtual_agent)
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
##
|
1756
|
+
# Create a new <Conversation> element
|
1757
|
+
# service_instance_sid:: Service instance Sid
|
1758
|
+
# inbound_autocreation:: Inbound autocreation
|
1759
|
+
# routing_assignment_timeout:: Routing assignment timeout
|
1760
|
+
# inbound_timeout:: Inbound timeout
|
1761
|
+
# record:: Record
|
1762
|
+
# trim:: Trim
|
1763
|
+
# recording_status_callback:: Recording status callback URL
|
1764
|
+
# recording_status_callback_method:: Recording status callback URL method
|
1765
|
+
# recording_status_callback_event:: Recording status callback events
|
1766
|
+
# status_callback:: Status callback URL
|
1767
|
+
# status_callback_method:: Status callback URL method
|
1768
|
+
# status_callback_event:: Events to call status callback URL
|
1769
|
+
# keyword_args:: additional attributes
|
1770
|
+
def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args)
|
1771
|
+
append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args))
|
1772
|
+
end
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
##
|
1776
|
+
# <Conversation> TwiML Noun
|
1777
|
+
class Conversation < TwiML
|
1778
|
+
def initialize(**keyword_args)
|
1779
|
+
super(**keyword_args)
|
1780
|
+
@name = 'Conversation'
|
1781
|
+
|
1782
|
+
yield(self) if block_given?
|
1749
1783
|
end
|
1750
1784
|
end
|
1751
1785
|
|
@@ -1758,6 +1792,35 @@ module Twilio
|
|
1758
1792
|
|
1759
1793
|
yield(self) if block_given?
|
1760
1794
|
end
|
1795
|
+
|
1796
|
+
##
|
1797
|
+
# Create a new <Config> element
|
1798
|
+
# name:: The name of the custom config
|
1799
|
+
# value:: The value of the custom config
|
1800
|
+
# keyword_args:: additional attributes
|
1801
|
+
def config(name: nil, value: nil, **keyword_args)
|
1802
|
+
append(Config.new(name: name, value: value, **keyword_args))
|
1803
|
+
end
|
1804
|
+
|
1805
|
+
##
|
1806
|
+
# Create a new <Parameter> element
|
1807
|
+
# name:: The name of the custom parameter
|
1808
|
+
# value:: The value of the custom parameter
|
1809
|
+
# keyword_args:: additional attributes
|
1810
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
1811
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
1812
|
+
end
|
1813
|
+
end
|
1814
|
+
|
1815
|
+
##
|
1816
|
+
# <Config> TwiML Noun
|
1817
|
+
class Config < TwiML
|
1818
|
+
def initialize(**keyword_args)
|
1819
|
+
super(**keyword_args)
|
1820
|
+
@name = 'Config'
|
1821
|
+
|
1822
|
+
yield(self) if block_given?
|
1823
|
+
end
|
1761
1824
|
end
|
1762
1825
|
|
1763
1826
|
##
|
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: 5.67.
|
4
|
+
version: 5.67.3
|
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: 2022-06-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -471,6 +471,8 @@ files:
|
|
471
471
|
- lib/twilio-ruby/rest/lookups.rb
|
472
472
|
- lib/twilio-ruby/rest/lookups/v1.rb
|
473
473
|
- lib/twilio-ruby/rest/lookups/v1/phone_number.rb
|
474
|
+
- lib/twilio-ruby/rest/lookups/v2.rb
|
475
|
+
- lib/twilio-ruby/rest/lookups/v2/phone_number.rb
|
474
476
|
- lib/twilio-ruby/rest/media.rb
|
475
477
|
- lib/twilio-ruby/rest/media/v1.rb
|
476
478
|
- lib/twilio-ruby/rest/media/v1/media_processor.rb
|