Skip to content

Commit 482e2d5

Browse files
authored
Merge pull request #617 from maxmind/greg/stf-190
Add `CLEAR` to the `TransactionReport.Tag` enum (STF-190)
2 parents 360f5aa + 87f7fa1 commit 482e2d5

5 files changed

Lines changed: 64 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ CHANGELOG
55
------------------
66

77
* Added `FAT_ZEBRA` to the `Payment.Processor` enum.
8+
* Added `CLEAR` to the `TransactionReport.Tag` enum for use with the Report
9+
Transaction API.
810

911
4.2.0 (2026-02-26)
1012
------------------

mise.lock

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mise.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[settings]
2+
experimental = true
3+
lockfile = true
4+
disable_backends = [
5+
"asdf",
6+
"vfox",
7+
]
8+
9+
[tools]
10+
java = "latest"
11+
maven = "latest"
12+
13+
[hooks]
14+
enter = "mise install --quiet --locked"
15+
16+
[[watch_files]]
17+
patterns = ["mise.toml", "mise.lock"]
18+
run = "mise install --quiet --locked"

src/main/java/com/maxmind/minfraud/request/TransactionReport.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ public enum Tag {
221221
/**
222222
* Chargeback
223223
*/
224-
CHARGEBACK;
224+
CHARGEBACK,
225+
/**
226+
* Clear a previous transaction report tag
227+
*/
228+
CLEAR;
225229

226230
/**
227231
* @return a string representation of the object.

src/test/java/com/maxmind/minfraud/request/TransactionReportTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ public void testTransactionID() {
119119
assertEquals(id, report.transactionId());
120120
}
121121

122+
@Test
123+
public void testClearTag() throws Exception {
124+
final var report = new Builder(Tag.CLEAR).ipAddress(ip).build();
125+
assertEquals(Tag.CLEAR, report.tag());
126+
127+
final var expectedJSON = "{ip_address:'1.1.1.1',tag:'clear'}";
128+
JSONAssert.assertEquals(expectedJSON, report.toJson(), true);
129+
}
130+
122131
// Test the example in the README
123132
@Test
124133
public void testAllFields() throws Exception {

0 commit comments

Comments
 (0)