twilio-ruby 5.48.0 → 5.49.0

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +21 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
  8. data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
  9. data/lib/twilio-ruby/rest/bulkexports/v1.rb +10 -8
  10. data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
  11. data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
  12. data/lib/twilio-ruby/rest/client.rb +1 -1
  13. data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
  14. data/lib/twilio-ruby/rest/events/v1.rb +20 -16
  15. data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
  16. data/lib/twilio-ruby/rest/events/v1/schema.rb +4 -4
  17. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +4 -4
  18. data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -4
  19. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
  20. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
  21. data/lib/twilio-ruby/rest/events/v1/subscription.rb +4 -4
  22. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +3 -3
  23. data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
  24. data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
  25. data/lib/twilio-ruby/rest/insights.rb +1 -1
  26. data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
  27. data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
  28. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
  29. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
  30. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
  31. data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
  32. data/lib/twilio-ruby/rest/messaging/v1.rb +10 -8
  33. data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
  34. data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
  35. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +10 -8
  36. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
  37. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
  38. data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
  39. data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
  40. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
  41. data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
  42. data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
  43. data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
  44. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
  45. data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
  46. data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
  47. data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
  48. data/lib/twilio-ruby/rest/supersim/v1.rb +25 -20
  49. data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
  50. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +9 -16
  51. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -15
  52. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +22 -33
  53. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -15
  54. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +22 -35
  55. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -15
  56. data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
  57. data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
  58. data/lib/twilio-ruby/rest/trusthub/v1.rb +35 -28
  59. data/lib/twilio-ruby/rest/verify/v2.rb +15 -12
  60. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +4 -3
  61. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +64 -13
  62. data/lib/twilio-ruby/rest/video/v1.rb +20 -16
  63. data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
  64. data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
  65. data/lib/twilio-ruby/twiml/voice_response.rb +22 -0
  66. data/lib/twilio-ruby/version.rb +1 -1
  67. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  68. data/spec/integration/messaging/v1/brand_registration_spec.rb +2 -2
  69. data/spec/integration/verify/v2/service/entity/factor_spec.rb +3 -3
  70. metadata +2 -2
@@ -34,11 +34,9 @@ module Twilio
34
34
  # URL path to address the resource.
35
35
  # @param [String] ttl An alias for `collection_ttl`. If both parameters are
36
36
  # provided, this value is ignored.
37
- # @param [String] collection_ttl How long, in seconds, before the Sync Map expires
38
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
39
- # The default value is `0`, which means the Sync Map does not expire. The Sync Map
40
- # will be deleted automatically after it expires, but there can be a delay between
41
- # the expiration time and the resources's deletion.
37
+ # @param [String] collection_ttl How long, {in
38
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
39
+ # the Sync Map expires (time-to-live) and is deleted.
42
40
  # @return [SyncMapInstance] Created SyncMapInstance
43
41
  def create(unique_name: :unset, ttl: :unset, collection_ttl: :unset)
44
42
  data = Twilio::Values.of({
@@ -210,11 +208,9 @@ module Twilio
210
208
  # Update the SyncMapInstance
211
209
  # @param [String] ttl An alias for `collection_ttl`. If both parameters are
212
210
  # provided, this value is ignored.
213
- # @param [String] collection_ttl How long, in seconds, before the Sync Map expires
214
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
215
- # The default value is `0`, which means the Sync Map does not expire. The Sync Map
216
- # will be deleted automatically after it expires, but there can be a delay between
217
- # the expiration time and the resources's deletion.
211
+ # @param [String] collection_ttl How long, {in
212
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
213
+ # the Sync Map expires (time-to-live) and is deleted.
218
214
  # @return [SyncMapInstance] Updated SyncMapInstance
219
215
  def update(ttl: :unset, collection_ttl: :unset)
220
216
  data = Twilio::Values.of({'Ttl' => ttl, 'CollectionTtl' => collection_ttl, })
@@ -412,11 +408,9 @@ module Twilio
412
408
  # Update the SyncMapInstance
413
409
  # @param [String] ttl An alias for `collection_ttl`. If both parameters are
414
410
  # provided, this value is ignored.
415
- # @param [String] collection_ttl How long, in seconds, before the Sync Map expires
416
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
417
- # The default value is `0`, which means the Sync Map does not expire. The Sync Map
418
- # will be deleted automatically after it expires, but there can be a delay between
419
- # the expiration time and the resources's deletion.
411
+ # @param [String] collection_ttl How long, {in
412
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
413
+ # the Sync Map expires (time-to-live) and is deleted.
420
414
  # @return [SyncMapInstance] Updated SyncMapInstance
421
415
  def update(ttl: :unset, collection_ttl: :unset)
422
416
  context.update(ttl: ttl, collection_ttl: collection_ttl, )
@@ -37,17 +37,12 @@ module Twilio
37
37
  # object that the Map Item stores. Can be up to 16 KiB in length.
38
38
  # @param [String] ttl An alias for `item_ttl`. If both parameters are provided,
39
39
  # this value is ignored.
40
- # @param [String] item_ttl How long, in seconds, before the Map Item expires
41
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
42
- # The default value is `0`, which means the Map Item does not expire. The Map
43
- # Item will be deleted automatically after it expires, but there can be a delay
44
- # between the expiration time and the resources's deletion.
45
- # @param [String] collection_ttl How long, in seconds, before the Map Item's
46
- # parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0
47
- # to 31,536,000 (1 year). The default value is `0`, which means the parent Sync
48
- # Map does not expire. The Sync Map will be deleted automatically after it
49
- # expires, but there can be a delay between the expiration time and the
50
- # resources's deletion.
40
+ # @param [String] item_ttl How long, {in
41
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
42
+ # the Map Item expires (time-to-live) and is deleted.
43
+ # @param [String] collection_ttl How long, {in
44
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
45
+ # the Map Item's parent Sync Map expires (time-to-live) and is deleted.
51
46
  # @return [SyncMapItemInstance] Created SyncMapItemInstance
52
47
  def create(key: nil, data: nil, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
53
48
  data = Twilio::Values.of({
@@ -278,18 +273,14 @@ module Twilio
278
273
  # object that the Map Item stores. Can be up to 16 KiB in length.
279
274
  # @param [String] ttl An alias for `item_ttl`. If both parameters are provided,
280
275
  # this value is ignored.
281
- # @param [String] item_ttl How long, in seconds, before the Map Item expires
282
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
283
- # The default value is `0`, which means the Map Item does not expire. The Map Item
284
- # will be deleted automatically after it expires, but there can be a delay between
285
- # the expiration time and the resources's deletion.
286
- # @param [String] collection_ttl How long, in seconds, before the Map Item's
287
- # parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0
288
- # to 31,536,000 (1 year). The default value is `0`, which means the parent Sync
289
- # Map does not expire. This parameter can only be used when the Map Item's `data`
290
- # or `ttl` is updated in the same request. The Sync Map will be deleted
291
- # automatically after it expires, but there can be a delay between the expiration
292
- # time and the resources's deletion.
276
+ # @param [String] item_ttl How long, {in
277
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
278
+ # the Map Item expires (time-to-live) and is deleted.
279
+ # @param [String] collection_ttl How long, {in
280
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
281
+ # the Map Item's parent Sync Map expires (time-to-live) and is deleted. This
282
+ # parameter can only be used when the Map Item's `data` or `ttl` is updated in the
283
+ # same request.
293
284
  # @param [String] if_match If provided, applies this mutation if (and only if) the
294
285
  # “revision” field of this {map item] matches the provided value. This matches the
295
286
  # semantics of (and is implemented with) the HTTP [If-Match
@@ -470,18 +461,14 @@ module Twilio
470
461
  # object that the Map Item stores. Can be up to 16 KiB in length.
471
462
  # @param [String] ttl An alias for `item_ttl`. If both parameters are provided,
472
463
  # this value is ignored.
473
- # @param [String] item_ttl How long, in seconds, before the Map Item expires
474
- # (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year).
475
- # The default value is `0`, which means the Map Item does not expire. The Map Item
476
- # will be deleted automatically after it expires, but there can be a delay between
477
- # the expiration time and the resources's deletion.
478
- # @param [String] collection_ttl How long, in seconds, before the Map Item's
479
- # parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0
480
- # to 31,536,000 (1 year). The default value is `0`, which means the parent Sync
481
- # Map does not expire. This parameter can only be used when the Map Item's `data`
482
- # or `ttl` is updated in the same request. The Sync Map will be deleted
483
- # automatically after it expires, but there can be a delay between the expiration
484
- # time and the resources's deletion.
464
+ # @param [String] item_ttl How long, {in
465
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
466
+ # the Map Item expires (time-to-live) and is deleted.
467
+ # @param [String] collection_ttl How long, {in
468
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
469
+ # the Map Item's parent Sync Map expires (time-to-live) and is deleted. This
470
+ # parameter can only be used when the Map Item's `data` or `ttl` is updated in the
471
+ # same request.
485
472
  # @param [String] if_match If provided, applies this mutation if (and only if) the
486
473
  # “revision” field of this {map item] matches the provided value. This matches the
487
474
  # semantics of (and is implemented with) the HTTP [If-Match
@@ -33,11 +33,9 @@ module Twilio
33
33
  # identifies the resource. This value must be unique within its Service and it can
34
34
  # be up to 320 characters long. The `unique_name` value can be used as an
35
35
  # alternative to the `sid` in the URL path to address the resource.
36
- # @param [String] ttl How long, in seconds, before the Stream expires and is
37
- # deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The
38
- # default value is `0`, which means the Stream does not expire. The Stream will be
39
- # deleted automatically after it expires, but there can be a delay between the
40
- # expiration time and the resources's deletion.
36
+ # @param [String] ttl How long, {in
37
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
38
+ # the Stream expires and is deleted (time-to-live).
41
39
  # @return [SyncStreamInstance] Created SyncStreamInstance
42
40
  def create(unique_name: :unset, ttl: :unset)
43
41
  data = Twilio::Values.of({'UniqueName' => unique_name, 'Ttl' => ttl, })
@@ -206,11 +204,9 @@ module Twilio
206
204
 
207
205
  ##
208
206
  # Update the SyncStreamInstance
209
- # @param [String] ttl How long, in seconds, before the Stream expires and is
210
- # deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The
211
- # default value is `0`, which means the Stream does not expire. The Stream will be
212
- # deleted automatically after it expires, but there can be a delay between the
213
- # expiration time and the resources's deletion.
207
+ # @param [String] ttl How long, {in
208
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
209
+ # the Stream expires and is deleted (time-to-live).
214
210
  # @return [SyncStreamInstance] Updated SyncStreamInstance
215
211
  def update(ttl: :unset)
216
212
  data = Twilio::Values.of({'Ttl' => ttl, })
@@ -375,11 +371,9 @@ module Twilio
375
371
 
376
372
  ##
377
373
  # Update the SyncStreamInstance
378
- # @param [String] ttl How long, in seconds, before the Stream expires and is
379
- # deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The
380
- # default value is `0`, which means the Stream does not expire. The Stream will be
381
- # deleted automatically after it expires, but there can be a delay between the
382
- # expiration time and the resources's deletion.
374
+ # @param [String] ttl How long, {in
375
+ # seconds}[https://www.twilio.com/docs/sync/limits#sync-payload-limits], before
376
+ # the Stream expires and is deleted (time-to-live).
383
377
  # @return [SyncStreamInstance] Updated SyncStreamInstance
384
378
  def update(ttl: :unset)
385
379
  context.update(ttl: ttl, )
@@ -24,11 +24,12 @@ module Twilio
24
24
  # @return [Twilio::REST::Taskrouter::V1::WorkspaceList]
25
25
  def workspaces(sid=:unset)
26
26
  if sid.nil?
27
- raise ArgumentError, 'sid cannot be nil'
28
- elsif sid == :unset
29
- @workspaces ||= WorkspaceList.new self
27
+ raise ArgumentError, 'sid cannot be nil'
28
+ end
29
+ if sid == :unset
30
+ @workspaces ||= WorkspaceList.new self
30
31
  else
31
- WorkspaceContext.new(self, sid)
32
+ WorkspaceContext.new(self, sid)
32
33
  end
33
34
  end
34
35
 
@@ -25,11 +25,12 @@ module Twilio
25
25
  # @return [Twilio::REST::Trunking::V1::TrunkList]
26
26
  def trunks(sid=:unset)
27
27
  if sid.nil?
28
- raise ArgumentError, 'sid cannot be nil'
29
- elsif sid == :unset
30
- @trunks ||= TrunkList.new self
28
+ raise ArgumentError, 'sid cannot be nil'
29
+ end
30
+ if sid == :unset
31
+ @trunks ||= TrunkList.new self
31
32
  else
32
- TrunkContext.new(self, sid)
33
+ TrunkContext.new(self, sid)
33
34
  end
34
35
  end
35
36
 
@@ -31,11 +31,12 @@ module Twilio
31
31
  # @return [Twilio::REST::Trusthub::V1::CustomerProfilesList]
32
32
  def customer_profiles(sid=:unset)
33
33
  if sid.nil?
34
- raise ArgumentError, 'sid cannot be nil'
35
- elsif sid == :unset
36
- @customer_profiles ||= CustomerProfilesList.new self
34
+ raise ArgumentError, 'sid cannot be nil'
35
+ end
36
+ if sid == :unset
37
+ @customer_profiles ||= CustomerProfilesList.new self
37
38
  else
38
- CustomerProfilesContext.new(self, sid)
39
+ CustomerProfilesContext.new(self, sid)
39
40
  end
40
41
  end
41
42
 
@@ -46,11 +47,12 @@ module Twilio
46
47
  # @return [Twilio::REST::Trusthub::V1::EndUserList]
47
48
  def end_users(sid=:unset)
48
49
  if sid.nil?
49
- raise ArgumentError, 'sid cannot be nil'
50
- elsif sid == :unset
51
- @end_users ||= EndUserList.new self
50
+ raise ArgumentError, 'sid cannot be nil'
51
+ end
52
+ if sid == :unset
53
+ @end_users ||= EndUserList.new self
52
54
  else
53
- EndUserContext.new(self, sid)
55
+ EndUserContext.new(self, sid)
54
56
  end
55
57
  end
56
58
 
@@ -61,11 +63,12 @@ module Twilio
61
63
  # @return [Twilio::REST::Trusthub::V1::EndUserTypeList]
62
64
  def end_user_types(sid=:unset)
63
65
  if sid.nil?
64
- raise ArgumentError, 'sid cannot be nil'
65
- elsif sid == :unset
66
- @end_user_types ||= EndUserTypeList.new self
66
+ raise ArgumentError, 'sid cannot be nil'
67
+ end
68
+ if sid == :unset
69
+ @end_user_types ||= EndUserTypeList.new self
67
70
  else
68
- EndUserTypeContext.new(self, sid)
71
+ EndUserTypeContext.new(self, sid)
69
72
  end
70
73
  end
71
74
 
@@ -75,11 +78,12 @@ module Twilio
75
78
  # @return [Twilio::REST::Trusthub::V1::PoliciesList]
76
79
  def policies(sid=:unset)
77
80
  if sid.nil?
78
- raise ArgumentError, 'sid cannot be nil'
79
- elsif sid == :unset
80
- @policies ||= PoliciesList.new self
81
+ raise ArgumentError, 'sid cannot be nil'
82
+ end
83
+ if sid == :unset
84
+ @policies ||= PoliciesList.new self
81
85
  else
82
- PoliciesContext.new(self, sid)
86
+ PoliciesContext.new(self, sid)
83
87
  end
84
88
  end
85
89
 
@@ -90,11 +94,12 @@ module Twilio
90
94
  # @return [Twilio::REST::Trusthub::V1::SupportingDocumentList]
91
95
  def supporting_documents(sid=:unset)
92
96
  if sid.nil?
93
- raise ArgumentError, 'sid cannot be nil'
94
- elsif sid == :unset
95
- @supporting_documents ||= SupportingDocumentList.new self
97
+ raise ArgumentError, 'sid cannot be nil'
98
+ end
99
+ if sid == :unset
100
+ @supporting_documents ||= SupportingDocumentList.new self
96
101
  else
97
- SupportingDocumentContext.new(self, sid)
102
+ SupportingDocumentContext.new(self, sid)
98
103
  end
99
104
  end
100
105
 
@@ -105,11 +110,12 @@ module Twilio
105
110
  # @return [Twilio::REST::Trusthub::V1::SupportingDocumentTypeList]
106
111
  def supporting_document_types(sid=:unset)
107
112
  if sid.nil?
108
- raise ArgumentError, 'sid cannot be nil'
109
- elsif sid == :unset
110
- @supporting_document_types ||= SupportingDocumentTypeList.new self
113
+ raise ArgumentError, 'sid cannot be nil'
114
+ end
115
+ if sid == :unset
116
+ @supporting_document_types ||= SupportingDocumentTypeList.new self
111
117
  else
112
- SupportingDocumentTypeContext.new(self, sid)
118
+ SupportingDocumentTypeContext.new(self, sid)
113
119
  end
114
120
  end
115
121
 
@@ -120,11 +126,12 @@ module Twilio
120
126
  # @return [Twilio::REST::Trusthub::V1::TrustProductsList]
121
127
  def trust_products(sid=:unset)
122
128
  if sid.nil?
123
- raise ArgumentError, 'sid cannot be nil'
124
- elsif sid == :unset
125
- @trust_products ||= TrustProductsList.new self
129
+ raise ArgumentError, 'sid cannot be nil'
130
+ end
131
+ if sid == :unset
132
+ @trust_products ||= TrustProductsList.new self
126
133
  else
127
- TrustProductsContext.new(self, sid)
134
+ TrustProductsContext.new(self, sid)
128
135
  end
129
136
  end
130
137
 
@@ -27,11 +27,12 @@ module Twilio
27
27
  # @return [Twilio::REST::Verify::V2::FormList]
28
28
  def forms(form_type=:unset)
29
29
  if form_type.nil?
30
- raise ArgumentError, 'form_type cannot be nil'
31
- elsif form_type == :unset
32
- @forms ||= FormList.new self
30
+ raise ArgumentError, 'form_type cannot be nil'
31
+ end
32
+ if form_type == :unset
33
+ @forms ||= FormList.new self
33
34
  else
34
- FormContext.new(self, form_type)
35
+ FormContext.new(self, form_type)
35
36
  end
36
37
  end
37
38
 
@@ -42,11 +43,12 @@ module Twilio
42
43
  # @return [Twilio::REST::Verify::V2::ServiceList]
43
44
  def services(sid=:unset)
44
45
  if sid.nil?
45
- raise ArgumentError, 'sid cannot be nil'
46
- elsif sid == :unset
47
- @services ||= ServiceList.new self
46
+ raise ArgumentError, 'sid cannot be nil'
47
+ end
48
+ if sid == :unset
49
+ @services ||= ServiceList.new self
48
50
  else
49
- ServiceContext.new(self, sid)
51
+ ServiceContext.new(self, sid)
50
52
  end
51
53
  end
52
54
 
@@ -56,11 +58,12 @@ module Twilio
56
58
  # @return [Twilio::REST::Verify::V2::VerificationAttemptList]
57
59
  def verification_attempts(sid=:unset)
58
60
  if sid.nil?
59
- raise ArgumentError, 'sid cannot be nil'
60
- elsif sid == :unset
61
- @verification_attempts ||= VerificationAttemptList.new self
61
+ raise ArgumentError, 'sid cannot be nil'
62
+ end
63
+ if sid == :unset
64
+ @verification_attempts ||= VerificationAttemptList.new self
62
65
  else
63
- VerificationAttemptContext.new(self, sid)
66
+ VerificationAttemptContext.new(self, sid)
64
67
  end
65
68
  end
66
69
 
@@ -20,7 +20,7 @@ module Twilio
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] service_sid The unique SID identifier of the Service.
22
22
  # @param [String] identity Customer unique identity for the Entity owner of the
23
- # Challenge
23
+ # Challenge. This value must be between 8 and 64 characters long.
24
24
  # @return [ChallengeList] ChallengeList
25
25
  def initialize(version, service_sid: nil, identity: nil)
26
26
  super(version)
@@ -208,7 +208,8 @@ module Twilio
208
208
  # @param [String] service_sid The unique SID identifier of the Service.
209
209
  # @param [String] identity The unique external identifier for the Entity of the
210
210
  # Service. This identifier should be immutable, not PII, and generated by your
211
- # external system, such as your user's UUID, GUID, or SID.
211
+ # external system, such as your user's UUID, GUID, or SID. This value must be
212
+ # between 8 and 64 characters long.
212
213
  # @param [String] sid A 34 character string that uniquely identifies this
213
214
  # Challenge.
214
215
  # @return [ChallengeContext] ChallengeContext
@@ -278,7 +279,7 @@ module Twilio
278
279
  # @param [Hash] payload payload that contains response from Twilio
279
280
  # @param [String] service_sid The unique SID identifier of the Service.
280
281
  # @param [String] identity Customer unique identity for the Entity owner of the
281
- # Challenge
282
+ # Challenge. This value must be between 8 and 64 characters long.
282
283
  # @param [String] sid A 34 character string that uniquely identifies this
283
284
  # Challenge.
284
285
  # @return [ChallengeInstance] ChallengeInstance
@@ -21,7 +21,8 @@ module Twilio
21
21
  # @param [String] service_sid The unique SID identifier of the Service.
22
22
  # @param [String] identity The unique external identifier for the Entity of the
23
23
  # Service. This identifier should be immutable, not PII, and generated by your
24
- # external system, such as your user's UUID, GUID, or SID.
24
+ # external system, such as your user's UUID, GUID, or SID. This value must be
25
+ # between 8 and 64 characters long.
25
26
  # @return [FactorList] FactorList
26
27
  def initialize(version, service_sid: nil, identity: nil)
27
28
  super(version)
@@ -33,7 +34,8 @@ module Twilio
33
34
 
34
35
  ##
35
36
  # Create the FactorInstance
36
- # @param [String] friendly_name The friendly name of this Factor
37
+ # @param [String] friendly_name The friendly name of this Factor. It can be up to
38
+ # 64 characters.
37
39
  # @param [factor.FactorTypes] factor_type The Type of this Factor. Currently only
38
40
  # `push` is supported
39
41
  # @param [String] binding_alg The algorithm used when `factor_type` is `push`.
@@ -42,17 +44,30 @@ module Twilio
42
44
  # format encoded in Base64
43
45
  # @param [String] config_app_id The ID that uniquely identifies your app in the
44
46
  # Google or Apple store, such as `com.example.myapp`. Required when `factor_type`
45
- # is `push`
47
+ # is `push`. If specified, it can be up to 100 characters long.
46
48
  # @param [factor.NotificationPlatforms] config_notification_platform The transport
47
49
  # technology used to generate the Notification Token. Can be `apn` or `fcm`.
48
50
  # Required when `factor_type` is `push`
49
51
  # @param [String] config_notification_token For APN, the device token. For FCM the
50
52
  # registration token. It used to send the push notifications. Required when
51
- # `factor_type` is `push`
53
+ # `factor_type` is `push`. If specified, this value must be between 32 and 255
54
+ # characters long.
52
55
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
53
56
  # the factor
57
+ # @param [String] binding_secret The shared secret for TOTP factors encoded in
58
+ # Base32
59
+ # @param [String] config_time_step Defines how often, in seconds, are TOTP codes
60
+ # generated. i.e, a new TOTP code is generated every time_step seconds. Must be
61
+ # between 20 and 60 seconds, inclusive. Defaults to 30 seconds
62
+ # @param [String] config_skew The number of time-steps, past and future, that are
63
+ # valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults
64
+ # to 1
65
+ # @param [String] config_code_length Number of digits for generated TOTP codes.
66
+ # Must be between 3 and 8, inclusive. Defaults to 6
67
+ # @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
68
+ # codes. Can be `sha1`, `sha256` or `sha512`. Defaults to `sha1`
54
69
  # @return [FactorInstance] Created FactorInstance
55
- 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)
70
+ 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)
56
71
  data = Twilio::Values.of({
57
72
  'FriendlyName' => friendly_name,
58
73
  'FactorType' => factor_type,
@@ -62,6 +77,11 @@ module Twilio
62
77
  'Config.NotificationPlatform' => config_notification_platform,
63
78
  'Config.NotificationToken' => config_notification_token,
64
79
  'Config.SdkVersion' => config_sdk_version,
80
+ 'Binding.Secret' => binding_secret,
81
+ 'Config.TimeStep' => config_time_step,
82
+ 'Config.Skew' => config_skew,
83
+ 'Config.CodeLength' => config_code_length,
84
+ 'Config.Alg' => config_alg,
65
85
  })
66
86
 
67
87
  payload = @version.create('POST', @uri, data: data)
@@ -205,7 +225,7 @@ module Twilio
205
225
  # @param [Version] version Version that contains the resource
206
226
  # @param [String] service_sid The unique SID identifier of the Service.
207
227
  # @param [String] identity Customer unique identity for the Entity owner of the
208
- # Factor
228
+ # Factor. This value must be between 8 and 64 characters long.
209
229
  # @param [String] sid A 34 character string that uniquely identifies this Factor.
210
230
  # @return [FactorContext] FactorContext
211
231
  def initialize(version, service_sid, identity, sid)
@@ -242,19 +262,34 @@ module Twilio
242
262
  # Update the FactorInstance
243
263
  # @param [String] auth_payload The optional payload needed to verify the Factor
244
264
  # for the first time. E.g. for a TOTP, the numeric code.
245
- # @param [String] friendly_name The new friendly name of this Factor
265
+ # @param [String] friendly_name The new friendly name of this Factor. It can be up
266
+ # to 64 characters.
246
267
  # @param [String] config_notification_token For APN, the device token. For FCM the
247
268
  # registration token. It used to send the push notifications. Required when
248
- # `factor_type` is `push`
269
+ # `factor_type` is `push`. If specified, this value must be between 32 and 255
270
+ # characters long.
249
271
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
250
272
  # the factor
273
+ # @param [String] config_time_step Defines how often, in seconds, are TOTP codes
274
+ # generated. i.e, a new TOTP code is generated every time_step seconds. Must be
275
+ # between 20 and 60 seconds, inclusive
276
+ # @param [String] config_skew The number of time-steps, past and future, that are
277
+ # valid for validation of TOTP codes. Must be between 0 and 2, inclusive
278
+ # @param [String] config_code_length Number of digits for generated TOTP codes.
279
+ # Must be between 3 and 8, inclusive
280
+ # @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
281
+ # codes. Can be `sha1`, `sha256` or `sha512`
251
282
  # @return [FactorInstance] Updated FactorInstance
252
- def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset)
283
+ 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)
253
284
  data = Twilio::Values.of({
254
285
  'AuthPayload' => auth_payload,
255
286
  'FriendlyName' => friendly_name,
256
287
  'Config.NotificationToken' => config_notification_token,
257
288
  'Config.SdkVersion' => config_sdk_version,
289
+ 'Config.TimeStep' => config_time_step,
290
+ 'Config.Skew' => config_skew,
291
+ 'Config.CodeLength' => config_code_length,
292
+ 'Config.Alg' => config_alg,
258
293
  })
259
294
 
260
295
  payload = @version.update('POST', @uri, data: data)
@@ -293,7 +328,8 @@ module Twilio
293
328
  # @param [String] service_sid The unique SID identifier of the Service.
294
329
  # @param [String] identity The unique external identifier for the Entity of the
295
330
  # Service. This identifier should be immutable, not PII, and generated by your
296
- # external system, such as your user's UUID, GUID, or SID.
331
+ # external system, such as your user's UUID, GUID, or SID. This value must be
332
+ # between 8 and 64 characters long.
297
333
  # @param [String] sid A 34 character string that uniquely identifies this Factor.
298
334
  # @return [FactorInstance] FactorInstance
299
335
  def initialize(version, payload, service_sid: nil, identity: nil, sid: nil)
@@ -426,19 +462,34 @@ module Twilio
426
462
  # Update the FactorInstance
427
463
  # @param [String] auth_payload The optional payload needed to verify the Factor
428
464
  # for the first time. E.g. for a TOTP, the numeric code.
429
- # @param [String] friendly_name The new friendly name of this Factor
465
+ # @param [String] friendly_name The new friendly name of this Factor. It can be up
466
+ # to 64 characters.
430
467
  # @param [String] config_notification_token For APN, the device token. For FCM the
431
468
  # registration token. It used to send the push notifications. Required when
432
- # `factor_type` is `push`
469
+ # `factor_type` is `push`. If specified, this value must be between 32 and 255
470
+ # characters long.
433
471
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
434
472
  # the factor
473
+ # @param [String] config_time_step Defines how often, in seconds, are TOTP codes
474
+ # generated. i.e, a new TOTP code is generated every time_step seconds. Must be
475
+ # between 20 and 60 seconds, inclusive
476
+ # @param [String] config_skew The number of time-steps, past and future, that are
477
+ # valid for validation of TOTP codes. Must be between 0 and 2, inclusive
478
+ # @param [String] config_code_length Number of digits for generated TOTP codes.
479
+ # Must be between 3 and 8, inclusive
480
+ # @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
481
+ # codes. Can be `sha1`, `sha256` or `sha512`
435
482
  # @return [FactorInstance] Updated FactorInstance
436
- def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset)
483
+ 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)
437
484
  context.update(
438
485
  auth_payload: auth_payload,
439
486
  friendly_name: friendly_name,
440
487
  config_notification_token: config_notification_token,
441
488
  config_sdk_version: config_sdk_version,
489
+ config_time_step: config_time_step,
490
+ config_skew: config_skew,
491
+ config_code_length: config_code_length,
492
+ config_alg: config_alg,
442
493
  )
443
494
  end
444
495