Record Class Disposition

java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.Disposition
Record Components:
action - A String with the action to take on the transaction as defined by your custom rules. The current set of values are "accept", "manual_review", "reject" and "test". If you do not have custom rules set up, null will be returned.
reason - A String with the reason for the action. The current possible values are "custom_rule" and "default". If you do not have custom rules set up, null will be returned.
ruleLabel - A String with the label of the custom rule that was triggered. If you do not have custom rules set up, the triggered custom rule does not have a label, or no custom rule was triggered, null will be returned.
All Implemented Interfaces:
JsonSerializable

public record Disposition(String action, String reason, String ruleLabel) extends Record implements JsonSerializable
This class contains the disposition set by custom rules.
  • Constructor Details

    • Disposition

      public Disposition()
      Constructs an instance of Disposition with no data.
    • Disposition

      public Disposition(String action, String reason, String ruleLabel)
      Creates an instance of a Disposition record class.
      Parameters:
      action - the value for the action record component
      reason - the value for the reason record component
      ruleLabel - the value for the ruleLabel record component
  • Method Details

    • getAction

      @Deprecated(since="4.0.0", forRemoval=true) public String getAction()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use action() instead. This method will be removed in 5.0.0.
      Returns:
      A String with the action to take on the transaction as defined by your custom rules. The current set of values are "accept", "manual_review", "reject" and "test". If you do not have custom rules set up, null will be returned.
    • getReason

      @Deprecated(since="4.0.0", forRemoval=true) public String getReason()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use reason() instead. This method will be removed in 5.0.0.
      Returns:
      A String with the reason for the action. The current possible values are "custom_rule" and "default". If you do not have custom rules set up, null will be returned.
    • getRuleLabel

      @Deprecated(since="4.0.0", forRemoval=true) public String getRuleLabel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use ruleLabel() instead. This method will be removed in 5.0.0.
      Returns:
      A String with the label of the custom rule that was triggered. If you do not have custom rules set up, the triggered custom rule does not have a label, or no custom rule was triggered, null will be returned.
    • 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.
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • ruleLabel

      public String ruleLabel()
      Returns the value of the ruleLabel record component.
      Returns:
      the value of the ruleLabel record component