Class: Twilio::REST::Studio::V1::FlowPageMetadata

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

Returns a new instance of FlowPageMetadata.



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/twilio-ruby/rest/studio/v1/flow.rb', line 389

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

#flow_pageObject (readonly)

Returns the value of attribute flow_page.



387
388
389
# File 'lib/twilio-ruby/rest/studio/v1/flow.rb', line 387

def flow_page
  @flow_page
end

Instance Method Details

#eachObject



405
406
407
408
409
# File 'lib/twilio-ruby/rest/studio/v1/flow.rb', line 405

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

#to_sObject



411
412
413
# File 'lib/twilio-ruby/rest/studio/v1/flow.rb', line 411

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