gocardless_pro 1.0.5 → 1.1.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/gocardless_pro/api_service.rb +3 -3
  4. data/lib/gocardless_pro/resources/bank_details_lookup.rb +8 -10
  5. data/lib/gocardless_pro/resources/creditor.rb +36 -42
  6. data/lib/gocardless_pro/resources/creditor_bank_account.rb +24 -38
  7. data/lib/gocardless_pro/resources/customer.rb +12 -27
  8. data/lib/gocardless_pro/resources/customer_bank_account.rb +26 -39
  9. data/lib/gocardless_pro/resources/event.rb +49 -40
  10. data/lib/gocardless_pro/resources/mandate.rb +33 -35
  11. data/lib/gocardless_pro/resources/mandate_pdf.rb +10 -11
  12. data/lib/gocardless_pro/resources/payment.rb +34 -42
  13. data/lib/gocardless_pro/resources/payout.rb +23 -34
  14. data/lib/gocardless_pro/resources/redirect_flow.rb +49 -54
  15. data/lib/gocardless_pro/resources/refund.rb +24 -39
  16. data/lib/gocardless_pro/resources/subscription.rb +65 -84
  17. data/lib/gocardless_pro/services/bank_details_lookups_service.rb +6 -5
  18. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +7 -6
  19. data/lib/gocardless_pro/services/creditors_service.rb +7 -6
  20. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +11 -10
  21. data/lib/gocardless_pro/services/customers_service.rb +7 -6
  22. data/lib/gocardless_pro/services/events_service.rb +8 -6
  23. data/lib/gocardless_pro/services/mandate_pdfs_service.rb +6 -5
  24. data/lib/gocardless_pro/services/mandates_service.rb +7 -6
  25. data/lib/gocardless_pro/services/payments_service.rb +7 -6
  26. data/lib/gocardless_pro/services/payouts_service.rb +7 -6
  27. data/lib/gocardless_pro/services/redirect_flows_service.rb +6 -5
  28. data/lib/gocardless_pro/services/refunds_service.rb +7 -6
  29. data/lib/gocardless_pro/services/subscriptions_service.rb +7 -6
  30. data/lib/gocardless_pro/version.rb +1 -1
  31. data/lib/gocardless_pro.rb +2 -3
  32. data/spec/resources/creditor_spec.rb +9 -1
  33. data/spec/resources/event_spec.rb +4 -0
  34. data/spec/resources/mandate_spec.rb +9 -1
  35. data/spec/resources/subscription_spec.rb +0 -4
  36. data/spec/services/creditor_bank_accounts_service_spec.rb +8 -0
  37. data/spec/services/creditors_service_spec.rb +39 -9
  38. data/spec/services/customer_bank_accounts_service_spec.rb +8 -0
  39. data/spec/services/customers_service_spec.rb +8 -0
  40. data/spec/services/events_service_spec.rb +8 -0
  41. data/spec/services/mandates_service_spec.rb +8 -0
  42. data/spec/services/payments_service_spec.rb +8 -0
  43. data/spec/services/payouts_service_spec.rb +8 -0
  44. data/spec/services/redirect_flows_service_spec.rb +8 -0
  45. data/spec/services/refunds_service_spec.rb +8 -0
  46. data/spec/services/subscriptions_service_spec.rb +8 -13
  47. metadata +19 -19
@@ -1,10 +1,11 @@
1
1
  require_relative './base_service'
2
+ require 'uri'
2
3
 
3
4
  # encoding: utf-8
4
5
  #
5
- # WARNING: Do not edit by hand, this file was generated by Crank:
6
+ # This client is automatically generated from a template and JSON schema definition.
7
+ # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
6
8
  #
7
- # https://github.com/gocardless/crank
8
9
 
9
10
  module GoCardlessPro
10
11
  module Services
@@ -44,7 +45,7 @@ module GoCardlessPro
44
45
  Resources::Refund.new(unenvelope_body(response.body), response)
45
46
  end
46
47
 
47
- # Returns a [cursor-paginated](#overview-cursor-pagination) list of your
48
+ # Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
48
49
  # refunds.
49
50
  # Example URL: /refunds
50
51
  # @param options [Hash] parameters as a hash, under a params key.
@@ -117,12 +118,12 @@ module GoCardlessPro
117
118
  'refunds'
118
119
  end
119
120
 
120
- # take a URL with placeholder params and substitute them out for the acutal value
121
+ # take a URL with placeholder params and substitute them out for the actual value
121
122
  # @param url [String] the URL with placeholders in
122
- # @param param_map [Hash] a hash of placeholders and their actual values
123
+ # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
123
124
  def sub_url(url, param_map)
124
125
  param_map.reduce(url) do |new_url, (param, value)|
125
- new_url.gsub(":#{param}", value)
126
+ new_url.gsub(":#{param}", URI.escape(value))
126
127
  end
127
128
  end
128
129
  end
@@ -1,10 +1,11 @@
1
1
  require_relative './base_service'
2
+ require 'uri'
2
3
 
3
4
  # encoding: utf-8
4
5
  #
5
- # WARNING: Do not edit by hand, this file was generated by Crank:
6
+ # This client is automatically generated from a template and JSON schema definition.
7
+ # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
6
8
  #
7
- # https://github.com/gocardless/crank
8
9
 
9
10
  module GoCardlessPro
10
11
  module Services
@@ -26,7 +27,7 @@ module GoCardlessPro
26
27
  Resources::Subscription.new(unenvelope_body(response.body), response)
27
28
  end
28
29
 
29
- # Returns a [cursor-paginated](#overview-cursor-pagination) list of your
30
+ # Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
30
31
  # subscriptions.
31
32
  # Example URL: /subscriptions
32
33
  # @param options [Hash] parameters as a hash, under a params key.
@@ -122,12 +123,12 @@ module GoCardlessPro
122
123
  'subscriptions'
123
124
  end
124
125
 
125
- # take a URL with placeholder params and substitute them out for the acutal value
126
+ # take a URL with placeholder params and substitute them out for the actual value
126
127
  # @param url [String] the URL with placeholders in
127
- # @param param_map [Hash] a hash of placeholders and their actual values
128
+ # @param param_map [Hash] a hash of placeholders and their actual values (which will be escaped)
128
129
  def sub_url(url, param_map)
129
130
  param_map.reduce(url) do |new_url, (param, value)|
130
- new_url.gsub(":#{param}", value)
131
+ new_url.gsub(":#{param}", URI.escape(value))
131
132
  end
132
133
  end
133
134
  end
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '1.0.5'
7
+ VERSION = '1.1.0'
8
8
  end
@@ -1,8 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # WARNING: Do not edit by hand, this file was generated by Crank:
4
- #
5
- # https://github.com/gocardless/crank
3
+ # This client is automatically generated from a template and JSON schema definition.
4
+ # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
6
5
  #
7
6
 
8
7
  require 'json'
@@ -29,11 +29,15 @@ describe GoCardlessPro::Resources::Creditor do
29
29
 
30
30
  },
31
31
 
32
+ 'logo_url' => 'logo_url-input',
33
+
32
34
  'name' => 'name-input',
33
35
 
34
36
  'postal_code' => 'postal_code-input',
35
37
 
36
- 'region' => 'region-input'
38
+ 'region' => 'region-input',
39
+
40
+ 'scheme_identifiers' => 'scheme_identifiers-input'
37
41
 
38
42
  }
39
43
  end
@@ -61,11 +65,15 @@ describe GoCardlessPro::Resources::Creditor do
61
65
 
62
66
  expect(resource.links.default_sek_payout_account).to eq('default_sek_payout_account-input')
63
67
 
68
+ expect(resource.logo_url).to eq('logo_url-input')
69
+
64
70
  expect(resource.name).to eq('name-input')
65
71
 
66
72
  expect(resource.postal_code).to eq('postal_code-input')
67
73
 
68
74
  expect(resource.region).to eq('region-input')
75
+
76
+ expect(resource.scheme_identifiers).to eq('scheme_identifiers-input')
69
77
  end
70
78
 
71
79
  it 'can handle new attributes without erroring' do
@@ -19,6 +19,8 @@ describe GoCardlessPro::Resources::Event do
19
19
 
20
20
  'new_customer_bank_account' => 'new_customer_bank_account-input',
21
21
 
22
+ 'new_mandate' => 'new_mandate-input',
23
+
22
24
  'organisation' => 'organisation-input',
23
25
 
24
26
  'parent_event' => 'parent_event-input',
@@ -57,6 +59,8 @@ describe GoCardlessPro::Resources::Event do
57
59
 
58
60
  expect(resource.links.new_customer_bank_account).to eq('new_customer_bank_account-input')
59
61
 
62
+ expect(resource.links.new_mandate).to eq('new_mandate-input')
63
+
60
64
  expect(resource.links.organisation).to eq('organisation-input')
61
65
 
62
66
  expect(resource.links.parent_event).to eq('parent_event-input')
@@ -13,7 +13,11 @@ describe GoCardlessPro::Resources::Mandate do
13
13
 
14
14
  'creditor' => 'creditor-input',
15
15
 
16
- 'customer_bank_account' => 'customer_bank_account-input'
16
+ 'customer' => 'customer-input',
17
+
18
+ 'customer_bank_account' => 'customer_bank_account-input',
19
+
20
+ 'new_mandate' => 'new_mandate-input'
17
21
 
18
22
  },
19
23
 
@@ -41,8 +45,12 @@ describe GoCardlessPro::Resources::Mandate do
41
45
 
42
46
  expect(resource.links.creditor).to eq('creditor-input')
43
47
 
48
+ expect(resource.links.customer).to eq('customer-input')
49
+
44
50
  expect(resource.links.customer_bank_account).to eq('customer_bank_account-input')
45
51
 
52
+ expect(resource.links.new_mandate).to eq('new_mandate-input')
53
+
46
54
  expect(resource.metadata).to eq('metadata-input')
47
55
 
48
56
  expect(resource.next_possible_charge_date).to eq('next_possible_charge_date-input')
@@ -7,8 +7,6 @@ describe GoCardlessPro::Resources::Subscription do
7
7
 
8
8
  'amount' => 'amount-input',
9
9
 
10
- 'count' => 'count-input',
11
-
12
10
  'created_at' => 'created_at-input',
13
11
 
14
12
  'currency' => 'currency-input',
@@ -51,8 +49,6 @@ describe GoCardlessPro::Resources::Subscription do
51
49
 
52
50
  expect(resource.amount).to eq('amount-input')
53
51
 
54
- expect(resource.count).to eq('count-input')
55
-
56
52
  expect(resource.created_at).to eq('created_at-input')
57
53
 
58
54
  expect(resource.currency).to eq('currency-input')
@@ -301,6 +301,14 @@ describe GoCardlessPro::Services::CreditorBankAccountsService do
301
301
  expect(get_response).to be_nil
302
302
  end
303
303
  end
304
+
305
+ context "when an ID is specified which can't be included in a valid URI" do
306
+ let(:id) { '`' }
307
+
308
+ it "doesn't raise an error" do
309
+ expect { get_response }.to_not raise_error(/bad URI/)
310
+ end
311
+ end
304
312
  end
305
313
 
306
314
  describe '#disable' do
@@ -21,9 +21,11 @@ describe GoCardlessPro::Services::CreditorsService do
21
21
  'created_at' => 'created_at-input',
22
22
  'id' => 'id-input',
23
23
  'links' => 'links-input',
24
+ 'logo_url' => 'logo_url-input',
24
25
  'name' => 'name-input',
25
26
  'postal_code' => 'postal_code-input',
26
- 'region' => 'region-input'
27
+ 'region' => 'region-input',
28
+ 'scheme_identifiers' => 'scheme_identifiers-input'
27
29
  }
28
30
  end
29
31
 
@@ -41,9 +43,11 @@ describe GoCardlessPro::Services::CreditorsService do
41
43
  'created_at' => 'created_at-input',
42
44
  'id' => 'id-input',
43
45
  'links' => 'links-input',
46
+ 'logo_url' => 'logo_url-input',
44
47
  'name' => 'name-input',
45
48
  'postal_code' => 'postal_code-input',
46
- 'region' => 'region-input'
49
+ 'region' => 'region-input',
50
+ 'scheme_identifiers' => 'scheme_identifiers-input'
47
51
  }
48
52
  }
49
53
  )
@@ -61,9 +65,11 @@ describe GoCardlessPro::Services::CreditorsService do
61
65
  'created_at' => 'created_at-input',
62
66
  'id' => 'id-input',
63
67
  'links' => 'links-input',
68
+ 'logo_url' => 'logo_url-input',
64
69
  'name' => 'name-input',
65
70
  'postal_code' => 'postal_code-input',
66
- 'region' => 'region-input'
71
+ 'region' => 'region-input',
72
+ 'scheme_identifiers' => 'scheme_identifiers-input'
67
73
  }
68
74
 
69
75
  }.to_json,
@@ -118,9 +124,11 @@ describe GoCardlessPro::Services::CreditorsService do
118
124
  'created_at' => 'created_at-input',
119
125
  'id' => 'id-input',
120
126
  'links' => 'links-input',
127
+ 'logo_url' => 'logo_url-input',
121
128
  'name' => 'name-input',
122
129
  'postal_code' => 'postal_code-input',
123
- 'region' => 'region-input'
130
+ 'region' => 'region-input',
131
+ 'scheme_identifiers' => 'scheme_identifiers-input'
124
132
  }],
125
133
  meta: {
126
134
  cursors: {
@@ -150,11 +158,15 @@ describe GoCardlessPro::Services::CreditorsService do
150
158
 
151
159
  expect(get_list_response.records.first.id).to eq('id-input')
152
160
 
161
+ expect(get_list_response.records.first.logo_url).to eq('logo_url-input')
162
+
153
163
  expect(get_list_response.records.first.name).to eq('name-input')
154
164
 
155
165
  expect(get_list_response.records.first.postal_code).to eq('postal_code-input')
156
166
 
157
167
  expect(get_list_response.records.first.region).to eq('region-input')
168
+
169
+ expect(get_list_response.records.first.scheme_identifiers).to eq('scheme_identifiers-input')
158
170
  end
159
171
 
160
172
  it 'exposes the cursors for before and after' do
@@ -180,9 +192,11 @@ describe GoCardlessPro::Services::CreditorsService do
180
192
  'created_at' => 'created_at-input',
181
193
  'id' => 'id-input',
182
194
  'links' => 'links-input',
195
+ 'logo_url' => 'logo_url-input',
183
196
  'name' => 'name-input',
184
197
  'postal_code' => 'postal_code-input',
185
- 'region' => 'region-input'
198
+ 'region' => 'region-input',
199
+ 'scheme_identifiers' => 'scheme_identifiers-input'
186
200
  }],
187
201
  meta: {
188
202
  cursors: { after: 'AB345' },
@@ -206,9 +220,11 @@ describe GoCardlessPro::Services::CreditorsService do
206
220
  'created_at' => 'created_at-input',
207
221
  'id' => 'id-input',
208
222
  'links' => 'links-input',
223
+ 'logo_url' => 'logo_url-input',
209
224
  'name' => 'name-input',
210
225
  'postal_code' => 'postal_code-input',
211
- 'region' => 'region-input'
226
+ 'region' => 'region-input',
227
+ 'scheme_identifiers' => 'scheme_identifiers-input'
212
228
  }],
213
229
  meta: {
214
230
  limit: 2,
@@ -248,9 +264,11 @@ describe GoCardlessPro::Services::CreditorsService do
248
264
  'created_at' => 'created_at-input',
249
265
  'id' => 'id-input',
250
266
  'links' => 'links-input',
267
+ 'logo_url' => 'logo_url-input',
251
268
  'name' => 'name-input',
252
269
  'postal_code' => 'postal_code-input',
253
- 'region' => 'region-input'
270
+ 'region' => 'region-input',
271
+ 'scheme_identifiers' => 'scheme_identifiers-input'
254
272
  }
255
273
  }.to_json,
256
274
  headers: { 'Content-Type' => 'application/json' }
@@ -284,9 +302,11 @@ describe GoCardlessPro::Services::CreditorsService do
284
302
  'created_at' => 'created_at-input',
285
303
  'id' => 'id-input',
286
304
  'links' => 'links-input',
305
+ 'logo_url' => 'logo_url-input',
287
306
  'name' => 'name-input',
288
307
  'postal_code' => 'postal_code-input',
289
- 'region' => 'region-input'
308
+ 'region' => 'region-input',
309
+ 'scheme_identifiers' => 'scheme_identifiers-input'
290
310
  }
291
311
  }.to_json,
292
312
  headers: { 'Content-Type' => 'application/json' }
@@ -311,6 +331,14 @@ describe GoCardlessPro::Services::CreditorsService do
311
331
  expect(get_response).to be_nil
312
332
  end
313
333
  end
334
+
335
+ context "when an ID is specified which can't be included in a valid URI" do
336
+ let(:id) { '`' }
337
+
338
+ it "doesn't raise an error" do
339
+ expect { get_response }.to_not raise_error(/bad URI/)
340
+ end
341
+ end
314
342
  end
315
343
 
316
344
  describe '#update' do
@@ -334,9 +362,11 @@ describe GoCardlessPro::Services::CreditorsService do
334
362
  'created_at' => 'created_at-input',
335
363
  'id' => 'id-input',
336
364
  'links' => 'links-input',
365
+ 'logo_url' => 'logo_url-input',
337
366
  'name' => 'name-input',
338
367
  'postal_code' => 'postal_code-input',
339
- 'region' => 'region-input'
368
+ 'region' => 'region-input',
369
+ 'scheme_identifiers' => 'scheme_identifiers-input'
340
370
  }
341
371
  }.to_json,
342
372
  headers: { 'Content-Type' => 'application/json' }
@@ -301,6 +301,14 @@ describe GoCardlessPro::Services::CustomerBankAccountsService do
301
301
  expect(get_response).to be_nil
302
302
  end
303
303
  end
304
+
305
+ context "when an ID is specified which can't be included in a valid URI" do
306
+ let(:id) { '`' }
307
+
308
+ it "doesn't raise an error" do
309
+ expect { get_response }.to_not raise_error(/bad URI/)
310
+ end
311
+ end
304
312
  end
305
313
 
306
314
  describe '#update' do
@@ -363,6 +363,14 @@ describe GoCardlessPro::Services::CustomersService do
363
363
  expect(get_response).to be_nil
364
364
  end
365
365
  end
366
+
367
+ context "when an ID is specified which can't be included in a valid URI" do
368
+ let(:id) { '`' }
369
+
370
+ it "doesn't raise an error" do
371
+ expect { get_response }.to_not raise_error(/bad URI/)
372
+ end
373
+ end
366
374
  end
367
375
 
368
376
  describe '#update' do
@@ -189,5 +189,13 @@ describe GoCardlessPro::Services::EventsService do
189
189
  expect(get_response).to be_nil
190
190
  end
191
191
  end
192
+
193
+ context "when an ID is specified which can't be included in a valid URI" do
194
+ let(:id) { '`' }
195
+
196
+ it "doesn't raise an error" do
197
+ expect { get_response }.to_not raise_error(/bad URI/)
198
+ end
199
+ end
192
200
  end
193
201
  end
@@ -291,6 +291,14 @@ describe GoCardlessPro::Services::MandatesService do
291
291
  expect(get_response).to be_nil
292
292
  end
293
293
  end
294
+
295
+ context "when an ID is specified which can't be included in a valid URI" do
296
+ let(:id) { '`' }
297
+
298
+ it "doesn't raise an error" do
299
+ expect { get_response }.to_not raise_error(/bad URI/)
300
+ end
301
+ end
294
302
  end
295
303
 
296
304
  describe '#update' do
@@ -311,6 +311,14 @@ describe GoCardlessPro::Services::PaymentsService do
311
311
  expect(get_response).to be_nil
312
312
  end
313
313
  end
314
+
315
+ context "when an ID is specified which can't be included in a valid URI" do
316
+ let(:id) { '`' }
317
+
318
+ it "doesn't raise an error" do
319
+ expect { get_response }.to_not raise_error(/bad URI/)
320
+ end
321
+ end
314
322
  end
315
323
 
316
324
  describe '#update' do
@@ -203,5 +203,13 @@ describe GoCardlessPro::Services::PayoutsService do
203
203
  expect(get_response).to be_nil
204
204
  end
205
205
  end
206
+
207
+ context "when an ID is specified which can't be included in a valid URI" do
208
+ let(:id) { '`' }
209
+
210
+ it "doesn't raise an error" do
211
+ expect { get_response }.to_not raise_error(/bad URI/)
212
+ end
213
+ end
206
214
  end
207
215
  end
@@ -171,6 +171,14 @@ describe GoCardlessPro::Services::RedirectFlowsService do
171
171
  expect(get_response).to be_nil
172
172
  end
173
173
  end
174
+
175
+ context "when an ID is specified which can't be included in a valid URI" do
176
+ let(:id) { '`' }
177
+
178
+ it "doesn't raise an error" do
179
+ expect { get_response }.to_not raise_error(/bad URI/)
180
+ end
181
+ end
174
182
  end
175
183
 
176
184
  describe '#complete' do
@@ -271,6 +271,14 @@ describe GoCardlessPro::Services::RefundsService do
271
271
  expect(get_response).to be_nil
272
272
  end
273
273
  end
274
+
275
+ context "when an ID is specified which can't be included in a valid URI" do
276
+ let(:id) { '`' }
277
+
278
+ it "doesn't raise an error" do
279
+ expect { get_response }.to_not raise_error(/bad URI/)
280
+ end
281
+ end
274
282
  end
275
283
 
276
284
  describe '#update' do
@@ -14,7 +14,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
14
14
  {
15
15
 
16
16
  'amount' => 'amount-input',
17
- 'count' => 'count-input',
18
17
  'created_at' => 'created_at-input',
19
18
  'currency' => 'currency-input',
20
19
  'day_of_month' => 'day_of_month-input',
@@ -40,7 +39,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
40
39
  'subscriptions' => {
41
40
 
42
41
  'amount' => 'amount-input',
43
- 'count' => 'count-input',
44
42
  'created_at' => 'created_at-input',
45
43
  'currency' => 'currency-input',
46
44
  'day_of_month' => 'day_of_month-input',
@@ -66,7 +64,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
66
64
  {
67
65
 
68
66
  'amount' => 'amount-input',
69
- 'count' => 'count-input',
70
67
  'created_at' => 'created_at-input',
71
68
  'currency' => 'currency-input',
72
69
  'day_of_month' => 'day_of_month-input',
@@ -129,7 +126,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
129
126
  'subscriptions' => [{
130
127
 
131
128
  'amount' => 'amount-input',
132
- 'count' => 'count-input',
133
129
  'created_at' => 'created_at-input',
134
130
  'currency' => 'currency-input',
135
131
  'day_of_month' => 'day_of_month-input',
@@ -162,8 +158,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
162
158
 
163
159
  expect(get_list_response.records.first.amount).to eq('amount-input')
164
160
 
165
- expect(get_list_response.records.first.count).to eq('count-input')
166
-
167
161
  expect(get_list_response.records.first.created_at).to eq('created_at-input')
168
162
 
169
163
  expect(get_list_response.records.first.currency).to eq('currency-input')
@@ -209,7 +203,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
209
203
  'subscriptions' => [{
210
204
 
211
205
  'amount' => 'amount-input',
212
- 'count' => 'count-input',
213
206
  'created_at' => 'created_at-input',
214
207
  'currency' => 'currency-input',
215
208
  'day_of_month' => 'day_of_month-input',
@@ -241,7 +234,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
241
234
  'subscriptions' => [{
242
235
 
243
236
  'amount' => 'amount-input',
244
- 'count' => 'count-input',
245
237
  'created_at' => 'created_at-input',
246
238
  'currency' => 'currency-input',
247
239
  'day_of_month' => 'day_of_month-input',
@@ -289,7 +281,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
289
281
  'subscriptions' => {
290
282
 
291
283
  'amount' => 'amount-input',
292
- 'count' => 'count-input',
293
284
  'created_at' => 'created_at-input',
294
285
  'currency' => 'currency-input',
295
286
  'day_of_month' => 'day_of_month-input',
@@ -331,7 +322,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
331
322
  'subscriptions' => {
332
323
 
333
324
  'amount' => 'amount-input',
334
- 'count' => 'count-input',
335
325
  'created_at' => 'created_at-input',
336
326
  'currency' => 'currency-input',
337
327
  'day_of_month' => 'day_of_month-input',
@@ -371,6 +361,14 @@ describe GoCardlessPro::Services::SubscriptionsService do
371
361
  expect(get_response).to be_nil
372
362
  end
373
363
  end
364
+
365
+ context "when an ID is specified which can't be included in a valid URI" do
366
+ let(:id) { '`' }
367
+
368
+ it "doesn't raise an error" do
369
+ expect { get_response }.to_not raise_error(/bad URI/)
370
+ end
371
+ end
374
372
  end
375
373
 
376
374
  describe '#update' do
@@ -387,7 +385,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
387
385
  'subscriptions' => {
388
386
 
389
387
  'amount' => 'amount-input',
390
- 'count' => 'count-input',
391
388
  'created_at' => 'created_at-input',
392
389
  'currency' => 'currency-input',
393
390
  'day_of_month' => 'day_of_month-input',
@@ -429,7 +426,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
429
426
  'subscriptions' => {
430
427
 
431
428
  'amount' => 'amount-input',
432
- 'count' => 'count-input',
433
429
  'created_at' => 'created_at-input',
434
430
  'currency' => 'currency-input',
435
431
  'day_of_month' => 'day_of_month-input',
@@ -476,7 +472,6 @@ describe GoCardlessPro::Services::SubscriptionsService do
476
472
  'subscriptions' => {
477
473
 
478
474
  'amount' => 'amount-input',
479
- 'count' => 'count-input',
480
475
  'created_at' => 'created_at-input',
481
476
  'currency' => 'currency-input',
482
477
  'day_of_month' => 'day_of_month-input',