Class: Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionContext
- Defined in:
- lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
Instance Method Summary collapse
-
#fetch ⇒ MessageInteractionInstance
Fetch the MessageInteractionInstance.
-
#initialize(version, service_sid, session_sid, participant_sid, sid) ⇒ MessageInteractionContext
constructor
Initialize the MessageInteractionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, session_sid, participant_sid, sid) ⇒ MessageInteractionContext
Initialize the MessageInteractionContext
174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 174 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
#fetch ⇒ MessageInteractionInstance
Fetch the MessageInteractionInstance
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 186 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) MessageInteractionInstance.new( @version, payload, service_sid: @solution[:service_sid], session_sid: @solution[:session_sid], participant_sid: @solution[:participant_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
215 216 217 218 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 215 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Proxy.V1.MessageInteractionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
208 209 210 211 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 208 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Proxy.V1.MessageInteractionContext #{context}>" end |