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

- old
+ new

@@ -16,10 +16,11 @@ module Twilio module REST class IpMessaging < IpMessagingBase class V1 < Version class ServiceList < ListResource + ## # Initialize the ServiceList # @param [Version] version Version that contains the resource # @return [ServiceList] ServiceList def initialize(version) @@ -39,10 +40,11 @@ data = Twilio::Values.of({ 'FriendlyName' => friendly_name, }) + payload = @version.create('POST', @uri, data: data) ServiceInstance.new( @version, payload, ) @@ -163,18 +165,20 @@ ## # Delete the ServiceInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the ServiceInstance # @return [ServiceInstance] Fetched ServiceInstance def fetch + payload = @version.fetch('GET', @uri) ServiceInstance.new( @version, payload, sid: @solution[:sid], @@ -350,9 +354,10 @@ 'Webhooks.OnMemberRemoved.Method' => webhooks_on_member_removed_method, 'Limits.ChannelMembers' => limits_channel_members, 'Limits.UserChannels' => limits_user_channels, }) + payload = @version.update('POST', @uri, data: data) ServiceInstance.new( @version, payload, sid: @solution[:sid],