Class: WorkOS::ApiKeyValidationResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ApiKeyValidationResponse
- 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
-
#agent_registration_id ⇒ Object
Returns the value of attribute agent_registration_id.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(json) ⇒ ApiKeyValidationResponse
constructor
A new instance of ApiKeyValidationResponse.
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_id ⇒ Object
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_key ⇒ Object
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 |