Class: WorkOS::AgentToken
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AgentToken
- Defined in:
- lib/workos/agents/agent_token.rb
Constant Summary collapse
- HASH_ATTRS =
{ access_token: :access_token, token_type: :token_type, expires_in: :expires_in, refresh_token: :refresh_token, agent_instance_id: :agent_instance_id, new_instance: :new_instance, agent_instance_session_id: :agent_instance_session_id, permissions: :permissions }.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#agent_instance_id ⇒ Object
Returns the value of attribute agent_instance_id.
-
#agent_instance_session_id ⇒ Object
Returns the value of attribute agent_instance_session_id.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#new_instance ⇒ Object
Returns the value of attribute new_instance.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#token_type ⇒ Object
Returns the value of attribute token_type.
Instance Method Summary collapse
-
#initialize(json) ⇒ AgentToken
constructor
A new instance of AgentToken.
Constructor Details
#initialize(json) ⇒ AgentToken
Returns a new instance of AgentToken.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/workos/agents/agent_token.rb', line 28 def initialize(json) hash = self.class.normalize(json) @access_token = hash[:access_token] @token_type = hash[:token_type] @expires_in = hash[:expires_in] @refresh_token = hash[:refresh_token] @agent_instance_id = hash[:agent_instance_id] @new_instance = hash[:new_instance] @agent_instance_session_id = hash[:agent_instance_session_id] @permissions = hash[:permissions] || [] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def access_token @access_token end |
#agent_instance_id ⇒ Object
Returns the value of attribute agent_instance_id.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def agent_instance_id @agent_instance_id end |
#agent_instance_session_id ⇒ Object
Returns the value of attribute agent_instance_session_id.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def agent_instance_session_id @agent_instance_session_id end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def expires_in @expires_in end |
#new_instance ⇒ Object
Returns the value of attribute new_instance.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def new_instance @new_instance end |
#permissions ⇒ Object
Returns the value of attribute permissions.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def @permissions end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def refresh_token @refresh_token end |
#token_type ⇒ Object
Returns the value of attribute token_type.
18 19 20 |
# File 'lib/workos/agents/agent_token.rb', line 18 def token_type @token_type end |