twilio-ruby 5.29.0 → 5.29.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/.travis.yml +2 -0
- data/CHANGES.md +31 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +9 -7
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +16 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +222 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +18 -6
- data/lib/twilio-ruby/rest/insights.rb +5 -5
- data/lib/twilio-ruby/rest/insights/v1.rb +10 -10
- data/lib/twilio-ruby/rest/insights/v1/call.rb +242 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +278 -0
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +268 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +305 -0
- data/lib/twilio-ruby/rest/preview.rb +5 -4
- data/lib/twilio-ruby/rest/preview/marketplace.rb +2 -4
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +9 -11
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +14 -11
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +27 -30
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +17 -14
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +263 -45
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +49 -0
- data/spec/integration/autopilot/v1/assistant_spec.rb +8 -4
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +8 -4
- data/spec/integration/insights/v1/call/event_spec.rb +171 -0
- data/spec/integration/insights/v1/call/metric_spec.rb +159 -0
- data/spec/integration/insights/v1/{summary_spec.rb → call/summary_spec.rb} +4 -2
- data/spec/integration/insights/v1/call_spec.rb +47 -0
- data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
- metadata +17 -5
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +0 -302
@@ -128,7 +128,8 @@ module Twilio
|
|
128
128
|
end
|
129
129
|
|
130
130
|
##
|
131
|
-
# @param [String] sid
|
131
|
+
# @param [String] sid The unique string that we created to identify the
|
132
|
+
# AvailableAddOn resource.
|
132
133
|
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
133
134
|
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
134
135
|
def available_add_ons(sid=:unset)
|
@@ -136,9 +137,9 @@ module Twilio
|
|
136
137
|
end
|
137
138
|
|
138
139
|
##
|
139
|
-
# @param [String] sid
|
140
|
-
# This Sid can also be found in the Console on that
|
141
|
-
# 'Available Add-on Sid'.
|
140
|
+
# @param [String] sid The unique string that we created to identify the
|
141
|
+
# InstalledAddOn resource. This Sid can also be found in the Console on that
|
142
|
+
# specific Add-ons page as the 'Available Add-on Sid'.
|
142
143
|
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnInstance] if sid was passed.
|
143
144
|
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
144
145
|
def installed_add_ons(sid=:unset)
|
@@ -20,8 +20,7 @@ module Twilio
|
|
20
20
|
end
|
21
21
|
|
22
22
|
##
|
23
|
-
# @param [String] sid The
|
24
|
-
# resource
|
23
|
+
# @param [String] sid The SID of the AvailableAddOn resource to fetch.
|
25
24
|
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
|
26
25
|
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
27
26
|
def available_add_ons(sid=:unset)
|
@@ -35,8 +34,7 @@ module Twilio
|
|
35
34
|
end
|
36
35
|
|
37
36
|
##
|
38
|
-
# @param [String] sid The
|
39
|
-
# resource
|
37
|
+
# @param [String] sid The SID of the InstalledAddOn resource to fetch.
|
40
38
|
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
|
41
39
|
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
42
40
|
def installed_add_ons(sid=:unset)
|
@@ -151,8 +151,7 @@ module Twilio
|
|
151
151
|
##
|
152
152
|
# Initialize the AvailableAddOnContext
|
153
153
|
# @param [Version] version Version that contains the resource
|
154
|
-
# @param [String] sid The
|
155
|
-
# resource
|
154
|
+
# @param [String] sid The SID of the AvailableAddOn resource to fetch.
|
156
155
|
# @return [AvailableAddOnContext] AvailableAddOnContext
|
157
156
|
def initialize(version, sid)
|
158
157
|
super(version)
|
@@ -220,8 +219,7 @@ module Twilio
|
|
220
219
|
# Initialize the AvailableAddOnInstance
|
221
220
|
# @param [Version] version Version that contains the resource
|
222
221
|
# @param [Hash] payload payload that contains response from Twilio
|
223
|
-
# @param [String] sid The
|
224
|
-
# resource
|
222
|
+
# @param [String] sid The SID of the AvailableAddOn resource to fetch.
|
225
223
|
# @return [AvailableAddOnInstance] AvailableAddOnInstance
|
226
224
|
def initialize(version, payload, sid: nil)
|
227
225
|
super(version)
|
@@ -254,43 +252,43 @@ module Twilio
|
|
254
252
|
end
|
255
253
|
|
256
254
|
##
|
257
|
-
# @return [String]
|
255
|
+
# @return [String] The unique string that identifies the resource
|
258
256
|
def sid
|
259
257
|
@properties['sid']
|
260
258
|
end
|
261
259
|
|
262
260
|
##
|
263
|
-
# @return [String]
|
261
|
+
# @return [String] The string that you assigned to describe the resource
|
264
262
|
def friendly_name
|
265
263
|
@properties['friendly_name']
|
266
264
|
end
|
267
265
|
|
268
266
|
##
|
269
|
-
# @return [String] A short description of the Add-on functionality
|
267
|
+
# @return [String] A short description of the Add-on's functionality
|
270
268
|
def description
|
271
269
|
@properties['description']
|
272
270
|
end
|
273
271
|
|
274
272
|
##
|
275
|
-
# @return [String]
|
273
|
+
# @return [String] How customers are charged for using this Add-on
|
276
274
|
def pricing_type
|
277
275
|
@properties['pricing_type']
|
278
276
|
end
|
279
277
|
|
280
278
|
##
|
281
|
-
# @return [Hash] The JSON
|
279
|
+
# @return [Hash] The JSON object with the configuration that must be provided when installing a given Add-on
|
282
280
|
def configuration_schema
|
283
281
|
@properties['configuration_schema']
|
284
282
|
end
|
285
283
|
|
286
284
|
##
|
287
|
-
# @return [String] The
|
285
|
+
# @return [String] The absolute URL of the resource
|
288
286
|
def url
|
289
287
|
@properties['url']
|
290
288
|
end
|
291
289
|
|
292
290
|
##
|
293
|
-
# @return [String] The
|
291
|
+
# @return [String] The URLs of related resources
|
294
292
|
def links
|
295
293
|
@properties['links']
|
296
294
|
end
|
data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb
CHANGED
@@ -17,7 +17,8 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the AvailableAddOnExtensionList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] available_add_on_sid The
|
20
|
+
# @param [String] available_add_on_sid The SID of the AvailableAddOn resource to
|
21
|
+
# which this extension applies.
|
21
22
|
# @return [AvailableAddOnExtensionList] AvailableAddOnExtensionList
|
22
23
|
def initialize(version, available_add_on_sid: nil)
|
23
24
|
super(version)
|
@@ -157,8 +158,9 @@ module Twilio
|
|
157
158
|
##
|
158
159
|
# Initialize the AvailableAddOnExtensionContext
|
159
160
|
# @param [Version] version Version that contains the resource
|
160
|
-
# @param [String] available_add_on_sid The
|
161
|
-
#
|
161
|
+
# @param [String] available_add_on_sid The SID of the AvailableAddOn resource with
|
162
|
+
# the extension to fetch.
|
163
|
+
# @param [String] sid The SID of the AvailableAddOn Extension resource to fetch.
|
162
164
|
# @return [AvailableAddOnExtensionContext] AvailableAddOnExtensionContext
|
163
165
|
def initialize(version, available_add_on_sid, sid)
|
164
166
|
super(version)
|
@@ -210,8 +212,9 @@ module Twilio
|
|
210
212
|
# Initialize the AvailableAddOnExtensionInstance
|
211
213
|
# @param [Version] version Version that contains the resource
|
212
214
|
# @param [Hash] payload payload that contains response from Twilio
|
213
|
-
# @param [String] available_add_on_sid The
|
214
|
-
#
|
215
|
+
# @param [String] available_add_on_sid The SID of the AvailableAddOn resource to
|
216
|
+
# which this extension applies.
|
217
|
+
# @param [String] sid The SID of the AvailableAddOn Extension resource to fetch.
|
215
218
|
# @return [AvailableAddOnExtensionInstance] AvailableAddOnExtensionInstance
|
216
219
|
def initialize(version, payload, available_add_on_sid: nil, sid: nil)
|
217
220
|
super(version)
|
@@ -247,37 +250,37 @@ module Twilio
|
|
247
250
|
end
|
248
251
|
|
249
252
|
##
|
250
|
-
# @return [String]
|
253
|
+
# @return [String] The unique string that identifies the resource
|
251
254
|
def sid
|
252
255
|
@properties['sid']
|
253
256
|
end
|
254
257
|
|
255
258
|
##
|
256
|
-
# @return [String] The
|
259
|
+
# @return [String] The SID of the AvailableAddOn resource to which this extension applies
|
257
260
|
def available_add_on_sid
|
258
261
|
@properties['available_add_on_sid']
|
259
262
|
end
|
260
263
|
|
261
264
|
##
|
262
|
-
# @return [String]
|
265
|
+
# @return [String] The string that you assigned to describe the resource
|
263
266
|
def friendly_name
|
264
267
|
@properties['friendly_name']
|
265
268
|
end
|
266
269
|
|
267
270
|
##
|
268
|
-
# @return [String]
|
271
|
+
# @return [String] The name of the Extension's Product
|
269
272
|
def product_name
|
270
273
|
@properties['product_name']
|
271
274
|
end
|
272
275
|
|
273
276
|
##
|
274
|
-
# @return [String]
|
277
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
275
278
|
def unique_name
|
276
279
|
@properties['unique_name']
|
277
280
|
end
|
278
281
|
|
279
282
|
##
|
280
|
-
# @return [String] The
|
283
|
+
# @return [String] The absolute URL of the resource
|
281
284
|
def url
|
282
285
|
@properties['url']
|
283
286
|
end
|
@@ -28,14 +28,13 @@ module Twilio
|
|
28
28
|
##
|
29
29
|
# Retrieve a single page of InstalledAddOnInstance records from the API.
|
30
30
|
# Request is executed immediately.
|
31
|
-
# @param [String] available_add_on_sid
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# this Add-on installation for an Account.
|
31
|
+
# @param [String] available_add_on_sid The SID of the AvaliableAddOn to install.
|
32
|
+
# @param [Boolean] accept_terms_of_service Whether the Terms of Service were
|
33
|
+
# accepted.
|
34
|
+
# @param [Hash] configuration The JSON object that represents the configuration of
|
35
|
+
# the new Add-on being installed.
|
36
|
+
# @param [String] unique_name An application-defined string that uniquely
|
37
|
+
# identifies the resource. This value must be unique within the Account.
|
39
38
|
# @return [InstalledAddOnInstance] Newly created InstalledAddOnInstance
|
40
39
|
def create(available_add_on_sid: nil, accept_terms_of_service: nil, configuration: :unset, unique_name: :unset)
|
41
40
|
data = Twilio::Values.of({
|
@@ -180,8 +179,7 @@ module Twilio
|
|
180
179
|
##
|
181
180
|
# Initialize the InstalledAddOnContext
|
182
181
|
# @param [Version] version Version that contains the resource
|
183
|
-
# @param [String] sid The
|
184
|
-
# resource
|
182
|
+
# @param [String] sid The SID of the InstalledAddOn resource to fetch.
|
185
183
|
# @return [InstalledAddOnContext] InstalledAddOnContext
|
186
184
|
def initialize(version, sid)
|
187
185
|
super(version)
|
@@ -219,10 +217,10 @@ module Twilio
|
|
219
217
|
##
|
220
218
|
# Update the InstalledAddOnInstance
|
221
219
|
# @param [Hash] configuration Valid JSON object that conform to the configuration
|
222
|
-
# schema exposed by the associated
|
223
|
-
#
|
224
|
-
# @param [String] unique_name
|
225
|
-
#
|
220
|
+
# schema exposed by the associated AvailableAddOn resource. This is only required
|
221
|
+
# by Add-ons that need to be configured
|
222
|
+
# @param [String] unique_name An application-defined string that uniquely
|
223
|
+
# identifies the resource. This value must be unique within the Account.
|
226
224
|
# @return [InstalledAddOnInstance] Updated InstalledAddOnInstance
|
227
225
|
def update(configuration: :unset, unique_name: :unset)
|
228
226
|
data = Twilio::Values.of({
|
@@ -279,8 +277,7 @@ module Twilio
|
|
279
277
|
# Initialize the InstalledAddOnInstance
|
280
278
|
# @param [Version] version Version that contains the resource
|
281
279
|
# @param [Hash] payload payload that contains response from Twilio
|
282
|
-
# @param [String] sid The
|
283
|
-
# resource
|
280
|
+
# @param [String] sid The SID of the InstalledAddOn resource to fetch.
|
284
281
|
# @return [InstalledAddOnInstance] InstalledAddOnInstance
|
285
282
|
def initialize(version, payload, sid: nil)
|
286
283
|
super(version)
|
@@ -316,61 +313,61 @@ module Twilio
|
|
316
313
|
end
|
317
314
|
|
318
315
|
##
|
319
|
-
# @return [String]
|
316
|
+
# @return [String] The unique string that identifies the resource
|
320
317
|
def sid
|
321
318
|
@properties['sid']
|
322
319
|
end
|
323
320
|
|
324
321
|
##
|
325
|
-
# @return [String] The Account
|
322
|
+
# @return [String] The SID of the Account that created the resource
|
326
323
|
def account_sid
|
327
324
|
@properties['account_sid']
|
328
325
|
end
|
329
326
|
|
330
327
|
##
|
331
|
-
# @return [String]
|
328
|
+
# @return [String] The string that you assigned to describe the resource
|
332
329
|
def friendly_name
|
333
330
|
@properties['friendly_name']
|
334
331
|
end
|
335
332
|
|
336
333
|
##
|
337
|
-
# @return [String] A short description of the Add-on functionality
|
334
|
+
# @return [String] A short description of the Add-on's functionality
|
338
335
|
def description
|
339
336
|
@properties['description']
|
340
337
|
end
|
341
338
|
|
342
339
|
##
|
343
|
-
# @return [Hash] The JSON object
|
340
|
+
# @return [Hash] The JSON object that represents the current configuration of installed Add-on
|
344
341
|
def configuration
|
345
342
|
@properties['configuration']
|
346
343
|
end
|
347
344
|
|
348
345
|
##
|
349
|
-
# @return [String]
|
346
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
350
347
|
def unique_name
|
351
348
|
@properties['unique_name']
|
352
349
|
end
|
353
350
|
|
354
351
|
##
|
355
|
-
# @return [Time] The date
|
352
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
356
353
|
def date_created
|
357
354
|
@properties['date_created']
|
358
355
|
end
|
359
356
|
|
360
357
|
##
|
361
|
-
# @return [Time] The date
|
358
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
362
359
|
def date_updated
|
363
360
|
@properties['date_updated']
|
364
361
|
end
|
365
362
|
|
366
363
|
##
|
367
|
-
# @return [String] The
|
364
|
+
# @return [String] The absolute URL of the resource
|
368
365
|
def url
|
369
366
|
@properties['url']
|
370
367
|
end
|
371
368
|
|
372
369
|
##
|
373
|
-
# @return [String]
|
370
|
+
# @return [String] The URLs of related resources
|
374
371
|
def links
|
375
372
|
@properties['links']
|
376
373
|
end
|
@@ -392,10 +389,10 @@ module Twilio
|
|
392
389
|
##
|
393
390
|
# Update the InstalledAddOnInstance
|
394
391
|
# @param [Hash] configuration Valid JSON object that conform to the configuration
|
395
|
-
# schema exposed by the associated
|
396
|
-
#
|
397
|
-
# @param [String] unique_name
|
398
|
-
#
|
392
|
+
# schema exposed by the associated AvailableAddOn resource. This is only required
|
393
|
+
# by Add-ons that need to be configured
|
394
|
+
# @param [String] unique_name An application-defined string that uniquely
|
395
|
+
# identifies the resource. This value must be unique within the Account.
|
399
396
|
# @return [InstalledAddOnInstance] Updated InstalledAddOnInstance
|
400
397
|
def update(configuration: :unset, unique_name: :unset)
|
401
398
|
context.update(configuration: configuration, unique_name: unique_name, )
|
data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb
CHANGED
@@ -17,7 +17,8 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the InstalledAddOnExtensionList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] installed_add_on_sid The
|
20
|
+
# @param [String] installed_add_on_sid The SID of the InstalledAddOn resource to
|
21
|
+
# which this extension applies.
|
21
22
|
# @return [InstalledAddOnExtensionList] InstalledAddOnExtensionList
|
22
23
|
def initialize(version, installed_add_on_sid: nil)
|
23
24
|
super(version)
|
@@ -157,8 +158,9 @@ module Twilio
|
|
157
158
|
##
|
158
159
|
# Initialize the InstalledAddOnExtensionContext
|
159
160
|
# @param [Version] version Version that contains the resource
|
160
|
-
# @param [String] installed_add_on_sid The
|
161
|
-
#
|
161
|
+
# @param [String] installed_add_on_sid The SID of the InstalledAddOn resource with
|
162
|
+
# the extension to fetch.
|
163
|
+
# @param [String] sid The SID of the InstalledAddOn Extension resource to fetch.
|
162
164
|
# @return [InstalledAddOnExtensionContext] InstalledAddOnExtensionContext
|
163
165
|
def initialize(version, installed_add_on_sid, sid)
|
164
166
|
super(version)
|
@@ -190,7 +192,7 @@ module Twilio
|
|
190
192
|
|
191
193
|
##
|
192
194
|
# Update the InstalledAddOnExtensionInstance
|
193
|
-
# @param [Boolean] enabled
|
195
|
+
# @param [Boolean] enabled Whether the Extension should be invoked.
|
194
196
|
# @return [InstalledAddOnExtensionInstance] Updated InstalledAddOnExtensionInstance
|
195
197
|
def update(enabled: nil)
|
196
198
|
data = Twilio::Values.of({'Enabled' => enabled, })
|
@@ -231,8 +233,9 @@ module Twilio
|
|
231
233
|
# Initialize the InstalledAddOnExtensionInstance
|
232
234
|
# @param [Version] version Version that contains the resource
|
233
235
|
# @param [Hash] payload payload that contains response from Twilio
|
234
|
-
# @param [String] installed_add_on_sid The
|
235
|
-
#
|
236
|
+
# @param [String] installed_add_on_sid The SID of the InstalledAddOn resource to
|
237
|
+
# which this extension applies.
|
238
|
+
# @param [String] sid The SID of the InstalledAddOn Extension resource to fetch.
|
236
239
|
# @return [InstalledAddOnExtensionInstance] InstalledAddOnExtensionInstance
|
237
240
|
def initialize(version, payload, installed_add_on_sid: nil, sid: nil)
|
238
241
|
super(version)
|
@@ -269,43 +272,43 @@ module Twilio
|
|
269
272
|
end
|
270
273
|
|
271
274
|
##
|
272
|
-
# @return [String]
|
275
|
+
# @return [String] The unique string that identifies the resource
|
273
276
|
def sid
|
274
277
|
@properties['sid']
|
275
278
|
end
|
276
279
|
|
277
280
|
##
|
278
|
-
# @return [String] The
|
281
|
+
# @return [String] The SID of the InstalledAddOn resource to which this extension applies
|
279
282
|
def installed_add_on_sid
|
280
283
|
@properties['installed_add_on_sid']
|
281
284
|
end
|
282
285
|
|
283
286
|
##
|
284
|
-
# @return [String]
|
287
|
+
# @return [String] The string that you assigned to describe the resource
|
285
288
|
def friendly_name
|
286
289
|
@properties['friendly_name']
|
287
290
|
end
|
288
291
|
|
289
292
|
##
|
290
|
-
# @return [String]
|
293
|
+
# @return [String] The name of the Extension's Product
|
291
294
|
def product_name
|
292
295
|
@properties['product_name']
|
293
296
|
end
|
294
297
|
|
295
298
|
##
|
296
|
-
# @return [String]
|
299
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
297
300
|
def unique_name
|
298
301
|
@properties['unique_name']
|
299
302
|
end
|
300
303
|
|
301
304
|
##
|
302
|
-
# @return [Boolean]
|
305
|
+
# @return [Boolean] Whether the Extension will be invoked
|
303
306
|
def enabled
|
304
307
|
@properties['enabled']
|
305
308
|
end
|
306
309
|
|
307
310
|
##
|
308
|
-
# @return [String] The
|
311
|
+
# @return [String] The absolute URL of the resource
|
309
312
|
def url
|
310
313
|
@properties['url']
|
311
314
|
end
|
@@ -319,7 +322,7 @@ module Twilio
|
|
319
322
|
|
320
323
|
##
|
321
324
|
# Update the InstalledAddOnExtensionInstance
|
322
|
-
# @param [Boolean] enabled
|
325
|
+
# @param [Boolean] enabled Whether the Extension should be invoked.
|
323
326
|
# @return [InstalledAddOnExtensionInstance] Updated InstalledAddOnExtensionInstance
|
324
327
|
def update(enabled: nil)
|
325
328
|
context.update(enabled: enabled, )
|
@@ -32,9 +32,10 @@ module Twilio
|
|
32
32
|
##
|
33
33
|
# Retrieve a single page of VerificationInstance records from the API.
|
34
34
|
# Request is executed immediately.
|
35
|
-
# @param [String] to The phone number to verify. Phone numbers must be in
|
36
|
-
# format](https://www.twilio.com/docs/glossary/what-e164).
|
37
|
-
# @param [String] channel The verification method to use. Can be: `sms`
|
35
|
+
# @param [String] to The phone number or email to verify. Phone numbers must be in
|
36
|
+
# [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
37
|
+
# @param [String] channel The verification method to use. Can be: `email`, `sms`
|
38
|
+
# or `call`.
|
38
39
|
# @param [String] custom_message The text of a custom message to use for the
|
39
40
|
# verification.
|
40
41
|
# @param [String] send_digits The digits to send after a phone call is answered,
|
@@ -55,8 +56,10 @@ module Twilio
|
|
55
56
|
# Limits. Keys should be the unique_name configured while creating you Rate Limit
|
56
57
|
# along with the associated values for each particular request. You may include
|
57
58
|
# multiple Rate Limit values in each request.
|
59
|
+
# @param [Hash] channel_configuration Channel specific configuration in json
|
60
|
+
# format: For email must include 'from' and 'from_name'.
|
58
61
|
# @return [VerificationInstance] Newly created VerificationInstance
|
59
|
-
def create(to: nil, channel: nil, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset)
|
62
|
+
def create(to: nil, channel: nil, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset)
|
60
63
|
data = Twilio::Values.of({
|
61
64
|
'To' => to,
|
62
65
|
'Channel' => channel,
|
@@ -67,6 +70,7 @@ module Twilio
|
|
67
70
|
'Amount' => amount,
|
68
71
|
'Payee' => payee,
|
69
72
|
'RateLimits' => Twilio.serialize_object(rate_limits),
|
73
|
+
'ChannelConfiguration' => Twilio.serialize_object(channel_configuration),
|
70
74
|
})
|
71
75
|
|
72
76
|
payload = @version.create(
|
@@ -261,7 +265,7 @@ module Twilio
|
|
261
265
|
end
|
262
266
|
|
263
267
|
##
|
264
|
-
# @return [String] The phone number being verified
|
268
|
+
# @return [String] The phone number or email being verified
|
265
269
|
def to
|
266
270
|
@properties['to']
|
267
271
|
end
|