gocardless_pro 4.20.1 → 4.22.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/services/payer_authorisations_service.rb +5 -0
- data/lib/gocardless_pro/services/redirect_flows_service.rb +3 -0
- 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: 2fbb2b1d839a297b95fac3863d7f281e872bf53ddb887c1a4cbc0623c7b5fff9
|
|
4
|
+
data.tar.gz: eec20a669e42a995af7c9f1074a41e80a4a53e6e416e5683e90cec45cd028b9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afc747c751aa25ba8d70c868b3863a81e8724dc51a711dd02d947552d06f38737a65a0e4f10d269c0a5f22df94718bc81c8b4a2c96cb2697d4996356a7514ebf
|
|
7
|
+
data.tar.gz: a6ba0ad4f44baaf68c7a7b2a0ac80b846bc69e945cb22bf1dcd0ec9b7f2d14fdac6e9696ea372d9823019bd1293b265db857c08f60dd1e691c54e7d312682113
|
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.22.0',
|
|
287
287
|
},
|
|
288
288
|
}
|
|
289
289
|
end
|
|
@@ -16,6 +16,7 @@ module GoCardlessPro
|
|
|
16
16
|
#
|
|
17
17
|
# @param identity # Unique identifier, beginning with "PA".
|
|
18
18
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
19
|
+
# @deprecated Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.
|
|
19
20
|
def get(identity, options = {})
|
|
20
21
|
path = sub_url('/payer_authorisations/:identity', {
|
|
21
22
|
'identity' => identity,
|
|
@@ -38,6 +39,7 @@ module GoCardlessPro
|
|
|
38
39
|
# solution, such as a multi-step form.
|
|
39
40
|
# Example URL: /payer_authorisations
|
|
40
41
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
42
|
+
# @deprecated Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.
|
|
41
43
|
def create(options = {})
|
|
42
44
|
path = '/payer_authorisations'
|
|
43
45
|
|
|
@@ -82,6 +84,7 @@ module GoCardlessPro
|
|
|
82
84
|
#
|
|
83
85
|
# @param identity # Unique identifier, beginning with "PA".
|
|
84
86
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
87
|
+
# @deprecated Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.
|
|
85
88
|
def update(identity, options = {})
|
|
86
89
|
path = sub_url('/payer_authorisations/:identity', {
|
|
87
90
|
'identity' => identity,
|
|
@@ -108,6 +111,7 @@ module GoCardlessPro
|
|
|
108
111
|
#
|
|
109
112
|
# @param identity # Unique identifier, beginning with "PA".
|
|
110
113
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
114
|
+
# @deprecated Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.
|
|
111
115
|
def submit(identity, options = {})
|
|
112
116
|
path = sub_url('/payer_authorisations/:identity/actions/submit', {
|
|
113
117
|
'identity' => identity,
|
|
@@ -155,6 +159,7 @@ module GoCardlessPro
|
|
|
155
159
|
#
|
|
156
160
|
# @param identity # Unique identifier, beginning with "PA".
|
|
157
161
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
162
|
+
# @deprecated Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.
|
|
158
163
|
def confirm(identity, options = {})
|
|
159
164
|
path = sub_url('/payer_authorisations/:identity/actions/confirm', {
|
|
160
165
|
'identity' => identity,
|
|
@@ -14,6 +14,7 @@ module GoCardlessPro
|
|
|
14
14
|
# customer to the GoCardless hosted payment pages.
|
|
15
15
|
# Example URL: /redirect_flows
|
|
16
16
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
17
|
+
# @deprecated Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.
|
|
17
18
|
def create(options = {})
|
|
18
19
|
path = '/redirect_flows'
|
|
19
20
|
|
|
@@ -51,6 +52,7 @@ module GoCardlessPro
|
|
|
51
52
|
#
|
|
52
53
|
# @param identity # Unique identifier, beginning with "RE".
|
|
53
54
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
55
|
+
# @deprecated Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.
|
|
54
56
|
def get(identity, options = {})
|
|
55
57
|
path = sub_url('/redirect_flows/:identity', {
|
|
56
58
|
'identity' => identity,
|
|
@@ -83,6 +85,7 @@ module GoCardlessPro
|
|
|
83
85
|
#
|
|
84
86
|
# @param identity # Unique identifier, beginning with "RE".
|
|
85
87
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
88
|
+
# @deprecated Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.
|
|
86
89
|
def complete(identity, options = {})
|
|
87
90
|
path = sub_url('/redirect_flows/:identity/actions/complete', {
|
|
88
91
|
'identity' => identity,
|
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.22.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
|