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, expires_at: :expires_at }.freeze
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#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.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateUserApiKey
constructor
A new instance of CreateUserApiKey.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ CreateUserApiKey
Returns a new instance of CreateUserApiKey.
20 21 22 23 24 25 26 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 20 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @organization_id = hash[:organization_id] @permissions = hash[:permissions] || [] @expires_at = hash[:expires_at] end |
Instance Attribute Details
#expires_at ⇒ Object
Returns the value of attribute expires_at.
14 15 16 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 14 def expires_at @expires_at end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 14 def name @name end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
14 15 16 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 14 def organization_id @organization_id end |
#permissions ⇒ Object
Returns the value of attribute permissions.
14 15 16 |
# File 'lib/workos/user_management/create_user_api_key.rb', line 14 def @permissions end |