Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepPageMetadata

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

Returns a new instance of StepPageMetadata.



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 339

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

#step_pageObject (readonly)

Returns the value of attribute step_page.



337
338
339
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 337

def step_page
  @step_page
end

Instance Method Details

#eachObject



355
356
357
358
359
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 355

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

#to_sObject



361
362
363
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 361

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