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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Step resource.
-
#context ⇒ Hash
The current state of the Flow’s Execution.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#engagement_sid ⇒ String
The SID of the Engagement.
-
#fetch ⇒ StepInstance
Fetch the StepInstance.
-
#flow_sid ⇒ String
The SID of the Flow.
-
#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 ⇒ Hash
The URLs of related resources.
-
#name ⇒ String
The event that caused the Flow to transition to the Step.
-
#sid ⇒ String
The unique string that we created to identify the Step resource.
-
#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 the Step.
-
#transitioned_to ⇒ String
The Widget that will follow the Widget for the Step.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) ⇒ StepInstance
Initialize the StepInstance
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 231 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 || @properties['flow_sid'] ,'engagement_sid' => engagement_sid || @properties['engagement_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
274 275 276 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 274 def account_sid @properties['account_sid'] end |
#context ⇒ Hash
259 260 261 262 263 264 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 259 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
316 317 318 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 316 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
322 323 324 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 322 def date_updated @properties['date_updated'] end |
#engagement_sid ⇒ String
286 287 288 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 286 def engagement_sid @properties['engagement_sid'] end |
#fetch ⇒ StepInstance
Fetch the StepInstance
341 342 343 344 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 341 def fetch context.fetch end |
#flow_sid ⇒ String
280 281 282 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 280 def flow_sid @properties['flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
362 363 364 365 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 362 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#links ⇒ Hash
334 335 336 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 334 def links @properties['links'] end |
#name ⇒ String
292 293 294 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 292 def name @properties['name'] end |
#sid ⇒ String
268 269 270 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 268 def sid @properties['sid'] end |
#step_context ⇒ step_context
Access the step_context
349 350 351 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 349 def step_context context.step_context end |
#to_s ⇒ Object
Provide a user friendly representation
355 356 357 358 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 355 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#transitioned_from ⇒ String
304 305 306 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 304 def transitioned_from @properties['transitioned_from'] end |
#transitioned_to ⇒ String
310 311 312 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 310 def transitioned_to @properties['transitioned_to'] end |
#url ⇒ String
328 329 330 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 328 def url @properties['url'] end |