lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb in twilio-ruby-5.25.4 vs lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb in twilio-ruby-5.26.0

- old
+ new

@@ -14,11 +14,11 @@ class RoleList < ListResource ## # Initialize the RoleList # @param [Version] version Version that contains the resource # @param [String] service_sid The SID of the - # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is + # [Service](https://www.twilio.com/docs/chat/rest/services) the Role resource is # associated with. # @return [RoleList] RoleList def initialize(version, service_sid: nil) super(version) @@ -36,11 +36,11 @@ # [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` # for [Service](https://www.twilio.com/docs/chat/api/services) roles. # @param [String] permission A permission that you grant to the new role. Only one # permission can be granted per parameter. To assign more than one permission, # repeat this parameter for each permission value. The values for this parameter - # depend on the role's `type` and are described in the documentation. + # depend on the role's `type`. # @return [RoleInstance] Newly created RoleInstance def create(friendly_name: nil, type: nil, permission: nil) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'Type' => type, @@ -177,14 +177,13 @@ class RoleContext < InstanceContext ## # Initialize the RoleContext # @param [Version] version Version that contains the resource # @param [String] service_sid The SID of the - # [Service](https://www.twilio.com/docs/chat/rest/services) to fetch the resource - # from. - # @param [String] sid The Twilio-provided string that uniquely identifies the Role - # resource to fetch. + # [Service](https://www.twilio.com/docs/chat/rest/services) to fetch the Role + # resource from. + # @param [String] sid The SID of the Role resource to fetch. # @return [RoleContext] RoleContext def initialize(version, service_sid, sid) super(version) # Path Solution @@ -207,21 +206,23 @@ RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end ## # Deletes the RoleInstance - # @return [Boolean] true if delete succeeds, true otherwise + # @return [Boolean] true if delete succeeds, false otherwise def delete @version.delete('delete', @uri) end ## # Update the RoleInstance # @param [String] permission A permission that you grant to the role. Only one # permission can be granted per parameter. To assign more than one permission, - # repeat this parameter for each permission value. The values for this parameter - # depend on the role's `type` and are described in the documentation. + # repeat this parameter for each permission value. Note that the update action + # replaces all previously assigned permissions with those defined in the update + # action. To remove a permission, do not include it in the subsequent update + # action. The values for this parameter depend on the role's `type`. # @return [RoleInstance] Updated RoleInstance def update(permission: nil) data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, }) payload = @version.update( @@ -252,14 +253,13 @@ ## # Initialize the RoleInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] service_sid The SID of the - # [Service](https://www.twilio.com/docs/chat/rest/services) the resource is + # [Service](https://www.twilio.com/docs/chat/rest/services) the Role resource is # associated with. - # @param [String] sid The Twilio-provided string that uniquely identifies the Role - # resource to fetch. + # @param [String] sid The SID of the Role resource to fetch. # @return [RoleInstance] RoleInstance def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @@ -326,17 +326,17 @@ def permissions @properties['permissions'] end ## - # @return [Time] The RFC 2822 date and time in GMT when the resource was created + # @return [Time] The ISO 8601 date and time in GMT when the resource was created def date_created @properties['date_created'] end ## - # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated + # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated def date_updated @properties['date_updated'] end ## @@ -352,20 +352,22 @@ context.fetch end ## # Deletes the RoleInstance - # @return [Boolean] true if delete succeeds, true otherwise + # @return [Boolean] true if delete succeeds, false otherwise def delete context.delete end ## # Update the RoleInstance # @param [String] permission A permission that you grant to the role. Only one # permission can be granted per parameter. To assign more than one permission, - # repeat this parameter for each permission value. The values for this parameter - # depend on the role's `type` and are described in the documentation. + # repeat this parameter for each permission value. Note that the update action + # replaces all previously assigned permissions with those defined in the update + # action. To remove a permission, do not include it in the subsequent update + # action. The values for this parameter depend on the role's `type`. # @return [RoleInstance] Updated RoleInstance def update(permission: nil) context.update(permission: permission, ) end \ No newline at end of file