Class: Twilio::REST::Api::V2010::AccountPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#account_page ⇒ Object
readonly
Returns the value of attribute account_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ AccountPageMetadata
constructor
A new instance of AccountPageMetadata.
- #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) ⇒ AccountPageMetadata
Returns a new instance of AccountPageMetadata.
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 869 def initialize(version, response, solution, limit) super(version, response) @account_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @account_page << AccountListResponse.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
#account_page ⇒ Object (readonly)
Returns the value of attribute account_page.
867 868 869 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 867 def account_page @account_page end |
Instance Method Details
#each ⇒ Object
885 886 887 888 889 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 885 def each @account_page.each do |record| yield record end end |
#to_s ⇒ Object
891 892 893 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 891 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |