Class: WorkOS::AgentRegistration

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/agents/agent_registration.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  agent_identity: :agent_identity,
  organization_id: :organization_id,
  status: :status,
  kind: :kind,
  claim: :claim,
  created_at: :created_at,
  updated_at: :updated_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AgentRegistration

Returns a new instance of AgentRegistration.



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/workos/agents/agent_registration.rb', line 28

def initialize(json)
  hash = self.class.normalize(json)
  @id = hash[:id]
  @agent_identity = hash[:agent_identity] ? WorkOS::AgentRegistrationAgentIdentity.new(hash[:agent_identity]) : nil
  @organization_id = hash[:organization_id]
  @status = hash[:status]
  @kind = hash[:kind]
  @claim = hash[:claim] ? WorkOS::AgentRegistrationClaim.new(hash[:claim]) : nil
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#agent_identityObject

Returns the value of attribute agent_identity.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def agent_identity
  @agent_identity
end

#claimObject

Returns the value of attribute claim.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def claim
  @claim
end

#created_atObject

Returns the value of attribute created_at.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def id
  @id
end

#kindObject

Returns the value of attribute kind.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def kind
  @kind
end

#organization_idObject

Returns the value of attribute organization_id.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def organization_id
  @organization_id
end

#statusObject

Returns the value of attribute status.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



18
19
20
# File 'lib/workos/agents/agent_registration.rb', line 18

def updated_at
  @updated_at
end