Repository navigation
STF-2532: Deprecate ShippingAddress.isHighRisk() #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this says only that "the method" will be removed. In 5.0.0 the removal also takes out the canonical constructor parameter and the
Suggestion: say that the 🤖 Comment by Claude Opus 5.5. |
||
| * 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) | ||
| ------------------ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the docs do not tell callers that this value can already be The wording also differs between the two places. This Javadoc says the web service "deprecated this field". The CHANGELOG says the web service "is removing" it. Suggestion: use the same text in both places. For example: "The minFraud web service is removing this field and already omits it from some responses. This is null when the response does not include it." 🤖 Comment by Claude Opus 5.5. |
||
| * It will be removed in 5.0.0. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: "It will be removed in 5.0.0." comes right after "This is null when the web service does not return it." In that sentence, "it" is the field, so this "It" can also read as the field. Suggest naming the thing that goes away, for example: "This record component and its accessor will be removed in 5.0.0." 🤖 Comment by Claude Opus 5.5. |
||
| * @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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the deprecation does not say what to use instead, or that there is no replacement. The repository CLAUDE.md ("Deprecation Strategy") says: "Include helpful deprecation messages in JavaDoc pointing to alternatives." The accessor is implicit, so it has no Suggestion: add "There is no replacement." (or name the replacement, if one exists) to the 🤖 Comment by Claude Opus 5.5. |
||
| @JsonProperty("is_high_risk") | ||
| Boolean isHighRisk, | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ public class ShippingAddressTest extends AbstractOutputTest { | |
| private static final double DELTA = 1e-15; | ||
|
|
||
| @Test | ||
| @SuppressWarnings("removal") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the test covers only a Suggestion: add a case that deserializes a 🤖 Comment by Claude Opus 5.5. |
||
| public void testShippingAddress() throws Exception { | ||
| ShippingAddress address = this.deserialize( | ||
| ShippingAddress.class, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, optional: when this library deprecated the Factors subscores (3.6.0), the CHANGELOG entry linked to the minFraud release notes. Consider a link to the release note for this removal, so users can find the date and the reason. If this release ships before that release note is published, ignore this.
🤖 Comment by Claude Opus 5.5.