Class: WorkOS::OrganizationRoleCreatedData

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/organizations/organization_role_created_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  organization_id: :organization_id,
  slug: :slug,
  name: :name,
  description: :description,
  resource_type_slug: :resource_type_slug,
  permissions: :permissions,
  created_at: :created_at,
  updated_at: :updated_at
}.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) ⇒ OrganizationRoleCreatedData

Returns a new instance of OrganizationRoleCreatedData.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/workos/organizations/organization_role_created_data.rb', line 30

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @organization_id = hash[:organization_id]
  @slug = hash[:slug]
  @name = hash[:name]
  @description = hash[:description]
  @resource_type_slug = hash[:resource_type_slug]
  @permissions = hash[:permissions] || []
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def description
  @description
end

#nameObject

Returns the value of attribute name.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def name
  @name
end

#objectObject

Returns the value of attribute object.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def organization_id
  @organization_id
end

#permissionsObject

Returns the value of attribute permissions.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def permissions
  @permissions
end

#resource_type_slugObject

Returns the value of attribute resource_type_slug.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def resource_type_slug
  @resource_type_slug
end

#slugObject

Returns the value of attribute slug.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def slug
  @slug
end

#updated_atObject

Returns the value of attribute updated_at.



19
20
21
# File 'lib/workos/organizations/organization_role_created_data.rb', line 19

def updated_at
  @updated_at
end