lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-6.11.0

- old
+ new

@@ -18,10 +18,11 @@ class Chat < ChatBase class V2 < Version class ServiceContext < InstanceContext class UserList < ListResource + ## # Initialize the UserList # @param [Version] version Version that contains the resource # @return [UserList] UserList def initialize(version, service_sid: nil) @@ -52,10 +53,11 @@ 'RoleSid' => role_sid, 'Attributes' => attributes, 'FriendlyName' => friendly_name, }) + 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, @@ -178,18 +180,20 @@ ## # Delete the UserInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the UserInstance # @return [UserInstance] Fetched UserInstance def fetch + payload = @version.fetch('GET', @uri) UserInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -215,9 +219,10 @@ 'RoleSid' => role_sid, 'Attributes' => attributes, 'FriendlyName' => friendly_name, }) + 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,