class Twilio::REST::Studio::V1::FlowContext::ExecutionContext::ExecutionContextInstance

Public Class Methods

new(version, payload, flow_sid: nil, execution_sid: nil) click to toggle source

Initialize the ExecutionContextInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] flow_sid The SID of the Flow. @param [String] execution_sid The SID of the context's Execution resource. @return [ExecutionContextInstance] ExecutionContextInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
123 def initialize(version, payload, flow_sid: nil, execution_sid: nil)
124   super(version)
125 
126   # Marshaled Properties
127   @properties = {
128       'account_sid' => payload['account_sid'],
129       'context' => payload['context'],
130       'flow_sid' => payload['flow_sid'],
131       'execution_sid' => payload['execution_sid'],
132       'url' => payload['url'],
133   }
134 
135   # Context
136   @instance_context = nil
137   @params = {'flow_sid' => flow_sid, 'execution_sid' => execution_sid, }
138 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
157 def account_sid
158   @properties['account_sid']
159 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [ExecutionContextContext] ExecutionContextContext for this ExecutionContextInstance

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
144 def context
145   unless @instance_context
146     @instance_context = ExecutionContextContext.new(
147         @version,
148         @params['flow_sid'],
149         @params['execution_sid'],
150     )
151   end
152   @instance_context
153 end
execution_sid() click to toggle source

@return [String] The SID of the Execution

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
175 def execution_sid
176   @properties['execution_sid']
177 end
fetch() click to toggle source

Fetch the ExecutionContextInstance @return [ExecutionContextInstance] Fetched ExecutionContextInstance

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
188 def fetch
189   context.fetch
190 end
flow_sid() click to toggle source

@return [String] The SID of the Flow

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
169 def flow_sid
170   @properties['flow_sid']
171 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
201 def inspect
202   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
203   "<Twilio.Studio.V1.ExecutionContextInstance #{values}>"
204 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
194 def to_s
195   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
196   "<Twilio.Studio.V1.ExecutionContextInstance #{values}>"
197 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb
181 def url
182   @properties['url']
183 end