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

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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

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](www.twilio.com/docs/verify/api/service) the resource is associated with.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/twilio-ruby/rest/verify/v2/service/verification_check.rb', line 112

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']),
  }
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



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

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.



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

def amount
  @properties['amount']
end

#channelverification_check.Channel

Returns The verification method to use.

Returns:

  • (verification_check.Channel)

    The verification method to use



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

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



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

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



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

def date_updated
  @properties['date_updated']
end

#inspectObject

Provide a detailed, user friendly representation



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

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



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

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



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

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



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

def sid
  @properties['sid']
end

#statusString

Returns The status of the verification resource.

Returns:

  • (String)

    The status of the verification resource



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

def status
  @properties['status']
end

#toString

Returns The phone number being verified.

Returns:

  • (String)

    The phone number being verified



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

def to
  @properties['to']
end

#to_sObject

Provide a user friendly representation



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

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

#validBoolean

Returns Whether the verification was successful.

Returns:

  • (Boolean)

    Whether the verification was successful



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

def valid
  @properties['valid']
end