Skip to content

Commit 1db3816

Browse files
oschwaldclaude
andcommitted
Add residential property to anonymizer object
Surface the residential sub-object added to the anonymizer object in the underlying GeoIP2 library (since 3.4.0). The IpAddress model already exposes GeoIp2\Record\Anonymizer directly, so this is a test fixture and CHANGELOG update only; no model code changes are needed. STF-997 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent daa5944 commit 1db3816

4 files changed

Lines changed: 44 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ CHANGELOG
44
3.7.0
55
------------------
66

7+
* Added the `residential` property to the `anonymizer` object on
8+
`MaxMind\MinFraud\Model\IpAddress`. This is a `GeoIp2\Record\AnonymizerFeed`
9+
object providing `confidence`, `networkLastSeen`, and `providerName` data
10+
sourced from the full-feed GeoIP Residential Proxy database. Because this
11+
feed is a superset of the residential proxies in Anonymous Plus, the
12+
`anonymizer` object may now be returned with only this property set. This
13+
data is available from the minFraud Insights and Factors web services.
14+
This requires `geoip2/geoip2` 3.4.0 or greater.
715
* Added `tracking_token` to the `/device` request object. This is the
816
token generated by the
917
[Device Tracking Add-on](https://dev.maxmind.com/minfraud/track-devices)

tests/MaxMind/Test/MinFraud/Model/InsightsTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,30 @@ public function testInsightsProperties(): void
156156
'correct anonymizer network last seen'
157157
);
158158

159+
$this->assertInstanceOf(
160+
'GeoIp2\Record\AnonymizerFeed',
161+
$insights->ipAddress->anonymizer->residential,
162+
'anonymizer residential is an AnonymizerFeed'
163+
);
164+
165+
$this->assertSame(
166+
$array['ip_address']['anonymizer']['residential']['confidence'],
167+
$insights->ipAddress->anonymizer->residential->confidence,
168+
'correct anonymizer residential confidence'
169+
);
170+
171+
$this->assertSame(
172+
$array['ip_address']['anonymizer']['residential']['network_last_seen'],
173+
$insights->ipAddress->anonymizer->residential->networkLastSeen,
174+
'correct anonymizer residential network last seen'
175+
);
176+
177+
$this->assertSame(
178+
$array['ip_address']['anonymizer']['residential']['provider_name'],
179+
$insights->ipAddress->anonymizer->residential->providerName,
180+
'correct anonymizer residential provider name'
181+
);
182+
159183
$this->assertSame(
160184
$array['billing_phone']['country'],
161185
$insights->billingPhone->country,

tests/data/minfraud/factors-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@
120120
"is_public_proxy": true,
121121
"is_tor_exit_node": true,
122122
"network_last_seen": "2025-01-15",
123-
"provider_name": "TestVPN"
123+
"provider_name": "TestVPN",
124+
"residential": {
125+
"confidence": 82,
126+
"network_last_seen": "2026-05-11",
127+
"provider_name": "quickshift"
128+
}
124129
}
125130
},
126131
"billing_address": {

tests/data/minfraud/insights-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@
120120
"is_public_proxy": true,
121121
"is_tor_exit_node": true,
122122
"network_last_seen": "2025-01-15",
123-
"provider_name": "TestVPN"
123+
"provider_name": "TestVPN",
124+
"residential": {
125+
"confidence": 82,
126+
"network_last_seen": "2026-05-11",
127+
"provider_name": "quickshift"
128+
}
124129
}
125130
},
126131
"billing_address": {

0 commit comments

Comments
 (0)