Class: Code42::Role

Inherits:
Resource show all
Defined in:
lib/code42/role.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#attributes, #client

Instance Method Summary collapse

Methods inherited from Resource

attribute, collection_from_response, deserialize, deserialize_and_initialize, from_response, #initialize, serialize, #serialize, serializer

Constructor Details

This class inherits a constructor from Code42::Resource

Instance Attribute Details

#created_atDateTime

Returns The timestamp for the time the role was assigned.

Returns:

  • (DateTime)

    The timestamp for the time the role was assigned



15
# File 'lib/code42/role.rb', line 15

attribute :id, :from => :roleId

#idFixnum

Returns The id of the role.

Returns:

  • (Fixnum)

    The id of the role



15
# File 'lib/code42/role.rb', line 15

attribute :id, :from => :roleId

#nameString

Returns The name of the role.

Returns:

  • (String)

    The name of the role



15
# File 'lib/code42/role.rb', line 15

attribute :id, :from => :roleId

#permissionsArray

Returns A list of permissions for this role.

Returns:

  • (Array)

    A list of permissions for this role



15
# File 'lib/code42/role.rb', line 15

attribute :id, :from => :roleId

#updated_atDateTime

Returns The timestamp for the time the role was updated.

Returns:

  • (DateTime)

    The timestamp for the time the role was updated



15
# File 'lib/code42/role.rb', line 15

attribute :id, :from => :roleId

Instance Method Details

#deleteObject



29
30
31
# File 'lib/code42/role.rb', line 29

def delete
  client.delete_role(id)
end

#update(attrs = {}) ⇒ Object



25
26
27
# File 'lib/code42/role.rb', line 25

def update(attrs = {})
  client.update_role(id, attrs)
end