twilio-ruby 5.52.0 → 5.56.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +7 -7
  3. data/.travis.yml +22 -28
  4. data/CHANGES.md +85 -0
  5. data/README.md +10 -2
  6. data/lib/twilio-ruby.rb +5 -15
  7. data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
  8. data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
  9. data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  10. data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
  11. data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
  12. data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
  13. data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
  14. data/lib/twilio-ruby/http.rb +5 -0
  15. data/lib/twilio-ruby/http/http_client.rb +14 -2
  16. data/lib/twilio-ruby/rest.rb +13 -0
  17. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  19. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +8 -7
  20. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
  21. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
  22. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
  23. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
  25. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
  26. data/lib/twilio-ruby/rest/client.rb +7 -0
  27. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
  28. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
  29. data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
  30. data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
  31. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +28 -22
  32. data/lib/twilio-ruby/rest/frontline_api.rb +47 -0
  33. data/lib/twilio-ruby/rest/frontline_api/v1.rb +45 -0
  34. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +233 -0
  35. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
  36. data/lib/twilio-ruby/rest/messaging/v1/service.rb +8 -2
  37. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +178 -18
  38. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
  39. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
  40. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
  41. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
  42. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +16 -7
  43. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -7
  44. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +43 -18
  45. data/lib/twilio-ruby/rest/video/v1/composition.rb +0 -8
  46. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
  47. data/lib/twilio-ruby/version.rb +1 -1
  48. metadata +15 -9
@@ -140,7 +140,7 @@ module Twilio
140
140
  # available as variable `{{contact.channel.address}}`.
141
141
  # @param [String] from The Twilio phone number to send messages or initiate calls
142
142
  # from during the Flow's Execution. Available as variable
143
- # `{{flow.channel.address}}`.
143
+ # `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID.
144
144
  # @param [Hash] parameters JSON data that will be added to the Flow's context and
145
145
  # that can be accessed as variables inside your Flow. For example, if you pass in
146
146
  # `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable
@@ -140,7 +140,7 @@ module Twilio
140
140
  # available as variable `{{contact.channel.address}}`.
141
141
  # @param [String] from The Twilio phone number to send messages or initiate calls
142
142
  # from during the Flow's Execution. Available as variable
143
- # `{{flow.channel.address}}`.
143
+ # `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID.
144
144
  # @param [Hash] parameters JSON data that will be added to the Flow's context and
145
145
  # that can be accessed as variables inside your Flow. For example, if you pass in
146
146
  # `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable
@@ -30,7 +30,7 @@ module Twilio
30
30
  # @param [String] iccid The
31
31
  # {ICCID}[https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID] of the
32
32
  # Super SIM to be added to your Account.
33
- # @param [String] registration_code The 10 digit code required to claim the Super
33
+ # @param [String] registration_code The 10-digit code required to claim the Super
34
34
  # SIM for your Account.
35
35
  # @return [SimInstance] Created SimInstance
36
36
  def create(iccid: nil, registration_code: nil)
@@ -200,6 +200,9 @@ module Twilio
200
200
  # Path Solution
201
201
  @solution = {sid: sid, }
202
202
  @uri = "/Sims/#{@solution[:sid]}"
203
+
204
+ # Dependents
205
+ @billing_periods = nil
203
206
  end
204
207
 
205
208
  ##
@@ -246,6 +249,18 @@ module Twilio
246
249
  SimInstance.new(@version, payload, sid: @solution[:sid], )
247
250
  end
248
251
 
252
+ ##
253
+ # Access the billing_periods
254
+ # @return [BillingPeriodList]
255
+ # @return [BillingPeriodContext]
256
+ def billing_periods
257
+ unless @billing_periods
258
+ @billing_periods = BillingPeriodList.new(@version, sim_sid: @solution[:sid], )
259
+ end
260
+
261
+ @billing_periods
262
+ end
263
+
249
264
  ##
250
265
  # Provide a user friendly representation
251
266
  def to_s
@@ -284,6 +299,7 @@ module Twilio
284
299
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
285
300
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
286
301
  'url' => payload['url'],
302
+ 'links' => payload['links'],
287
303
  }
288
304
 
289
305
  # Context
@@ -356,6 +372,12 @@ module Twilio
356
372
  @properties['url']
357
373
  end
358
374
 
375
+ ##
376
+ # @return [String] The links
377
+ def links
378
+ @properties['links']
379
+ end
380
+
359
381
  ##
360
382
  # Fetch the SimInstance
361
383
  # @return [SimInstance] Fetched SimInstance
@@ -394,6 +416,13 @@ module Twilio
394
416
  )
395
417
  end
396
418
 
419
+ ##
420
+ # Access the billing_periods
421
+ # @return [billing_periods] billing_periods
422
+ def billing_periods
423
+ context.billing_periods
424
+ end
425
+
397
426
  ##
398
427
  # Provide a user friendly representation
399
428
  def to_s
@@ -0,0 +1,231 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Supersim < Domain
12
+ class V1 < Version
13
+ class SimContext < InstanceContext
14
+ class BillingPeriodList < ListResource
15
+ ##
16
+ # Initialize the BillingPeriodList
17
+ # @param [Version] version Version that contains the resource
18
+ # @param [String] sim_sid The SID of the Super SIM the Billing Period belongs to.
19
+ # @return [BillingPeriodList] BillingPeriodList
20
+ def initialize(version, sim_sid: nil)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {sim_sid: sim_sid}
25
+ @uri = "/Sims/#{@solution[:sim_sid]}/BillingPeriods"
26
+ end
27
+
28
+ ##
29
+ # Lists BillingPeriodInstance records from the API as a list.
30
+ # Unlike stream(), this operation is eager and will load `limit` records into
31
+ # memory before returning.
32
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
33
+ # guarantees to never return more than limit. Default is no limit
34
+ # @param [Integer] page_size Number of records to fetch per request, when
35
+ # not set will use the default value of 50 records. If no page_size is defined
36
+ # but a limit is defined, stream() will attempt to read the limit with the most
37
+ # efficient page size, i.e. min(limit, 1000)
38
+ # @return [Array] Array of up to limit results
39
+ def list(limit: nil, page_size: nil)
40
+ self.stream(limit: limit, page_size: page_size).entries
41
+ end
42
+
43
+ ##
44
+ # Streams BillingPeriodInstance records from the API as an Enumerable.
45
+ # This operation lazily loads records as efficiently as possible until the limit
46
+ # is reached.
47
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
48
+ # guarantees to never return more than limit. Default is no limit.
49
+ # @param [Integer] page_size Number of records to fetch per request, when
50
+ # not set will use the default value of 50 records. If no page_size is defined
51
+ # but a limit is defined, stream() will attempt to read the limit with the most
52
+ # efficient page size, i.e. min(limit, 1000)
53
+ # @return [Enumerable] Enumerable that will yield up to limit results
54
+ def stream(limit: nil, page_size: nil)
55
+ limits = @version.read_limits(limit, page_size)
56
+
57
+ page = self.page(page_size: limits[:page_size], )
58
+
59
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
60
+ end
61
+
62
+ ##
63
+ # When passed a block, yields BillingPeriodInstance records from the API.
64
+ # This operation lazily loads records as efficiently as possible until the limit
65
+ # is reached.
66
+ def each
67
+ limits = @version.read_limits
68
+
69
+ page = self.page(page_size: limits[:page_size], )
70
+
71
+ @version.stream(page,
72
+ limit: limits[:limit],
73
+ page_limit: limits[:page_limit]).each {|x| yield x}
74
+ end
75
+
76
+ ##
77
+ # Retrieve a single page of BillingPeriodInstance records from the API.
78
+ # Request is executed immediately.
79
+ # @param [String] page_token PageToken provided by the API
80
+ # @param [Integer] page_number Page Number, this value is simply for client state
81
+ # @param [Integer] page_size Number of records to return, defaults to 50
82
+ # @return [Page] Page of BillingPeriodInstance
83
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
84
+ params = Twilio::Values.of({
85
+ 'PageToken' => page_token,
86
+ 'Page' => page_number,
87
+ 'PageSize' => page_size,
88
+ })
89
+
90
+ response = @version.page('GET', @uri, params: params)
91
+
92
+ BillingPeriodPage.new(@version, response, @solution)
93
+ end
94
+
95
+ ##
96
+ # Retrieve a single page of BillingPeriodInstance records from the API.
97
+ # Request is executed immediately.
98
+ # @param [String] target_url API-generated URL for the requested results page
99
+ # @return [Page] Page of BillingPeriodInstance
100
+ def get_page(target_url)
101
+ response = @version.domain.request(
102
+ 'GET',
103
+ target_url
104
+ )
105
+ BillingPeriodPage.new(@version, response, @solution)
106
+ end
107
+
108
+ ##
109
+ # Provide a user friendly representation
110
+ def to_s
111
+ '#<Twilio.Supersim.V1.BillingPeriodList>'
112
+ end
113
+ end
114
+
115
+ class BillingPeriodPage < Page
116
+ ##
117
+ # Initialize the BillingPeriodPage
118
+ # @param [Version] version Version that contains the resource
119
+ # @param [Response] response Response from the API
120
+ # @param [Hash] solution Path solution for the resource
121
+ # @return [BillingPeriodPage] BillingPeriodPage
122
+ def initialize(version, response, solution)
123
+ super(version, response)
124
+
125
+ # Path Solution
126
+ @solution = solution
127
+ end
128
+
129
+ ##
130
+ # Build an instance of BillingPeriodInstance
131
+ # @param [Hash] payload Payload response from the API
132
+ # @return [BillingPeriodInstance] BillingPeriodInstance
133
+ def get_instance(payload)
134
+ BillingPeriodInstance.new(@version, payload, sim_sid: @solution[:sim_sid], )
135
+ end
136
+
137
+ ##
138
+ # Provide a user friendly representation
139
+ def to_s
140
+ '<Twilio.Supersim.V1.BillingPeriodPage>'
141
+ end
142
+ end
143
+
144
+ class BillingPeriodInstance < InstanceResource
145
+ ##
146
+ # Initialize the BillingPeriodInstance
147
+ # @param [Version] version Version that contains the resource
148
+ # @param [Hash] payload payload that contains response from Twilio
149
+ # @param [String] sim_sid The SID of the Super SIM the Billing Period belongs to.
150
+ # @return [BillingPeriodInstance] BillingPeriodInstance
151
+ def initialize(version, payload, sim_sid: nil)
152
+ super(version)
153
+
154
+ # Marshaled Properties
155
+ @properties = {
156
+ 'sid' => payload['sid'],
157
+ 'account_sid' => payload['account_sid'],
158
+ 'sim_sid' => payload['sim_sid'],
159
+ 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
160
+ 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
161
+ 'period_type' => payload['period_type'],
162
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
163
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
164
+ }
165
+ end
166
+
167
+ ##
168
+ # @return [String] The SID of the Billing Period
169
+ def sid
170
+ @properties['sid']
171
+ end
172
+
173
+ ##
174
+ # @return [String] The SID of the Account the Super SIM belongs to
175
+ def account_sid
176
+ @properties['account_sid']
177
+ end
178
+
179
+ ##
180
+ # @return [String] The SID of the Super SIM the Billing Period belongs to
181
+ def sim_sid
182
+ @properties['sim_sid']
183
+ end
184
+
185
+ ##
186
+ # @return [Time] The start time of the Billing Period
187
+ def start_time
188
+ @properties['start_time']
189
+ end
190
+
191
+ ##
192
+ # @return [Time] The end time of the Billing Period
193
+ def end_time
194
+ @properties['end_time']
195
+ end
196
+
197
+ ##
198
+ # @return [billing_period.BpType] The type of the Billing Period
199
+ def period_type
200
+ @properties['period_type']
201
+ end
202
+
203
+ ##
204
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
205
+ def date_created
206
+ @properties['date_created']
207
+ end
208
+
209
+ ##
210
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
211
+ def date_updated
212
+ @properties['date_updated']
213
+ end
214
+
215
+ ##
216
+ # Provide a user friendly representation
217
+ def to_s
218
+ "<Twilio.Supersim.V1.BillingPeriodInstance>"
219
+ end
220
+
221
+ ##
222
+ # Provide a detailed, user friendly representation
223
+ def inspect
224
+ "<Twilio.Supersim.V1.BillingPeriodInstance>"
225
+ end
226
+ end
227
+ end
228
+ end
229
+ end
230
+ end
231
+ end
@@ -38,16 +38,21 @@ module Twilio
38
38
  # is five (5) minutes after Challenge creation. The max value is sixty (60)
39
39
  # minutes after creation.
40
40
  # @param [String] details_message Shown to the user when the push notification
41
- # arrives. Required when `factor_type` is `push`
41
+ # arrives. Required when `factor_type` is `push`. Can be up to 256 characters in
42
+ # length
42
43
  # @param [Array[Hash]] details_fields A list of objects that describe the Fields
43
44
  # included in the Challenge. Each object contains the label and value of the
44
- # field. Used when `factor_type` is `push`.
45
+ # field, the label can be up to 36 characters in length and the value can be up to
46
+ # 128 characters in length. Used when `factor_type` is `push`. There can be up to
47
+ # 20 details fields.
45
48
  # @param [Hash] hidden_details Details provided to give context about the
46
49
  # Challenge. Not shown to the end user. It must be a stringified JSON with only
47
- # strings values eg. `{"ip": "172.168.1.234"}`
50
+ # strings values eg. `{"ip": "172.168.1.234"}`. Can be up to 1024 characters in
51
+ # length
48
52
  # @param [String] auth_payload Optional payload used to verify the Challenge upon
49
- # creation. Only used with a Factor of type `totp` to carry an OTP used in the
50
- # verification.
53
+ # creation. Only used with a Factor of type `totp` to carry the TOTP code that
54
+ # needs to be verified. For `TOTP` this value must be between 3 and 8 characters
55
+ # long.
51
56
  # @return [ChallengeInstance] Created ChallengeInstance
52
57
  def create(factor_sid: nil, expiration_date: :unset, details_message: :unset, details_fields: :unset, hidden_details: :unset, auth_payload: :unset)
53
58
  data = Twilio::Values.of({
@@ -246,7 +251,9 @@ module Twilio
246
251
  ##
247
252
  # Update the ChallengeInstance
248
253
  # @param [String] auth_payload The optional payload needed to verify the
249
- # Challenge. E.g., a TOTP would use the numeric code.
254
+ # Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must
255
+ # be between 3 and 8 characters long. For `Push` this value can be up to 5456
256
+ # characters in length
250
257
  # @return [ChallengeInstance] Updated ChallengeInstance
251
258
  def update(auth_payload: :unset)
252
259
  data = Twilio::Values.of({'AuthPayload' => auth_payload, })
@@ -464,7 +471,9 @@ module Twilio
464
471
  ##
465
472
  # Update the ChallengeInstance
466
473
  # @param [String] auth_payload The optional payload needed to verify the
467
- # Challenge. E.g., a TOTP would use the numeric code.
474
+ # Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must
475
+ # be between 3 and 8 characters long. For `Push` this value can be up to 5456
476
+ # characters in length
468
477
  # @return [ChallengeInstance] Updated ChallengeInstance
469
478
  def update(auth_payload: :unset)
470
479
  context.update(auth_payload: auth_payload, )
@@ -34,11 +34,10 @@ module Twilio
34
34
 
35
35
  ##
36
36
  # Create the NotificationInstance
37
- # @param [String] ttl How long, in seconds, the Notification is valid. Delivery
38
- # will be attempted if the device is offline until the TTL elapses. 0 means that
39
- # the notification delivery is attempted immediately, only once, and is not stored
40
- # for future delivery. Must be an integer between 0 and 300 seconds, inclusive.
41
- # Defaults to 300 seconds.
37
+ # @param [String] ttl How long, in seconds, the notification is valid. Can be an
38
+ # integer between 0 and 300. Default is 300. Delivery is attempted until the TTL
39
+ # elapses, even if the device is offline. 0 means that the notification delivery
40
+ # is attempted immediately, only once, and is not stored for future delivery.
42
41
  # @return [NotificationInstance] Created NotificationInstance
43
42
  def create(ttl: :unset)
44
43
  data = Twilio::Values.of({'Ttl' => ttl, })
@@ -164,13 +163,13 @@ module Twilio
164
163
  end
165
164
 
166
165
  ##
167
- # @return [String] The priority of the Notification.
166
+ # @return [String] The priority of the notification.
168
167
  def priority
169
168
  @properties['priority']
170
169
  end
171
170
 
172
171
  ##
173
- # @return [String] How long, in seconds, the Notification is valid.
172
+ # @return [String] How long, in seconds, the notification is valid.
174
173
  def ttl
175
174
  @properties['ttl']
176
175
  end
@@ -34,43 +34,68 @@ module Twilio
34
34
 
35
35
  ##
36
36
  # Create the NewFactorInstance
37
- # @param [String] friendly_name The friendly name of this Factor. It can be up to
38
- # 64 characters.
37
+ # @param [String] friendly_name The friendly name of this Factor. This can be any
38
+ # string up to 64 characters, meant for humans to distinguish between Factors.
39
+ # For `factor_type` `push`, this could be a device name.
40
+ # For `factor_type` `totp`, this value is used as the “account name” in
41
+ # constructing the `binding.uri` property.
42
+ # At the same time, we recommend avoiding providing PII.
39
43
  # @param [new_factor.FactorTypes] factor_type The Type of this Factor. Currently
40
- # `push` and `totp` are supported. For `totp` to work, you need to contact Twilio
41
- # sales first to have the Verify TOTP feature enabled for your Twilio account.
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.
42
47
  # @param [String] binding_alg The algorithm used when `factor_type` is `push`.
43
48
  # Algorithm supported: `ES256`
44
49
  # @param [String] binding_public_key The Ecdsa public key in PKIX, ASN.1 DER
45
- # format encoded in Base64
50
+ # format encoded in Base64.
51
+ #
52
+ # Required when `factor_type` is `push`
46
53
  # @param [String] config_app_id The ID that uniquely identifies your app in the
47
- # Google or Apple store, such as `com.example.myapp`. Required when `factor_type`
48
- # is `push`. If specified, it can be up to 100 characters long.
54
+ # Google or Apple store, such as `com.example.myapp`. It can be up to 100
55
+ # characters long.
56
+ #
57
+ # Required when `factor_type` is `push`.
49
58
  # @param [new_factor.NotificationPlatforms] config_notification_platform The
50
59
  # transport technology used to generate the Notification Token. Can be `apn` or
51
- # `fcm`. Required when `factor_type` is `push`
60
+ # `fcm`.
61
+ #
62
+ # Required when `factor_type` is `push`.
52
63
  # @param [String] config_notification_token For APN, the device token. For FCM the
53
- # registration token. It used to send the push notifications. Required when
54
- # `factor_type` is `push`. If specified, this value must be between 32 and 255
55
- # characters long.
64
+ # registration token. It used to send the push notifications. Must be between 32
65
+ # and 255 characters long.
66
+ #
67
+ # Required when `factor_type` is `push`.
56
68
  # @param [String] config_sdk_version The Verify Push SDK version used to configure
57
69
  # the factor
70
+ #
71
+ # Required when `factor_type` is `push`
58
72
  # @param [String] binding_secret The shared secret for TOTP factors encoded in
59
- # Base32
73
+ # Base32. This can be provided when creating the Factor, otherwise it will be
74
+ # generated.
75
+ #
76
+ # Used when `factor_type` is `totp`
60
77
  # @param [String] config_time_step Defines how often, in seconds, are TOTP codes
61
78
  # generated. i.e, a new TOTP code is generated every time_step seconds. Must be
62
79
  # between 20 and 60 seconds, inclusive. The default value is defined at the
63
- # service level in the property totp.time_step. If not configured defaults to 30
64
- # seconds
80
+ # service level in the property `totp.time_step`. Defaults to 30 seconds if not
81
+ # configured.
82
+ #
83
+ # Used when `factor_type` is `totp`
65
84
  # @param [String] config_skew The number of time-steps, past and future, that are
66
85
  # valid for validation of TOTP codes. Must be between 0 and 2, inclusive. The
67
- # default value is defined at the service level in the property totp.skew. If not
68
- # configured defaults to 1
86
+ # default value is defined at the service level in the property `totp.skew`. If
87
+ # not configured defaults to 1.
88
+ #
89
+ # Used when `factor_type` is `totp`
69
90
  # @param [String] config_code_length Number of digits for generated TOTP codes.
70
91
  # Must be between 3 and 8, inclusive. The default value is defined at the service
71
- # level in the property totp.code_length. If not configured defaults to 6
92
+ # level in the property `totp.code_length`. If not configured defaults to 6.
93
+ #
94
+ # Used when `factor_type` is `totp`
72
95
  # @param [new_factor.TotpAlgorithms] config_alg The algorithm used to derive the
73
- # TOTP codes. Can be `sha1`, `sha256` or `sha512`. Defaults to `sha1`
96
+ # TOTP codes. Can be `sha1`, `sha256` or `sha512`. Defaults to `sha1`.
97
+ #
98
+ # Used when `factor_type` is `totp`
74
99
  # @return [NewFactorInstance] Created NewFactorInstance
75
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)
76
101
  data = Twilio::Values.of({