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