class TXTextControl::ReportingCloud::APIKey

Represents a ReportingCloud API key object. @attr key [String] The actual API Key that belongs to the account. @attr is_active [Boolean] Specifies whether the API Key is active or not (not used yet). @author Thorsten Kummerow (@thomerow)

Attributes

is_active[R]

Public Class Methods

new(key, is_active = true) click to toggle source

@param key [String] The actual API Key that belongs to the account. @param is_active [Boolean] Specifies whether the API Key is active or not (not used yet).

# File lib/txtextcontrol/reportingcloud/api_key.rb, line 26
def initialize(key, is_active = true)
  self.key = key
  @is_active = is_active
end

Public Instance Methods

key() click to toggle source
# File lib/txtextcontrol/reportingcloud/api_key.rb, line 31
def key
  @key
end
key=(val) click to toggle source
# File lib/txtextcontrol/reportingcloud/api_key.rb, line 35
def key=(val)
  unless val.nil? || ((val.kind_of? String) && !val.to_s.empty?)
    raise ArgumentError, "API key must be a non empty string."
  end
  @key = val
end