Class: WorkOS::AgentRegistrationCredentialIssuedData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/shared/agent_registration_credential_issued_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  agent_registration_id: :agent_registration_id,
  detail: :detail,
  created_at: :created_at,
  updated_at: :updated_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AgentRegistrationCredentialIssuedData

Returns a new instance of AgentRegistrationCredentialIssuedData.



24
25
26
27
28
29
30
31
32
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 24

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @agent_registration_id = hash[:agent_registration_id]
  @detail = hash[:detail] ? (case hash[:detail][:kind] when "api_key" then WorkOS::AgentRegistrationCredentialIssuedDataDetail.new(hash[:detail]) when "access_token" then WorkOS::AccessTokenAgentRegistrationCredentialIssuedDataDetail.new(hash[:detail]) else hash[:detail] end) : nil
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#agent_registration_idObject

Returns the value of attribute agent_registration_id.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def agent_registration_id
  @agent_registration_id
end

#created_atObject

Returns the value of attribute created_at.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def created_at
  @created_at
end

#detailObject

Returns the value of attribute detail.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def detail
  @detail
end

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def id
  @id
end

#objectObject

Returns the value of attribute object.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def object
  @object
end

#updated_atObject

Returns the value of attribute updated_at.



16
17
18
# File 'lib/workos/shared/agent_registration_credential_issued_data.rb', line 16

def updated_at
  @updated_at
end