Class: Twilio::REST::Intelligence::V2::TranscriptContext::EncryptedSentencesPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.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) ⇒ EncryptedSentencesPageMetadata

Returns a new instance of EncryptedSentencesPageMetadata.



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 214

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

#encrypted_sentences_pageObject (readonly)

Returns the value of attribute encrypted_sentences_page.



212
213
214
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 212

def encrypted_sentences_page
  @encrypted_sentences_page
end

Instance Method Details

#eachObject



230
231
232
233
234
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 230

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

#to_sObject



236
237
238
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 236

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