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