Class: Twilio::REST::Voice::V1::ArchivedCallPageMetadata

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

Returns a new instance of ArchivedCallPageMetadata.



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 189

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

#archived_call_pageObject (readonly)

Returns the value of attribute archived_call_page.



187
188
189
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 187

def archived_call_page
  @archived_call_page
end

Instance Method Details

#eachObject



205
206
207
208
209
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 205

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

#to_sObject



211
212
213
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 211

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