class Twilio::REST::Studio::V2::FlowContext::ExecutionInstance

Public Class Methods

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

Initialize the ExecutionInstance @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] sid The SID of the Execution resource to fetch. @return [ExecutionInstance] ExecutionInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
301 def initialize(version, payload, flow_sid: nil, sid: nil)
302   super(version)
303 
304   # Marshaled Properties
305   @properties = {
306       'sid' => payload['sid'],
307       'account_sid' => payload['account_sid'],
308       'flow_sid' => payload['flow_sid'],
309       'contact_channel_address' => payload['contact_channel_address'],
310       'context' => payload['context'],
311       'status' => payload['status'],
312       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
313       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
314       'url' => payload['url'],
315       'links' => payload['links'],
316   }
317 
318   # Context
319   @instance_context = nil
320   @params = {'flow_sid' => flow_sid, 'sid' => sid || @properties['sid'], }
321 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/v2/flow/execution.rb
342 def account_sid
343   @properties['account_sid']
344 end
contact_channel_address() click to toggle source

@return [String] The phone number, SIP address or Client identifier that triggered the Execution

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
354 def contact_channel_address
355   @properties['contact_channel_address']
356 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 [ExecutionContext] ExecutionContext for this ExecutionInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
327 def context
328   unless @instance_context
329     @instance_context = ExecutionContext.new(@version, @params['flow_sid'], @params['sid'], )
330   end
331   @instance_context
332 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
372 def date_created
373   @properties['date_created']
374 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
378 def date_updated
379   @properties['date_updated']
380 end
delete() click to toggle source

Delete the ExecutionInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
404 def delete
405   context.delete
406 end
execution_context() click to toggle source

Access the execution_context @return [execution_context] execution_context

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
427 def execution_context
428   context.execution_context
429 end
fetch() click to toggle source

Fetch the ExecutionInstance @return [ExecutionInstance] Fetched ExecutionInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
397 def fetch
398   context.fetch
399 end
flow_sid() click to toggle source

@return [String] The SID of the Flow

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
348 def flow_sid
349   @properties['flow_sid']
350 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
440 def inspect
441   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
442   "<Twilio.Studio.V2.ExecutionInstance #{values}>"
443 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
336 def sid
337   @properties['sid']
338 end
status() click to toggle source

@return [execution.Status] The status of the Execution

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
366 def status
367   @properties['status']
368 end
steps() click to toggle source

Access the steps @return [steps] steps

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
420 def steps
421   context.steps
422 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
433 def to_s
434   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
435   "<Twilio.Studio.V2.ExecutionInstance #{values}>"
436 end
update(status: nil) click to toggle source

Update the ExecutionInstance @param [execution.Status] status The status of the Execution. Can only be

`ended`.

@return [ExecutionInstance] Updated ExecutionInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
413 def update(status: nil)
414   context.update(status: status, )
415 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v2/flow/execution.rb
384 def url
385   @properties['url']
386 end