Class: Twilio::REST::Verify::V2::VerificationAttemptPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::VerificationAttemptPageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#verification_attempt_page ⇒ Object
readonly
Returns the value of attribute verification_attempt_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ VerificationAttemptPageMetadata
constructor
A new instance of VerificationAttemptPageMetadata.
- #to_s ⇒ Object
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) ⇒ VerificationAttemptPageMetadata
Returns a new instance of VerificationAttemptPageMetadata.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 373 def initialize(version, response, solution, limit) super(version, response) @verification_attempt_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @verification_attempt_page << VerificationAttemptListResponse.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_attempt_page ⇒ Object (readonly)
Returns the value of attribute verification_attempt_page.
371 372 373 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 371 def verification_attempt_page @verification_attempt_page end |
Instance Method Details
#each ⇒ Object
389 390 391 392 393 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 389 def each @verification_attempt_page.each do |record| yield record end end |
#to_s ⇒ Object
395 396 397 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 395 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |