Class: Twilio::REST::Verify::V2::VerificationAttemptsSummaryInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ VerificationAttemptsSummaryInstance

Initialize the VerificationAttemptsSummaryInstance



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 305

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'total_attempts' => payload['total_attempts'] == nil ? payload['total_attempts'] : payload['total_attempts'].to_i,
        'total_converted' => payload['total_converted'] == nil ? payload['total_converted'] : payload['total_converted'].to_i,
        'total_unconverted' => payload['total_unconverted'] == nil ? payload['total_unconverted'] : payload['total_unconverted'].to_i,
        'conversion_rate_percentage' => payload['conversion_rate_percentage'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = {  }
end

Instance Method Details

#contextVerificationAttemptsSummaryContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



327
328
329
330
331
332
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 327

def context
    unless @instance_context
        @instance_context = VerificationAttemptsSummaryContext.new(@version )
    end
    @instance_context
end

#conversion_rate_percentageString



354
355
356
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 354

def conversion_rate_percentage
    @properties['conversion_rate_percentage']
end

#fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset) ⇒ VerificationAttemptsSummaryInstance

Fetch the VerificationAttemptsSummaryInstance



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 373

def fetch(
    verify_service_sid: :unset, 
    date_created_after: :unset, 
    date_created_before: :unset, 
    country: :unset, 
    channel: :unset, 
    destination_prefix: :unset
)

    context.fetch(
        verify_service_sid: verify_service_sid, 
        date_created_after: date_created_after, 
        date_created_before: date_created_before, 
        country: country, 
        channel: channel, 
        destination_prefix: destination_prefix, 
    )
end

#inspectObject

Provide a detailed, user friendly representation



401
402
403
404
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 401

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
end

#to_sObject

Provide a user friendly representation



394
395
396
397
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 394

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
end

#total_attemptsString



336
337
338
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 336

def total_attempts
    @properties['total_attempts']
end

#total_convertedString



342
343
344
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 342

def total_converted
    @properties['total_converted']
end

#total_unconvertedString



348
349
350
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 348

def total_unconverted
    @properties['total_unconverted']
end

#urlString



360
361
362
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 360

def url
    @properties['url']
end