diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c16501..236737c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ CHANGELOG ========= +4.5.1 +------------------ + +* 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. + 4.5.0 (2026-11-18) ------------------ diff --git a/README.md b/README.md index cf21c323..502400ee 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,6 @@ Transaction request = new Transaction.Builder( .phoneNumber("313-545-3113") .phoneCountryCode("1") .phoneVerificationMethod(Shipping.PhoneVerificationMethod.NETWORK) - .phoneVerificationTime(ZonedDateTime.parse("2026-10-02T09:15:00Z")) .phoneWasVerificationSuccessful(false) .deliverySpeed(Shipping.DeliverySpeed.EXPEDITED) .address("32 Washington Ave.") diff --git a/src/main/java/com/maxmind/minfraud/request/AbstractLocation.java b/src/main/java/com/maxmind/minfraud/request/AbstractLocation.java index b96bba3e..5d405c5f 100644 --- a/src/main/java/com/maxmind/minfraud/request/AbstractLocation.java +++ b/src/main/java/com/maxmind/minfraud/request/AbstractLocation.java @@ -174,8 +174,10 @@ public final T phoneNumber(String number) { } /** - * @param method The most recent method used to verify the phone number associated with - * the address. Do not set this if no verification was attempted. + * @param method The method used for the most recent completed verification of the phone + * number associated with the address. 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. * @return The builder object. */ public final T phoneVerificationMethod(PhoneVerificationMethod method) { @@ -184,9 +186,16 @@ public final T phoneVerificationMethod(PhoneVerificationMethod method) { } /** - * @param wasSuccessful Whether the most recent verification of the phone number - * associated with the address succeeded. Do not set this if no - * verification was attempted. + * @param wasSuccessful Whether the end user has verified that they control the phone + * number associated with the address, as of the time of the event. + * Set this to {@code 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 {@code 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 {@code false}. If your system does not + * track phone verification, leave this unset. * @return The builder object. */ public final T phoneWasVerificationSuccessful(Boolean wasSuccessful) { @@ -195,10 +204,12 @@ public final T phoneWasVerificationSuccessful(Boolean wasSuccessful) { } /** - * @param time The date and time of the most recent verification of the phone number - * associated with the address. 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. + * @param time The date and time that the end user completed the most recent + * verification of the phone number associated with the address, if + * known. Set this only if {@code phoneWasVerificationSuccessful} is + * {@code true}. 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. * @return The builder object. */ public final T phoneVerificationTime(ZonedDateTime time) { @@ -303,7 +314,8 @@ public final String phoneCountryCode() { } /** - * @return The most recent method used to verify the phone number associated with the address + * @return The method used for the most recent completed verification of the phone number + * associated with the address, or for the most recent attempt if it is not verified */ @JsonProperty("phone_verification_method") public final PhoneVerificationMethod phoneVerificationMethod() { @@ -311,8 +323,8 @@ public final PhoneVerificationMethod phoneVerificationMethod() { } /** - * @return Whether the most recent verification of the phone number associated with the - * address succeeded + * @return Whether the end user has verified that they control the phone number associated + * with the address, as of the time of the event */ @JsonProperty("phone_was_verification_successful") public final Boolean phoneWasVerificationSuccessful() { @@ -320,8 +332,8 @@ public final Boolean phoneWasVerificationSuccessful() { } /** - * @return The date and time of the most recent verification of the phone number associated - * with the address + * @return The date and time that the end user completed the most recent verification of + * the phone number associated with the address */ @JsonProperty("phone_verification_time") public final ZonedDateTime phoneVerificationTime() { diff --git a/src/main/java/com/maxmind/minfraud/request/Email.java b/src/main/java/com/maxmind/minfraud/request/Email.java index 47f37721..3143ad30 100644 --- a/src/main/java/com/maxmind/minfraud/request/Email.java +++ b/src/main/java/com/maxmind/minfraud/request/Email.java @@ -392,10 +392,11 @@ public Email.Builder domain(String domain) { } /** - * @param time The date and time of the most recent attempt to verify the email address, - * if known. 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. + * @param time The date and time that the end user completed the most recent + * verification of the email address, if known. Set this only if + * {@code wasVerificationSuccessful} is {@code true}. 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. * @return The builder object. */ public Email.Builder verificationTime(ZonedDateTime time) { @@ -404,10 +405,17 @@ public Email.Builder verificationTime(ZonedDateTime time) { } /** - * @param wasSuccessful 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 set this if no verification was - * attempted. + * @param wasSuccessful 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 {@code 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 {@code 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 {@code false}. + * If your system does not track email verification, leave this + * unset. * @return The builder object. */ public Email.Builder wasVerificationSuccessful(Boolean wasSuccessful) { @@ -605,7 +613,8 @@ public String domain() { } /** - * @return The date and time of the most recent attempt to verify the email address. + * @return The date and time that the end user completed the most recent verification of + * the email address. */ @JsonProperty("verification_time") public ZonedDateTime verificationTime() { @@ -613,8 +622,8 @@ public ZonedDateTime verificationTime() { } /** - * @return Whether the most recent verification that the end user controls the email - * address succeeded. + * @return Whether the end user has verified that they control the email address, as of + * the time of the event. */ @JsonProperty("was_verification_successful") public Boolean wasVerificationSuccessful() {