Class: Twilio::REST::Api::V2010::AccountContext::SipList::CredentialListContext::CredentialPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::SipList::CredentialListContext::CredentialPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#credential_page ⇒ Object
readonly
Returns the value of attribute credential_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CredentialPageMetadata
constructor
A new instance of CredentialPageMetadata.
- #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) ⇒ CredentialPageMetadata
Returns a new instance of CredentialPageMetadata.
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb', line 479 def initialize(version, response, solution, limit) super(version, response) @credential_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @credential_page << CredentialListResponse.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
#credential_page ⇒ Object (readonly)
Returns the value of attribute credential_page.
477 478 479 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb', line 477 def credential_page @credential_page end |
Instance Method Details
#each ⇒ Object
495 496 497 498 499 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb', line 495 def each @credential_page.each do |record| yield record end end |
#to_s ⇒ Object
501 502 503 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb', line 501 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |