twilio-ruby 5.61.0 → 5.61.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/deploy.yml +2 -0
- data/.gitignore +1 -0
- data/CHANGES.md +23 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -3
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +84 -3
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +12 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +2 -2
- data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +2 -7
- data/.yardoc/checksums +0 -532
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2583fb03b7f76ca77faa5e168a640ee6666859f
|
4
|
+
data.tar.gz: 861886a68fcff99ea6447453fe9293d078d2b0ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c26374082ab77796489dbc76fb3d4098dfec72c9ab0f8ea5c69896ffca74edd38baf6b128489f61f9b14189c93dab29850ac70aa9cae784f1f1e87baff6731
|
7
|
+
data.tar.gz: 390ba0f3829c07b954a5097995a61dec268c05736cf21b1a971527a36436980ca6ecf17abd5371079cb05fac72f23bbb8426560a1dd7ec82ed92287fcc854cb5
|
data/.gitignore
CHANGED
data/CHANGES.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-11-17] Version 5.61.1
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #578](https://github.com/twilio/twilio-ruby/pull/578): remove yardoc files. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
8
|
+
|
9
|
+
**Library - Fix**
|
10
|
+
- [PR #576](https://github.com/twilio/twilio-ruby/pull/576): git log retrieval issues. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
11
|
+
|
12
|
+
**Frontline**
|
13
|
+
- Added `is_available` to User's resource
|
14
|
+
|
15
|
+
**Messaging**
|
16
|
+
- Added GET vetting API
|
17
|
+
|
18
|
+
**Verify**
|
19
|
+
- Add `WHATSAPP` to the attempts API.
|
20
|
+
- Allow to update `config.notification_platform` from `none` to `apn` or `fcm` and viceversa for Verify Push
|
21
|
+
- Add `none` as a valid `config.notification_platform` value for Verify Push
|
22
|
+
|
23
|
+
**Twiml**
|
24
|
+
- Add supported SSML children to `<emphasis>`, `<lang>`, `<p>`, `<prosody>`, `<s>`, and `<w>`.
|
25
|
+
|
26
|
+
|
4
27
|
[2021-11-03] Version 5.61.0
|
5
28
|
---------------------------
|
6
29
|
**Library - Chore**
|
data/README.md
CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
|
|
35
35
|
To install using [Bundler][bundler] grab the latest stable version:
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
gem 'twilio-ruby', '~> 5.61.
|
38
|
+
gem 'twilio-ruby', '~> 5.61.1'
|
39
39
|
```
|
40
40
|
|
41
41
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
42
42
|
|
43
43
|
```bash
|
44
|
-
gem install twilio-ruby -v 5.61.
|
44
|
+
gem install twilio-ruby -v 5.61.1
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
@@ -144,9 +144,9 @@ module Twilio
|
|
144
144
|
# Calls Beta)
|
145
145
|
# @param [String] call_token A token string needed to invoke a forwarded call. A
|
146
146
|
# call_token is generated when an incoming call is received on a Twilio number.
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
147
|
+
# Pass an incoming call's call_token value to a forwarded call via the call_token
|
148
|
+
# parameter when creating a new call. A forwarded call should bear the same
|
149
|
+
# CallerID of the original incoming call.
|
150
150
|
# @param [String] recording_track The audio track to record for the call. Can be:
|
151
151
|
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
|
152
152
|
# audio that is received by Twilio. `outbound` records the audio that is generated
|
@@ -94,10 +94,19 @@ module Twilio
|
|
94
94
|
# @param [String] avatar The avatar URL which will be shown in Frontline
|
95
95
|
# application.
|
96
96
|
# @param [user.StateType] state Current state of this user. Can be either `active`
|
97
|
-
# or `deactivated
|
97
|
+
# or `deactivated`.
|
98
|
+
# @param [Boolean] is_available Whether the User is available for new
|
99
|
+
# conversations. Set to `false` to prevent User from receiving new inbound
|
100
|
+
# conversations if you are using {Pool
|
101
|
+
# Routing}[https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing].
|
98
102
|
# @return [UserInstance] Updated UserInstance
|
99
|
-
def update(friendly_name: :unset, avatar: :unset, state: :unset)
|
100
|
-
data = Twilio::Values.of({
|
103
|
+
def update(friendly_name: :unset, avatar: :unset, state: :unset, is_available: :unset)
|
104
|
+
data = Twilio::Values.of({
|
105
|
+
'FriendlyName' => friendly_name,
|
106
|
+
'Avatar' => avatar,
|
107
|
+
'State' => state,
|
108
|
+
'IsAvailable' => is_available,
|
109
|
+
})
|
101
110
|
|
102
111
|
payload = @version.update('POST', @uri, data: data)
|
103
112
|
|
@@ -139,6 +148,7 @@ module Twilio
|
|
139
148
|
'friendly_name' => payload['friendly_name'],
|
140
149
|
'avatar' => payload['avatar'],
|
141
150
|
'state' => payload['state'],
|
151
|
+
'is_available' => payload['is_available'],
|
142
152
|
'url' => payload['url'],
|
143
153
|
}
|
144
154
|
|
@@ -188,6 +198,12 @@ module Twilio
|
|
188
198
|
@properties['state']
|
189
199
|
end
|
190
200
|
|
201
|
+
##
|
202
|
+
# @return [Boolean] Whether the User is available for new conversations
|
203
|
+
def is_available
|
204
|
+
@properties['is_available']
|
205
|
+
end
|
206
|
+
|
191
207
|
##
|
192
208
|
# @return [String] An absolute URL for this user.
|
193
209
|
def url
|
@@ -207,10 +223,19 @@ module Twilio
|
|
207
223
|
# @param [String] avatar The avatar URL which will be shown in Frontline
|
208
224
|
# application.
|
209
225
|
# @param [user.StateType] state Current state of this user. Can be either `active`
|
210
|
-
# or `deactivated
|
226
|
+
# or `deactivated`.
|
227
|
+
# @param [Boolean] is_available Whether the User is available for new
|
228
|
+
# conversations. Set to `false` to prevent User from receiving new inbound
|
229
|
+
# conversations if you are using {Pool
|
230
|
+
# Routing}[https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing].
|
211
231
|
# @return [UserInstance] Updated UserInstance
|
212
|
-
def update(friendly_name: :unset, avatar: :unset, state: :unset)
|
213
|
-
context.update(
|
232
|
+
def update(friendly_name: :unset, avatar: :unset, state: :unset, is_available: :unset)
|
233
|
+
context.update(
|
234
|
+
friendly_name: friendly_name,
|
235
|
+
avatar: avatar,
|
236
|
+
state: state,
|
237
|
+
is_available: is_available,
|
238
|
+
)
|
214
239
|
end
|
215
240
|
|
216
241
|
##
|
@@ -166,6 +166,54 @@ module Twilio
|
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
169
|
+
##
|
170
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
171
|
+
class BrandVettingContext < InstanceContext
|
172
|
+
##
|
173
|
+
# Initialize the BrandVettingContext
|
174
|
+
# @param [Version] version Version that contains the resource
|
175
|
+
# @param [String] brand_sid The SID of the Brand Registration resource of the
|
176
|
+
# vettings to read .
|
177
|
+
# @param [String] brand_vetting_sid The Twilio SID of the third-party vetting
|
178
|
+
# record.
|
179
|
+
# @return [BrandVettingContext] BrandVettingContext
|
180
|
+
def initialize(version, brand_sid, brand_vetting_sid)
|
181
|
+
super(version)
|
182
|
+
|
183
|
+
# Path Solution
|
184
|
+
@solution = {brand_sid: brand_sid, brand_vetting_sid: brand_vetting_sid, }
|
185
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings/#{@solution[:brand_vetting_sid]}"
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# Fetch the BrandVettingInstance
|
190
|
+
# @return [BrandVettingInstance] Fetched BrandVettingInstance
|
191
|
+
def fetch
|
192
|
+
payload = @version.fetch('GET', @uri)
|
193
|
+
|
194
|
+
BrandVettingInstance.new(
|
195
|
+
@version,
|
196
|
+
payload,
|
197
|
+
brand_sid: @solution[:brand_sid],
|
198
|
+
brand_vetting_sid: @solution[:brand_vetting_sid],
|
199
|
+
)
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Provide a user friendly representation
|
204
|
+
def to_s
|
205
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
206
|
+
"#<Twilio.Messaging.V1.BrandVettingContext #{context}>"
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Provide a detailed, user friendly representation
|
211
|
+
def inspect
|
212
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
213
|
+
"#<Twilio.Messaging.V1.BrandVettingContext #{context}>"
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
169
217
|
##
|
170
218
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
171
219
|
class BrandVettingInstance < InstanceResource
|
@@ -174,8 +222,10 @@ module Twilio
|
|
174
222
|
# @param [Version] version Version that contains the resource
|
175
223
|
# @param [Hash] payload payload that contains response from Twilio
|
176
224
|
# @param [String] brand_sid The unique string to identify Brand Registration.
|
225
|
+
# @param [String] brand_vetting_sid The Twilio SID of the third-party vetting
|
226
|
+
# record.
|
177
227
|
# @return [BrandVettingInstance] BrandVettingInstance
|
178
|
-
def initialize(version, payload, brand_sid: nil)
|
228
|
+
def initialize(version, payload, brand_sid: nil, brand_vetting_sid: nil)
|
179
229
|
super(version)
|
180
230
|
|
181
231
|
# Marshaled Properties
|
@@ -191,6 +241,28 @@ module Twilio
|
|
191
241
|
'vetting_provider' => payload['vetting_provider'],
|
192
242
|
'url' => payload['url'],
|
193
243
|
}
|
244
|
+
|
245
|
+
# Context
|
246
|
+
@instance_context = nil
|
247
|
+
@params = {
|
248
|
+
'brand_sid' => brand_sid,
|
249
|
+
'brand_vetting_sid' => brand_vetting_sid || @properties['brand_vetting_sid'],
|
250
|
+
}
|
251
|
+
end
|
252
|
+
|
253
|
+
##
|
254
|
+
# Generate an instance context for the instance, the context is capable of
|
255
|
+
# performing various actions. All instance actions are proxied to the context
|
256
|
+
# @return [BrandVettingContext] BrandVettingContext for this BrandVettingInstance
|
257
|
+
def context
|
258
|
+
unless @instance_context
|
259
|
+
@instance_context = BrandVettingContext.new(
|
260
|
+
@version,
|
261
|
+
@params['brand_sid'],
|
262
|
+
@params['brand_vetting_sid'],
|
263
|
+
)
|
264
|
+
end
|
265
|
+
@instance_context
|
194
266
|
end
|
195
267
|
|
196
268
|
##
|
@@ -253,16 +325,25 @@ module Twilio
|
|
253
325
|
@properties['url']
|
254
326
|
end
|
255
327
|
|
328
|
+
##
|
329
|
+
# Fetch the BrandVettingInstance
|
330
|
+
# @return [BrandVettingInstance] Fetched BrandVettingInstance
|
331
|
+
def fetch
|
332
|
+
context.fetch
|
333
|
+
end
|
334
|
+
|
256
335
|
##
|
257
336
|
# Provide a user friendly representation
|
258
337
|
def to_s
|
259
|
-
"
|
338
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
339
|
+
"<Twilio.Messaging.V1.BrandVettingInstance #{values}>"
|
260
340
|
end
|
261
341
|
|
262
342
|
##
|
263
343
|
# Provide a detailed, user friendly representation
|
264
344
|
def inspect
|
265
|
-
"
|
345
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
346
|
+
"<Twilio.Messaging.V1.BrandVettingInstance #{values}>"
|
266
347
|
end
|
267
348
|
end
|
268
349
|
end
|
@@ -201,8 +201,14 @@ module Twilio
|
|
201
201
|
##
|
202
202
|
# Access the brand_vettings
|
203
203
|
# @return [BrandVettingList]
|
204
|
-
# @return [BrandVettingContext]
|
205
|
-
def brand_vettings
|
204
|
+
# @return [BrandVettingContext] if brand_vetting_sid was passed.
|
205
|
+
def brand_vettings(brand_vetting_sid=:unset)
|
206
|
+
raise ArgumentError, 'brand_vetting_sid cannot be nil' if brand_vetting_sid.nil?
|
207
|
+
|
208
|
+
if brand_vetting_sid != :unset
|
209
|
+
return BrandVettingContext.new(@version, @solution[:sid], brand_vetting_sid, )
|
210
|
+
end
|
211
|
+
|
206
212
|
unless @brand_vettings
|
207
213
|
@brand_vettings = BrandVettingList.new(@version, brand_sid: @solution[:sid], )
|
208
214
|
end
|
@@ -219,8 +219,12 @@ module Twilio
|
|
219
219
|
# Must be between 3 and 8, inclusive
|
220
220
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
221
221
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
222
|
+
# @param [String] config_notification_platform The transport technology used to
|
223
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
224
|
+
#
|
225
|
+
# Required when `factor_type` is `push`.
|
222
226
|
# @return [FactorInstance] Updated FactorInstance
|
223
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
227
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
224
228
|
data = Twilio::Values.of({
|
225
229
|
'AuthPayload' => auth_payload,
|
226
230
|
'FriendlyName' => friendly_name,
|
@@ -230,6 +234,7 @@ module Twilio
|
|
230
234
|
'Config.Skew' => config_skew,
|
231
235
|
'Config.CodeLength' => config_code_length,
|
232
236
|
'Config.Alg' => config_alg,
|
237
|
+
'Config.NotificationPlatform' => config_notification_platform,
|
233
238
|
})
|
234
239
|
|
235
240
|
payload = @version.update('POST', @uri, data: data)
|
@@ -419,8 +424,12 @@ module Twilio
|
|
419
424
|
# Must be between 3 and 8, inclusive
|
420
425
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
421
426
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
427
|
+
# @param [String] config_notification_platform The transport technology used to
|
428
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
429
|
+
#
|
430
|
+
# Required when `factor_type` is `push`.
|
422
431
|
# @return [FactorInstance] Updated FactorInstance
|
423
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
432
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
424
433
|
context.update(
|
425
434
|
auth_payload: auth_payload,
|
426
435
|
friendly_name: friendly_name,
|
@@ -430,6 +439,7 @@ module Twilio
|
|
430
439
|
config_skew: config_skew,
|
431
440
|
config_code_length: config_code_length,
|
432
441
|
config_alg: config_alg,
|
442
|
+
config_notification_platform: config_notification_platform,
|
433
443
|
)
|
434
444
|
end
|
435
445
|
|
@@ -56,8 +56,8 @@ module Twilio
|
|
56
56
|
#
|
57
57
|
# Required when `factor_type` is `push`.
|
58
58
|
# @param [new_factor.NotificationPlatforms] config_notification_platform The
|
59
|
-
# transport technology used to generate the Notification Token. Can be `apn
|
60
|
-
# `fcm`.
|
59
|
+
# transport technology used to generate the Notification Token. Can be `apn`,
|
60
|
+
# `fcm` or `none`.
|
61
61
|
#
|
62
62
|
# Required when `factor_type` is `push`.
|
63
63
|
# @param [String] config_notification_token For APN, the device token. For FCM,
|