class Twilio::REST::Studio::V1::FlowInstance

Public Class Methods

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

Initialize the FlowInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Flow resource to fetch. @return [FlowInstance] FlowInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v1/flow.rb
234 def initialize(version, payload, sid: nil)
235   super(version)
236 
237   # Marshaled Properties
238   @properties = {
239       'sid' => payload['sid'],
240       'account_sid' => payload['account_sid'],
241       'friendly_name' => payload['friendly_name'],
242       'status' => payload['status'],
243       'version' => payload['version'].to_i,
244       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
245       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
246       'url' => payload['url'],
247       'links' => payload['links'],
248   }
249 
250   # Context
251   @instance_context = nil
252   @params = {'sid' => sid || @properties['sid'], }
253 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.rb
274 def account_sid
275   @properties['account_sid']
276 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 [FlowContext] FlowContext for this FlowInstance

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
259 def context
260   unless @instance_context
261     @instance_context = FlowContext.new(@version, @params['sid'], )
262   end
263   @instance_context
264 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.rb
298 def date_created
299   @properties['date_created']
300 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.rb
304 def date_updated
305   @properties['date_updated']
306 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
330 def delete
331   context.delete
332 end
engagements() click to toggle source

Access the engagements @return [engagements] engagements

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
337 def engagements
338   context.engagements
339 end
executions() click to toggle source

Access the executions @return [executions] executions

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
344 def executions
345   context.executions
346 end
fetch() click to toggle source

Fetch the FlowInstance @return [FlowInstance] Fetched FlowInstance

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
323 def fetch
324   context.fetch
325 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the Flow

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
280 def friendly_name
281   @properties['friendly_name']
282 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
357 def inspect
358   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
359   "<Twilio.Studio.V1.FlowInstance #{values}>"
360 end
sid() click to toggle source

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

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

@return [flow.Status] The status of the Flow

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
286 def status
287   @properties['status']
288 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
350 def to_s
351   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
352   "<Twilio.Studio.V1.FlowInstance #{values}>"
353 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
310 def url
311   @properties['url']
312 end
version() click to toggle source

@return [String] The latest version number of the Flow's definition

    # File lib/twilio-ruby/rest/studio/v1/flow.rb
292 def version
293   @properties['version']
294 end