Class: Twilio::REST::Insights::V1::ConferencePageMetadata

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

Returns a new instance of ConferencePageMetadata.



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 409

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

#conference_pageObject (readonly)

Returns the value of attribute conference_page.



407
408
409
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 407

def conference_page
  @conference_page
end

Instance Method Details

#eachObject



425
426
427
428
429
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 425

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

#to_sObject



431
432
433
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 431

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