class Twilio::REST::Proxy::V1::ServiceContext::SessionContext::InteractionContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, service_sid, session_sid, sid) click to toggle source

Initialize the InteractionContext @param [Version] version Version that contains the resource @param [String] service_sid The SID of the parent

{Service}[https://www.twilio.com/docs/proxy/api/service] of the resource to
fetch.

@param [String] session_sid The SID of the parent

{Session}[https://www.twilio.com/docs/proxy/api/session] of the resource to
fetch.

@param [String] sid The Twilio-provided string that uniquely identifies the

Interaction resource to fetch.

@return [InteractionContext] InteractionContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
172 def initialize(version, service_sid, session_sid, sid)
173   super(version)
174 
175   # Path Solution
176   @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid, }
177   @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Interactions/#{@solution[:sid]}"
178 end

Public Instance Methods

delete() click to toggle source

Delete the InteractionInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
198 def delete
199    @version.delete('DELETE', @uri)
200 end
fetch() click to toggle source

Fetch the InteractionInstance @return [InteractionInstance] Fetched InteractionInstance

    # File lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
183 def fetch
184   payload = @version.fetch('GET', @uri)
185 
186   InteractionInstance.new(
187       @version,
188       payload,
189       service_sid: @solution[:service_sid],
190       session_sid: @solution[:session_sid],
191       sid: @solution[:sid],
192   )
193 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
211 def inspect
212   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
213   "#<Twilio.Proxy.V1.InteractionContext #{context}>"
214 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
204 def to_s
205   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
206   "#<Twilio.Proxy.V1.InteractionContext #{context}>"
207 end