twilio-ruby 5.22.0 → 5.22.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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +15 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/client.rb +7 -0
  5. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  6. data/lib/twilio-ruby/rest/messaging/v1/session.rb +1 -7
  7. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +34 -32
  8. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +37 -35
  9. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +45 -38
  10. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +38 -34
  11. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +67 -52
  12. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +32 -23
  13. data/lib/twilio-ruby/rest/proxy/v1/service.rb +123 -79
  14. data/lib/twilio-ruby/rest/proxy/v1.rb +2 -1
  15. data/lib/twilio-ruby/rest/proxy.rb +2 -1
  16. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +366 -0
  17. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +384 -0
  18. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +348 -0
  19. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +358 -0
  20. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +398 -0
  21. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +417 -0
  22. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +366 -0
  23. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +384 -0
  24. data/lib/twilio-ruby/rest/{verify → serverless}/v1/service.rb +139 -175
  25. data/lib/twilio-ruby/rest/{verify → serverless}/v1.rb +6 -6
  26. data/lib/twilio-ruby/rest/serverless.rb +46 -0
  27. data/lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb +419 -0
  28. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +26 -0
  29. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +46 -38
  30. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +24 -20
  31. data/lib/twilio-ruby/rest/verify/v2/service.rb +59 -57
  32. data/lib/twilio-ruby/rest/verify/v2.rb +2 -1
  33. data/lib/twilio-ruby/rest/verify.rb +2 -8
  34. data/lib/twilio-ruby/version.rb +1 -1
  35. data/spec/integration/flex_api/v1/configuration_spec.rb +15 -0
  36. data/spec/integration/messaging/v1/session/participant_spec.rb +10 -10
  37. data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +144 -0
  38. data/spec/integration/serverless/v1/service/asset_spec.rb +177 -0
  39. data/spec/integration/serverless/v1/service/build_spec.rb +184 -0
  40. data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +137 -0
  41. data/spec/integration/serverless/v1/service/environment/variable_spec.rb +181 -0
  42. data/spec/integration/serverless/v1/service/environment_spec.rb +143 -0
  43. data/spec/integration/serverless/v1/service/function/function_version_spec.rb +144 -0
  44. data/spec/integration/serverless/v1/service/function_spec.rb +177 -0
  45. data/spec/integration/serverless/v1/service_spec.rb +180 -0
  46. data/spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb +231 -0
  47. data/spec/integration/trunking/v1/trunk_spec.rb +12 -6
  48. metadata +34 -12
  49. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +0 -340
  50. data/lib/twilio-ruby/rest/verify/v1/service/verification_check.rb +0 -209
  51. data/spec/integration/verify/v1/service/verification_check_spec.rb +0 -54
  52. data/spec/integration/verify/v1/service/verification_spec.rb +0 -169
  53. data/spec/integration/verify/v1/service_spec.rb +0 -231
@@ -213,6 +213,7 @@ module Twilio
213
213
  @credentials_lists = nil
214
214
  @ip_access_control_lists = nil
215
215
  @phone_numbers = nil
216
+ @terminating_sip_domains = nil
216
217
  end
217
218
 
218
219
  ##
@@ -361,6 +362,24 @@ module Twilio
361
362
  @phone_numbers
362
363
  end
363
364
 
365
+ ##
366
+ # Access the terminating_sip_domains
367
+ # @return [TerminatingSipDomainList]
368
+ # @return [TerminatingSipDomainContext] if sid was passed.
369
+ def terminating_sip_domains(sid=:unset)
370
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
371
+
372
+ if sid != :unset
373
+ return TerminatingSipDomainContext.new(@version, @solution[:sid], sid, )
374
+ end
375
+
376
+ unless @terminating_sip_domains
377
+ @terminating_sip_domains = TerminatingSipDomainList.new(@version, trunk_sid: @solution[:sid], )
378
+ end
379
+
380
+ @terminating_sip_domains
381
+ end
382
+
364
383
  ##
365
384
  # Provide a user friendly representation
366
385
  def to_s
@@ -598,6 +617,13 @@ module Twilio
598
617
  context.phone_numbers
599
618
  end
600
619
 
620
+ ##
621
+ # Access the terminating_sip_domains
622
+ # @return [terminating_sip_domains] terminating_sip_domains
623
+ def terminating_sip_domains
624
+ context.terminating_sip_domains
625
+ end
626
+
601
627
  ##
602
628
  # Provide a user friendly representation
603
629
  def to_s
@@ -17,7 +17,9 @@ module Twilio
17
17
  ##
18
18
  # Initialize the VerificationList
19
19
  # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique SID identifier of the Service.
20
+ # @param [String] service_sid The SID of the
21
+ # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
22
+ # associated with.
21
23
  # @return [VerificationList] VerificationList
22
24
  def initialize(version, service_sid: nil)
23
25
  super(version)
@@ -30,21 +32,23 @@ module Twilio
30
32
  ##
31
33
  # Retrieve a single page of VerificationInstance records from the API.
32
34
  # Request is executed immediately.
33
- # @param [String] to The To phonenumber of the phone being verified
34
- # @param [String] channel The method in which the phone will be verified. Either
35
- # sms or call
36
- # @param [String] custom_message A character string containing a custom message
37
- # for this verification
38
- # @param [String] send_digits Digits to send when a phone call is started, same
39
- # parameters as in Programmable Voice are supported
40
- # @param [String] locale Supported values are af, ar, ca, cs, da, de, el, en, es,
41
- # fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nb, nl, pl, pt, pr-BR, ro, ru, sv,
42
- # th, tl, tr, vi, zh, zh-CN, zh-HK
43
- # @param [String] custom_code Pass in a pre-generated code. Code length can be
44
- # between 4-10 characters.
45
- # @param [String] amount Amount of the associated PSD2 compliant transaction.
35
+ # @param [String] to The phone number to verify.
36
+ # @param [String] channel The verification method to use. Can be: `sms` or `call`.
37
+ # @param [String] custom_message The text of a custom message to use for the
38
+ # verification.
39
+ # @param [String] send_digits The digits to send after a phone call is answered,
40
+ # for example, to dial an extension. For more information, see the Programmable
41
+ # Voice documentation of
42
+ # [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
43
+ # @param [String] locale The local to use for the verification SMS or call. Can
44
+ # be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `es`, `fi`, `fr`, `he`,
45
+ # `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`,
46
+ # `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.`
47
+ # @param [String] custom_code A pre-generated code to use for verification. The
48
+ # code can be between 4 and 10 characters, inclusive.
49
+ # @param [String] amount The amount of the associated PSD2 compliant transaction.
46
50
  # Requires the PSD2 Service flag enabled.
47
- # @param [String] payee Payee of the associated PSD2 compliant transaction.
51
+ # @param [String] payee The payee of the associated PSD2 compliant transaction.
48
52
  # Requires the PSD2 Service flag enabled.
49
53
  # @return [VerificationInstance] Newly created VerificationInstance
50
54
  def create(to: nil, channel: nil, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset)
@@ -112,9 +116,11 @@ module Twilio
112
116
  ##
113
117
  # Initialize the VerificationContext
114
118
  # @param [Version] version Version that contains the resource
115
- # @param [String] service_sid The unique SID identifier of the Service.
116
- # @param [String] sid A 34 character string that uniquely identifies this
117
- # Verification or the associated phone number.
119
+ # @param [String] service_sid The SID of the verification
120
+ # [Service](https://www.twilio.com/docs/chat/rest/services) to fetch the resource
121
+ # from.
122
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
123
+ # Verification resource to fetch.
118
124
  # @return [VerificationContext] VerificationContext
119
125
  def initialize(version, service_sid, sid)
120
126
  super(version)
@@ -126,8 +132,8 @@ module Twilio
126
132
 
127
133
  ##
128
134
  # Update the VerificationInstance
129
- # @param [verification.Status] status New status to set for the Verification, only
130
- # canceled is allowed at the moment.
135
+ # @param [verification.Status] status The new status of the resource. Can be:
136
+ # `pending`, `approved`, `denied`, or `expired`.
131
137
  # @return [VerificationInstance] Updated VerificationInstance
132
138
  def update(status: nil)
133
139
  data = Twilio::Values.of({'Status' => status, })
@@ -188,9 +194,11 @@ module Twilio
188
194
  # Initialize the VerificationInstance
189
195
  # @param [Version] version Version that contains the resource
190
196
  # @param [Hash] payload payload that contains response from Twilio
191
- # @param [String] service_sid The unique SID identifier of the Service.
192
- # @param [String] sid A 34 character string that uniquely identifies this
193
- # Verification or the associated phone number.
197
+ # @param [String] service_sid The SID of the
198
+ # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
199
+ # associated with.
200
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
201
+ # Verification resource to fetch.
194
202
  # @return [VerificationInstance] VerificationInstance
195
203
  def initialize(version, payload, service_sid: nil, sid: nil)
196
204
  super(version)
@@ -229,87 +237,87 @@ module Twilio
229
237
  end
230
238
 
231
239
  ##
232
- # @return [String] A string that uniquely identifies this Verification.
240
+ # @return [String] The unique string that identifies the resource
233
241
  def sid
234
242
  @properties['sid']
235
243
  end
236
244
 
237
245
  ##
238
- # @return [String] Service Sid.
246
+ # @return [String] The SID of the Service that the resource is associated with
239
247
  def service_sid
240
248
  @properties['service_sid']
241
249
  end
242
250
 
243
251
  ##
244
- # @return [String] Account Sid.
252
+ # @return [String] The SID of the Account that created the resource
245
253
  def account_sid
246
254
  @properties['account_sid']
247
255
  end
248
256
 
249
257
  ##
250
- # @return [String] To phonenumber
258
+ # @return [String] The phone number being verified
251
259
  def to
252
260
  @properties['to']
253
261
  end
254
262
 
255
263
  ##
256
- # @return [verification.Channel] sms or call
264
+ # @return [verification.Channel] The verification method to use
257
265
  def channel
258
266
  @properties['channel']
259
267
  end
260
268
 
261
269
  ##
262
- # @return [String] pending, approved, denied or expired
270
+ # @return [String] The status of the verification resource
263
271
  def status
264
272
  @properties['status']
265
273
  end
266
274
 
267
275
  ##
268
- # @return [Boolean] successful verification
276
+ # @return [Boolean] Whether the verification was successful
269
277
  def valid
270
278
  @properties['valid']
271
279
  end
272
280
 
273
281
  ##
274
- # @return [Hash] Info about the phone number
282
+ # @return [Hash] Information about the phone number being verified
275
283
  def lookup
276
284
  @properties['lookup']
277
285
  end
278
286
 
279
287
  ##
280
- # @return [String] Amount of the associated PSD2 compliant transaction.
288
+ # @return [String] The amount of the associated PSD2 compliant transaction.
281
289
  def amount
282
290
  @properties['amount']
283
291
  end
284
292
 
285
293
  ##
286
- # @return [String] Payee of the associated PSD2 compliant transaction.
294
+ # @return [String] The payee of the associated PSD2 compliant transaction
287
295
  def payee
288
296
  @properties['payee']
289
297
  end
290
298
 
291
299
  ##
292
- # @return [Time] The date this Verification was created
300
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
293
301
  def date_created
294
302
  @properties['date_created']
295
303
  end
296
304
 
297
305
  ##
298
- # @return [Time] The date this Verification was updated
306
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
299
307
  def date_updated
300
308
  @properties['date_updated']
301
309
  end
302
310
 
303
311
  ##
304
- # @return [String] The URL of this resource.
312
+ # @return [String] The absolute URL of the Verification resource
305
313
  def url
306
314
  @properties['url']
307
315
  end
308
316
 
309
317
  ##
310
318
  # Update the VerificationInstance
311
- # @param [verification.Status] status New status to set for the Verification, only
312
- # canceled is allowed at the moment.
319
+ # @param [verification.Status] status The new status of the resource. Can be:
320
+ # `pending`, `approved`, `denied`, or `expired`.
313
321
  # @return [VerificationInstance] Updated VerificationInstance
314
322
  def update(status: nil)
315
323
  context.update(status: status, )
@@ -17,7 +17,9 @@ module Twilio
17
17
  ##
18
18
  # Initialize the VerificationCheckList
19
19
  # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique SID identifier of the Service.
20
+ # @param [String] service_sid The SID of the
21
+ # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
22
+ # associated with.
21
23
  # @return [VerificationCheckList] VerificationCheckList
22
24
  def initialize(version, service_sid: nil)
23
25
  super(version)
@@ -30,14 +32,14 @@ module Twilio
30
32
  ##
31
33
  # Retrieve a single page of VerificationCheckInstance records from the API.
32
34
  # Request is executed immediately.
33
- # @param [String] code The 4-10 character string being verified
34
- # @param [String] to The To phone number of the phone being verified
35
- # @param [String] verification_sid A SID that uniquely identifies this
36
- # Verification Check, either this parameter or the To phone number must be
37
- # specified
38
- # @param [String] amount Amount of the associated PSD2 compliant transaction.
35
+ # @param [String] code The 4-10 character string being verified.
36
+ # @param [String] to The phone number to verify. Either this parameter or the
37
+ # `verification_sid` must be specified
38
+ # @param [String] verification_sid A SID that uniquely identifies the Verification
39
+ # Check. Either this parameter or the `to` phone number must be specified.
40
+ # @param [String] amount The amount of the associated PSD2 compliant transaction.
39
41
  # Requires the PSD2 Service flag enabled.
40
- # @param [String] payee Payee of the associated PSD2 compliant transaction.
42
+ # @param [String] payee The payee of the associated PSD2 compliant transaction.
41
43
  # Requires the PSD2 Service flag enabled.
42
44
  # @return [VerificationCheckInstance] Newly created VerificationCheckInstance
43
45
  def create(code: nil, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset)
@@ -103,7 +105,9 @@ module Twilio
103
105
  # Initialize the VerificationCheckInstance
104
106
  # @param [Version] version Version that contains the resource
105
107
  # @param [Hash] payload payload that contains response from Twilio
106
- # @param [String] service_sid The unique SID identifier of the Service.
108
+ # @param [String] service_sid The SID of the
109
+ # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
110
+ # associated with.
107
111
  # @return [VerificationCheckInstance] VerificationCheckInstance
108
112
  def initialize(version, payload, service_sid: nil)
109
113
  super(version)
@@ -125,67 +129,67 @@ module Twilio
125
129
  end
126
130
 
127
131
  ##
128
- # @return [String] A string that uniquely identifies this Verification Check.
132
+ # @return [String] The unique string that identifies the resource
129
133
  def sid
130
134
  @properties['sid']
131
135
  end
132
136
 
133
137
  ##
134
- # @return [String] Service Sid.
138
+ # @return [String] The SID of the Service that the resource is associated with
135
139
  def service_sid
136
140
  @properties['service_sid']
137
141
  end
138
142
 
139
143
  ##
140
- # @return [String] Account Sid.
144
+ # @return [String] The SID of the Account that created the resource
141
145
  def account_sid
142
146
  @properties['account_sid']
143
147
  end
144
148
 
145
149
  ##
146
- # @return [String] To phone number
150
+ # @return [String] The phone number being verified
147
151
  def to
148
152
  @properties['to']
149
153
  end
150
154
 
151
155
  ##
152
- # @return [verification_check.Channel] sms or call
156
+ # @return [verification_check.Channel] The verification method to use
153
157
  def channel
154
158
  @properties['channel']
155
159
  end
156
160
 
157
161
  ##
158
- # @return [String] pending, approved, denied or expired
162
+ # @return [String] The status of the verification resource
159
163
  def status
160
164
  @properties['status']
161
165
  end
162
166
 
163
167
  ##
164
- # @return [Boolean] successful verification
168
+ # @return [Boolean] Whether the verification was successful
165
169
  def valid
166
170
  @properties['valid']
167
171
  end
168
172
 
169
173
  ##
170
- # @return [String] Amount of the associated PSD2 compliant transaction.
174
+ # @return [String] The amount of the associated PSD2 compliant transaction.
171
175
  def amount
172
176
  @properties['amount']
173
177
  end
174
178
 
175
179
  ##
176
- # @return [String] Payee of the associated PSD2 compliant transaction.
180
+ # @return [String] The payee of the associated PSD2 compliant transaction
177
181
  def payee
178
182
  @properties['payee']
179
183
  end
180
184
 
181
185
  ##
182
- # @return [Time] The date this Verification Check was created
186
+ # @return [Time] The ISO 8601 date and time in GMT when the Verification Check resource was created
183
187
  def date_created
184
188
  @properties['date_created']
185
189
  end
186
190
 
187
191
  ##
188
- # @return [Time] The date this Verification Check was updated
192
+ # @return [Time] The ISO 8601 date and time in GMT when the Verification Check resource was last updated
189
193
  def date_updated
190
194
  @properties['date_updated']
191
195
  end
@@ -28,20 +28,20 @@ module Twilio
28
28
  ##
29
29
  # Retrieve a single page of ServiceInstance records from the API.
30
30
  # Request is executed immediately.
31
- # @param [String] friendly_name A 1-64 character string with friendly name of
32
- # service
33
- # @param [String] code_length The length of the verification code to be generated.
34
- # Must be an integer value between 4-10
35
- # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
36
- # be performed with each verification started and associated info returned
37
- # @param [Boolean] skip_sms_to_landlines Boolean value that indicates whether or
38
- # not to ignore SMS verifications for landlines, depends on lookup_enabled flag
39
- # @param [Boolean] dtmf_input_required Boolean value that indicates whether or not
40
- # to require a random number input to deliver the verify code via phone calls
41
- # @param [String] tts_name Alternative to be used as Service friendly name in
42
- # phone calls, only applies to TTS languages
43
- # @param [Boolean] psd2_enabled Boolean value that enables to pass PSD2
44
- # transaction parameters when starting a verification
31
+ # @param [String] friendly_name A descriptive string that you create to describe
32
+ # the verification service. It can be up to 64 characters long.
33
+ # @param [String] code_length The length of the verification code to generate.
34
+ # Must be an integer value between 4 and 10, inclusive.
35
+ # @param [Boolean] lookup_enabled Whether to perform a lookup with each
36
+ # verification started and return info about the phone number.
37
+ # @param [Boolean] skip_sms_to_landlines Whether to skip sending SMS verifications
38
+ # to landlines. Requires `lookup_enabled`.
39
+ # @param [Boolean] dtmf_input_required Whether to ask the user to press a number
40
+ # before delivering the verify code in a phone call.
41
+ # @param [String] tts_name The name of an alternative text-to-speech service to
42
+ # use in phone calls. Applies only to TTS languages.
43
+ # @param [Boolean] psd2_enabled Whether to pass PSD2 transaction parameters when
44
+ # starting a verification.
45
45
  # @return [ServiceInstance] Newly created ServiceInstance
46
46
  def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset)
47
47
  data = Twilio::Values.of({
@@ -189,7 +189,8 @@ module Twilio
189
189
  ##
190
190
  # Initialize the ServiceContext
191
191
  # @param [Version] version Version that contains the resource
192
- # @param [String] sid The unique SID identifier of Verification Service Instance.
192
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
193
+ # Verification Service resource to fetch.
193
194
  # @return [ServiceContext] ServiceContext
194
195
  def initialize(version, sid)
195
196
  super(version)
@@ -227,20 +228,20 @@ module Twilio
227
228
 
228
229
  ##
229
230
  # Update the ServiceInstance
230
- # @param [String] friendly_name A 1-64 character string with friendly name of
231
- # service
232
- # @param [String] code_length The length of the verification code to be generated.
233
- # Must be an integer value between 4-10
234
- # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
235
- # be performed with each verification started and associated info returned
236
- # @param [Boolean] skip_sms_to_landlines Boolean value that indicates whether or
237
- # not to ignore SMS verifications for landlines, depends on lookup_enabled flag
238
- # @param [Boolean] dtmf_input_required Boolean value that indicates whether or not
239
- # to require a random number input to deliver the verify code via phone calls
240
- # @param [String] tts_name Alternative to be used as Service friendly name in
241
- # phone calls, only applies to TTS languages
242
- # @param [Boolean] psd2_enabled Boolean value that enables to pass PSD2
243
- # transaction parameters when starting a verification
231
+ # @param [String] friendly_name A descriptive string that you create to describe
232
+ # the verification service. It can be up to 64 characters long.
233
+ # @param [String] code_length The length of the verification code to generate.
234
+ # Must be an integer value between 4 and 10, inclusive.
235
+ # @param [Boolean] lookup_enabled Whether to perform a lookup with each
236
+ # verification started and return info about the phone number.
237
+ # @param [Boolean] skip_sms_to_landlines Whether to skip sending SMS verifications
238
+ # to landlines. Requires `lookup_enabled`.
239
+ # @param [Boolean] dtmf_input_required Whether to ask the user to press a number
240
+ # before delivering the verify code in a phone call.
241
+ # @param [String] tts_name The name of an alternative text-to-speech service to
242
+ # use in phone calls. Applies only to TTS languages.
243
+ # @param [Boolean] psd2_enabled Whether to pass PSD2 transaction parameters when
244
+ # starting a verification.
244
245
  # @return [ServiceInstance] Updated ServiceInstance
245
246
  def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset)
246
247
  data = Twilio::Values.of({
@@ -314,7 +315,8 @@ module Twilio
314
315
  # Initialize the ServiceInstance
315
316
  # @param [Version] version Version that contains the resource
316
317
  # @param [Hash] payload payload that contains response from Twilio
317
- # @param [String] sid The unique SID identifier of Verification Service Instance.
318
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
319
+ # Verification Service resource to fetch.
318
320
  # @return [ServiceInstance] ServiceInstance
319
321
  def initialize(version, payload, sid: nil)
320
322
  super(version)
@@ -353,79 +355,79 @@ module Twilio
353
355
  end
354
356
 
355
357
  ##
356
- # @return [String] A string that uniquely identifies this Service.
358
+ # @return [String] The unique string that identifies the resource
357
359
  def sid
358
360
  @properties['sid']
359
361
  end
360
362
 
361
363
  ##
362
- # @return [String] Account Sid.
364
+ # @return [String] The SID of the Account that created the resource
363
365
  def account_sid
364
366
  @properties['account_sid']
365
367
  end
366
368
 
367
369
  ##
368
- # @return [String] Friendly name of the service
370
+ # @return [String] The string that you assigned to describe the verification service
369
371
  def friendly_name
370
372
  @properties['friendly_name']
371
373
  end
372
374
 
373
375
  ##
374
- # @return [String] Length of verification code. Valid values are 4-10
376
+ # @return [String] The length of the verification code
375
377
  def code_length
376
378
  @properties['code_length']
377
379
  end
378
380
 
379
381
  ##
380
- # @return [Boolean] Indicates whether or not to perform a lookup with each verification started
382
+ # @return [Boolean] Whether to perform a lookup with each verification
381
383
  def lookup_enabled
382
384
  @properties['lookup_enabled']
383
385
  end
384
386
 
385
387
  ##
386
- # @return [Boolean] Indicates whether PSD2 parameters are enabled or not
388
+ # @return [Boolean] Whether to pass PSD2 transaction parameters when starting a verification
387
389
  def psd2_enabled
388
390
  @properties['psd2_enabled']
389
391
  end
390
392
 
391
393
  ##
392
- # @return [Boolean] Indicates whether or not to ignore SMS verifications for landlines
394
+ # @return [Boolean] Whether to skip sending SMS verifications to landlines
393
395
  def skip_sms_to_landlines
394
396
  @properties['skip_sms_to_landlines']
395
397
  end
396
398
 
397
399
  ##
398
- # @return [Boolean] Indicates whether or not to require a random number input to deliver the verify code via phone calls
400
+ # @return [Boolean] Whether to ask the user to press a number before delivering the verify code in a phone call
399
401
  def dtmf_input_required
400
402
  @properties['dtmf_input_required']
401
403
  end
402
404
 
403
405
  ##
404
- # @return [String] Alternative to be used as Service friendly name in phone calls
406
+ # @return [String] The name of an alternative text-to-speech service to use in phone calls
405
407
  def tts_name
406
408
  @properties['tts_name']
407
409
  end
408
410
 
409
411
  ##
410
- # @return [Time] The date this Service was created
412
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
411
413
  def date_created
412
414
  @properties['date_created']
413
415
  end
414
416
 
415
417
  ##
416
- # @return [Time] The date this Service was updated
418
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
417
419
  def date_updated
418
420
  @properties['date_updated']
419
421
  end
420
422
 
421
423
  ##
422
- # @return [String] The url
424
+ # @return [String] The absolute URL of the resource
423
425
  def url
424
426
  @properties['url']
425
427
  end
426
428
 
427
429
  ##
428
- # @return [String] The links
430
+ # @return [String] The URLs of related resources
429
431
  def links
430
432
  @properties['links']
431
433
  end
@@ -446,20 +448,20 @@ module Twilio
446
448
 
447
449
  ##
448
450
  # Update the ServiceInstance
449
- # @param [String] friendly_name A 1-64 character string with friendly name of
450
- # service
451
- # @param [String] code_length The length of the verification code to be generated.
452
- # Must be an integer value between 4-10
453
- # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
454
- # be performed with each verification started and associated info returned
455
- # @param [Boolean] skip_sms_to_landlines Boolean value that indicates whether or
456
- # not to ignore SMS verifications for landlines, depends on lookup_enabled flag
457
- # @param [Boolean] dtmf_input_required Boolean value that indicates whether or not
458
- # to require a random number input to deliver the verify code via phone calls
459
- # @param [String] tts_name Alternative to be used as Service friendly name in
460
- # phone calls, only applies to TTS languages
461
- # @param [Boolean] psd2_enabled Boolean value that enables to pass PSD2
462
- # transaction parameters when starting a verification
451
+ # @param [String] friendly_name A descriptive string that you create to describe
452
+ # the verification service. It can be up to 64 characters long.
453
+ # @param [String] code_length The length of the verification code to generate.
454
+ # Must be an integer value between 4 and 10, inclusive.
455
+ # @param [Boolean] lookup_enabled Whether to perform a lookup with each
456
+ # verification started and return info about the phone number.
457
+ # @param [Boolean] skip_sms_to_landlines Whether to skip sending SMS verifications
458
+ # to landlines. Requires `lookup_enabled`.
459
+ # @param [Boolean] dtmf_input_required Whether to ask the user to press a number
460
+ # before delivering the verify code in a phone call.
461
+ # @param [String] tts_name The name of an alternative text-to-speech service to
462
+ # use in phone calls. Applies only to TTS languages.
463
+ # @param [Boolean] psd2_enabled Whether to pass PSD2 transaction parameters when
464
+ # starting a verification.
463
465
  # @return [ServiceInstance] Updated ServiceInstance
464
466
  def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset)
465
467
  context.update(