Class: FinAppsCore::REST::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/finapps_core/rest/credentials.rb

Overview

represents both tenant and user credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier, token) ⇒ Credentials

Returns a new instance of Credentials.



11
12
13
14
# File 'lib/finapps_core/rest/credentials.rb', line 11

def initialize(identifier, token)
  @identifier = identifier
  @token = token
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



9
10
11
# File 'lib/finapps_core/rest/credentials.rb', line 9

def identifier
  @identifier
end

#tokenObject (readonly)

Returns the value of attribute token.



9
10
11
# File 'lib/finapps_core/rest/credentials.rb', line 9

def token
  @token
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/finapps_core/rest/credentials.rb', line 16

def valid?
  identifier.present? && token.present?
end