Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog

## v2.11.1
## v2.12.0

* Deprecated `is_high_risk` in `Minfraud::Model::ShippingAddress`. The

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the last deprecation that the web service caused (the v2.7.0 subscores entry) linked to the minFraud release notes. Consider a link to the release note for this removal when it is published, so users can find the date and the reason.

🤖 Comment by Claude Opus 5.5.

minFraud web service is removing the `shipping_address.is_high_risk` field
from its responses. The attribute will be removed in v3.0.0.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entry does not tell users what to expect before v3.0.0. STF-2532 says the web service already leaves out this field for some responses that include a shipping address, so users cannot rely on it now. After the web service removes the field, the attribute is nil for every response. Code such as is_high_risk == false then stops matching, and the user did not upgrade the gem or change any code. The doc comment says this, but the release notes do not.

Suggestion: add a sentence such as "The web service already omits the field from some responses. When the field is absent, the attribute is nil. Do not rely on it."

🤖 Comment by Claude Opus 5.5.

* Updated the documentation for the email and phone verification attributes.
Set `was_verification_successful` and `phone_was_verification_successful`
to `true` if your system considers the email address or phone number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the existing entry in this release still ends with "There are no code changes." (lines 14-15, outside the diff). v2.12.0 now also deprecates is_high_risk, so a reader can take that sentence to cover the whole release.

The PHP, Java, and .NET PRs for this deprecation change the same sentence to "This is a documentation change." Consider the same edit here.

🤖 Comment by Claude Opus 5.5.

Expand Down
8 changes: 4 additions & 4 deletions lib/minfraud/model/shipping_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class ShippingAddress < Address
# @return [Integer, nil]
attr_reader :distance_to_billing_address

# This field is true if the shipping address is an address associated
# with fraudulent transactions. The field is false when the address is
# not associated with increased risk. The key will only be present when a
# shipping address is provided.
# This is true if the shipping address is associated with fraudulent
# transactions. The minFraud web service deprecated this field. This is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this comment says the web service "deprecated this field", but the CHANGELOG entry says the web service "is removing" it from its responses. "Deprecated" can suggest that the web service still sends the field. The web service already leaves the field out of some responses, and after the change it leaves it out of all responses.

Suggest the CHANGELOG wording here, for example: "The minFraud web service is removing this field from its responses. This is nil when the web service does not return it."

🤖 Comment by Claude Opus 5.5.

# nil when the web service does not return it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No spec covers the nil case that this line documents. After the web service change, every response is like this. spec/fixtures/files/insights-response2.json is the fixture for "missing some fields", but its shipping_address still has "is_high_risk": false.

Suggestion: remove the key from that fixture and add expect(m.shipping_address.is_high_risk).to be_nil to the "creates a populated object missing some fields" example in spec/model/insights_spec.rb. Only that example reads the fixture.

🤖 Comment by Claude Opus 5.5.

#
# @return [Boolean, nil]
# @deprecated This attribute will be removed in v3.0.0.
attr_reader :is_high_risk

# @!visibility private
Expand Down
Loading