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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, flow_sid, execution_sid) ⇒ ExecutionContextContext

Initialize the ExecutionContextContext

Parameters:

  • version (Version)

    Version that contains the resource

  • flow_sid (String)

    The SID of the Flow with the Execution context to fetch.

  • execution_sid (String)

    The SID of the Execution context to fetch.


78
79
80
81
82
83
84
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb', line 78

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

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

Instance Method Details

#fetchExecutionContextInstance

Fetch the ExecutionContextInstance

Returns:


89
90
91
92
93
94
95
96
97
98
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb', line 89

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

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

#inspectObject

Provide a detailed, user friendly representation


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

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

#to_sObject

Provide a user friendly representation


102
103
104
105
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb', line 102

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