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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, flow_sid, execution_sid, step_sid) ⇒ ExecutionStepContextContext

Initialize the ExecutionStepContextContext

Parameters:

  • version (Version)

    Version that contains the resource

  • flow_sid (String)

    The SID of the Flow with the Step to fetch.

  • execution_sid (String)

    The SID of the Execution resource with the Step to fetch.

  • step_sid (String)

    The SID of the Step to fetch.


83
84
85
86
87
88
89
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb', line 83

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

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

Instance Method Details

#fetchExecutionStepContextInstance

Fetch the ExecutionStepContextInstance

Returns:


94
95
96
97
98
99
100
101
102
103
104
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb', line 94

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

  ExecutionStepContextInstance.new(
      @version,
      payload,
      flow_sid: @solution[:flow_sid],
      execution_sid: @solution[:execution_sid],
      step_sid: @solution[:step_sid],
  )
end

#inspectObject

Provide a detailed, user friendly representation


115
116
117
118
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb', line 115

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

#to_sObject

Provide a user friendly representation


108
109
110
111
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb', line 108

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