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

- old
+ new

@@ -16,10 +16,11 @@ module Twilio module REST class Messaging < MessagingBase class V1 < Version class ServiceList < ListResource + ## # Initialize the ServiceList # @param [Version] version Version that contains the resource # @return [ServiceList] ServiceList def initialize(version) @@ -84,10 +85,11 @@ 'SynchronousValidation' => synchronous_validation, 'Usecase' => usecase, 'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number, }) + payload = @version.create('POST', @uri, data: data) ServiceInstance.new( @version, payload, ) @@ -213,18 +215,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], @@ -286,9 +290,10 @@ 'SynchronousValidation' => synchronous_validation, 'Usecase' => usecase, 'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number, }) + payload = @version.update('POST', @uri, data: data) ServiceInstance.new( @version, payload, sid: @solution[:sid],