twilio-ruby 5.63.1 → 5.65.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +7 -2
  3. data/CHANGES.md +81 -0
  4. data/README.md +3 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +7 -0
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
  8. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +27 -7
  9. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  10. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +447 -0
  11. data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
  12. data/lib/twilio-ruby/rest/conversations.rb +9 -0
  13. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
  14. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +56 -65
  15. data/lib/twilio-ruby/rest/insights/v1/conference.rb +82 -54
  16. data/lib/twilio-ruby/rest/insights/v1.rb +1 -1
  17. data/lib/twilio-ruby/rest/insights.rb +1 -1
  18. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +385 -0
  19. data/lib/twilio-ruby/rest/media/v1.rb +16 -0
  20. data/lib/twilio-ruby/rest/media.rb +9 -0
  21. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
  22. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  23. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
  24. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  25. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +9 -9
  26. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +18 -1
  27. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +22 -4
  28. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +7 -0
  29. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +16 -6
  30. data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
  31. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  32. data/lib/twilio-ruby/rest/verify.rb +2 -2
  33. data/lib/twilio-ruby/rest/video/v1/room.rb +7 -4
  34. data/lib/twilio-ruby/version.rb +1 -1
  35. data/lib/twilio-ruby.rb +1 -1
  36. metadata +5 -2
@@ -39,16 +39,23 @@ module Twilio
39
39
  # in Megabytes that each Sim resource assigned to the Fleet resource can consume
40
40
  # during a billing period (normally one month). Value must be between 1MB (1) and
41
41
  # 2TB (2,000,000). Defaults to 1GB (1,000).
42
- # @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
43
- # of sending and receiving machine-to-machine SMS via Commands. Defaults to
44
- # `true`.
45
- # @param [String] commands_url The URL that will receive a webhook when a Super
46
- # SIM in the Fleet is used to send an SMS from your device to the Commands number.
47
- # Your server should respond with an HTTP status code in the 200 range; any
48
- # response body will be ignored.
49
- # @param [String] commands_method A string representing the HTTP method to use
50
- # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
51
- # to `POST`.
42
+ # @param [Boolean] commands_enabled Deprecated. Use `sms_commands_enabled`
43
+ # instead. Defines whether SIMs in the Fleet are capable of sending and receiving
44
+ # machine-to-machine SMS via Commands. Defaults to `true`.
45
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
46
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
47
+ # from your device to the Commands number. Your server should respond with an HTTP
48
+ # status code in the 200 range; any response body will be ignored.
49
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
50
+ # string representing the HTTP method to use when making a request to
51
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
52
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
53
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
54
+ # address. Your server should respond with an HTTP status code in the 200 range;
55
+ # any response body will be ignored.
56
+ # @param [String] ip_commands_method A string representing the HTTP method to use
57
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
58
+ # Defaults to `POST`.
52
59
  # @param [Boolean] sms_commands_enabled Defines whether SIMs in the Fleet are
53
60
  # capable of sending and receiving machine-to-machine SMS via Commands. Defaults
54
61
  # to `true`.
@@ -60,7 +67,7 @@ module Twilio
60
67
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
61
68
  # Defaults to `POST`.
62
69
  # @return [FleetInstance] Created FleetInstance
63
- def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, sms_commands_enabled: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
70
+ def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_enabled: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
64
71
  data = Twilio::Values.of({
65
72
  'NetworkAccessProfile' => network_access_profile,
66
73
  'UniqueName' => unique_name,
@@ -69,6 +76,8 @@ module Twilio
69
76
  'CommandsEnabled' => commands_enabled,
70
77
  'CommandsUrl' => commands_url,
71
78
  'CommandsMethod' => commands_method,
79
+ 'IpCommandsUrl' => ip_commands_url,
80
+ 'IpCommandsMethod' => ip_commands_method,
72
81
  'SmsCommandsEnabled' => sms_commands_enabled,
73
82
  'SmsCommandsUrl' => sms_commands_url,
74
83
  'SmsCommandsMethod' => sms_commands_method,
@@ -244,13 +253,20 @@ module Twilio
244
253
  # @param [String] network_access_profile The SID or unique name of the Network
245
254
  # Access Profile that will control which cellular networks the Fleet's SIMs can
246
255
  # connect to.
247
- # @param [String] commands_url The URL that will receive a webhook when a Super
248
- # SIM in the Fleet is used to send an SMS from your device to the Commands number.
249
- # Your server should respond with an HTTP status code in the 200 range; any
250
- # response body will be ignored.
251
- # @param [String] commands_method A string representing the HTTP method to use
252
- # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
253
- # to `POST`.
256
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
257
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
258
+ # from your device to the Commands number. Your server should respond with an HTTP
259
+ # status code in the 200 range; any response body will be ignored.
260
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
261
+ # string representing the HTTP method to use when making a request to
262
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
263
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
264
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
265
+ # address. Your server should respond with an HTTP status code in the 200 range;
266
+ # any response body will be ignored.
267
+ # @param [String] ip_commands_method A string representing the HTTP method to use
268
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
269
+ # Defaults to `POST`.
254
270
  # @param [String] sms_commands_url The URL that will receive a webhook when a
255
271
  # Super SIM in the Fleet is used to send an SMS from your device to the SMS
256
272
  # Commands number. Your server should respond with an HTTP status code in the 200
@@ -259,12 +275,14 @@ module Twilio
259
275
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
260
276
  # Defaults to `POST`.
261
277
  # @return [FleetInstance] Updated FleetInstance
262
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
278
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
263
279
  data = Twilio::Values.of({
264
280
  'UniqueName' => unique_name,
265
281
  'NetworkAccessProfile' => network_access_profile,
266
282
  'CommandsUrl' => commands_url,
267
283
  'CommandsMethod' => commands_method,
284
+ 'IpCommandsUrl' => ip_commands_url,
285
+ 'IpCommandsMethod' => ip_commands_method,
268
286
  'SmsCommandsUrl' => sms_commands_url,
269
287
  'SmsCommandsMethod' => sms_commands_method,
270
288
  })
@@ -319,6 +337,8 @@ module Twilio
319
337
  'sms_commands_url' => payload['sms_commands_url'],
320
338
  'sms_commands_method' => payload['sms_commands_method'],
321
339
  'network_access_profile_sid' => payload['network_access_profile_sid'],
340
+ 'ip_commands_url' => payload['ip_commands_url'],
341
+ 'ip_commands_method' => payload['ip_commands_method'],
322
342
  }
323
343
 
324
344
  # Context
@@ -392,19 +412,19 @@ module Twilio
392
412
  end
393
413
 
394
414
  ##
395
- # @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
415
+ # @return [Boolean] Deprecated
396
416
  def commands_enabled
397
417
  @properties['commands_enabled']
398
418
  end
399
419
 
400
420
  ##
401
- # @return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number
421
+ # @return [String] Deprecated
402
422
  def commands_url
403
423
  @properties['commands_url']
404
424
  end
405
425
 
406
426
  ##
407
- # @return [String] A string representing the HTTP method to use when making a request to `commands_url`
427
+ # @return [String] Deprecated
408
428
  def commands_method
409
429
  @properties['commands_method']
410
430
  end
@@ -433,6 +453,18 @@ module Twilio
433
453
  @properties['network_access_profile_sid']
434
454
  end
435
455
 
456
+ ##
457
+ # @return [String] The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
458
+ def ip_commands_url
459
+ @properties['ip_commands_url']
460
+ end
461
+
462
+ ##
463
+ # @return [String] A string representing the HTTP method to use when making a request to `ip_commands_url`
464
+ def ip_commands_method
465
+ @properties['ip_commands_method']
466
+ end
467
+
436
468
  ##
437
469
  # Fetch the FleetInstance
438
470
  # @return [FleetInstance] Fetched FleetInstance
@@ -448,13 +480,20 @@ module Twilio
448
480
  # @param [String] network_access_profile The SID or unique name of the Network
449
481
  # Access Profile that will control which cellular networks the Fleet's SIMs can
450
482
  # connect to.
451
- # @param [String] commands_url The URL that will receive a webhook when a Super
452
- # SIM in the Fleet is used to send an SMS from your device to the Commands number.
453
- # Your server should respond with an HTTP status code in the 200 range; any
454
- # response body will be ignored.
455
- # @param [String] commands_method A string representing the HTTP method to use
456
- # when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults
457
- # to `POST`.
483
+ # @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
484
+ # that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
485
+ # from your device to the Commands number. Your server should respond with an HTTP
486
+ # status code in the 200 range; any response body will be ignored.
487
+ # @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
488
+ # string representing the HTTP method to use when making a request to
489
+ # `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
490
+ # @param [String] ip_commands_url The URL that will receive a webhook when a Super
491
+ # SIM in the Fleet is used to send an IP Command from your device to a special IP
492
+ # address. Your server should respond with an HTTP status code in the 200 range;
493
+ # any response body will be ignored.
494
+ # @param [String] ip_commands_method A string representing the HTTP method to use
495
+ # when making a request to `ip_commands_url`. Can be one of `POST` or `GET`.
496
+ # Defaults to `POST`.
458
497
  # @param [String] sms_commands_url The URL that will receive a webhook when a
459
498
  # Super SIM in the Fleet is used to send an SMS from your device to the SMS
460
499
  # Commands number. Your server should respond with an HTTP status code in the 200
@@ -463,12 +502,14 @@ module Twilio
463
502
  # when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
464
503
  # Defaults to `POST`.
465
504
  # @return [FleetInstance] Updated FleetInstance
466
- def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
505
+ def update(unique_name: :unset, network_access_profile: :unset, commands_url: :unset, commands_method: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
467
506
  context.update(
468
507
  unique_name: unique_name,
469
508
  network_access_profile: network_access_profile,
470
509
  commands_url: commands_url,
471
510
  commands_method: commands_method,
511
+ ip_commands_url: ip_commands_url,
512
+ ip_commands_method: ip_commands_method,
472
513
  sms_commands_url: sms_commands_url,
473
514
  sms_commands_method: sms_commands_method,
474
515
  )
@@ -28,7 +28,7 @@ module Twilio
28
28
  ##
29
29
  # Create the SmsCommandInstance
30
30
  # @param [String] sim The `sid` or `unique_name` of the
31
- # {SIM}[https://www.twilio.com/docs/wireless/api/sim-resource] to send the SMS
31
+ # {SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the SMS
32
32
  # Command to.
33
33
  # @param [String] payload The message body of the SMS Command.
34
34
  # @param [String] callback_method The HTTP method we should use to call
@@ -49,9 +49,9 @@ module Twilio
49
49
  # @param [Time] start_time Only include usage that occurred at or after this time,
50
50
  # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
51
51
  # is one month before the `end_time`.
52
- # @param [Time] end_time Only include usage that occurred before this time,
53
- # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
54
- # is the current time.
52
+ # @param [Time] end_time Only include usage that occurred before this time
53
+ # (exclusive), specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601]
54
+ # format. Default is the current time.
55
55
  # @param [Integer] limit Upper limit for the number of records to return. stream()
56
56
  # guarantees to never return more than limit. Default is no limit
57
57
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -98,9 +98,9 @@ module Twilio
98
98
  # @param [Time] start_time Only include usage that occurred at or after this time,
99
99
  # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
100
100
  # is one month before the `end_time`.
101
- # @param [Time] end_time Only include usage that occurred before this time,
102
- # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
103
- # is the current time.
101
+ # @param [Time] end_time Only include usage that occurred before this time
102
+ # (exclusive), specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601]
103
+ # format. Default is the current time.
104
104
  # @param [Integer] limit Upper limit for the number of records to return. stream()
105
105
  # guarantees to never return more than limit. Default is no limit.
106
106
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -163,9 +163,9 @@ module Twilio
163
163
  # @param [Time] start_time Only include usage that occurred at or after this time,
164
164
  # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
165
165
  # is one month before the `end_time`.
166
- # @param [Time] end_time Only include usage that occurred before this time,
167
- # specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601] format. Default
168
- # is the current time.
166
+ # @param [Time] end_time Only include usage that occurred before this time
167
+ # (exclusive), specified in {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601]
168
+ # format. Default is the current time.
169
169
  # @param [String] page_token PageToken provided by the API
170
170
  # @param [Integer] page_number Page Number, this value is simply for client state
171
171
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -36,12 +36,15 @@ module Twilio
36
36
  # `push`
37
37
  # @param [String] factor_friendly_name The friendly name of the factor that is
38
38
  # going to be created with this access token
39
+ # @param [String] ttl How long, in seconds, the access token is valid. Can be an
40
+ # integer between 60 and 300. Default is 60.
39
41
  # @return [AccessTokenInstance] Created AccessTokenInstance
40
- def create(identity: nil, factor_type: nil, factor_friendly_name: :unset)
42
+ def create(identity: nil, factor_type: nil, factor_friendly_name: :unset, ttl: :unset)
41
43
  data = Twilio::Values.of({
42
44
  'Identity' => identity,
43
45
  'FactorType' => factor_type,
44
46
  'FactorFriendlyName' => factor_friendly_name,
47
+ 'Ttl' => ttl,
45
48
  })
46
49
 
47
50
  payload = @version.create('POST', @uri, data: data)
@@ -158,6 +161,8 @@ module Twilio
158
161
  'factor_friendly_name' => payload['factor_friendly_name'],
159
162
  'token' => payload['token'],
160
163
  'url' => payload['url'],
164
+ 'ttl' => payload['ttl'].to_i,
165
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
161
166
  }
162
167
 
163
168
  # Context
@@ -224,6 +229,18 @@ module Twilio
224
229
  @properties['url']
225
230
  end
226
231
 
232
+ ##
233
+ # @return [String] How long, in seconds, the access token is valid.
234
+ def ttl
235
+ @properties['ttl']
236
+ end
237
+
238
+ ##
239
+ # @return [Time] The date this access token was created
240
+ def date_created
241
+ @properties['date_created']
242
+ end
243
+
227
244
  ##
228
245
  # Fetch the AccessTokenInstance
229
246
  # @return [AccessTokenInstance] Fetched AccessTokenInstance
@@ -277,9 +277,16 @@ module Twilio
277
277
  # Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must
278
278
  # be between 3 and 8 characters long. For `Push` this value can be up to 5456
279
279
  # characters in length
280
+ # @param [Hash] metadata Custom metadata associated with the challenge. This is
281
+ # added by the Device/SDK directly to allow for the inclusion of device
282
+ # information. It must be a stringified JSON with only strings values eg. `{"os":
283
+ # "Android"}`. Can be up to 1024 characters in length.
280
284
  # @return [ChallengeInstance] Updated ChallengeInstance
281
- def update(auth_payload: :unset)
282
- data = Twilio::Values.of({'AuthPayload' => auth_payload, })
285
+ def update(auth_payload: :unset, metadata: :unset)
286
+ data = Twilio::Values.of({
287
+ 'AuthPayload' => auth_payload,
288
+ 'Metadata' => Twilio.serialize_object(metadata),
289
+ })
283
290
 
284
291
  payload = @version.update('POST', @uri, data: data)
285
292
 
@@ -358,6 +365,7 @@ module Twilio
358
365
  'responded_reason' => payload['responded_reason'],
359
366
  'details' => payload['details'],
360
367
  'hidden_details' => payload['hidden_details'],
368
+ 'metadata' => payload['metadata'],
361
369
  'factor_type' => payload['factor_type'],
362
370
  'url' => payload['url'],
363
371
  'links' => payload['links'],
@@ -468,6 +476,12 @@ module Twilio
468
476
  @properties['hidden_details']
469
477
  end
470
478
 
479
+ ##
480
+ # @return [Hash] Metadata of the challenge.
481
+ def metadata
482
+ @properties['metadata']
483
+ end
484
+
471
485
  ##
472
486
  # @return [challenge.FactorTypes] The Factor Type of this Challenge
473
487
  def factor_type
@@ -499,9 +513,13 @@ module Twilio
499
513
  # Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must
500
514
  # be between 3 and 8 characters long. For `Push` this value can be up to 5456
501
515
  # characters in length
516
+ # @param [Hash] metadata Custom metadata associated with the challenge. This is
517
+ # added by the Device/SDK directly to allow for the inclusion of device
518
+ # information. It must be a stringified JSON with only strings values eg. `{"os":
519
+ # "Android"}`. Can be up to 1024 characters in length.
502
520
  # @return [ChallengeInstance] Updated ChallengeInstance
503
- def update(auth_payload: :unset)
504
- context.update(auth_payload: auth_payload, )
521
+ def update(auth_payload: :unset, metadata: :unset)
522
+ context.update(auth_payload: auth_payload, metadata: metadata, )
505
523
  end
506
524
 
507
525
  ##
@@ -293,6 +293,7 @@ module Twilio
293
293
  'status' => payload['status'],
294
294
  'factor_type' => payload['factor_type'],
295
295
  'config' => payload['config'],
296
+ 'metadata' => payload['metadata'],
296
297
  'url' => payload['url'],
297
298
  }
298
299
 
@@ -383,6 +384,12 @@ module Twilio
383
384
  @properties['config']
384
385
  end
385
386
 
387
+ ##
388
+ # @return [Hash] Metadata of the factor.
389
+ def metadata
390
+ @properties['metadata']
391
+ end
392
+
386
393
  ##
387
394
  # @return [String] The URL of this resource.
388
395
  def url
@@ -41,9 +41,7 @@ module Twilio
41
41
  # constructing the `binding.uri` property.
42
42
  # At the same time, we recommend avoiding providing PII.
43
43
  # @param [new_factor.FactorTypes] factor_type The Type of this Factor. Currently
44
- # `push` and `totp` are supported. For `totp` to work, you need to contact {Twilio
45
- # sales}[https://www.twilio.com/help/sales] first to have the Verify TOTP feature
46
- # enabled for your Twilio account.
44
+ # `push` and `totp` are supported.
47
45
  # @param [String] binding_alg The algorithm used when `factor_type` is `push`.
48
46
  # Algorithm supported: `ES256`
49
47
  # @param [String] binding_public_key The Ecdsa public key in PKIX, ASN.1 DER
@@ -96,8 +94,12 @@ module Twilio
96
94
  # TOTP codes. Can be `sha1`, `sha256` or `sha512`. Defaults to `sha1`.
97
95
  #
98
96
  # Used when `factor_type` is `totp`
97
+ # @param [Hash] metadata Custom metadata associated with the factor. This is added
98
+ # by the Device/SDK directly to allow for the inclusion of device information. It
99
+ # must be a stringified JSON with only strings values eg. `{"os": "Android"}`. Can
100
+ # be up to 1024 characters in length.
99
101
  # @return [NewFactorInstance] Created NewFactorInstance
100
- def create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, binding_secret: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
102
+ def create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, binding_secret: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, metadata: :unset)
101
103
  data = Twilio::Values.of({
102
104
  'FriendlyName' => friendly_name,
103
105
  'FactorType' => factor_type,
@@ -112,6 +114,7 @@ module Twilio
112
114
  'Config.Skew' => config_skew,
113
115
  'Config.CodeLength' => config_code_length,
114
116
  'Config.Alg' => config_alg,
117
+ 'Metadata' => Twilio.serialize_object(metadata),
115
118
  })
116
119
 
117
120
  payload = @version.create('POST', @uri, data: data)
@@ -197,6 +200,7 @@ module Twilio
197
200
  'status' => payload['status'],
198
201
  'factor_type' => payload['factor_type'],
199
202
  'config' => payload['config'],
203
+ 'metadata' => payload['metadata'],
200
204
  'url' => payload['url'],
201
205
  }
202
206
  end
@@ -232,7 +236,7 @@ module Twilio
232
236
  end
233
237
 
234
238
  ##
235
- # @return [Hash] Unique external identifier of the Entity
239
+ # @return [Hash] Binding of the factor
236
240
  def binding
237
241
  @properties['binding']
238
242
  end
@@ -268,11 +272,17 @@ module Twilio
268
272
  end
269
273
 
270
274
  ##
271
- # @return [Hash] Binding for a `factor_type`.
275
+ # @return [Hash] Configurations for a `factor_type`.
272
276
  def config
273
277
  @properties['config']
274
278
  end
275
279
 
280
+ ##
281
+ # @return [Hash] Metadata of the factor.
282
+ def metadata
283
+ @properties['metadata']
284
+ end
285
+
276
286
  ##
277
287
  # @return [String] The URL of this resource.
278
288
  def url
@@ -183,7 +183,7 @@ module Twilio
183
183
  end
184
184
 
185
185
  ##
186
- # @return [Hash] Ojbect with the template translations.
186
+ # @return [Hash] Object with the template translations.
187
187
  def translations
188
188
  @properties['translations']
189
189
  end