Class: Twilio::REST::Trunking::V1::TrunkContext::CredentialListPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Trunking::V1::TrunkContext::CredentialListPageMetadata
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#credential_list_page ⇒ Object
readonly
Returns the value of attribute credential_list_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CredentialListPageMetadata
constructor
A new instance of CredentialListPageMetadata.
- #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) ⇒ CredentialListPageMetadata
Returns a new instance of CredentialListPageMetadata.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 404 def initialize(version, response, solution, limit) super(version, response) @credential_list_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @credential_list_page << CredentialListListResponse.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_list_page ⇒ Object (readonly)
Returns the value of attribute credential_list_page.
402 403 404 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 402 def credential_list_page @credential_list_page end |
Instance Method Details
#each ⇒ Object
420 421 422 423 424 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 420 def each @credential_list_page.each do |record| yield record end end |
#to_s ⇒ Object
426 427 428 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb', line 426 def to_s '<Twilio::REST::Trunking::V1PageMetadata>'; end |