Class: Twilio::REST::Voice::V3::TranscriptionPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/voice/v3/transcription.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) ⇒ TranscriptionPageMetadata

Returns a new instance of TranscriptionPageMetadata.



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 480

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

#transcription_page ⇒ Object (readonly)

Returns the value of attribute transcription_page.



478
479
480
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 478

def transcription_page
  @transcription_page
end

Instance Method Details

#each ⇒ Object



496
497
498
499
500
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 496

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

#to_s ⇒ Object



502
503
504
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 502

def to_s
  '<Twilio::REST::Voice::V3PageMetadata>';
end