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

- old
+ new

@@ -16,10 +16,11 @@ module Twilio module REST class Events < EventsBase class V1 < Version class SubscriptionList < ListResource + ## # Initialize the SubscriptionList # @param [Version] version Version that contains the resource # @return [SubscriptionList] SubscriptionList def initialize(version) @@ -45,10 +46,11 @@ 'Description' => description, 'SinkSid' => sink_sid, 'Types' => Twilio.serialize_list(types) { |e| Twilio.serialize_object(e) }, }) + payload = @version.create('POST', @uri, data: data) SubscriptionInstance.new( @version, payload, ) @@ -173,18 +175,20 @@ ## # Delete the SubscriptionInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the SubscriptionInstance # @return [SubscriptionInstance] Fetched SubscriptionInstance def fetch + payload = @version.fetch('GET', @uri) SubscriptionInstance.new( @version, payload, sid: @solution[:sid], @@ -204,9 +208,10 @@ data = Twilio::Values.of({ 'Description' => description, 'SinkSid' => sink_sid, }) + payload = @version.update('POST', @uri, data: data) SubscriptionInstance.new( @version, payload, sid: @solution[:sid],