Class: WorkOS::CreateOrganizationApiKey

Inherits:
Types::BaseModel show all
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

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

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

#nameObject

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

#permissionsObject

Returns the value of attribute permissions.



12
13
14
# File 'lib/workos/api_keys/create_organization_api_key.rb', line 12

def permissions
  @permissions
end