Record Class RiskScoreReason

java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.RiskScoreReason
Record Components:
multiplier - The factor by which the risk score is increased (if the value is greater than 1) or decreased (if the value is less than 1) for given risk reason(s). Multipliers greater than 1.5 and less than 0.66 are considered significant and lead to risk reason(s) being present.
reasons - An unmodifiable list containing objects that describe one of the reasons for the multiplier. This will be an empty list if there are no reasons.
All Implemented Interfaces:
JsonSerializable

public record RiskScoreReason(Double multiplier, List<Reason> reasons) extends Record implements JsonSerializable
This class represents a risk score multiplier and reasons for that multiplier.
  • Constructor Details

    • RiskScoreReason

      public RiskScoreReason(Double multiplier, List<Reason> reasons)
      Compact canonical constructor that ensures immutability.
  • Method Details

    • getMultiplier

      @Deprecated(since="4.0.0", forRemoval=true) public Double getMultiplier()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use multiplier() instead. This method will be removed in 5.0.0.
      Returns:
      The factor by which the risk score is increased (if the value is greater than 1) or decreased (if the value is less than 1) for given risk reason(s). Multipliers greater than 1.5 and less than 0.66 are considered significant and lead to risk reason(s) being present.
    • getReasons

      @Deprecated(since="4.0.0", forRemoval=true) public List<Reason> getReasons()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use reasons() instead. This method will be removed in 5.0.0.
      Returns:
      An unmodifiable list containing objects that describe one of the reasons for the multiplier. This will be an empty list if there are no reasons.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • multiplier

      public Double multiplier()
      Returns the value of the multiplier record component.
      Returns:
      the value of the multiplier record component
    • reasons

      public List<Reason> reasons()
      Returns the value of the reasons record component.
      Returns:
      the value of the reasons record component