lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-7.2.0

- old
+ new

@@ -74,12 +74,12 @@ 'Timers.Closed' => timers_closed, 'Bindings.Email.Address' => bindings_email_address, 'Bindings.Email.Name' => bindings_email_name, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) - headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.create('POST', @uri, data: data, headers: headers) ConversationInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], @@ -223,22 +223,23 @@ # @return [Boolean] True if delete succeeds, false otherwise def delete( x_twilio_webhook_enabled: :unset ) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) - headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) @version.delete('DELETE', @uri, headers: headers) end ## # Fetch the ConversationInstance # @return [ConversationInstance] Fetched ConversationInstance def fetch + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.fetch('GET', @uri) + payload = @version.fetch('GET', @uri, headers: headers) ConversationInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], sid: @solution[:sid], @@ -287,11 +288,11 @@ 'UniqueName' => unique_name, 'Bindings.Email.Address' => bindings_email_address, 'Bindings.Email.Name' => bindings_email_name, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) - headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.update('POST', @uri, data: data, headers: headers) ConversationInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid],