Class: Mdm::ApiKey

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/mdm/api_key.rb

Overview

API key to access the RPC.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#created_atDateTime

When this API Key was created.

Returns:

  • (DateTime)

# File 'app/models/mdm/api_key.rb', line 8

#tokenString

The API Key to authenicate to the RPC.

Returns:

  • (String)

# File 'app/models/mdm/api_key.rb', line 13

#updated_atDateTime

The last time this API Key was updated.

Returns:

  • (DateTime)

# File 'app/models/mdm/api_key.rb', line 18

Instance Method Details

#supports_apivoid (protected)

TODO:

MSP-2724

This method returns an undefined value.

Validates whether License supports API.


52
53
54
55
56
57
58
# File 'app/models/mdm/api_key.rb', line 52

def supports_api
  license = License.get

  if license and not license.supports_api?
    errors.add :license, " - this product does not support API access"
  end
end