Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepInstance
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
Account Sid.
-
#context ⇒ Hash
The context.
-
#date_created ⇒ Time
The date this Step was created.
-
#date_updated ⇒ Time
The date this Step was updated.
-
#engagement_sid ⇒ String
Engagement Sid.
-
#fetch ⇒ StepInstance
Fetch a StepInstance.
-
#flow_sid ⇒ String
Flow Sid.
-
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) ⇒ StepInstance
constructor
Initialize the StepInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#name ⇒ String
The event that caused the flow to transition to this Step.
-
#sid ⇒ String
A string that uniquely identifies this Step.
-
#step_context ⇒ step_context
Access the step_context.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#transitioned_from ⇒ String
The Widget that preceded the Widget for this Step.
-
#transitioned_to ⇒ String
The Widget that will follow the Widget for this Step.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) ⇒ StepInstance
Initialize the StepInstance
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 226 def initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'flow_sid' => payload['flow_sid'], 'engagement_sid' => payload['engagement_sid'], 'name' => payload['name'], 'context' => payload['context'], 'transitioned_from' => payload['transitioned_from'], 'transitioned_to' => payload['transitioned_to'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
278 279 280 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 278 def account_sid @properties['account_sid'] end |
#context ⇒ Hash
Returns The context.
258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 258 def context unless @instance_context @instance_context = StepContext.new( @version, @params['flow_sid'], @params['engagement_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date this Step was created.
320 321 322 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 320 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Step was updated.
326 327 328 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 326 def date_updated @properties['date_updated'] end |
#engagement_sid ⇒ String
Returns Engagement Sid.
290 291 292 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 290 def engagement_sid @properties['engagement_sid'] end |
#fetch ⇒ StepInstance
Fetch a StepInstance
345 346 347 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 345 def fetch context.fetch end |
#flow_sid ⇒ String
Returns Flow Sid.
284 285 286 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 284 def flow_sid @properties['flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
365 366 367 368 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 365 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#links ⇒ String
Returns The links.
338 339 340 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 338 def links @properties['links'] end |
#name ⇒ String
Returns The event that caused the flow to transition to this Step.
296 297 298 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 296 def name @properties['name'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Step.
272 273 274 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 272 def sid @properties['sid'] end |
#step_context ⇒ step_context
Access the step_context
352 353 354 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 352 def step_context context.step_context end |
#to_s ⇒ Object
Provide a user friendly representation
358 359 360 361 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 358 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#transitioned_from ⇒ String
Returns The Widget that preceded the Widget for this Step.
308 309 310 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 308 def transitioned_from @properties['transitioned_from'] end |
#transitioned_to ⇒ String
Returns The Widget that will follow the Widget for this Step.
314 315 316 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 314 def transitioned_to @properties['transitioned_to'] end |
#url ⇒ String
Returns The URL of this resource.
332 333 334 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 332 def url @properties['url'] end |