lib/twilio-ruby/rest/chat/v1/service/role.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/chat/v1/service/role.rb in twilio-ruby-6.11.0

- old
+ new

@@ -18,10 +18,11 @@ class Chat < ChatBase class V1 < Version class ServiceContext < InstanceContext class RoleList < ListResource + ## # Initialize the RoleList # @param [Version] version Version that contains the resource # @return [RoleList] RoleList def initialize(version, service_sid: nil) @@ -47,10 +48,11 @@ 'FriendlyName' => friendly_name, 'Type' => type, 'Permission' => Twilio.serialize_list(permission) { |e| e }, }) + payload = @version.create('POST', @uri, data: data) RoleInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -170,18 +172,20 @@ ## # Delete the RoleInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the RoleInstance # @return [RoleInstance] Fetched RoleInstance def fetch + payload = @version.fetch('GET', @uri) RoleInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -199,9 +203,10 @@ data = Twilio::Values.of({ 'Permission' => Twilio.serialize_list(permission) { |e| e }, }) + payload = @version.update('POST', @uri, data: data) RoleInstance.new( @version, payload, service_sid: @solution[:service_sid],