Class: Twilio::REST::Verify::V2::VerificationAttemptsSummaryPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Verify::V2::VerificationAttemptsSummaryPageMetadata
- Defined in:
- lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#verification_attempts_summary_page ⇒ Object
readonly
Returns the value of attribute verification_attempts_summary_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ VerificationAttemptsSummaryPageMetadata
constructor
A new instance of VerificationAttemptsSummaryPageMetadata.
- #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) ⇒ 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_page ⇒ Object (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
#each ⇒ Object
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_s ⇒ Object
261 262 263 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 261 def to_s '<Twilio::REST::Verify::V2PageMetadata>'; end |