class Twilio::REST::Verify::V2::VerificationAttemptInstance

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the VerificationAttemptInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The unique SID identifier of a Verification Attempt @return [VerificationAttemptInstance] VerificationAttemptInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
219 def initialize(version, payload, sid: nil)
220   super(version)
221 
222   # Marshaled Properties
223   @properties = {
224       'sid' => payload['sid'],
225       'account_sid' => payload['account_sid'],
226       'service_sid' => payload['service_sid'],
227       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
228       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
229       'conversion_status' => payload['conversion_status'],
230       'channel' => payload['channel'],
231       'channel_data' => payload['channel_data'],
232       'url' => payload['url'],
233   }
234 
235   # Context
236   @instance_context = nil
237   @params = {'sid' => sid || @properties['sid'], }
238 end

Public Instance Methods

account_sid() click to toggle source

@return [String] Account Sid

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
259 def account_sid
260   @properties['account_sid']
261 end
channel() click to toggle source

@return [verification_attempt.Channels] Channel used for the attempt

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
289 def channel
290   @properties['channel']
291 end
channel_data() click to toggle source

@return [Hash] Object with the channel information for an attempt

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
295 def channel_data
296   @properties['channel_data']
297 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [VerificationAttemptContext] VerificationAttemptContext for this VerificationAttemptInstance

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
244 def context
245   unless @instance_context
246     @instance_context = VerificationAttemptContext.new(@version, @params['sid'], )
247   end
248   @instance_context
249 end
conversion_status() click to toggle source

@return [verification_attempt.ConversionStatus] Status of a conversion

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
283 def conversion_status
284   @properties['conversion_status']
285 end
date_created() click to toggle source

@return [Time] The date this Attempt was created

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
271 def date_created
272   @properties['date_created']
273 end
date_updated() click to toggle source

@return [Time] The date this Attempt was updated

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
277 def date_updated
278   @properties['date_updated']
279 end
fetch() click to toggle source

Fetch the VerificationAttemptInstance @return [VerificationAttemptInstance] Fetched VerificationAttemptInstance

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
308 def fetch
309   context.fetch
310 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
321 def inspect
322   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
323   "<Twilio.Verify.V2.VerificationAttemptInstance #{values}>"
324 end
service_sid() click to toggle source

@return [String] The service_sid

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
265 def service_sid
266   @properties['service_sid']
267 end
sid() click to toggle source

@return [String] A string that uniquely identifies this Verification Attempt

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
253 def sid
254   @properties['sid']
255 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
314 def to_s
315   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
316   "<Twilio.Verify.V2.VerificationAttemptInstance #{values}>"
317 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
301 def url
302   @properties['url']
303 end