Class: WorkOS::CreateUserApiKey
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::CreateUserApiKey
- Defined in:
- lib/workos/user_management/create_user_api_key.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, organization_id: :organization_id, permissions: :permissions }.freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateUserApiKey
constructor
A new instance of CreateUserApiKey.
Constructor Details
#initialize(json) ⇒ CreateUserApiKey
Returns a new instance of CreateUserApiKey.
18 19 20 21 22 23 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 18 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @organization_id = hash[:organization_id] @permissions = hash[:permissions] || [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 13 def name @name end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
13 14 15 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 13 def organization_id @organization_id end |
#permissions ⇒ Object
Returns the value of attribute permissions.
13 14 15 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 13 def @permissions end |