Class: Twilio::REST::Verify::V2::VerificationAttemptsSummaryPageMetadata

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

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PageMetadata

#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response

Constructor Details

#initialize(version, response, solution, limit) ⇒ VerificationAttemptsSummaryPageMetadata

Returns a new instance of VerificationAttemptsSummaryPageMetadata.



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 239

def initialize(version, response, solution, limit)
    super(version, response)
    @verification_attempts_summary_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @verification_attempts_summary_page << VerificationAttemptsSummaryListResponse.new(version, @payload, key, limit - records)
        @payload = self.next_page
        break unless @payload
        records += @payload.body[key].size
    end
    # Path Solution
    @solution = solution
end

Instance Attribute Details

#verification_attempts_summary_pageObject (readonly)

Returns the value of attribute verification_attempts_summary_page.



237
238
239
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 237

def verification_attempts_summary_page
  @verification_attempts_summary_page
end

Instance Method Details

#eachObject



255
256
257
258
259
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 255

def each
    @verification_attempts_summary_page.each do |record|
      yield record
    end
end

#to_sObject



261
262
263
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 261

def to_s
  '<Twilio::REST::Verify::V2PageMetadata>';
end