From f48c280e94717d5be038de0e7f3f185af565573a Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 8 Jan 2026 13:26:04 -0800 Subject: [PATCH 1/4] Update Gradle instructions to use implementation instead of compile The `compile` configuration was deprecated in Gradle 3.4 and removed in Gradle 7.0. The modern `implementation` configuration should be used instead. Co-Authored-By: Claude Opus 4.5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7684ec97..b9a6ddd9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ repositories { mavenCentral() } dependencies { - compile 'com.maxmind.minfraud:minfraud:4.0.0' + implementation 'com.maxmind.minfraud:minfraud:4.0.0' } ``` From 98af935d4274bbf61d1c055d721c9a5572244cec Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 8 Jan 2026 13:27:44 -0800 Subject: [PATCH 2/4] Fix typos and style inconsistencies in README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing article "the" before method names - Fix missing space after hyphen in HttpException description - Fix typo "with" → "will" in Report Transactions section - Fix grammatically broken sentence about required arguments - Fix typo "BanK" → "Bank" in example code - Standardize heading style to use trailing ## consistently Co-Authored-By: Claude Opus 4.5 --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b9a6ddd9..0cb4c07d 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,13 @@ After creating the transaction object, send a Score request by calling the ScoreResponse score = client.score(transaction); ``` -an Insights request by calling `insights` method: +an Insights request by calling the `insights` method: ```java InsightsResponse insights = client.insights(transaction); ``` -a Factors request by calling `factors` method: +a Factors request by calling the `factors` method: ```java FactorsResponse factors = client.factors(transaction); @@ -128,12 +128,12 @@ Checked exceptions: * `MinFraudException` - This will be thrown when the server returns an unexpected response. This also serves as the base class for the above checked exceptions. -* `HttpException` -This will be thrown when an unexpected HTTP error +* `HttpException` - This will be thrown when an unexpected HTTP error occurs such as an internal server error or other unexpected status code. -## Examples +## Examples ## -### Insights +### Insights ### ```java Transaction request = new Transaction.Builder( @@ -164,7 +164,7 @@ Transaction request = new Transaction.Builder( ).creditCard( new CreditCard.Builder() .avsResult('N') - .bankName("BanK of New Haven") + .bankName("Bank of New Haven") .bankPhoneCountryCode("1") .bankPhoneNumber("313-231-3213") .cvvResult('Y') @@ -243,18 +243,18 @@ WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build(); System.out.println(client.insights(request)); ``` -### Report Transactions API +### Report Transactions API ### MaxMind encourages the use of this API, as data received through this channel is continually used to improve the accuracy of our fraud detection algorithms. To use the Report Transactions API, create a new `TransactionReport` object. A -valid tag at least one of the following are required arguments: IP address, -MaxMind ID, minFraud ID, or transaction ID. Additional parameters may also be -set, as documented below. +valid tag and at least one of the following are required: IP address, MaxMind +ID, minFraud ID, or transaction ID. Additional parameters may also be set, as +documented below. If the report is successful, nothing is returned. If the report fails, an -exception with be thrown. +exception will be thrown. See the API documentation for more details. From 7d1634487444d5d2e1f49aa24cf36165b3fad37b Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 8 Jan 2026 13:30:27 -0800 Subject: [PATCH 3/4] 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 --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0cb4c07d..b065be97 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,9 @@ If the request fails, an exception will be thrown. To report a transaction: ```java -TransactionReport transaction = new TransactionReport.Builder( - InetAddress.getByName("1.1.1.1"), Tag.NOT_FRAUD - ).build(); +TransactionReport transaction = new TransactionReport.Builder(Tag.NOT_FRAUD) + .ipAddress(InetAddress.getByName("1.1.1.1")) + .build(); client.reportTransaction(transaction); ``` @@ -259,7 +259,8 @@ exception will be thrown. See the API documentation for more details. ```java -TransactionReport transaction = new TransactionReport.Builder(InetAddress.getByName("1.1.1.1"), Tag.NOT_FRAUD) +TransactionReport transaction = new TransactionReport.Builder(Tag.NOT_FRAUD) + .ipAddress(InetAddress.getByName("1.1.1.1")) .chargebackCode("mycode") .maxmindId("12345678") .minfraudId(UUID.fromString("58fa38d8-4b87-458b-a22b-f00eda1aa20d")) From 96538162a61580569e1232030403729953298829 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 8 Jan 2026 13:52:03 -0800 Subject: [PATCH 4/4] Improve README documentation and formatting - Add groovy syntax highlighting to Gradle code block - Document that WebServiceClient is thread-safe and should be reused - Fix trailing whitespace and punctuation - Improve sentence structure for API method descriptions Co-Authored-By: Claude Opus 4.5 --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b065be97..1b0690f3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To do this, add the dependency to your pom.xml: Add the following to your `build.gradle` file: -``` +```groovy repositories { mavenCentral() } @@ -47,8 +47,11 @@ takes your MaxMind account ID and license key as arguments. For example: WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build(); ``` -If you would like to use the Sandbox environment, you can use the `host` method -that belongs to the Builder. For example, +The `WebServiceClient` object is thread-safe and can be reused across requests. +Reusing the object allows connection pooling and improves performance. + +If you would like to use the Sandbox environment, you can use the `host` method +that belongs to the Builder. For example: ```java WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890") @@ -78,13 +81,13 @@ After creating the transaction object, send a Score request by calling the ScoreResponse score = client.score(transaction); ``` -an Insights request by calling the `insights` method: +Send an Insights request by calling the `insights` method: ```java InsightsResponse insights = client.insights(transaction); ``` -a Factors request by calling the `factors` method: +Send a Factors request by calling the `factors` method: ```java FactorsResponse factors = client.factors(transaction);