Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextContext
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb
Instance Method Summary collapse
-
#fetch ⇒ StepContextInstance
Fetch the StepContextInstance.
-
#initialize(version, flow_sid, engagement_sid, step_sid) ⇒ StepContextContext
constructor
Initialize the StepContextContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, flow_sid, engagement_sid, step_sid) ⇒ StepContextContext
Initialize the StepContextContext
54 55 56 57 58 59 60 61 62 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 54 def initialize(version, flow_sid, engagement_sid, step_sid) super(version) # Path Solution @solution = { flow_sid: flow_sid, engagement_sid: engagement_sid, step_sid: step_sid, } @uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps/#{@solution[:step_sid]}/Context" end |
Instance Method Details
#fetch ⇒ StepContextInstance
Fetch the StepContextInstance
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 66 def fetch payload = @version.fetch('GET', @uri) StepContextInstance.new( @version, payload, flow_sid: @solution[:flow_sid], engagement_sid: @solution[:engagement_sid], step_sid: @solution[:step_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
88 89 90 91 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 88 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V1.StepContextContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
81 82 83 84 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 81 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Studio.V1.StepContextContext #{context}>" end |