Class: WorkOS::AssignRole
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AssignRole
- Defined in:
- lib/workos/authorization/assign_role.rb
Constant Summary collapse
- HASH_ATTRS =
{ role_slug: :role_slug, resource_id: :resource_id, resource_external_id: :resource_external_id, resource_type_slug: :resource_type_slug }.freeze
Instance Attribute Summary collapse
-
#resource_external_id ⇒ Object
Returns the value of attribute resource_external_id.
-
#resource_id ⇒ Object
Returns the value of attribute resource_id.
-
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
-
#role_slug ⇒ Object
Returns the value of attribute role_slug.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ AssignRole
constructor
A new instance of AssignRole.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AssignRole
Returns a new instance of AssignRole.
20 21 22 23 24 25 26 |
# File 'lib/workos/authorization/assign_role.rb', line 20 def initialize(json) hash = self.class.normalize(json) @role_slug = hash[:role_slug] @resource_id = hash[:resource_id] @resource_external_id = hash[:resource_external_id] @resource_type_slug = hash[:resource_type_slug] end |
Instance Attribute Details
#resource_external_id ⇒ Object
Returns the value of attribute resource_external_id.
14 15 16 |
# File 'lib/workos/authorization/assign_role.rb', line 14 def resource_external_id @resource_external_id end |
#resource_id ⇒ Object
Returns the value of attribute resource_id.
14 15 16 |
# File 'lib/workos/authorization/assign_role.rb', line 14 def resource_id @resource_id end |
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
14 15 16 |
# File 'lib/workos/authorization/assign_role.rb', line 14 def resource_type_slug @resource_type_slug end |
#role_slug ⇒ Object
Returns the value of attribute role_slug.
14 15 16 |
# File 'lib/workos/authorization/assign_role.rb', line 14 def role_slug @role_slug end |