Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextInstance
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.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
Flow state.
-
#engagement_sid ⇒ String
Engagement Sid.
-
#fetch ⇒ StepContextInstance
Fetch a StepContextInstance.
-
#flow_sid ⇒ String
Flow Sid.
-
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) ⇒ StepContextInstance
constructor
Initialize the StepContextInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#step_sid ⇒ String
Step Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) ⇒ StepContextInstance
Initialize the StepContextInstance
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 137 def initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'context' => payload['context'], 'engagement_sid' => payload['engagement_sid'], 'flow_sid' => payload['flow_sid'], 'step_sid' => payload['step_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'step_sid' => step_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
173 174 175 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 173 def account_sid @properties['account_sid'] end |
#context ⇒ Hash
Returns Flow state.
159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 159 def context unless @instance_context @instance_context = StepContextContext.new( @version, @params['flow_sid'], @params['engagement_sid'], @params['step_sid'], ) end @instance_context end |
#engagement_sid ⇒ String
Returns Engagement Sid.
185 186 187 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 185 def engagement_sid @properties['engagement_sid'] end |
#fetch ⇒ StepContextInstance
Fetch a StepContextInstance
210 211 212 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 210 def fetch context.fetch end |
#flow_sid ⇒ String
Returns Flow Sid.
191 192 193 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 191 def flow_sid @properties['flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
223 224 225 226 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 223 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepContextInstance #{values}>" end |
#step_sid ⇒ String
Returns Step Sid.
197 198 199 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 197 def step_sid @properties['step_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
216 217 218 219 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 216 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepContextInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
203 204 205 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 203 def url @properties['url'] end |