Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb,
lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb
Defined Under Namespace
Classes: StepContextContext, StepContextInstance, StepContextList, StepContextPage
Instance Method Summary collapse
-
#fetch ⇒ StepInstance
Fetch the StepInstance.
-
#initialize(version, flow_sid, engagement_sid, sid) ⇒ StepContext
constructor
Initialize the StepContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#step_context ⇒ StepContextList, StepContextContext
Access the step_context.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, flow_sid, engagement_sid, sid) ⇒ StepContext
Initialize the StepContext
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 141 def initialize(version, flow_sid, engagement_sid, sid) super(version) # Path Solution @solution = { flow_sid: flow_sid, engagement_sid: engagement_sid, sid: sid, } @uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps/#{@solution[:sid]}" # Dependents @step_context = nil end |
Instance Method Details
#fetch ⇒ StepInstance
Fetch the StepInstance
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 154 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) StepInstance.new( @version, payload, flow_sid: @solution[:flow_sid], engagement_sid: @solution[:engagement_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
194 195 196 197 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 194 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V1.StepContext #{context}>" end |
#step_context ⇒ StepContextList, StepContextContext
Access the step_context
176 177 178 179 180 181 182 183 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 176 def step_context StepContextContext.new( @version, @solution[:flow_sid], @solution[:engagement_sid], @solution[:sid] ) end |
#to_s ⇒ Object
Provide a user friendly representation
187 188 189 190 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb', line 187 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V1.StepContext #{context}>" end |