Class: Twilio::REST::Accounts::V1::CredentialList::PublicKeyPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Accounts::V1::CredentialList::PublicKeyPageMetadata
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#public_key_page ⇒ Object
readonly
Returns the value of attribute public_key_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ PublicKeyPageMetadata
constructor
A new instance of PublicKeyPageMetadata.
- #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) ⇒ PublicKeyPageMetadata
Returns a new instance of PublicKeyPageMetadata.
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb', line 469 def initialize(version, response, solution, limit) super(version, response) @public_key_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @public_key_page << PublicKeyListResponse.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
#public_key_page ⇒ Object (readonly)
Returns the value of attribute public_key_page.
467 468 469 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb', line 467 def public_key_page @public_key_page end |
Instance Method Details
#each ⇒ Object
485 486 487 488 489 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb', line 485 def each @public_key_page.each do |record| yield record end end |
#to_s ⇒ Object
491 492 493 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb', line 491 def to_s '<Twilio::REST::Accounts::V1PageMetadata>'; end |