class Twilio::REST::Studio::V1::FlowContext::EngagementContext::EngagementContextInstance

Public Class Methods

new(version, payload, flow_sid: nil, engagement_sid: nil) click to toggle source

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

Calls superclass method 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

account_sid() click to toggle source

@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
context() click to toggle source

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
engagement_sid() click to toggle source

@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() click to toggle source

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
flow_sid() click to toggle source

@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
inspect() click to toggle source

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
to_s() click to toggle source

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
url() click to toggle source

@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