From a93248b7d2fccae41eda2326d03d89b7188fb90d Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 23 Nov 2026 22:07:50 +0000 Subject: [PATCH] Update verification input documentation `true` now means that your system considers the email address or phone number verified as of the time of the event. `false` means that it is not verified, for any reason. Before, the documentation said not to set the value if no verification was attempted. Set the verification time only with `true`. If your system does not track verification, leave the value unset. STF-2488 Co-Authored-By: Claude Fable 5.2 --- CHANGELOG.md | 11 ++++++++++ lib/minfraud/components/addressable.rb | 29 ++++++++++++++++++-------- lib/minfraud/components/email.rb | 25 +++++++++++++++------- 3 files changed, 48 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 413ef2ca..8f9280cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + 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. + ## v2.11.0 (2026-11-18) * Added the `phone_verification_method`, diff --git a/lib/minfraud/components/addressable.rb b/lib/minfraud/components/addressable.rb index e38f9c90..071296b1 100644 --- a/lib/minfraud/components/addressable.rb +++ b/lib/minfraud/components/addressable.rb @@ -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 @@ -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 # diff --git a/lib/minfraud/components/email.rb b/lib/minfraud/components/email.rb index 2f52c131..2fb7bfc1 100644 --- a/lib/minfraud/components/email.rb +++ b/lib/minfraud/components/email.rb @@ -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 + # 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 + # 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. # # @return [Boolean, nil] attr_accessor :was_verification_successful