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.



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 173

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_sid ⇒ String

Returns The SID of the Account that created the VerificationCheck resource.

Returns:

  • (String) —

    The SID of the Account that created the VerificationCheck resource.



209
210
211
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 209

def 
    @properties['account_sid']
end

#amount ⇒ String

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.



239
240
241
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 239

def amount
    @properties['amount']
end

#channel ⇒ Channel

Returns:

  • (Channel)


221
222
223
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 221

def channel
    @properties['channel']
end

#date_created ⇒ Time

Returns The ISO 8601 date and time in GMT when the Verification Check resource was created.

Returns:

  • (Time) —

    The ISO 8601 date and time in GMT when the Verification Check resource was created.



251
252
253
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 251

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The ISO 8601 date and time in GMT when the Verification Check resource was last updated.

Returns:

  • (Time) —

    The ISO 8601 date and time in GMT when the Verification Check resource was last updated.



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

def date_updated
    @properties['date_updated']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



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

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

#payee ⇒ String

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.



245
246
247
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 245

def payee
    @properties['payee']
end

#service_sid ⇒ String

Returns The SID of the Service the resource is associated with.

Returns:

  • (String) —

    The SID of the Service the resource is associated with.



203
204
205
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 203

def service_sid
    @properties['service_sid']
end

#sid ⇒ String

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.



197
198
199
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 197

def sid
    @properties['sid']
end

#sna_attempts_error_codes ⇒ Array<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.



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

def sna_attempts_error_codes
    @properties['sna_attempts_error_codes']
end

#status ⇒ String

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.



227
228
229
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 227

def status
    @properties['status']
end

#to ⇒ String

Returns The phone number or email being verified. Phone numbers must be in E.164 format.

Returns:

  • (String) —

    The phone number or email being verified. Phone numbers must be in E.164 format.



215
216
217
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 215

def to
    @properties['to']
end

#to_s ⇒ Object

Provide a user friendly representation



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

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

#valid ⇒ Boolean

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.



233
234
235
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 233

def valid
    @properties['valid']
end