Class: Conductor::Http::Models::Token

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/conductor/http/models/token.rb

Overview

Token model representing the authentication token response from Conductor server

Constant Summary collapse

SWAGGER_TYPES =
{
  token: 'String',
  user_id: 'String'
}.freeze
ATTRIBUTE_MAP =
{
  token: :token,
  user_id: :userId
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

attribute_map, deserialize_model, deserialize_value, find_model_class, from_hash, from_json, parse_datetime, swagger_types, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ Token

Initialize a new Token

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



24
25
26
27
28
29
# File 'lib/conductor/http/models/token.rb', line 24

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  self.token = attributes[:token] if attributes.key?(:token)
  self.user_id = attributes[:user_id] if attributes.key?(:user_id)
end

Instance Attribute Details

#tokenObject

Returns the value of attribute token.



20
21
22
# File 'lib/conductor/http/models/token.rb', line 20

def token
  @token
end

#user_idObject

Returns the value of attribute user_id.



20
21
22
# File 'lib/conductor/http/models/token.rb', line 20

def user_id
  @user_id
end