From 11686a2c3258de37eef5432dae9af6f26964aa4e 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:52:58 +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/40310541277 --- CHANGELOG.md | 17 +++++++++++++++++ lib/gocardless_pro/client.rb | 2 +- lib/gocardless_pro/version.rb | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d1152..7b52609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ # Changelog +## 4.21.0 (2026-10-26) + +### Features + +#### Set a 60 second request timeout explicitly + +Requests now time out after 60 seconds unless you set `request: { timeout: ... }` in the `connection_options` client option. Previously no timeout was set by this library, so the effective timeout depended on the Faraday adapter in use, and could be unlimited for some adapters. With the default `net_http` adapter the behaviour is effectively unchanged, as Net::HTTP already waits up to 60 seconds. + +```ruby +client = GoCardlessPro::Client.new( + access_token: ENV["GOCARDLESS_TOKEN"], + connection_options: { request: { timeout: 10 } } +) +``` + +Other `request` options in `connection_options`, such as `open_timeout`, are kept and do not remove the default `timeout`. A timed out request raises `Faraday::TimeoutError` once automatic retries are exhausted. + ## 4.20.1 (2026-10-13) ### Fixes diff --git a/lib/gocardless_pro/client.rb b/lib/gocardless_pro/client.rb index 7bc5e57..4f80403 100644 --- a/lib/gocardless_pro/client.rb +++ b/lib/gocardless_pro/client.rb @@ -283,7 +283,7 @@ def default_options 'User-Agent' => "#{user_agent}", 'Content-Type' => 'application/json', 'GoCardless-Client-Library' => 'gocardless-pro-ruby', - 'GoCardless-Client-Version' => '4.20.1', + 'GoCardless-Client-Version' => '4.21.0', }, } end diff --git a/lib/gocardless_pro/version.rb b/lib/gocardless_pro/version.rb index 658627a..e3272b2 100644 --- a/lib/gocardless_pro/version.rb +++ b/lib/gocardless_pro/version.rb @@ -3,5 +3,5 @@ module GoCardlessPro module GoCardlessPro # Current version of the GC gem - VERSION = '4.20.1' + VERSION = '4.21.0' end