class Moka::Configuration

Attributes

dealer_code[RW]
env[RW]
password[RW]
username[RW]

Public Instance Methods

check_key() click to toggle source
# File lib/moka/configuration.rb, line 15
def check_key
  Digest::SHA256.hexdigest "#{dealer_code}MK#{username}PD#{password}"
end
config_hash() click to toggle source
# File lib/moka/configuration.rb, line 23
def config_hash
  {
      "DealerCode": dealer_code,
      "UserName": username,
      "Password": password,
      "CheckKey": check_key
  }
end
test?() click to toggle source
# File lib/moka/configuration.rb, line 19
def test?
  env == 'test'
end