Class: WorkOS::RoleAssignmentResource

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

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  external_id: :external_id,
  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) ⇒ RoleAssignmentResource

Returns a new instance of RoleAssignmentResource.



18
19
20
21
22
23
# File 'lib/workos/authorization/role_assignment_resource.rb', line 18

def initialize(json)
  hash = self.class.normalize(json)
  @id = hash[:id]
  @external_id = hash[:external_id]
  @resource_type_slug = hash[:resource_type_slug]
end

Instance Attribute Details

#external_idObject

Returns the value of attribute external_id.



13
14
15
# File 'lib/workos/authorization/role_assignment_resource.rb', line 13

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



13
14
15
# File 'lib/workos/authorization/role_assignment_resource.rb', line 13

def id
  @id
end

#resource_type_slugObject

Returns the value of attribute resource_type_slug.



13
14
15
# File 'lib/workos/authorization/role_assignment_resource.rb', line 13

def resource_type_slug
  @resource_type_slug
end