class Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepInstance

Public Class Methods

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

Initialize the StepInstance @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] engagement_sid The SID of the Engagement. @param [String] sid The SID of the Step resource to fetch. @return [StepInstance] StepInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
217 def initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil)
218   super(version)
219 
220   # Marshaled Properties
221   @properties = {
222       'sid' => payload['sid'],
223       'account_sid' => payload['account_sid'],
224       'flow_sid' => payload['flow_sid'],
225       'engagement_sid' => payload['engagement_sid'],
226       'name' => payload['name'],
227       'context' => payload['context'],
228       'transitioned_from' => payload['transitioned_from'],
229       'transitioned_to' => payload['transitioned_to'],
230       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
231       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
232       'url' => payload['url'],
233       'links' => payload['links'],
234   }
235 
236   # Context
237   @instance_context = nil
238   @params = {
239       'flow_sid' => flow_sid,
240       'engagement_sid' => engagement_sid,
241       'sid' => sid || @properties['sid'],
242   }
243 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/engagement/step.rb
269 def account_sid
270   @properties['account_sid']
271 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 [StepContext] StepContext for this StepInstance

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
249 def context
250   unless @instance_context
251     @instance_context = StepContext.new(
252         @version,
253         @params['flow_sid'],
254         @params['engagement_sid'],
255         @params['sid'],
256     )
257   end
258   @instance_context
259 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/engagement/step.rb
311 def date_created
312   @properties['date_created']
313 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/engagement/step.rb
317 def date_updated
318   @properties['date_updated']
319 end
engagement_sid() click to toggle source

@return [String] The SID of the Engagement

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
281 def engagement_sid
282   @properties['engagement_sid']
283 end
fetch() click to toggle source

Fetch the StepInstance @return [StepInstance] Fetched StepInstance

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
336 def fetch
337   context.fetch
338 end
flow_sid() click to toggle source

@return [String] The SID of the Flow

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
275 def flow_sid
276   @properties['flow_sid']
277 end
inspect() click to toggle source

Provide a detailed, user friendly representation

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

@return [String] The event that caused the Flow to transition to the Step

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
287 def name
288   @properties['name']
289 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
263 def sid
264   @properties['sid']
265 end
step_context() click to toggle source

Access the step_context @return [step_context] step_context

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
343 def step_context
344   context.step_context
345 end
to_s() click to toggle source

Provide a user friendly representation

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

@return [String] The Widget that preceded the Widget for the Step

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
299 def transitioned_from
300   @properties['transitioned_from']
301 end
transitioned_to() click to toggle source

@return [String] The Widget that will follow the Widget for the Step

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
305 def transitioned_to
306   @properties['transitioned_to']
307 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
323 def url
324   @properties['url']
325 end