Class: WorkOS::CreateOrganizationApiKey
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::CreateOrganizationApiKey
- Defined in:
- lib/workos/api_keys/create_organization_api_key.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, 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.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateOrganizationApiKey
constructor
A new instance of CreateOrganizationApiKey.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ CreateOrganizationApiKey
Returns a new instance of CreateOrganizationApiKey.
18 19 20 21 22 23 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 18 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @permissions = hash[:permissions] || [] @expires_at = hash[:expires_at] end |
Instance Attribute Details
#expires_at ⇒ Object
Returns the value of attribute expires_at.
13 14 15 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 13 def expires_at @expires_at end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 13 def name @name end |
#permissions ⇒ Object
Returns the value of attribute permissions.
13 14 15 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 13 def @permissions end |