From b0356b7ac7b4de909ca36ff91226eeb14182c618 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 1 Dec 2026 22:07:32 +0000 Subject: [PATCH] Deprecate ShippingAddress.isHighRisk() The minFraud web service is removing shipping_address.is_high_risk from its responses. Mark the record component deprecated for removal in 5.0.0, and change the next release to 4.6.0, since a deprecation needs a minor release. STF-2532 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 7 +++++-- .../com/maxmind/minfraud/response/ShippingAddress.java | 9 +++++---- .../maxmind/minfraud/response/ShippingAddressTest.java | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 236737c2..c6ca4643 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,19 @@ CHANGELOG ========= -4.5.1 +4.6.0 ------------------ +* Deprecated `isHighRisk()` in `ShippingAddress`. The minFraud web service + is removing the `shipping_address.is_high_risk` field from its responses. + The method will be removed in 5.0.0. * Updated the documentation for the email and phone verification inputs. Set `wasVerificationSuccessful` and `phoneWasVerificationSuccessful` to `true` if your system considers the email address or phone number verified as of the time of the event. Set them to `false` if it is not verified, for example if its only verification is pending or failed. If your system does not track verification, leave them unset. Set a verification time only when - the value is `true`. There are no code changes. + the value is `true`. This is a documentation change. 4.5.0 (2026-11-18) ------------------ diff --git a/src/main/java/com/maxmind/minfraud/response/ShippingAddress.java b/src/main/java/com/maxmind/minfraud/response/ShippingAddress.java index 6f4bbcac..0c236257 100644 --- a/src/main/java/com/maxmind/minfraud/response/ShippingAddress.java +++ b/src/main/java/com/maxmind/minfraud/response/ShippingAddress.java @@ -10,10 +10,10 @@ * address. * @param distanceToIpLocation The distance in kilometers from the address to the IP location. * This will be null if there is no value in the response. - * @param isHighRisk This returns true if the shipping address is an address - * associated with fraudulent transactions. It returns false when - * the address is not associated with increased risk. If the address - * could not be parsed or was not provided, null is returned. + * @param isHighRisk Deprecated. This is true if the shipping address is associated + * with fraudulent transactions. The minFraud web service deprecated + * this field. This is null when the web service does not return it. + * It will be removed in 5.0.0. * @param isInIpCountry This returns true if the address is in the IP country. It is * false when the address is not in the IP country. If the address * could not be parsed or was not provided or the IP address could @@ -34,6 +34,7 @@ public record ShippingAddress( @JsonProperty("distance_to_ip_location") Integer distanceToIpLocation, + @Deprecated(since = "4.6.0", forRemoval = true) @JsonProperty("is_high_risk") Boolean isHighRisk, diff --git a/src/test/java/com/maxmind/minfraud/response/ShippingAddressTest.java b/src/test/java/com/maxmind/minfraud/response/ShippingAddressTest.java index 1f0f66d7..875fecf7 100644 --- a/src/test/java/com/maxmind/minfraud/response/ShippingAddressTest.java +++ b/src/test/java/com/maxmind/minfraud/response/ShippingAddressTest.java @@ -11,6 +11,7 @@ public class ShippingAddressTest extends AbstractOutputTest { private static final double DELTA = 1e-15; @Test + @SuppressWarnings("removal") public void testShippingAddress() throws Exception { ShippingAddress address = this.deserialize( ShippingAddress.class,