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 }.freeze
Instance Attribute Summary collapse
-
#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.
16 17 18 19 20 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 16 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @permissions = hash[:permissions] || [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 12 def name @name end |
#permissions ⇒ Object
Returns the value of attribute permissions.
12 13 14 |
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 12 def @permissions end |