Class: Twilio::REST::Chat::V2::ServiceContext::ChannelContext::MessagePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Chat::V2::ServiceContext::ChannelContext::MessagePageMetadata
- Defined in:
- lib/twilio-ruby/rest/chat/v2/service/channel/message.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#message_page ⇒ Object
readonly
Returns the value of attribute message_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ MessagePageMetadata
constructor
A new instance of MessagePageMetadata.
- #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) ⇒ MessagePageMetadata
Returns a new instance of MessagePageMetadata.
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/message.rb', line 560 def initialize(version, response, solution, limit) super(version, response) = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) << MessageListResponse.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
#message_page ⇒ Object (readonly)
Returns the value of attribute message_page.
558 559 560 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/message.rb', line 558 def end |
Instance Method Details
#each ⇒ Object
576 577 578 579 580 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/message.rb', line 576 def each .each do |record| yield record end end |
#to_s ⇒ Object
582 583 584 |
# File 'lib/twilio-ruby/rest/chat/v2/service/channel/message.rb', line 582 def to_s '<Twilio::REST::Chat::V2PageMetadata>'; end |