Class: Twilio::REST::Verify::V2::ServiceContext::VerificationCheckInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service/verification_check.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil) ⇒ VerificationCheckInstance

Initialize the VerificationCheckInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this VerificationCheck resource.

  • sid (String)

    The SID of the Call resource to fetch.



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 232

def initialize(version, payload , service_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'service_sid' => payload['service_sid'],
        'account_sid' => payload['account_sid'],
        'to' => payload['to'],
        'channel' => payload['channel'],
        'status' => payload['status'],
        'valid' => payload['valid'],
        'amount' => payload['amount'],
        'payee' => payload['payee'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'sna_attempts_error_codes' => payload['sna_attempts_error_codes'],
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the VerificationCheck resource.

Returns:



268
269
270
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 268

def 
    @properties['account_sid']
end

#amountString

Returns The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

Returns:

  • (String)

    The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.



298
299
300
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 298

def amount
    @properties['amount']
end

#channelChannel

Returns:

  • (Channel)


280
281
282
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 280

def channel
    @properties['channel']
end

#date_createdTime

Returns The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the Verification Check resource was created.

Returns:



310
311
312
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 310

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the Verification Check resource was last updated.

Returns:



316
317
318
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 316

def date_updated
    @properties['date_updated']
end

#inspectObject

Provide a detailed, user friendly representation



334
335
336
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 334

def inspect
    "<Twilio.Verify.V2.VerificationCheckInstance>"
end

#payeeString

Returns The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

Returns:

  • (String)

    The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.



304
305
306
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 304

def payee
    @properties['payee']
end

#service_sidString

Returns The SID of the [Service](www.twilio.com/docs/verify/api/service) the resource is associated with.

Returns:



262
263
264
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 262

def service_sid
    @properties['service_sid']
end

#sidString

Returns The unique string that we created to identify the VerificationCheck resource.

Returns:

  • (String)

    The unique string that we created to identify the VerificationCheck resource.



256
257
258
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 256

def sid
    @properties['sid']
end

#sna_attempts_error_codesArray<Hash>

Returns List of error codes as a result of attempting a verification using the sna channel. The error codes are chronologically ordered, from the first attempt to the latest attempt. This will be an empty list if no errors occured or null if the last channel used wasn’t sna.

Returns:

  • (Array<Hash>)

    List of error codes as a result of attempting a verification using the sna channel. The error codes are chronologically ordered, from the first attempt to the latest attempt. This will be an empty list if no errors occured or null if the last channel used wasn’t sna.



322
323
324
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 322

def sna_attempts_error_codes
    @properties['sna_attempts_error_codes']
end

#statusString

Returns The status of the verification. Can be: pending, approved, canceled, max_attempts_reached, deleted, failed or expired.

Returns:

  • (String)

    The status of the verification. Can be: pending, approved, canceled, max_attempts_reached, deleted, failed or expired.



286
287
288
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 286

def status
    @properties['status']
end

#toString

Returns The phone number or [email](www.twilio.com/docs/verify/email) being verified. Phone numbers must be in [E.164 format](www.twilio.com/docs/glossary/what-e164).

Returns:



274
275
276
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 274

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



328
329
330
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 328

def to_s
    "<Twilio.Verify.V2.VerificationCheckInstance>"
end

#validBoolean

Returns Use "status" instead. Legacy property indicating whether the verification was successful.

Returns:

  • (Boolean)

    Use "status" instead. Legacy property indicating whether the verification was successful.



292
293
294
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 292

def valid
    @properties['valid']
end