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

  • service_sid (String) (defaults to: nil)

    The SID of the Service the resource is associated with.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 104

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 that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource



138
139
140
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 138

def 
  @properties['account_sid']
end

#amountString

Returns The amount of the associated PSD2 compliant transaction.

Returns:

  • (String)

    The amount of the associated PSD2 compliant transaction.



168
169
170
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 168

def amount
  @properties['amount']
end

#channelverification_check.Channel

Returns The verification method to use.

Returns:

  • (verification_check.Channel)

    The verification method to use



150
151
152
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 150

def channel
  @properties['channel']
end

#date_createdTime

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



180
181
182
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 180

def date_created
  @properties['date_created']
end

#date_updatedTime

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



186
187
188
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 186

def date_updated
  @properties['date_updated']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#payeeString

Returns The payee of the associated PSD2 compliant transaction.

Returns:

  • (String)

    The payee of the associated PSD2 compliant transaction



174
175
176
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 174

def payee
  @properties['payee']
end

#service_sidString

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

Returns:

  • (String)

    The SID of the Service that the resource is associated with



132
133
134
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 132

def service_sid
  @properties['service_sid']
end

#sidString

Returns The unique string that identifies the resource.

Returns:

  • (String)

    The unique string that identifies the resource



126
127
128
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 126

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.

Returns:

  • (Array[Hash])

    List of error codes as a result of attempting a verification using the ‘sna` channel.



192
193
194
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 192

def sna_attempts_error_codes
  @properties['sna_attempts_error_codes']
end

#statusString

Returns The status of the verification resource.

Returns:

  • (String)

    The status of the verification resource



156
157
158
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 156

def status
  @properties['status']
end

#toString

Returns The phone number or email being verified.

Returns:

  • (String)

    The phone number or email being verified



144
145
146
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 144

def to
  @properties['to']
end

#to_sObject

Provide a user friendly representation



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

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

#validBoolean

Returns Whether the verification was successful.

Returns:

  • (Boolean)

    Whether the verification was successful



162
163
164
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 162

def valid
  @properties['valid']
end