Class: Twilio::REST::Api::V2010::AccountContext::MessagePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::MessagePageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/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.
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/twilio-ruby/rest/api/v2010/account/message.rb', line 680 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.
678 679 680 |
# File 'lib/twilio-ruby/rest/api/v2010/account/message.rb', line 678 def end |
Instance Method Details
#each ⇒ Object
696 697 698 699 700 |
# File 'lib/twilio-ruby/rest/api/v2010/account/message.rb', line 696 def each .each do |record| yield record end end |
#to_s ⇒ Object
702 703 704 |
# File 'lib/twilio-ruby/rest/api/v2010/account/message.rb', line 702 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |