lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-7.2.0

- old
+ new

@@ -53,12 +53,12 @@ 'RoleSid' => role_sid, 'Attributes' => attributes, 'FriendlyName' => friendly_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) UserInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -180,21 +180,23 @@ ## # Delete the UserInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - @version.delete('DELETE', @uri) + @version.delete('DELETE', @uri, headers: headers) end ## # Fetch the UserInstance # @return [UserInstance] Fetched UserInstance 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) UserInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], @@ -219,11 +221,11 @@ 'RoleSid' => role_sid, 'Attributes' => attributes, 'FriendlyName' => friendly_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) UserInstance.new( @version, payload, service_sid: @solution[:service_sid],