Record Class Device

java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.Device
Record Components:
confidence - A number representing the confidence that the device ID refers to a unique device as opposed to a cluster of similar devices. A confidence of 0.01 indicates very low confidence that the device is unique, whereas 99 indicates very high confidence.
id - A UUID identifying the device associated with this IP address.
lastSeen - The date and time of the last sighting of the device. This is an RFC 3339 date-time.
localTime - The date and time of the transaction at the UTC offset associated with the device. This is an RFC 3339 date-time.
All Implemented Interfaces:
JsonSerializable

public record Device(Double confidence, UUID id, String lastSeen, String localTime) extends Record implements JsonSerializable
This class contains minFraud response data related to the device.

In order to receive device output from minFraud Insights or minFraud Factors, you must be using the Device Tracking Add-on.

See Also:
  • Constructor Details

    • Device

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

      public Device(Double confidence, UUID id, String lastSeen, String localTime)
      Creates an instance of a Device record class.
      Parameters:
      confidence - the value for the confidence record component
      id - the value for the id record component
      lastSeen - the value for the lastSeen record component
      localTime - the value for the localTime record component
  • Method Details

    • getConfidence

      @Deprecated(since="4.0.0", forRemoval=true) public Double getConfidence()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use confidence() instead. This method will be removed in 5.0.0.
      Returns:
      a number representing the confidence that the device ID refers to a unique device as opposed to a cluster of similar devices. A confidence of 0.01 indicates very low confidence that the device is unique, whereas 99 indicates very high confidence.
    • getId

      @Deprecated(since="4.0.0", forRemoval=true) public UUID getId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use id() instead. This method will be removed in 5.0.0.
      Returns:
      A UUID identifying the device associated with this IP address.
    • getLastSeen

      @Deprecated(since="4.0.0", forRemoval=true) public String getLastSeen()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use lastSeen() instead. This method will be removed in 5.0.0.
      Returns:
      The date and time of the last sighting of the device. This is an RFC 3339 date-time.
    • getLastSeenDateTime

      public ZonedDateTime getLastSeenDateTime()
      Returns:
      The date and time of the last sighting of the device as a ZonedDateTime.
    • getLocalTime

      @Deprecated(since="4.0.0", forRemoval=true) public String getLocalTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use localTime() instead. This method will be removed in 5.0.0.
      Returns:
      The date and time of the transaction at the UTC offset associated with the device. This is an RFC 3339 date-time.
    • getLocalDateTime

      public ZonedDateTime getLocalDateTime()
      Returns:
      The date and time of the transaction at the UTC offset associated with the device as a ZonedDateTime.
    • 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.
    • confidence

      public Double confidence()
      Returns the value of the confidence record component.
      Returns:
      the value of the confidence record component
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • lastSeen

      public String lastSeen()
      Returns the value of the lastSeen record component.
      Returns:
      the value of the lastSeen record component
    • localTime

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