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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v2.11.1

* 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
verified as of the time of the event. Set them to `false` if it is not

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: "Set them to false if it is not verified, for example if its only verification is pending or failed" changes from "them" (the attributes) to "it" (the email address or phone number). A reader can take "it" to mean the attributes.

Suggest: "Set them to false if the email address or phone number is not verified, for example if its only verification is pending or failed."

The suggested text in the other comment on this entry keeps the same "them ... it" wording. The same comment is on the Java, .NET, and PHP PRs.

🤖 Comment by Claude Opus 5.5.

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

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 entry does not say that verification_time changed meaning. The v2.11.0 documentation described it as "The date and time of the most recent attempt to verify the email address". Now it is the time that the user completed the verification, and only for a true value. A caller that sends the time of the latest attempt, for example the time it sent the link, gets no signal to change.

Suggest one more sentence, for example: "The verification time is now the time of the verification behind a true value, not the time of the most recent attempt."

The Java PR has the same comment.

🤖 Comment by Claude Opus 5.5.

changes.
Comment on lines +5 to +12

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.

This entry does not name the largest change from v2.11.0. The v2.11.0 docs said to leave the boolean unset if no one tried to verify the contact. Now a caller that tracks verification must send false for that case. The example here ("if its only verification is pending or failed") does not include it, so a v2.11.0 integrator that omits the field for unattempted contacts sees no reason to change.

The entry also does not say that:

  • An earlier completed verification still counts as true when a newer attempt is pending or failed. v2.11.0 said "whether the most recent verification ... succeeded".
  • phone_verification_method is now the method of the most recent completed verification, not of the most recent attempt.

Possible text:

Suggested change
* 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
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.
* 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
verified as of the time of the event. An earlier completed verification
still counts, even if a newer attempt is pending or failed. Set them to
`false` if it is not verified. This includes a pending or failed
verification and one that you did not try to verify. The previous
documentation said to leave them unset in that last case. If your system
does not track verification, leave them unset. `phone_verification_method`
is the method of the most recent completed verification. Set a
verification time only when the value is `true`. There are no code
changes.

🤖 Comment by Claude Opus 5.5.


## v2.11.0 (2026-11-18)

* Added the `phone_verification_method`,
Expand Down
29 changes: 20 additions & 9 deletions lib/minfraud/components/addressable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ class Addressable < Base
# @return [String, nil]
attr_accessor :phone_country_code

# The most recent method used to verify the phone number. This must be
# The method used for the most recent completed verification of the
# phone number. If the phone number is not verified, you can set the
# method of the most recent attempt if your system records it. Do not
# set this if you did not try to verify the phone number. This must be
# one of +:delivered_code+, +:network+, or +:other+.
# +:delivered_code+ is a code delivered to the phone, such as by SMS,
# voice call, or messaging app. +:network+ is verification through the
Expand All @@ -86,18 +89,26 @@ class Addressable < Base
# @return [Symbol, nil]
enum_accessor :phone_verification_method, %i[delivered_code network other]

# Whether the most recent verification of the phone number
# succeeded. Do not include this field if no verification was
# attempted.
# Whether the end user has verified that they control the phone number,
# as of the time of the event. Set this to +true+ if your system
# considers the phone number verified as of the time of the event. An
# earlier completed verification still counts, even if a newer attempt
# is pending or failed. Set it to +false+ if the phone number is not
# verified. This includes one whose only verification is pending or
# failed, and one that you did not try to verify. Leaving this unset is
# not equivalent to +false+. If your system does not track phone
# verification, leave this unset.
#
# @return [Boolean, nil]
attr_accessor :phone_was_verification_successful

# The date and time of the most recent verification of the phone
# number. The string must be in the RFC 3339 date-time format, e.g.,
# "2012-04-12T23:20:50.52Z". The time must not be before
# 1970-01-01T00:00:00Z or more than two days in the future. The web
# service ignores a time outside this range and returns a warning.
# The date and time that the end user completed the most recent
# verification of the phone number, if known. Set this only if
# +phone_was_verification_successful+ is +true+. The string must be in
# the RFC 3339 date-time format, e.g., "2012-04-12T23:20:50.52Z". The
# time must not be before 1970-01-01T00:00:00Z or more than two days in
# the future. The web service ignores a time outside this range and
# returns a warning.
#
# @see https://datatracker.ietf.org/doc/html/rfc3339
#
Expand Down
25 changes: 17 additions & 8 deletions lib/minfraud/components/email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,29 @@ class Email < Base
# @return [Boolean, nil]
attr_accessor :hash_address

# The date and time of the most recent attempt to verify the email
# address, if known. The string must be in the RFC 3339 date-time
# format, e.g., "2012-04-12T23:20:50.52Z". The time must not be before
# 1970-01-01T00:00:00Z or more than two days in the future. The web
# service ignores a time outside this range and returns a warning.
# The date and time that the end user completed the most recent
# verification of the email address, if known. Set this only if
# +was_verification_successful+ is +true+. The string must be in the
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

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, outside the diff: spec/support/verification_examples.rb now shows a combination that this text tells callers not to send.

  • 'does not raise an exception for valid verification values' (lines 56-61) sends a verification time with was_verification_successful: false and calls the pair valid.
  • "sends #{prefix}was_verification_successful #{successful} as a JSON boolean" (lines 9-19) sends the time with false too.

The client does not enforce the pairing, so the tests pass. But a reader who copies the "valid values" example gets a request that the docs now forbid. Consider true in the valid-values example, and no time in the false case of the JSON boolean test.

🤖 Comment by Claude Opus 5.5.

# RFC 3339 date-time format, e.g., "2012-04-12T23:20:50.52Z". The time
# must not be before 1970-01-01T00:00:00Z or more than two days in the
# future. The web service ignores a time outside this range and returns
# a warning.
#
# @see https://datatracker.ietf.org/doc/html/rfc3339
#
# @return [String, nil]
attr_accessor :verification_time

# Whether the most recent verification that the end user controls the
# email address succeeded, for example by confirming a link sent to the
# address. Do not include this field if no verification was attempted.
# Whether the end user has verified that they control the email
# address, as of the time of the event, for example by confirming a

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: "as of the time of the event, for example by confirming a link sent to the address" puts the example after the time phrase. It reads as an example of the time, not of how the user verified the address.

maxmind/openapi#28 puts the example in a separate sentence: "For example, the user clicked a link that you sent to the address." Suggest the same here, for example: "Whether the end user has verified that they control the email address, as of the time of the event. For example, the user confirmed a link sent to the address."

The same comment is on the Java and .NET PRs.

🤖 Comment by Claude Opus 5.5.

# link sent to the address. Set this to +true+ if your system considers
# the email address verified as of the time of the event. An earlier
# completed verification still counts, even if a newer attempt is
# pending or failed. Set it to +false+ if the email address is not
# verified. This includes one whose only verification is pending or
# failed, and one that you did not try to verify. Leaving this unset is
# not equivalent to +false+. If your system does not track email
# verification, leave this unset.
Comment on lines +54 to +56

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 new text leaves out two sentences from the reference text that the sibling PRs use (for example maxmind/openapi#28 and maxmind/dev-site#1826):

  • "If your system tracks email verification, send true or false for every request that includes this email address."
  • "The choice can affect risk scores."

Without the first sentence, a caller that tracks verification can still read the text as "set it only when you have a result", and leave it unset for some requests. Without the second, the caller does not know why the unset-versus-false choice matters.

Suggested change
# failed, and one that you did not try to verify. Leaving this unset is
# not equivalent to +false+. If your system does not track email
# verification, leave this unset.
# failed, and one that you did not try to verify. Leaving this unset is
# not equivalent to +false+. If your system tracks email verification,
# set this to +true+ or +false+ for every request that includes this
# email address. If your system does not track email verification,
# leave this unset. The choice can affect risk scores.

phone_was_verification_successful in lib/minfraud/components/addressable.rb (lines 98-100) has the same gap. Suggested text for it:

      # failed, and one that you did not try to verify. Leaving this unset is
      # not equivalent to +false+. If your system tracks phone verification,
      # set this to +true+ or +false+ for every request that includes this
      # phone number. If your system does not track phone verification,
      # leave this unset. The choice can affect risk scores.

🤖 Comment by Claude Opus 5.5.

#
# @return [Boolean, nil]
attr_accessor :was_verification_successful
Expand Down
Loading