Class: WorkOS::ApiKeyValidationResponse

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/api_keys/api_key_validation_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  api_key: :api_key,
  agent_registration_id: :agent_registration_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ApiKeyValidationResponse

Returns a new instance of ApiKeyValidationResponse.



16
17
18
19
20
# File 'lib/workos/api_keys/api_key_validation_response.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @api_key = hash[:api_key] ? WorkOS::ApiKey.new(hash[:api_key]) : nil
  @agent_registration_id = hash[:agent_registration_id]
end

Instance Attribute Details

#agent_registration_idObject

Returns the value of attribute agent_registration_id.



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

def agent_registration_id
  @agent_registration_id
end

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end