class Twilio::REST::Studio::V1::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/v1/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_sid' => payload['contact_sid'],
310       'contact_channel_address' => payload['contact_channel_address'],
311       'context' => payload['context'],
312       'status' => payload['status'],
313       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
314       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
315       'url' => payload['url'],
316       'links' => payload['links'],
317   }
318 
319   # Context
320   @instance_context = nil
321   @params = {'flow_sid' => flow_sid, 'sid' => sid || @properties['sid'], }
322 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.rb
343 def account_sid
344   @properties['account_sid']
345 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/v1/flow/execution.rb
361 def contact_channel_address
362   @properties['contact_channel_address']
363 end
contact_sid() click to toggle source

@return [String] The SID of the Contact

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
355 def contact_sid
356   @properties['contact_sid']
357 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/v1/flow/execution.rb
328 def context
329   unless @instance_context
330     @instance_context = ExecutionContext.new(@version, @params['flow_sid'], @params['sid'], )
331   end
332   @instance_context
333 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/v1/flow/execution.rb
379 def date_created
380   @properties['date_created']
381 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/v1/flow/execution.rb
385 def date_updated
386   @properties['date_updated']
387 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
411 def delete
412   context.delete
413 end
execution_context() click to toggle source

Access the execution_context @return [execution_context] execution_context

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
434 def execution_context
435   context.execution_context
436 end
fetch() click to toggle source

Fetch the ExecutionInstance @return [ExecutionInstance] Fetched ExecutionInstance

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

@return [String] The SID of the Flow

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

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
447 def inspect
448   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
449   "<Twilio.Studio.V1.ExecutionInstance #{values}>"
450 end
sid() click to toggle source

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

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

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

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
373 def status
374   @properties['status']
375 end
steps() click to toggle source

Access the steps @return [steps] steps

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

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
440 def to_s
441   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
442   "<Twilio.Studio.V1.ExecutionInstance #{values}>"
443 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/v1/flow/execution.rb
420 def update(status: nil)
421   context.update(status: status, )
422 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v1/flow/execution.rb
391 def url
392   @properties['url']
393 end