class Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextInstance
Public Class Methods
Initialize the StepContextInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] flow_sid
The SID of the Flow. @param [String] engagement_sid
The SID of the Engagement. @param [String] step_sid
The SID of the Step the context is associated with. @return [StepContextInstance] StepContextInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 128 def initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) 129 super(version) 130 131 # Marshaled Properties 132 @properties = { 133 'account_sid' => payload['account_sid'], 134 'context' => payload['context'], 135 'engagement_sid' => payload['engagement_sid'], 136 'flow_sid' => payload['flow_sid'], 137 'step_sid' => payload['step_sid'], 138 'url' => payload['url'], 139 } 140 141 # Context 142 @instance_context = nil 143 @params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'step_sid' => step_sid, } 144 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 164 def account_sid 165 @properties['account_sid'] 166 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [StepContextContext] StepContextContext
for this StepContextInstance
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 150 def context 151 unless @instance_context 152 @instance_context = StepContextContext.new( 153 @version, 154 @params['flow_sid'], 155 @params['engagement_sid'], 156 @params['step_sid'], 157 ) 158 end 159 @instance_context 160 end
@return [String] The SID of the Engagement
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 176 def engagement_sid 177 @properties['engagement_sid'] 178 end
Fetch the StepContextInstance
@return [StepContextInstance] Fetched StepContextInstance
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 201 def fetch 202 context.fetch 203 end
@return [String] The SID of the Flow
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 182 def flow_sid 183 @properties['flow_sid'] 184 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 214 def inspect 215 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 216 "<Twilio.Studio.V1.StepContextInstance #{values}>" 217 end
@return [String] Step SID
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 188 def step_sid 189 @properties['step_sid'] 190 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 207 def to_s 208 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 209 "<Twilio.Studio.V1.StepContextInstance #{values}>" 210 end
@return [String] The absolute URL of the resource
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb 194 def url 195 @properties['url'] 196 end