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
The account_sid.
-
#context ⇒ Hash
The context.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#engagement_sid ⇒ String
The engagement_sid.
-
#fetch ⇒ StepInstance
Fetch a StepInstance.
-
#flow_sid ⇒ String
The 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.
-
#name ⇒ String
The name.
-
#sid ⇒ String
The sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#transitioned_from ⇒ String
The transitioned_from.
-
#transitioned_to ⇒ String
The transitioned_to.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) ⇒ StepInstance
Initialize the StepInstance
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 213 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'], } # Context @instance_context = nil @params = { 'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
264 265 266 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 264 def account_sid @properties['account_sid'] end |
#context ⇒ Hash
244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 244 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
306 307 308 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 306 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
312 313 314 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 312 def date_updated @properties['date_updated'] end |
#engagement_sid ⇒ String
276 277 278 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 276 def engagement_sid @properties['engagement_sid'] end |
#fetch ⇒ StepInstance
Fetch a StepInstance
325 326 327 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 325 def fetch context.fetch end |
#flow_sid ⇒ String
270 271 272 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 270 def flow_sid @properties['flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
338 339 340 341 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 338 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#name ⇒ String
282 283 284 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 282 def name @properties['name'] end |
#sid ⇒ String
258 259 260 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 258 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
331 332 333 334 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 331 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepInstance #{values}>" end |
#transitioned_from ⇒ String
294 295 296 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 294 def transitioned_from @properties['transitioned_from'] end |
#transitioned_to ⇒ String
300 301 302 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 300 def transitioned_to @properties['transitioned_to'] end |
#url ⇒ String
318 319 320 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 318 def url @properties['url'] end |