Class: Twilio::REST::Intelligence::V2::TranscriptPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2/transcript.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ TranscriptPageMetadata

Returns a new instance of TranscriptPageMetadata.



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 544

def initialize(version, response, solution, limit)
    super(version, response)
    @transcript_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @transcript_page << TranscriptListResponse.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

#transcript_pageObject (readonly)

Returns the value of attribute transcript_page.



542
543
544
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 542

def transcript_page
  @transcript_page
end

Instance Method Details

#eachObject



560
561
562
563
564
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 560

def each
    @transcript_page.each do |record|
      yield record
    end
end

#to_sObject



566
567
568
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript.rb', line 566

def to_s
  '<Twilio::REST::Intelligence::V2PageMetadata>';
end