Class: Twilio::REST::Api::V2010::AccountContext::KeyPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::KeyPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/key.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#key_page ⇒ Object
readonly
Returns the value of attribute key_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ KeyPageMetadata
constructor
A new instance of KeyPageMetadata.
- #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) ⇒ KeyPageMetadata
Returns a new instance of KeyPageMetadata.
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 414 def initialize(version, response, solution, limit) super(version, response) @key_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @key_page << KeyListResponse.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
#key_page ⇒ Object (readonly)
Returns the value of attribute key_page.
412 413 414 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 412 def key_page @key_page end |
Instance Method Details
#each ⇒ Object
430 431 432 433 434 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 430 def each @key_page.each do |record| yield record end end |
#to_s ⇒ Object
436 437 438 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 436 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |