diff --git a/CHANGELOG.md b/CHANGELOG.md index df0476b5..e4c211e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ CHANGELOG 3.7.0 ------------------ +* Added the `residential` property to the `anonymizer` object on + `MaxMind\MinFraud\Model\IpAddress`. This is a `GeoIp2\Record\AnonymizerFeed` + object providing residential proxy data for the network: `confidence`, + `networkLastSeen`, and `providerName`. It may be populated even when no + other anonymizer properties are set. This data is available from the + minFraud Insights and Factors web services. This requires + `geoip2/geoip2` 3.4.0 or greater. * Added `tracking_token` to the `/device` request object. This is the token generated by the [Device Tracking Add-on](https://dev.maxmind.com/minfraud/track-devices) diff --git a/tests/MaxMind/Test/MinFraud/Model/InsightsTest.php b/tests/MaxMind/Test/MinFraud/Model/InsightsTest.php index a5046383..3226f523 100644 --- a/tests/MaxMind/Test/MinFraud/Model/InsightsTest.php +++ b/tests/MaxMind/Test/MinFraud/Model/InsightsTest.php @@ -4,6 +4,7 @@ namespace MaxMind\Test\MinFraud\Model; +use GeoIp2\Record\AnonymizerFeed; use MaxMind\MinFraud\Model\Insights; use MaxMind\MinFraud\Model\Score; use MaxMind\Test\MinFraudData as Data; @@ -156,6 +157,30 @@ public function testInsightsProperties(): void 'correct anonymizer network last seen' ); + $this->assertInstanceOf( + AnonymizerFeed::class, + $insights->ipAddress->anonymizer->residential, + 'anonymizer residential is an AnonymizerFeed' + ); + + $this->assertSame( + $array['ip_address']['anonymizer']['residential']['confidence'], + $insights->ipAddress->anonymizer->residential->confidence, + 'correct anonymizer residential confidence' + ); + + $this->assertSame( + $array['ip_address']['anonymizer']['residential']['network_last_seen'], + $insights->ipAddress->anonymizer->residential->networkLastSeen, + 'correct anonymizer residential network last seen' + ); + + $this->assertSame( + $array['ip_address']['anonymizer']['residential']['provider_name'], + $insights->ipAddress->anonymizer->residential->providerName, + 'correct anonymizer residential provider name' + ); + $this->assertSame( $array['billing_phone']['country'], $insights->billingPhone->country, diff --git a/tests/data/minfraud/factors-response.json b/tests/data/minfraud/factors-response.json index dea20485..14d38c4d 100644 --- a/tests/data/minfraud/factors-response.json +++ b/tests/data/minfraud/factors-response.json @@ -120,7 +120,12 @@ "is_public_proxy": true, "is_tor_exit_node": true, "network_last_seen": "2025-01-15", - "provider_name": "TestVPN" + "provider_name": "TestVPN", + "residential": { + "confidence": 82, + "network_last_seen": "2026-05-11", + "provider_name": "quickshift" + } } }, "billing_address": { diff --git a/tests/data/minfraud/insights-response.json b/tests/data/minfraud/insights-response.json index 6af029e0..3f2be922 100644 --- a/tests/data/minfraud/insights-response.json +++ b/tests/data/minfraud/insights-response.json @@ -120,7 +120,12 @@ "is_public_proxy": true, "is_tor_exit_node": true, "network_last_seen": "2025-01-15", - "provider_name": "TestVPN" + "provider_name": "TestVPN", + "residential": { + "confidence": 82, + "network_last_seen": "2026-05-11", + "provider_name": "quickshift" + } } }, "billing_address": {