lib/twilio-ruby/rest/events/v1/sink.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/events/v1/sink.rb in twilio-ruby-6.11.0

- old
+ new

@@ -16,10 +16,11 @@ module Twilio module REST class Events < EventsBase class V1 < Version class SinkList < ListResource + ## # Initialize the SinkList # @param [Version] version Version that contains the resource # @return [SinkList] SinkList def initialize(version) @@ -45,10 +46,11 @@ 'Description' => description, 'SinkConfiguration' => Twilio.serialize_object(sink_configuration), 'SinkType' => sink_type, }) + payload = @version.create('POST', @uri, data: data) SinkInstance.new( @version, payload, ) @@ -180,18 +182,20 @@ ## # Delete the SinkInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the SinkInstance # @return [SinkInstance] Fetched SinkInstance def fetch + payload = @version.fetch('GET', @uri) SinkInstance.new( @version, payload, sid: @solution[:sid], @@ -208,9 +212,10 @@ data = Twilio::Values.of({ 'Description' => description, }) + payload = @version.update('POST', @uri, data: data) SinkInstance.new( @version, payload, sid: @solution[:sid],