Class: WorkOS::CreateAuthorizationPermission

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/authorization/create_authorization_permission.rb

Constant Summary collapse

HASH_ATTRS =
{
  slug: :slug,
  name: :name,
  description: :description,
  resource_type_slug: :resource_type_slug
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ CreateAuthorizationPermission

Returns a new instance of CreateAuthorizationPermission.



20
21
22
23
24
25
26
# File 'lib/workos/authorization/create_authorization_permission.rb', line 20

def initialize(json)
  hash = self.class.normalize(json)
  @slug = hash[:slug]
  @name = hash[:name]
  @description = hash[:description]
  @resource_type_slug = hash[:resource_type_slug]
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



14
15
16
# File 'lib/workos/authorization/create_authorization_permission.rb', line 14

def description
  @description
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/workos/authorization/create_authorization_permission.rb', line 14

def name
  @name
end

#resource_type_slugObject

Returns the value of attribute resource_type_slug.



14
15
16
# File 'lib/workos/authorization/create_authorization_permission.rb', line 14

def resource_type_slug
  @resource_type_slug
end

#slugObject

Returns the value of attribute slug.



14
15
16
# File 'lib/workos/authorization/create_authorization_permission.rb', line 14

def slug
  @slug
end