lib/twilio-ruby/rest/chat/v2/service/role.rb in twilio-ruby-5.9.0 vs lib/twilio-ruby/rest/chat/v2/service/role.rb in twilio-ruby-5.10.0

- old
+ new

@@ -13,11 +13,12 @@ class ServiceContext < InstanceContext class RoleList < ListResource ## # Initialize the RoleList # @param [Version] version Version that contains the resource - # @param [String] service_sid The service_sid + # @param [String] service_sid The unique id of the + # [Service](https://www.twilio.com/docs/chat/api/services) this role belongs to. # @return [RoleList] RoleList def initialize(version, service_sid: nil) super(version) # Path Solution @@ -26,13 +27,16 @@ end ## # Retrieve a single page of RoleInstance records from the API. # Request is executed immediately. - # @param [String] friendly_name The friendly_name - # @param [role.RoleType] type The type - # @param [String] permission The permission + # @param [String] friendly_name The human-readable name of this role. + # @param [role.RoleType] type What kind of role this is. Either `channel` for + # [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` + # for [Service](https://www.twilio.com/docs/api/chat/rest/services) roles. + # @param [String] permission (multiple) A permission this role should have. + # Consult the table above for the list of possible permissions. # @return [RoleInstance] Newly created RoleInstance def create(friendly_name: nil, type: nil, permission: nil) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'Type' => type, @@ -203,11 +207,12 @@ @version.delete('delete', @uri) end ## # Update the RoleInstance - # @param [String] permission The permission + # @param [String] permission (multiple) A permission this role should have. + # Consult the table above for the list of possible permissions. # @return [RoleInstance] Updated RoleInstance def update(permission: nil) data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, }) payload = @version.update( @@ -230,11 +235,12 @@ class RoleInstance < InstanceResource ## # 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 service_sid + # @param [String] service_sid The unique id of the + # [Service](https://www.twilio.com/docs/chat/api/services) this role belongs to. # @param [String] sid The sid # @return [RoleInstance] RoleInstance def initialize(version, payload, service_sid: nil, sid: nil) super(version) @@ -266,59 +272,59 @@ end @instance_context end ## - # @return [String] The sid + # @return [String] A 34 character string that uniquely identifies this resource. def sid @properties['sid'] end ## - # @return [String] The account_sid + # @return [String] The unique id of the Account responsible for this role. def account_sid @properties['account_sid'] end ## - # @return [String] The service_sid + # @return [String] The unique id of the Service this role belongs to. def service_sid @properties['service_sid'] end ## - # @return [String] The friendly_name + # @return [String] The human-readable name of this role. def friendly_name @properties['friendly_name'] end ## - # @return [role.RoleType] The type + # @return [role.RoleType] What kind of role this is. def type @properties['type'] end ## - # @return [String] The permissions + # @return [String] A JSON array of the permissions this role has. def permissions @properties['permissions'] end ## - # @return [Time] The date_created + # @return [Time] The date that this resource was created in ISO 8601 format. def date_created @properties['date_created'] end ## - # @return [Time] The date_updated + # @return [Time] The date that this resource was last updated in ISO 8601 format. def date_updated @properties['date_updated'] end ## - # @return [String] The url + # @return [String] An absolute URL for this role. def url @properties['url'] end ## @@ -335,10 +341,11 @@ context.delete end ## # Update the RoleInstance - # @param [String] permission The permission + # @param [String] permission (multiple) A permission this role should have. + # Consult the table above for the list of possible permissions. # @return [RoleInstance] Updated RoleInstance def update(permission: nil) context.update(permission: permission, ) end \ No newline at end of file