Class: Twilio::REST::Chat::V1::CredentialPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Chat::V1::CredentialPageMetadata
- Defined in:
- lib/twilio-ruby/rest/chat/v1/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.
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/twilio-ruby/rest/chat/v1/credential.rb', line 529 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.
527 528 529 |
# File 'lib/twilio-ruby/rest/chat/v1/credential.rb', line 527 def credential_page @credential_page end |
Instance Method Details
#each ⇒ Object
545 546 547 548 549 |
# File 'lib/twilio-ruby/rest/chat/v1/credential.rb', line 545 def each @credential_page.each do |record| yield record end end |
#to_s ⇒ Object
551 552 553 |
# File 'lib/twilio-ruby/rest/chat/v1/credential.rb', line 551 def to_s '<Twilio::REST::Chat::V1PageMetadata>'; end |