class Twilio::REST::Studio::V1::FlowContext::ExecutionContext::ExecutionStepInstance
Public Class Methods
Initialize the ExecutionStepInstance
@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 Step's Execution resource. @param [String] sid The SID of the ExecutionStep resource to fetch. @return [ExecutionStepInstance] ExecutionStepInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 223 def initialize(version, payload, flow_sid: nil, execution_sid: nil, sid: nil) 224 super(version) 225 226 # Marshaled Properties 227 @properties = { 228 'sid' => payload['sid'], 229 'account_sid' => payload['account_sid'], 230 'flow_sid' => payload['flow_sid'], 231 'execution_sid' => payload['execution_sid'], 232 'name' => payload['name'], 233 'context' => payload['context'], 234 'transitioned_from' => payload['transitioned_from'], 235 'transitioned_to' => payload['transitioned_to'], 236 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 237 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 238 'url' => payload['url'], 239 'links' => payload['links'], 240 } 241 242 # Context 243 @instance_context = nil 244 @params = { 245 'flow_sid' => flow_sid, 246 'execution_sid' => execution_sid, 247 'sid' => sid || @properties['sid'], 248 } 249 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 275 def account_sid 276 @properties['account_sid'] 277 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [ExecutionStepContext] ExecutionStepContext
for this ExecutionStepInstance
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 255 def context 256 unless @instance_context 257 @instance_context = ExecutionStepContext.new( 258 @version, 259 @params['flow_sid'], 260 @params['execution_sid'], 261 @params['sid'], 262 ) 263 end 264 @instance_context 265 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 317 def date_created 318 @properties['date_created'] 319 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 323 def date_updated 324 @properties['date_updated'] 325 end
@return [String] The SID of the Execution
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 287 def execution_sid 288 @properties['execution_sid'] 289 end
Fetch the ExecutionStepInstance
@return [ExecutionStepInstance] Fetched ExecutionStepInstance
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 342 def fetch 343 context.fetch 344 end
@return [String] The SID of the Flow
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 281 def flow_sid 282 @properties['flow_sid'] 283 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 362 def inspect 363 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 364 "<Twilio.Studio.V1.ExecutionStepInstance #{values}>" 365 end
@return [String] The URLs of related resources
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 335 def links 336 @properties['links'] 337 end
@return [String] The event that caused the Flow to transition to the Step
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 293 def name 294 @properties['name'] 295 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 269 def sid 270 @properties['sid'] 271 end
Access the step_context
@return [step_context] step_context
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 349 def step_context 350 context.step_context 351 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 355 def to_s 356 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 357 "<Twilio.Studio.V1.ExecutionStepInstance #{values}>" 358 end
@return [String] The Widget that preceded the Widget for the Step
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 305 def transitioned_from 306 @properties['transitioned_from'] 307 end
@return [String] The Widget that will follow the Widget for the Step
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 311 def transitioned_to 312 @properties['transitioned_to'] 313 end
@return [String] The absolute URL of the resource
# File lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb 329 def url 330 @properties['url'] 331 end