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_level ⇒ Integer (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

#id ⇒ Integer (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

#name ⇒ String (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

#resources ⇒ Array<PermissionResource> (readonly)

Nested child resources

Returns:



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

def resources
  @resources
end

#type ⇒ String (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