Method: Twilio::REST::Chat::V1::ServiceContext::ChannelContext::MessageContext#fetch

Defined in:
lib/twilio-ruby/rest/chat/v1/service/channel/message.rb

#fetchMessageInstance

Fetch the MessageInstance

Returns:



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 289

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    MessageInstance.new(
        @version,
        payload,
        service_sid: @solution[:service_sid],
        channel_sid: @solution[:channel_sid],
        sid: @solution[:sid],
    )
end