class Minfraud::Components::Account
Account
corresponds to the account object of a minFraud request.
Attributes
user_id[RW]
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.
@return [String, nil]
username_md5[RW]
An MD5 hash as a hexadecimal string of the username or login name associated with the account.
@return [String, nil]
Public Class Methods
new(params = {})
click to toggle source
@param params [Hash] Hash of parameters. Each key/value should
correspond to one of the available attributes.
# File lib/minfraud/components/account.rb, line 28 def initialize(params = {}) @user_id = params[:user_id] @username_md5 = params[:username_md5] validate end
Private Instance Methods
validate()
click to toggle source
# File lib/minfraud/components/account.rb, line 37 def validate return if !Minfraud.enable_validation validate_string('user_id', 255, @user_id) validate_md5('username_md5', @username_md5) end