Class: WorkOS::ApiKeyValidationResponse

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

Constant Summary collapse

HASH_ATTRS =
{
  api_key: :api_key
}.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) ⇒ ApiKeyValidationResponse

Returns a new instance of ApiKeyValidationResponse.



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

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

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end