|
7 | 7 |
|
8 | 8 | /** |
9 | 9 | * This class contains minFraud response data related to the device. |
| 10 | + * |
| 11 | + * In order to receive device output from minFraud Insights or minFraud |
| 12 | + * Factors, you must be using the Device Tracking Add-on. |
| 13 | + * |
| 14 | + * @see <a href="https://dev.maxmind.com/minfraud/device/">Device Tracking Add-on</a> |
| 15 | +
|
10 | 16 | */ |
11 | 17 | public final class Device extends AbstractModel { |
| 18 | + private final Double confidence; |
12 | 19 | private final UUID id; |
| 20 | + private final String lastSeen; |
13 | 21 |
|
14 | 22 | public Device( |
15 | | - @JsonProperty("id") UUID id |
| 23 | + @JsonProperty("confidence") Double confidence, |
| 24 | + @JsonProperty("id") UUID id, |
| 25 | + @JsonProperty("last_seen") String lastSeen |
16 | 26 | ) { |
| 27 | + this.confidence = confidence; |
17 | 28 | this.id = id; |
| 29 | + this.lastSeen = lastSeen; |
18 | 30 | } |
19 | 31 |
|
20 | 32 | public Device() { |
21 | | - this(null); |
| 33 | + this(null, null, null); |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * @return a number representing the confidence that the device ID refers |
| 38 | + * to a unique device as opposed to a cluster of similar devices. A |
| 39 | + * confidence of 0.01 indicates very low confidence that the device is |
| 40 | + * unique, whereas 99 indicates very high confidence. |
| 41 | + */ |
| 42 | + public Double getConfidence() { |
| 43 | + return confidence; |
22 | 44 | } |
23 | 45 |
|
24 | 46 | /** |
25 | | - * @return The device id. |
| 47 | + * @return A UUID identifying the device associated with this IP address. |
| 48 | + * Note that many devices cannot be uniquely identified because they are too |
| 49 | + * common (for example, all iPhones of a given model and OS release). |
26 | 50 | */ |
27 | 51 | public UUID getId() { |
28 | 52 | return id; |
29 | 53 | } |
| 54 | + |
| 55 | + /** |
| 56 | + * @return The date and time of the last sighting of the device. This is an |
| 57 | + * RFC 3339 date-time. |
| 58 | + */ |
| 59 | + @JsonProperty("last_seen") |
| 60 | + public String getLastSeen() { |
| 61 | + return lastSeen; |
| 62 | + } |
30 | 63 | } |
0 commit comments