Skip to content

Commit 078579b

Browse files
oschwaldclaude
andcommitted
Add residential field to Anonymizer response
The minFraud Insights and Factors responses now include a residential object inside the ip_address anonymizer object. This is surfaced via the AnonymizerFeed record on the geoip2 Anonymizer record, which IpAddress reuses, so no model changes are needed here. Update the test fixtures and assertions to cover the new field and document the required geoip2 dependency bump in the changelog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1b3a6b9 commit 078579b

4 files changed

Lines changed: 48 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
CHANGELOG
22
=========
33

4+
4.4.0 (unreleased)
5+
------------------
6+
7+
* Added `residential` field to the `Anonymizer` response record via an
8+
updated `geoip2` dependency. This is an `AnonymizerFeed` record containing
9+
`confidence`, `networkLastSeen`, and `providerName` fields sourced from the
10+
GeoIP Residential Proxy feed. Because the residential proxy feed is a
11+
superset of the data used for the other `Anonymizer` fields, `residential`
12+
may be populated even when none of the other fields on `Anonymizer` are
13+
set. This requires `geoip2` 5.2.0 or greater.
14+
415
4.3.0 (2026-05-12)
516
------------------
617

src/test/java/com/maxmind/minfraud/response/InsightsResponseTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.junit.jupiter.api.Assertions.assertTrue;
77

88
import com.fasterxml.jackson.jr.ob.JSON;
9+
import com.maxmind.geoip2.record.AnonymizerFeed;
910
import java.time.LocalDate;
1011
import java.util.UUID;
1112
import org.junit.jupiter.api.Test;
@@ -39,6 +40,11 @@ public void testInsights() throws Exception {
3940
.put("is_tor_exit_node", true)
4041
.put("network_last_seen", "2025-01-15")
4142
.put("provider_name", "TestVPN")
43+
.startObjectField("residential")
44+
.put("confidence", 82)
45+
.put("network_last_seen", "2026-05-11")
46+
.put("provider_name", "quickshift")
47+
.end()
4248
.end()
4349
.startObjectField("country")
4450
.put("iso_code", "US")
@@ -152,5 +158,24 @@ public void testInsights() throws Exception {
152158
"correct networkLastSeen"
153159
);
154160
assertEquals("TestVPN", insights.ipAddress().anonymizer().providerName(), "correct providerName");
161+
162+
AnonymizerFeed residential = insights.ipAddress().anonymizer().residential();
163+
164+
assertNotNull(residential, "anonymizer.residential() returns null");
165+
assertEquals(
166+
Integer.valueOf(82),
167+
residential.confidence(),
168+
"correct anonymizer.residential().confidence()"
169+
);
170+
assertEquals(
171+
LocalDate.parse("2026-05-11"),
172+
residential.networkLastSeen(),
173+
"correct anonymizer.residential().networkLastSeen()"
174+
);
175+
assertEquals(
176+
"quickshift",
177+
residential.providerName(),
178+
"correct anonymizer.residential().providerName()"
179+
);
155180
}
156181
}

src/test/resources/test-data/factors-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
"is_residential_proxy": true,
2525
"is_tor_exit_node": true,
2626
"network_last_seen": "2025-01-15",
27-
"provider_name": "TestVPN"
27+
"provider_name": "TestVPN",
28+
"residential": {
29+
"confidence": 82,
30+
"network_last_seen": "2026-05-11",
31+
"provider_name": "quickshift"
32+
}
2833
},
2934
"city": {
3035
"confidence": 42,

src/test/resources/test-data/insights-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
"is_residential_proxy": true,
2525
"is_tor_exit_node": true,
2626
"network_last_seen": "2025-01-15",
27-
"provider_name": "TestVPN"
27+
"provider_name": "TestVPN",
28+
"residential": {
29+
"confidence": 82,
30+
"network_last_seen": "2026-05-11",
31+
"provider_name": "quickshift"
32+
}
2833
},
2934
"city": {
3035
"confidence": 42,

0 commit comments

Comments
 (0)