lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb in twilio-ruby-6.11.0

- old
+ new

@@ -19,10 +19,11 @@ class V1 < Version class ServiceContext < InstanceContext class ConversationContext < InstanceContext class WebhookList < ListResource + ## # Initialize the WebhookList # @param [Version] version Version that contains the resource # @return [WebhookList] WebhookList def initialize(version, chat_service_sid: nil, conversation_sid: nil) @@ -60,10 +61,11 @@ 'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e }, 'Configuration.FlowSid' => configuration_flow_sid, 'Configuration.ReplayAfter' => configuration_replay_after, }) + payload = @version.create('POST', @uri, data: data) WebhookInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], @@ -185,18 +187,20 @@ ## # Delete the WebhookInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the WebhookInstance # @return [WebhookInstance] Fetched WebhookInstance def fetch + payload = @version.fetch('GET', @uri) WebhookInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], @@ -227,9 +231,10 @@ 'Configuration.Filters' => Twilio.serialize_list(configuration_filters) { |e| e }, 'Configuration.Triggers' => Twilio.serialize_list(configuration_triggers) { |e| e }, 'Configuration.FlowSid' => configuration_flow_sid, }) + payload = @version.update('POST', @uri, data: data) WebhookInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid],