Class: Twilio::REST::FlexApi::V1::FlexFlowPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/flex_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) ⇒ FlexFlowPageMetadata

Returns a new instance of FlexFlowPageMetadata.



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 663

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

#flex_flow_pageObject (readonly)

Returns the value of attribute flex_flow_page.



661
662
663
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 661

def flex_flow_page
  @flex_flow_page
end

Instance Method Details

#eachObject



679
680
681
682
683
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 679

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

#to_sObject



685
686
687
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 685

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