Class: Twilio::REST::Insights::V1::CallContext::AnnotationPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Insights::V1::CallContext::AnnotationPageMetadata
- Defined in:
- lib/twilio-ruby/rest/insights/v1/call/annotation.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#annotation_page ⇒ Object
readonly
Returns the value of attribute annotation_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ AnnotationPageMetadata
constructor
A new instance of AnnotationPageMetadata.
- #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) ⇒ AnnotationPageMetadata
Returns a new instance of AnnotationPageMetadata.
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/insights/v1/call/annotation.rb', line 296 def initialize(version, response, solution, limit) super(version, response) @annotation_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @annotation_page << AnnotationListResponse.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
#annotation_page ⇒ Object (readonly)
Returns the value of attribute annotation_page.
294 295 296 |
# File 'lib/twilio-ruby/rest/insights/v1/call/annotation.rb', line 294 def annotation_page @annotation_page end |
Instance Method Details
#each ⇒ Object
312 313 314 315 316 |
# File 'lib/twilio-ruby/rest/insights/v1/call/annotation.rb', line 312 def each @annotation_page.each do |record| yield record end end |
#to_s ⇒ Object
318 319 320 |
# File 'lib/twilio-ruby/rest/insights/v1/call/annotation.rb', line 318 def to_s '<Twilio::REST::Insights::V1PageMetadata>'; end |