From 1e35d331bfaa28bfda7cff0286c84bc6bcdca55d Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 22 Apr 2026 21:27:16 +0000 Subject: [PATCH 1/2] Add `CLEAR` to the `TransactionReport.Tag` enum Part of STF-190. The `clear` tag retracts a previously reported fraud report tag on a transaction, restoring its label to "unknown" (distinct from the positive `NOT_FRAUD` signal). Backend support shipped in STF-15; this adds SDK support. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 2 ++ .../com/maxmind/minfraud/request/TransactionReport.java | 6 +++++- .../maxmind/minfraud/request/TransactionReportTest.java | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64152236..7b6ef9b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ CHANGELOG ------------------ * Added `FAT_ZEBRA` to the `Payment.Processor` enum. +* Added `CLEAR` to the `TransactionReport.Tag` enum for use with the Report + Transaction API. 4.2.0 (2026-02-26) ------------------ diff --git a/src/main/java/com/maxmind/minfraud/request/TransactionReport.java b/src/main/java/com/maxmind/minfraud/request/TransactionReport.java index d85717c7..83c66f7f 100644 --- a/src/main/java/com/maxmind/minfraud/request/TransactionReport.java +++ b/src/main/java/com/maxmind/minfraud/request/TransactionReport.java @@ -221,7 +221,11 @@ public enum Tag { /** * Chargeback */ - CHARGEBACK; + CHARGEBACK, + /** + * Clear a previous transaction report tag + */ + CLEAR; /** * @return a string representation of the object. diff --git a/src/test/java/com/maxmind/minfraud/request/TransactionReportTest.java b/src/test/java/com/maxmind/minfraud/request/TransactionReportTest.java index c07b3f48..eef09e0e 100644 --- a/src/test/java/com/maxmind/minfraud/request/TransactionReportTest.java +++ b/src/test/java/com/maxmind/minfraud/request/TransactionReportTest.java @@ -119,6 +119,15 @@ public void testTransactionID() { assertEquals(id, report.transactionId()); } + @Test + public void testClearTag() throws Exception { + final var report = new Builder(Tag.CLEAR).ipAddress(ip).build(); + assertEquals(Tag.CLEAR, report.tag()); + + final var expectedJSON = "{ip_address:'1.1.1.1',tag:'clear'}"; + JSONAssert.assertEquals(expectedJSON, report.toJson(), true); + } + // Test the example in the README @Test public void testAllFields() throws Exception { From 87f7fa1fa0626d75c47e55734270e66c7768ec4b Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 22 Apr 2026 21:30:35 +0000 Subject: [PATCH 2/2] Add mise configuration for local toolchain management Sets up `mise` for automatic Java + Maven provisioning, matching the pattern already in use in minfraud-api-dotnet and GeoIP2-dotnet. This lets contributors run the full test/lint loop locally without manually installing a JDK or Maven. Co-Authored-By: Claude Opus 4.7 (1M context) --- mise.lock | 30 ++++++++++++++++++++++++++++++ mise.toml | 18 ++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 mise.lock create mode 100644 mise.toml diff --git a/mise.lock b/mise.lock new file mode 100644 index 00000000..0145b93f --- /dev/null +++ b/mise.lock @@ -0,0 +1,30 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +[[tools.java]] +version = "26.0.0" +backend = "core:java" + +[[tools.maven]] +version = "3.9.15" +backend = "aqua:apache/maven" + +[tools.maven."platforms.linux-arm64"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.linux-arm64-musl"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.linux-x64"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.linux-x64-musl"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.macos-arm64"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.macos-x64"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" + +[tools.maven."platforms.windows-x64"] +url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..c4027682 --- /dev/null +++ b/mise.toml @@ -0,0 +1,18 @@ +[settings] +experimental = true +lockfile = true +disable_backends = [ + "asdf", + "vfox", +] + +[tools] +java = "latest" +maven = "latest" + +[hooks] +enter = "mise install --quiet --locked" + +[[watch_files]] +patterns = ["mise.toml", "mise.lock"] +run = "mise install --quiet --locked"