Class: WorkOS::AgentRegistration
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AgentRegistration
- 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
-
#agent_identity ⇒ Object
Returns the value of attribute agent_identity.
-
#claim ⇒ Object
Returns the value of attribute claim.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ AgentRegistration
constructor
A new instance of AgentRegistration.
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_identity ⇒ Object
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 |
#claim ⇒ Object
Returns the value of attribute claim.
18 19 20 |
# File 'lib/workos/agents/agent_registration.rb', line 18 def claim @claim end |
#created_at ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/workos/agents/agent_registration.rb', line 18 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind.
18 19 20 |
# File 'lib/workos/agents/agent_registration.rb', line 18 def kind @kind end |
#organization_id ⇒ Object
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 |
#status ⇒ Object
Returns the value of attribute status.
18 19 20 |
# File 'lib/workos/agents/agent_registration.rb', line 18 def status @status end |
#updated_at ⇒ Object
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 |