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.
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 406 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.
404 405 406 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 404 def key_page @key_page end |
Instance Method Details
#each ⇒ Object
422 423 424 425 426 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 422 def each @key_page.each do |record| yield record end end |
#to_s ⇒ Object
428 429 430 |
# File 'lib/twilio-ruby/rest/api/v2010/account/key.rb', line 428 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |