Class: Mailtrap::PermissionResource

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/permission_resource.rb

Overview

Data Transfer Object for a node in the Permissions resources tree

Instance Attribute Summary collapse

Instance Attribute Details

#access_levelInteger (readonly)

The access level the current token has on this resource

Returns:

  • (Integer)

    the current value of access_level



10
11
12
# File 'lib/mailtrap/permission_resource.rb', line 10

def access_level
  @access_level
end

#idInteger (readonly)

Resource ID

Returns:

  • (Integer)

    the current value of id



10
11
12
# File 'lib/mailtrap/permission_resource.rb', line 10

def id
  @id
end

#nameString (readonly)

Resource name

Returns:

  • (String)

    the current value of name



10
11
12
# File 'lib/mailtrap/permission_resource.rb', line 10

def name
  @name
end

#resourcesArray<PermissionResource> (readonly)

Nested child resources

Returns:



10
11
12
# File 'lib/mailtrap/permission_resource.rb', line 10

def resources
  @resources
end

#typeString (readonly)

Resource type (account, project, inbox, sending_domain, …)

Returns:

  • (String)

    the current value of type



10
11
12
# File 'lib/mailtrap/permission_resource.rb', line 10

def type
  @type
end