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