Skip to content

Commit 7d16344

Browse files
oschwaldclaude
andcommitted
Fix TransactionReport.Builder examples in README
The constructor only takes Tag, not both InetAddress and Tag. The IP address must be set via the ipAddress() builder method. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 98af935 commit 7d16344

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ If the request fails, an exception will be thrown.
9696
To report a transaction:
9797

9898
```java
99-
TransactionReport transaction = new TransactionReport.Builder(
100-
InetAddress.getByName("1.1.1.1"), Tag.NOT_FRAUD
101-
).build();
99+
TransactionReport transaction = new TransactionReport.Builder(Tag.NOT_FRAUD)
100+
.ipAddress(InetAddress.getByName("1.1.1.1"))
101+
.build();
102102
client.reportTransaction(transaction);
103103
```
104104

@@ -259,7 +259,8 @@ exception will be thrown.
259259
See the API documentation for more details.
260260

261261
```java
262-
TransactionReport transaction = new TransactionReport.Builder(InetAddress.getByName("1.1.1.1"), Tag.NOT_FRAUD)
262+
TransactionReport transaction = new TransactionReport.Builder(Tag.NOT_FRAUD)
263+
.ipAddress(InetAddress.getByName("1.1.1.1"))
263264
.chargebackCode("mycode")
264265
.maxmindId("12345678")
265266
.minfraudId(UUID.fromString("58fa38d8-4b87-458b-a22b-f00eda1aa20d"))

0 commit comments

Comments
 (0)