Repository navigation
STF-2488: Update verification input documentation #758
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,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 | ||
|
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. Important: This entry does not say that the method and the time changed meaning since 4.5.0.
The entry says only "Set a verification time only when the value is Suggest adding: "The verification method and time now describe the most recent completed verification, not the most recent attempt. If the email address or phone number is not verified, you can set the method of the most recent attempt." 🤖 Comment by Claude Opus 5.5. |
||
| the value is `true`. There are no code changes. | ||
|
|
||
| 4.5.0 (2026-11-18) | ||
| ------------------ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
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 PR removes the time from this example because a time now goes only with
The tests still pass, because the library does not check the pairing. But these are the full-request reference payloads, and they now show usage that the docs tell people not to do. Suggest removing the time from the 🤖 Comment by Claude Opus 5.5. |
||
| .deliverySpeed(Shipping.DeliverySpeed.EXPEDITED) | ||
| .address("32 Washington Ave.") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
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. Important: This Javadoc leaves out two parts of the new reference text. The OpenAPI text (maxmind/openapi#28) says:
Here, the "every request that includes this phone number" rule and "The choice can affect risk scores." are missing. Without the first sentence, an integrator can send the value only on some requests, for example only at sign-up, and leave it unset on later requests. The text says that unset is not the same as Suggest adding, after "Leaving this unset is not equivalent to {@code false}.": "If your system tracks phone verification, set this to {@code true} or {@code false} for every request that includes this phone number." Then end with "The choice can affect risk scores." Make the same change to 🤖 Comment by Claude Opus 5.5. |
||
| * @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,25 +314,26 @@ 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() { | ||
| return 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() { | ||
| return 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() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
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: "for example by confirming a link sent to the address" now comes after "as of the time of the event". So it reads as an example of the time, not of how the user verified that they control the address. Suggest moving the example to its own sentence, as the OpenAPI text does: "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." 🤖 Comment by Claude Opus 5.5. |
||
| * 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,16 +613,17 @@ 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() { | ||
| return 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() { | ||
|
|
||
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: "Set them to
falseif it is not verified, for example if its only verification is pending or failed." Here "them" is the two fields, but "it" and "its" are the email address or phone number, which this sentence does not name. A reader can think "it" is the field.Suggest: "Set them to
falseif the email address or phone number is not verified, for example if its only verification is pending or failed."🤖 Comment by Claude Opus 5.5.