class Twilio::REST::Studio::V1::FlowContext::EngagementContext::EngagementContextInstance
Public Class Methods
Initialize the EngagementContextInstance
@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. @return [EngagementContextInstance] EngagementContextInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 122 def initialize(version, payload, flow_sid: nil, engagement_sid: nil) 123 super(version) 124 125 # Marshaled Properties 126 @properties = { 127 'account_sid' => payload['account_sid'], 128 'context' => payload['context'], 129 'engagement_sid' => payload['engagement_sid'], 130 'flow_sid' => payload['flow_sid'], 131 'url' => payload['url'], 132 } 133 134 # Context 135 @instance_context = nil 136 @params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, } 137 end
Public Instance Methods
@return [String] Account SID
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 156 def account_sid 157 @properties['account_sid'] 158 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 [EngagementContextContext] EngagementContextContext
for this EngagementContextInstance
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 143 def context 144 unless @instance_context 145 @instance_context = EngagementContextContext.new( 146 @version, 147 @params['flow_sid'], 148 @params['engagement_sid'], 149 ) 150 end 151 @instance_context 152 end
@return [String] Engagement SID
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 168 def engagement_sid 169 @properties['engagement_sid'] 170 end
Fetch the EngagementContextInstance
@return [EngagementContextInstance] Fetched EngagementContextInstance
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 187 def fetch 188 context.fetch 189 end
@return [String] Flow SID
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 174 def flow_sid 175 @properties['flow_sid'] 176 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 200 def inspect 201 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 202 "<Twilio.Studio.V1.EngagementContextInstance #{values}>" 203 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 193 def to_s 194 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 195 "<Twilio.Studio.V1.EngagementContextInstance #{values}>" 196 end
@return [String] The URL of the resource
# File lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb 180 def url 181 @properties['url'] 182 end