Class: Twilio::REST::Studio::V1::FlowContext::ExecutionContext::ExecutionStepContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb,
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Defined Under Namespace

Classes: ExecutionStepContextContext, ExecutionStepContextInstance, ExecutionStepContextList, ExecutionStepContextPage

Instance Method Summary collapse

Constructor Details

#initialize(version, flow_sid, execution_sid, sid) ⇒ ExecutionStepContext

Initialize the ExecutionStepContext

Parameters:

  • version (Version)

    Version that contains the resource

  • flow_sid (String)

    The unique SID identifier of the Flow.

  • execution_sid (String)

    The unique SID identifier of the Execution.

  • sid (String)

    The unique SID identifier of the Step.



167
168
169
170
171
172
173
174
175
176
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb', line 167

def initialize(version, flow_sid, execution_sid, sid)
  super(version)

  # Path Solution
  @solution = {flow_sid: flow_sid, execution_sid: execution_sid, sid: sid, }
  @uri = "/Flows/#{@solution[:flow_sid]}/Executions/#{@solution[:execution_sid]}/Steps/#{@solution[:sid]}"

  # Dependents
  @step_context = nil
end

Instance Method Details

#fetchExecutionStepInstance

Fetch a ExecutionStepInstance

Returns:



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb', line 181

def fetch
  params = Twilio::Values.of({})

  payload = @version.fetch(
      'GET',
      @uri,
      params,
  )

  ExecutionStepInstance.new(
      @version,
      payload,
      flow_sid: @solution[:flow_sid],
      execution_sid: @solution[:execution_sid],
      sid: @solution[:sid],
  )
end

#step_contextExecutionStepContextList, ExecutionStepContextContext

Access the step_context



203
204
205
206
207
208
209
210
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb', line 203

def step_context
  ExecutionStepContextContext.new(
      @version,
      @solution[:flow_sid],
      @solution[:execution_sid],
      @solution[:sid],
  )
end

#to_sObject

Provide a user friendly representation



214
215
216
217
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb', line 214

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Studio.V1.ExecutionStepContext #{context}>"
end