Class: Twilio::REST::Studio::V2::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextPageMetadata

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

Returns a new instance of ExecutionStepContextPageMetadata.



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 210

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

Returns the value of attribute execution_step_context_page.



208
209
210
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 208

def execution_step_context_page
  @execution_step_context_page
end

Instance Method Details

#eachObject



226
227
228
229
230
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 226

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

#to_sObject



232
233
234
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 232

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