class Twilio::REST::Studio::V1::FlowInstance
Public Class Methods
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
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
@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
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
@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
@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 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
Access the engagements @return [engagements] engagements
# File lib/twilio-ruby/rest/studio/v1/flow.rb 337 def engagements 338 context.engagements 339 end
Access the executions @return [executions] executions
# File lib/twilio-ruby/rest/studio/v1/flow.rb 344 def executions 345 context.executions 346 end
Fetch the FlowInstance
@return [FlowInstance] Fetched FlowInstance
# File lib/twilio-ruby/rest/studio/v1/flow.rb 323 def fetch 324 context.fetch 325 end
@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
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
@return [String] Nested resource URLs
# File lib/twilio-ruby/rest/studio/v1/flow.rb 316 def links 317 @properties['links'] 318 end
@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
@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
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
@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
@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