Class: Twilio::REST::Studio::V2::FlowContext::ExecutionContext::ExecutionStepPageMetadata

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

Returns a new instance of ExecutionStepPageMetadata.



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb', line 331

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

#execution_step_pageObject (readonly)

Returns the value of attribute execution_step_page.



329
330
331
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb', line 329

def execution_step_page
  @execution_step_page
end

Instance Method Details

#eachObject



347
348
349
350
351
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb', line 347

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

#to_sObject



353
354
355
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb', line 353

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