class Minfraud::Model::Score

Model of the Score response.

Attributes

disposition[R]

An object containing the disposition set by custom rules.

@return [Minfraud::Model::Disposition]

funds_remaining[R]

The approximate US dollar value of the funds remaining on your MaxMind account.

@return [Float]

id[R]

This is a UUID that identifies the minFraud request. Please use this ID in bug reports or support requests to MaxMind so that we can easily identify a particular request.

@return [String]

ip_address[R]

An object containing the IP risk for the transaction.

@return [Minfraud::Model::ScoreIPAddress]

queries_remaining[R]

The approximate number of queries remaining for this service before your account runs out of funds.

@return [Integer]

risk_score[R]

This property contains the risk score, from 0.01 to 99. A higher score indicates a higher risk of fraud. For example, a score of 20 indicates a 20% chance that a transaction is fraudulent. We never return a risk score of 0, since all transactions have the possibility of being fraudulent. Likewise we never return a risk score of 100.

@return [Float]

warnings[R]

This array contains objects detailing issues with the request that was sent, such as invalid or unknown inputs. It is highly recommended that you check this array for issues when integrating the web service.

@return [Array<Minfraud::Model::Warning>]

Public Class Methods

new(record, _locales) click to toggle source

@!visibility private

Calls superclass method Minfraud::Model::Abstract::new
# File lib/minfraud/model/score.rb, line 58
def initialize(record, _locales)
  super(record)

  @disposition       = Minfraud::Model::Disposition.new(get('disposition'))
  @funds_remaining   = get('funds_remaining')
  @id                = get('id')
  @ip_address        = Minfraud::Model::ScoreIPAddress.new(get('ip_address'))
  @queries_remaining = get('queries_remaining')
  @risk_score        = get('risk_score')
  @warnings          = []
  if record && record.key?('warnings')
    record['warnings'].each do |w|
      @warnings << Minfraud::Model::Warning.new(w)
    end
  end
end