Class: Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(version, service_sid, session_sid, participant_sid, sid) ⇒ MessageInteractionContext

Initialize the MessageInteractionContext

Parameters:



166
167
168
169
170
171
172
173
174
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 166

def initialize(version, service_sid, session_sid, participant_sid, sid)
    super(version)

    # Path Solution
    @solution = { service_sid: service_sid, session_sid: session_sid, participant_sid: participant_sid, sid: sid,  }
    @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Participants/#{@solution[:participant_sid]}/MessageInteractions/#{@solution[:sid]}"

    
end

Instance Method Details

#fetchMessageInteractionInstance

Fetch the MessageInteractionInstance

Returns:



178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 178

def fetch

    payload = @version.fetch('GET', @uri)
    MessageInteractionInstance.new(
        @version,
        payload,
        service_sid: @solution[:service_sid],
        session_sid: @solution[:session_sid],
        participant_sid: @solution[:participant_sid],
        sid: @solution[:sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



201
202
203
204
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 201

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Proxy.V1.MessageInteractionContext #{context}>"
end

#to_sObject

Provide a user friendly representation



194
195
196
197
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 194

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Proxy.V1.MessageInteractionContext #{context}>"
end