Class: Twilio::REST::Api::V2010::AccountContext::CallPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::CallPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#call_page ⇒ Object
readonly
Returns the value of attribute call_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CallPageMetadata
constructor
A new instance of CallPageMetadata.
- #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) ⇒ CallPageMetadata
Returns a new instance of CallPageMetadata.
966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call.rb', line 966 def initialize(version, response, solution, limit) super(version, response) @call_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @call_page << CallListResponse.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
#call_page ⇒ Object (readonly)
Returns the value of attribute call_page.
964 965 966 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call.rb', line 964 def call_page @call_page end |
Instance Method Details
#each ⇒ Object
982 983 984 985 986 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call.rb', line 982 def each @call_page.each do |record| yield record end end |
#to_s ⇒ Object
988 989 990 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call.rb', line 988 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |