lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-6.11.0

- old
+ new

@@ -18,10 +18,11 @@ class IpMessaging < IpMessagingBase class V1 < Version class ServiceContext < InstanceContext class ChannelList < ListResource + ## # Initialize the ChannelList # @param [Version] version Version that contains the resource # @return [ChannelList] ChannelList def initialize(version, service_sid: nil) @@ -50,10 +51,11 @@ 'UniqueName' => unique_name, 'Attributes' => attributes, 'Type' => type, }) + payload = @version.create('POST', @uri, data: data) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -183,18 +185,20 @@ ## # Delete the ChannelInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the ChannelInstance # @return [ChannelInstance] Fetched ChannelInstance def fetch + payload = @version.fetch('GET', @uri) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -218,9 +222,10 @@ 'FriendlyName' => friendly_name, 'UniqueName' => unique_name, 'Attributes' => attributes, }) + payload = @version.update('POST', @uri, data: data) ChannelInstance.new( @version, payload, service_sid: @solution[:service_sid],