Class: Twilio::REST::Studio::V1::FlowContext::ExecutionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V1::FlowContext::ExecutionContext
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/execution.rb,
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb,
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.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: ExecutionContextContext, ExecutionContextInstance, ExecutionContextList, ExecutionContextPage, ExecutionStepContext, ExecutionStepInstance, ExecutionStepList, ExecutionStepPage
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes the ExecutionInstance.
-
#execution_context ⇒ ExecutionContextList, ExecutionContextContext
Access the execution_context.
-
#fetch ⇒ ExecutionInstance
Fetch a ExecutionInstance.
-
#initialize(version, flow_sid, sid) ⇒ ExecutionContext
constructor
Initialize the ExecutionContext.
-
#steps(sid = :unset) ⇒ ExecutionStepList, ExecutionStepContext
Access the steps.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, flow_sid, sid) ⇒ ExecutionContext
Initialize the ExecutionContext
182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 182 def initialize(version, flow_sid, sid) super(version) # Path Solution @solution = {flow_sid: flow_sid, sid: sid, } @uri = "/Flows/#{@solution[:flow_sid]}/Executions/#{@solution[:sid]}" # Dependents @steps = nil @execution_context = nil end |
Instance Method Details
#delete ⇒ Boolean
Deletes the ExecutionInstance
212 213 214 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 212 def delete @version.delete('delete', @uri) end |
#execution_context ⇒ ExecutionContextList, ExecutionContextContext
Access the execution_context
242 243 244 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 242 def execution_context ExecutionContextContext.new(@version, @solution[:flow_sid], @solution[:sid], ) end |
#fetch ⇒ ExecutionInstance
Fetch a ExecutionInstance
197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 197 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) ExecutionInstance.new(@version, payload, flow_sid: @solution[:flow_sid], sid: @solution[:sid], ) end |
#steps(sid = :unset) ⇒ ExecutionStepList, ExecutionStepContext
Access the steps
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 220 def steps(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return ExecutionStepContext.new(@version, @solution[:flow_sid], @solution[:sid], sid, ) end unless @steps @steps = ExecutionStepList.new( @version, flow_sid: @solution[:flow_sid], execution_sid: @solution[:sid], ) end @steps end |
#to_s ⇒ Object
Provide a user friendly representation
248 249 250 251 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/execution.rb', line 248 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V1.ExecutionContext #{context}>" end |