lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb in twilio-ruby-6.11.0
- old
+ new
@@ -19,10 +19,11 @@
class V1 < Version
class ServiceContext < InstanceContext
class ChannelContext < InstanceContext
class MessageList < ListResource
+
##
# Initialize the MessageList
# @param [Version] version Version that contains the resource
# @return [MessageList] MessageList
def initialize(version, service_sid: nil, channel_sid: nil)
@@ -48,10 +49,11 @@
'Body' => body,
'From' => from,
'Attributes' => attributes,
})
+
payload = @version.create('POST', @uri, data: data)
MessageInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
@@ -179,18 +181,20 @@
##
# Delete the MessageInstance
# @return [Boolean] True if delete succeeds, false otherwise
def delete
+
@version.delete('DELETE', @uri)
end
##
# Fetch the MessageInstance
# @return [MessageInstance] Fetched MessageInstance
def fetch
+
payload = @version.fetch('GET', @uri)
MessageInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
@@ -212,9 +216,10 @@
data = Twilio::Values.of({
'Body' => body,
'Attributes' => attributes,
})
+
payload = @version.update('POST', @uri, data: data)
MessageInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],