gocardless_pro 2.22.0 → 2.22.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bb8531d374a6fe482eaaccbc49cd9cbf1575f880cb9633c0b0848ca09157b76
4
- data.tar.gz: 24e1f269a875c46dd8a2165f856ba18a4acea648aed82a600de26425bb32bd3d
3
+ metadata.gz: 2380802da7e32b788d03eb0ce5965cb79b27f310c7643bf40078880823dcb2f7
4
+ data.tar.gz: ad1ebf6cbec94675df50e0b4a0154fb2eea77f659993625c5d8a9bcb8bd9f7df
5
5
  SHA512:
6
- metadata.gz: b93423658f351048e9dd31cb216a86d2c389638d2079647457f68a521eaa4f749844c199cc2cfbb44904dcc18ed9608f94698d1e2e3201341e833714c8a6e6bc
7
- data.tar.gz: a2836a224de279066f96d8fa28238368271cbfe967bda9015655ce68cca8262466821d6a923b87db2a050f85e99f14758de9c8214f61fd0089ae127a0cb229d2
6
+ metadata.gz: 54622b040fa474ef16f0431e439bef3603d45cdf74c6001bc175fc638057db41231eae81cd9c502e5d16f3a796d6c1e068d27907aeacc1b0bfceb15186bcce0b
7
+ data.tar.gz: e89435ce6a6da8761c8b113e93f34fe1c7268e462aeda83fe8183620334c35f939c362efc1027b7bf0e3bef1a0ab9d56bb1eacf09e3ab64fd6596f1cc0055ad1
@@ -148,7 +148,7 @@ module GoCardlessPro
148
148
  'User-Agent' => user_agent.to_s,
149
149
  'Content-Type' => 'application/json',
150
150
  'GoCardless-Client-Library' => 'gocardless-pro-ruby',
151
- 'GoCardless-Client-Version' => '2.22.0',
151
+ 'GoCardless-Client-Version' => '2.22.1',
152
152
  },
153
153
  }
154
154
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -59,15 +58,6 @@ module GoCardlessPro
59
58
  def envelope_key
60
59
  'bank_details_lookups'
61
60
  end
62
-
63
- # take a URL with placeholder params and substitute them out for the actual value
64
- # @param url [String] the URL with placeholders in
65
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
66
- def sub_url(url, param_map)
67
- param_map.reduce(url) do |new_url, (param, value)|
68
- new_url.gsub(":#{param}", URI.escape(value))
69
- end
70
- end
71
61
  end
72
62
  end
73
63
  end
@@ -1,3 +1,5 @@
1
+ require 'cgi'
2
+
1
3
  module GoCardlessPro
2
4
  # Module that contains all services for making requests to the API.
3
5
  module Services
@@ -23,6 +25,15 @@ module GoCardlessPro
23
25
  def envelope_key
24
26
  raise NotImplementedError
25
27
  end
28
+
29
+ # take a URL with placeholder params and substitute them out for the actual value
30
+ # @param url [String] the URL with placeholders in
31
+ # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
32
+ def sub_url(url, param_map)
33
+ param_map.reduce(url) do |new_url, (param, value)|
34
+ new_url.gsub(":#{param}", CGI.escape(value))
35
+ end
36
+ end
26
37
  end
27
38
  end
28
39
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -153,15 +152,6 @@ module GoCardlessPro
153
152
  def envelope_key
154
153
  'creditor_bank_accounts'
155
154
  end
156
-
157
- # take a URL with placeholder params and substitute them out for the actual value
158
- # @param url [String] the URL with placeholders in
159
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
160
- def sub_url(url, param_map)
161
- param_map.reduce(url) do |new_url, (param, value)|
162
- new_url.gsub(":#{param}", URI.escape(value))
163
- end
164
- end
165
155
  end
166
156
  end
167
157
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -129,15 +128,6 @@ module GoCardlessPro
129
128
  def envelope_key
130
129
  'creditors'
131
130
  end
132
-
133
- # take a URL with placeholder params and substitute them out for the actual value
134
- # @param url [String] the URL with placeholders in
135
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
136
- def sub_url(url, param_map)
137
- param_map.reduce(url) do |new_url, (param, value)|
138
- new_url.gsub(":#{param}", URI.escape(value))
139
- end
140
- end
141
131
  end
142
132
  end
143
133
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -53,15 +52,6 @@ module GoCardlessPro
53
52
  def envelope_key
54
53
  'currency_exchange_rates'
55
54
  end
56
-
57
- # take a URL with placeholder params and substitute them out for the actual value
58
- # @param url [String] the URL with placeholders in
59
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
60
- def sub_url(url, param_map)
61
- param_map.reduce(url) do |new_url, (param, value)|
62
- new_url.gsub(":#{param}", URI.escape(value))
63
- end
64
- end
65
55
  end
66
56
  end
67
57
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -186,15 +185,6 @@ module GoCardlessPro
186
185
  def envelope_key
187
186
  'customer_bank_accounts'
188
187
  end
189
-
190
- # take a URL with placeholder params and substitute them out for the actual value
191
- # @param url [String] the URL with placeholders in
192
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
193
- def sub_url(url, param_map)
194
- param_map.reduce(url) do |new_url, (param, value)|
195
- new_url.gsub(":#{param}", URI.escape(value))
196
- end
197
- end
198
188
  end
199
189
  end
200
190
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -52,15 +51,6 @@ module GoCardlessPro
52
51
  def envelope_key
53
52
  'customer_notifications'
54
53
  end
55
-
56
- # take a URL with placeholder params and substitute them out for the actual value
57
- # @param url [String] the URL with placeholders in
58
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
59
- def sub_url(url, param_map)
60
- param_map.reduce(url) do |new_url, (param, value)|
61
- new_url.gsub(":#{param}", URI.escape(value))
62
- end
63
- end
64
54
  end
65
55
  end
66
56
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -153,15 +152,6 @@ module GoCardlessPro
153
152
  def envelope_key
154
153
  'customers'
155
154
  end
156
-
157
- # take a URL with placeholder params and substitute them out for the actual value
158
- # @param url [String] the URL with placeholders in
159
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
160
- def sub_url(url, param_map)
161
- param_map.reduce(url) do |new_url, (param, value)|
162
- new_url.gsub(":#{param}", URI.escape(value))
163
- end
164
- end
165
155
  end
166
156
  end
167
157
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -70,15 +69,6 @@ module GoCardlessPro
70
69
  def envelope_key
71
70
  'events'
72
71
  end
73
-
74
- # take a URL with placeholder params and substitute them out for the actual value
75
- # @param url [String] the URL with placeholders in
76
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
77
- def sub_url(url, param_map)
78
- param_map.reduce(url) do |new_url, (param, value)|
79
- new_url.gsub(":#{param}", URI.escape(value))
80
- end
81
- end
82
72
  end
83
73
  end
84
74
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -239,15 +238,6 @@ module GoCardlessPro
239
238
  def envelope_key
240
239
  'instalment_schedules'
241
240
  end
242
-
243
- # take a URL with placeholder params and substitute them out for the actual value
244
- # @param url [String] the URL with placeholders in
245
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
246
- def sub_url(url, param_map)
247
- param_map.reduce(url) do |new_url, (param, value)|
248
- new_url.gsub(":#{param}", URI.escape(value))
249
- end
250
- end
251
241
  end
252
242
  end
253
243
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -85,15 +84,6 @@ module GoCardlessPro
85
84
  def envelope_key
86
85
  'mandate_import_entries'
87
86
  end
88
-
89
- # take a URL with placeholder params and substitute them out for the actual value
90
- # @param url [String] the URL with placeholders in
91
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
92
- def sub_url(url, param_map)
93
- param_map.reduce(url) do |new_url, (param, value)|
94
- new_url.gsub(":#{param}", URI.escape(value))
95
- end
96
- end
97
87
  end
98
88
  end
99
89
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -176,15 +175,6 @@ module GoCardlessPro
176
175
  def envelope_key
177
176
  'mandate_imports'
178
177
  end
179
-
180
- # take a URL with placeholder params and substitute them out for the actual value
181
- # @param url [String] the URL with placeholders in
182
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
183
- def sub_url(url, param_map)
184
- param_map.reduce(url) do |new_url, (param, value)|
185
- new_url.gsub(":#{param}", URI.escape(value))
186
- end
187
- end
188
178
  end
189
179
  end
190
180
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -85,15 +84,6 @@ module GoCardlessPro
85
84
  def envelope_key
86
85
  'mandate_pdfs'
87
86
  end
88
-
89
- # take a URL with placeholder params and substitute them out for the actual value
90
- # @param url [String] the URL with placeholders in
91
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
92
- def sub_url(url, param_map)
93
- param_map.reduce(url) do |new_url, (param, value)|
94
- new_url.gsub(":#{param}", URI.escape(value))
95
- end
96
- end
97
87
  end
98
88
  end
99
89
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -225,15 +224,6 @@ module GoCardlessPro
225
224
  def envelope_key
226
225
  'mandates'
227
226
  end
228
-
229
- # take a URL with placeholder params and substitute them out for the actual value
230
- # @param url [String] the URL with placeholders in
231
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
232
- def sub_url(url, param_map)
233
- param_map.reduce(url) do |new_url, (param, value)|
234
- new_url.gsub(":#{param}", URI.escape(value))
235
- end
236
- end
237
227
  end
238
228
  end
239
229
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -225,15 +224,6 @@ module GoCardlessPro
225
224
  def envelope_key
226
225
  'payments'
227
226
  end
228
-
229
- # take a URL with placeholder params and substitute them out for the actual value
230
- # @param url [String] the URL with placeholders in
231
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
232
- def sub_url(url, param_map)
233
- param_map.reduce(url) do |new_url, (param, value)|
234
- new_url.gsub(":#{param}", URI.escape(value))
235
- end
236
- end
237
227
  end
238
228
  end
239
229
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -54,15 +53,6 @@ module GoCardlessPro
54
53
  def envelope_key
55
54
  'payout_items'
56
55
  end
57
-
58
- # take a URL with placeholder params and substitute them out for the actual value
59
- # @param url [String] the URL with placeholders in
60
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
61
- def sub_url(url, param_map)
62
- param_map.reduce(url) do |new_url, (param, value)|
63
- new_url.gsub(":#{param}", URI.escape(value))
64
- end
65
- end
66
56
  end
67
57
  end
68
58
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -93,15 +92,6 @@ module GoCardlessPro
93
92
  def envelope_key
94
93
  'payouts'
95
94
  end
96
-
97
- # take a URL with placeholder params and substitute them out for the actual value
98
- # @param url [String] the URL with placeholders in
99
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
100
- def sub_url(url, param_map)
101
- param_map.reduce(url) do |new_url, (param, value)|
102
- new_url.gsub(":#{param}", URI.escape(value))
103
- end
104
- end
105
95
  end
106
96
  end
107
97
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -127,15 +126,6 @@ module GoCardlessPro
127
126
  def envelope_key
128
127
  'redirect_flows'
129
128
  end
130
-
131
- # take a URL with placeholder params and substitute them out for the actual value
132
- # @param url [String] the URL with placeholders in
133
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
134
- def sub_url(url, param_map)
135
- param_map.reduce(url) do |new_url, (param, value)|
136
- new_url.gsub(":#{param}", URI.escape(value))
137
- end
138
- end
139
129
  end
140
130
  end
141
131
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -14,7 +13,8 @@ module GoCardlessPro
14
13
  # Creates a new refund object.
15
14
  #
16
15
  # This fails with:<a name="total_amount_confirmation_invalid"></a><a
17
- # name="number_of_refunds_exceeded"></a>
16
+ # name="number_of_refunds_exceeded"></a><a
17
+ # name="available_refund_amount_insufficient"></a>
18
18
  #
19
19
  # - `total_amount_confirmation_invalid` if the confirmation amount doesn't match
20
20
  # the total amount refunded for the payment. This safeguard is there to prevent
@@ -23,6 +23,10 @@ module GoCardlessPro
23
23
  # - `number_of_refunds_exceeded` if five or more refunds have already been
24
24
  # created against the payment.
25
25
  #
26
+ # - `available_refund_amount_insufficient` if the creditor does not have
27
+ # sufficient balance for refunds available to cover the cost of the requested
28
+ # refund.
29
+ #
26
30
  # Example URL: /refunds
27
31
  # @param options [Hash] parameters as a hash, under a params key.
28
32
  def create(options = {})
@@ -139,15 +143,6 @@ module GoCardlessPro
139
143
  def envelope_key
140
144
  'refunds'
141
145
  end
142
-
143
- # take a URL with placeholder params and substitute them out for the actual value
144
- # @param url [String] the URL with placeholders in
145
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
146
- def sub_url(url, param_map)
147
- param_map.reduce(url) do |new_url, (param, value)|
148
- new_url.gsub(":#{param}", URI.escape(value))
149
- end
150
- end
151
146
  end
152
147
  end
153
148
  end
@@ -1,5 +1,4 @@
1
1
  require_relative './base_service'
2
- require 'uri'
3
2
 
4
3
  # encoding: utf-8
5
4
  #
@@ -324,15 +323,6 @@ module GoCardlessPro
324
323
  def envelope_key
325
324
  'subscriptions'
326
325
  end
327
-
328
- # take a URL with placeholder params and substitute them out for the actual value
329
- # @param url [String] the URL with placeholders in
330
- # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
331
- def sub_url(url, param_map)
332
- param_map.reduce(url) do |new_url, (param, value)|
333
- new_url.gsub(":#{param}", URI.escape(value))
334
- end
335
- end
336
326
  end
337
327
  end
338
328
  end
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '2.22.0'.freeze
7
+ VERSION = '2.22.1'.freeze
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gocardless_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.22.0
4
+ version: 2.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-09 00:00:00.000000000 Z
11
+ date: 2020-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday