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,
  revoked_at: :revoked_at,
  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.



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

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]
  @revoked_at = hash[:revoked_at]
  @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_identity ⇒ Object

Returns the value of attribute agent_identity.



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

def agent_identity
  @agent_identity
end

#claim ⇒ Object

Returns the value of attribute claim.



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

def claim
  @claim
end

#created_at ⇒ Object

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#id ⇒ Object

Returns the value of attribute id.



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

def id
  @id
end

#kind ⇒ Object

Returns the value of attribute kind.



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

def kind
  @kind
end

#organization_id ⇒ Object

Returns the value of attribute organization_id.



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

def organization_id
  @organization_id
end

#revoked_at ⇒ Object

Returns the value of attribute revoked_at.



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

def revoked_at
  @revoked_at
end

#status ⇒ Object

Returns the value of attribute status.



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

def status
  @status
end

#updated_at ⇒ Object

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end