From 75a7795a376a4fcdb0cfe50ad4115d7d8cc6df5f Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:54:51 +0000 Subject: [PATCH] Changes generated by 2c9c63561144da3c5fb3782bfa64c12fdc5e0c24 This commit was automatically created from gocardless/client-library-templates@2c9c63561144da3c5fb3782bfa64c12fdc5e0c24 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/40310541522 --- CHANGELOG.md | 17 +++++++++++++++++ README.md | 4 ++-- build.gradle | 2 +- .../java/com/gocardless/http/HttpClient.java | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db2c59af..494c8049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ # Changelog +## 9.14.0 (2026-10-26) + +### Features + +#### Add timeout options to the client builder + +`GoCardlessClient.Builder` now has `withConnectTimeout`, `withReadTimeout`, `withWriteTimeout` and `withCallTimeout`, each taking a `java.time.Duration`. Previously the client used OkHttp's defaults (10 seconds for connect, read and write, and no overall call timeout) with no way to change them. Unset options keep those defaults, which are now documented in the README and covered by tests. + +```java +GoCardlessClient client = GoCardlessClient.newBuilder(accessToken) + .withConnectTimeout(Duration.ofSeconds(5)) + .withCallTimeout(Duration.ofSeconds(30)) + .build(); +``` + +A request that times out raises `GoCardlessNetworkException` once the client's automatic retries are exhausted, so the total time before an error can exceed the configured timeout. + ## 9.13.0 (2026-10-12) ### Features diff --git a/README.md b/README.md index 8cdb0215..7052e6a9 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 9.13.0 + 9.14.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:9.13.0' +implementation 'com.gocardless:gocardless-pro:9.14.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index d6a71251..079bc591 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '9.13.0' +version = '9.14.0' apply plugin: 'ch.raffael.pegdown-doclet' diff --git a/src/main/java/com/gocardless/http/HttpClient.java b/src/main/java/com/gocardless/http/HttpClient.java index 43017dad..cd3d1394 100644 --- a/src/main/java/com/gocardless/http/HttpClient.java +++ b/src/main/java/com/gocardless/http/HttpClient.java @@ -35,7 +35,7 @@ public class HttpClient { private static final String DISALLOWED_USER_AGENT_CHARACTERS = "[^\\w!#$%&'\\*\\+\\-\\.\\^`\\|~]"; private static final String USER_AGENT = - String.format("gocardless-pro-java/9.13.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/9.14.0 java/%s %s/%s %s/%s", cleanUserAgentToken(System.getProperty("java.vm.specification.version")), cleanUserAgentToken(System.getProperty("java.vm.name")), cleanUserAgentToken(System.getProperty("java.version")), @@ -49,7 +49,7 @@ public class HttpClient { builder.put("GoCardless-Version", "2015-07-06"); builder.put("Accept", "application/json"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "9.13.0"); + builder.put("GoCardless-Client-Version", "9.14.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient;