Skip to content

Commit 1f7eb7a

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 6633fcc commit 1f7eb7a

4 files changed

Lines changed: 46 additions & 2 deletions

File tree

CHANGELOG.md

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

4+
4.4.0 (unreleased)
5+
------------------
6+
7+
* Added `residential` field to the `Anonymizer` response record. This is
8+
an `AnonymizerFeed` record containing `confidence`, `networkLastSeen`,
9+
and `providerName` fields with residential proxy data for the network.
10+
`residential` may be populated even when none of the other fields on
11+
`Anonymizer` are set.
12+
413
4.3.0 (2026-05-12)
514
------------------
615

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)