Class: Minfraud::Components::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/minfraud/components/account.rb

Overview

Account corresponds to the account object of a minFraud request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Account

Returns a new instance of Account.

Parameters:

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

    Hash of parameters. Each key/value should correspond to one of the available attributes.



28
29
30
31
32
33
# File 'lib/minfraud/components/account.rb', line 28

def initialize(params = {})
  @user_id      = params[:user_id]
  @username_md5 = params[:username_md5]

  validate
end

Instance Attribute Details

#user_idString?

A unique user ID associated with the end-user in your system. If your system allows the login name for the account to be changed, this should not be the login name for the account, but rather should be an internal ID that does not change. This is not your MaxMind account ID. No specific format is required.

Returns:

  • (String, nil)


18
19
20
# File 'lib/minfraud/components/account.rb', line 18

def user_id
  @user_id
end

#username_md5String?

An MD5 hash as a hexadecimal string of the username or login name associated with the account.

Returns:

  • (String, nil)


24
25
26
# File 'lib/minfraud/components/account.rb', line 24

def username_md5
  @username_md5
end