Class: Twilio::REST::Studio::V2::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V2::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextContext
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb
Instance Method Summary collapse
-
#fetch ⇒ ExecutionStepContextInstance
Fetch the ExecutionStepContextInstance.
-
#initialize(version, flow_sid, execution_sid, step_sid) ⇒ ExecutionStepContextContext
constructor
Initialize the ExecutionStepContextContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, flow_sid, execution_sid, step_sid) ⇒ ExecutionStepContextContext
Initialize the ExecutionStepContextContext
55 56 57 58 59 60 61 62 63 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 55 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
#fetch ⇒ ExecutionStepContextInstance
Fetch the ExecutionStepContextInstance
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 67 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ExecutionStepContextInstance.new( @version, payload, flow_sid: @solution[:flow_sid], execution_sid: @solution[:execution_sid], step_sid: @solution[:step_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
95 96 97 98 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 95 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.ExecutionStepContextContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
88 89 90 91 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 88 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V2.ExecutionStepContextContext #{context}>" end |