gocardless_pro 4.20.1 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/gocardless_pro/api_service.rb +5 -1
- data/lib/gocardless_pro/client.rb +2 -2
- data/lib/gocardless_pro/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70bf421df9a5853c67ad88288ab8d51f0f9e5db1ec23ec09ac9ecd5af4caba30
|
|
4
|
+
data.tar.gz: 3a81c352482231d314162b34c72dc78650e98d671c8d62ccb2144dfdacece566
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b712860ea4fbddecfe948d3aae14783f2d709a7c1014456e509b6292a52db264469cd3df35d6efd005c090832adeeca482944fc4c4d18b58041c36ec6b4dfcc7
|
|
7
|
+
data.tar.gz: df867153918273531b4edd0b889382c46a713751a20ef037c4cdea6a81dc96097bab41784103057458dccc0ffcf38b6057dbe1ed9d2480f681deade492d86634
|
data/README.md
CHANGED
|
@@ -192,7 +192,7 @@ end
|
|
|
192
192
|
|
|
193
193
|
If the client is unable to connect to GoCardless, an appropriate exception will be raised, for example:
|
|
194
194
|
|
|
195
|
-
* `Faraday::TimeoutError`, in case of a timeout
|
|
195
|
+
* `Faraday::TimeoutError`, in case of a timeout (requests time out after 60 seconds by default; change this with the `connection_options` client option, e.g. `connection_options: { request: { timeout: 10 } }`)
|
|
196
196
|
* `Faraday::ConnectionFailed`, in case of a connection issue (e.g. problems with DNS resolution)
|
|
197
197
|
* `GoCardlessPro::ApiError`, for `5xx` errors returned from our infrastructure, but not by the API itself
|
|
198
198
|
|
|
@@ -9,6 +9,9 @@ require 'base64'
|
|
|
9
9
|
module GoCardlessPro
|
|
10
10
|
# GoCardless API
|
|
11
11
|
class ApiService
|
|
12
|
+
# Seconds to wait for a response when `connection_options` doesn't set `request: { timeout: ... }`
|
|
13
|
+
DEFAULT_TIMEOUT = 60
|
|
14
|
+
|
|
12
15
|
attr_reader :on_idempotency_conflict
|
|
13
16
|
|
|
14
17
|
# Initialize an APIService
|
|
@@ -22,8 +25,9 @@ module GoCardlessPro
|
|
|
22
25
|
root_url, @path_prefix = unpack_url(url)
|
|
23
26
|
http_adapter = options[:http_adapter] || [:net_http]
|
|
24
27
|
connection_options = options.fetch(:connection_options, {})
|
|
28
|
+
request_options = { timeout: DEFAULT_TIMEOUT }.merge(connection_options.fetch(:request, {}))
|
|
25
29
|
|
|
26
|
-
@connection = Faraday.new(root_url, connection_options) do |faraday|
|
|
30
|
+
@connection = Faraday.new(root_url, connection_options.merge(request: request_options)) do |faraday|
|
|
27
31
|
faraday.response :raise_gocardless_errors
|
|
28
32
|
|
|
29
33
|
faraday.adapter(*http_adapter)
|
|
@@ -239,7 +239,7 @@ module GoCardlessPro
|
|
|
239
239
|
# @option options [Symbol] :environment the environment to connect to - one of `:live` or `:sandbox`.
|
|
240
240
|
# @option options [Symbol] :access_token the API token
|
|
241
241
|
# @option options [Symbol] :url the full URL used to make requests to. If you specify this, it will be used over the `environment` option.
|
|
242
|
-
# @option options [Symbol] :connection_options `Faraday` connection options hash, e.g. `{ request: { timeout: 3 } }`.
|
|
242
|
+
# @option options [Symbol] :connection_options `Faraday` connection options hash, e.g. `{ request: { timeout: 3 } }`. Requests time out after 60 seconds unless `request: { timeout: ... }` is set.
|
|
243
243
|
# @return [Client] A client configured to use the API with HTTP Basic
|
|
244
244
|
# authentication.
|
|
245
245
|
#
|
|
@@ -283,7 +283,7 @@ module GoCardlessPro
|
|
|
283
283
|
'User-Agent' => "#{user_agent}",
|
|
284
284
|
'Content-Type' => 'application/json',
|
|
285
285
|
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
|
|
286
|
-
'GoCardless-Client-Version' => '4.
|
|
286
|
+
'GoCardless-Client-Version' => '4.21.0',
|
|
287
287
|
},
|
|
288
288
|
}
|
|
289
289
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gocardless_pro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GoCardless
|
|
@@ -63,28 +63,28 @@ dependencies:
|
|
|
63
63
|
requirements:
|
|
64
64
|
- - "~>"
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: 3.
|
|
66
|
+
version: 3.32.0
|
|
67
67
|
type: :development
|
|
68
68
|
prerelease: false
|
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: 3.
|
|
73
|
+
version: 3.32.0
|
|
74
74
|
- !ruby/object:Gem::Dependency
|
|
75
75
|
name: rubocop
|
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements:
|
|
78
78
|
- - "~>"
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 1.
|
|
80
|
+
version: 1.92.0
|
|
81
81
|
type: :development
|
|
82
82
|
prerelease: false
|
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
|
84
84
|
requirements:
|
|
85
85
|
- - "~>"
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 1.
|
|
87
|
+
version: 1.92.0
|
|
88
88
|
- !ruby/object:Gem::Dependency
|
|
89
89
|
name: yard
|
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|