Class: WorkOS::RoleCreatedData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::RoleCreatedData
- Defined in:
- lib/workos/authorization/role_created_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, slug: :slug, resource_type_slug: :resource_type_slug, permissions: :permissions, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#object ⇒ Object
Returns the value of attribute object.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
-
#slug ⇒ Object
Returns the value of attribute slug.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ RoleCreatedData
constructor
A new instance of RoleCreatedData.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ RoleCreatedData
Returns a new instance of RoleCreatedData.
24 25 26 27 28 29 30 31 32 |
# File 'lib/workos/authorization/role_created_data.rb', line 24 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @slug = hash[:slug] @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_at ⇒ Object
Returns the value of attribute created_at.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def created_at @created_at end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def object @object end |
#permissions ⇒ Object
Returns the value of attribute permissions.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def @permissions end |
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def resource_type_slug @resource_type_slug end |
#slug ⇒ Object
Returns the value of attribute slug.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def slug @slug end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
16 17 18 |
# File 'lib/workos/authorization/role_created_data.rb', line 16 def updated_at @updated_at end |