Class: Twilio::REST::Conversations::V2::CommunicationPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Conversations::V2::CommunicationPageMetadata
- Defined in:
- lib/twilio-ruby/rest/conversations/v2/communication.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#communication_page ⇒ Object
readonly
Returns the value of attribute communication_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CommunicationPageMetadata
constructor
A new instance of CommunicationPageMetadata.
- #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) ⇒ CommunicationPageMetadata
Returns a new instance of CommunicationPageMetadata.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/twilio-ruby/rest/conversations/v2/communication.rb', line 504 def initialize(version, response, solution, limit) super(version, response) @communication_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @communication_page << CommunicationListResponse.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
#communication_page ⇒ Object (readonly)
Returns the value of attribute communication_page.
502 503 504 |
# File 'lib/twilio-ruby/rest/conversations/v2/communication.rb', line 502 def communication_page @communication_page end |
Instance Method Details
#each ⇒ Object
520 521 522 523 524 |
# File 'lib/twilio-ruby/rest/conversations/v2/communication.rb', line 520 def each @communication_page.each do |record| yield record end end |
#to_s ⇒ Object
526 527 528 |
# File 'lib/twilio-ruby/rest/conversations/v2/communication.rb', line 526 def to_s '<Twilio::REST::Conversations::V2PageMetadata>'; end |