gocardless_pro 2.28.0 → 2.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gocardless_pro/client.rb +6 -1
  3. data/lib/gocardless_pro/resources/bank_authorisation.rb +0 -4
  4. data/lib/gocardless_pro/resources/block.rb +66 -0
  5. data/lib/gocardless_pro/resources/event.rb +20 -0
  6. data/lib/gocardless_pro/resources/institution.rb +2 -0
  7. data/lib/gocardless_pro/resources/redirect_flow.rb +2 -0
  8. data/lib/gocardless_pro/services/billing_request_templates_service.rb +3 -3
  9. data/lib/gocardless_pro/services/billing_requests_service.rb +1 -1
  10. data/lib/gocardless_pro/services/blocks_service.rb +223 -0
  11. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +1 -1
  12. data/lib/gocardless_pro/services/creditors_service.rb +1 -1
  13. data/lib/gocardless_pro/services/currency_exchange_rates_service.rb +1 -1
  14. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +1 -1
  15. data/lib/gocardless_pro/services/customers_service.rb +1 -1
  16. data/lib/gocardless_pro/services/events_service.rb +1 -1
  17. data/lib/gocardless_pro/services/instalment_schedules_service.rb +1 -1
  18. data/lib/gocardless_pro/services/institutions_service.rb +1 -1
  19. data/lib/gocardless_pro/services/mandate_import_entries_service.rb +1 -1
  20. data/lib/gocardless_pro/services/mandates_service.rb +1 -1
  21. data/lib/gocardless_pro/services/payments_service.rb +1 -1
  22. data/lib/gocardless_pro/services/payout_items_service.rb +1 -1
  23. data/lib/gocardless_pro/services/payouts_service.rb +1 -1
  24. data/lib/gocardless_pro/services/refunds_service.rb +1 -1
  25. data/lib/gocardless_pro/services/subscriptions_service.rb +1 -1
  26. data/lib/gocardless_pro/services/tax_rates_service.rb +1 -1
  27. data/lib/gocardless_pro/services/webhooks_service.rb +1 -1
  28. data/lib/gocardless_pro/version.rb +1 -1
  29. data/lib/gocardless_pro.rb +3 -0
  30. data/spec/resources/billing_request_template_spec.rb +1 -1
  31. data/spec/resources/block_spec.rb +560 -0
  32. data/spec/resources/institution_spec.rb +5 -0
  33. data/spec/resources/redirect_flow_spec.rb +9 -0
  34. data/spec/services/billing_request_templates_service_spec.rb +3 -3
  35. data/spec/services/blocks_service_spec.rb +823 -0
  36. data/spec/services/institutions_service_spec.rb +9 -0
  37. data/spec/services/redirect_flows_service_spec.rb +9 -0
  38. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed30309cc0e32f7ec8fe6136447f06a06b7f6b42fea7ccadd35313cd2a5ca0a1
4
- data.tar.gz: cd88fcef318324644a91336c487e2704283e12120c938bc48bfbba5cbaa36919
3
+ metadata.gz: ae7ce2e7f276bbb9d36b64093e6be341e1f76325a7ced35710e8276360c2df22
4
+ data.tar.gz: 554e6c6c947c94c76d250fafabdc3867b65ca218269ce70395fe5a0079fdb5e5
5
5
  SHA512:
6
- metadata.gz: af3903ffe4dc7425072a286abc535fa379fd8d293307112d6f26b66d1ed283b7f8a440cddf833f255b13507b09ed5671d43e30773b1b50305c736ae30c84520b
7
- data.tar.gz: c1f579f53780f7c1f96464810e2a5186fddf1d041af62f7cf975fa6d7e4304c1d149b74ff9fdf3d07985e41bb1ee46eb71ac67d556aab49343e85650e02f06b7
6
+ metadata.gz: fb5865c593f89c21fe7b1d9ea930c2683286753f9635dcb0e70350ac4fd5af02345a6c472c8b9940484242f6f39cfd05fcdbca0c5a96c3e7cad66f2bf5cf42e6
7
+ data.tar.gz: 55605f88d457f5a0e8bb3445b9a796dbe1332a94eb3c1ab86318c4bce49d4ab88fcaf6a27ed67c01e4195f6b73eb40ede88d86f3f5998b09b348eb5e5a7a26d0
@@ -28,6 +28,11 @@ module GoCardlessPro
28
28
  @billing_request_templates ||= Services::BillingRequestTemplatesService.new(@api_service)
29
29
  end
30
30
 
31
+ # Access to the service for block to make API calls
32
+ def blocks
33
+ @blocks ||= Services::BlocksService.new(@api_service)
34
+ end
35
+
31
36
  # Access to the service for creditor to make API calls
32
37
  def creditors
33
38
  @creditors ||= Services::CreditorsService.new(@api_service)
@@ -193,7 +198,7 @@ module GoCardlessPro
193
198
  'User-Agent' => user_agent.to_s,
194
199
  'Content-Type' => 'application/json',
195
200
  'GoCardless-Client-Library' => 'gocardless-pro-ruby',
196
- 'GoCardless-Client-Version' => '2.28.0',
201
+ 'GoCardless-Client-Version' => '2.29.0',
197
202
  },
198
203
  }
199
204
  end
@@ -75,10 +75,6 @@ module GoCardlessPro
75
75
  def institution
76
76
  @links['institution']
77
77
  end
78
-
79
- def payment_request
80
- @links['payment_request']
81
- end
82
78
  end
83
79
  end
84
80
  end
@@ -0,0 +1,66 @@
1
+ # encoding: utf-8
2
+
3
+ #
4
+ # This client is automatically generated from a template and JSON schema definition.
5
+ # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
6
+ #
7
+
8
+ require 'uri'
9
+
10
+ module GoCardlessPro
11
+ # A module containing classes for each of the resources in the GC Api
12
+ module Resources
13
+ # Represents an instance of a block resource returned from the API
14
+
15
+ # A block object is a simple rule, when matched, pushes a newly created
16
+ # mandate to a blocked state. These details can be an exact match, like a
17
+ # bank account
18
+ # or an email, or a more generic match such as an email domain. New block
19
+ # types may be added
20
+ # over time. Payments and subscriptions can't be created against mandates in
21
+ # blocked state.
22
+ #
23
+ # <p class="notice">
24
+ # Client libraries have not yet been updated for this API but will be
25
+ # released soon.
26
+ # This API is currently only available for approved integrators - please
27
+ # <a href="mailto:help@gocardless.com">get in touch</a> if you would like to
28
+ # use this API.
29
+ # </p>
30
+ class Block
31
+ attr_reader :active
32
+ attr_reader :block_type
33
+ attr_reader :created_at
34
+ attr_reader :id
35
+ attr_reader :reason_description
36
+ attr_reader :reason_type
37
+ attr_reader :resource_reference
38
+ attr_reader :updated_at
39
+
40
+ # Initialize a block resource instance
41
+ # @param object [Hash] an object returned from the API
42
+ def initialize(object, response = nil)
43
+ @object = object
44
+
45
+ @active = object['active']
46
+ @block_type = object['block_type']
47
+ @created_at = object['created_at']
48
+ @id = object['id']
49
+ @reason_description = object['reason_description']
50
+ @reason_type = object['reason_type']
51
+ @resource_reference = object['resource_reference']
52
+ @updated_at = object['updated_at']
53
+ @response = response
54
+ end
55
+
56
+ def api_response
57
+ ApiResponse.new(@response)
58
+ end
59
+
60
+ # Provides the block resource as a hash of all its readable attributes
61
+ def to_h
62
+ @object
63
+ end
64
+ end
65
+ end
66
+ end
@@ -60,6 +60,18 @@ module GoCardlessPro
60
60
  @links = links || {}
61
61
  end
62
62
 
63
+ def bank_authorisation
64
+ @links['bank_authorisation']
65
+ end
66
+
67
+ def billing_request
68
+ @links['billing_request']
69
+ end
70
+
71
+ def billing_request_flow
72
+ @links['billing_request_flow']
73
+ end
74
+
63
75
  def creditor
64
76
  @links['creditor']
65
77
  end
@@ -80,6 +92,10 @@ module GoCardlessPro
80
92
  @links['mandate']
81
93
  end
82
94
 
95
+ def mandate_request_mandate
96
+ @links['mandate_request_mandate']
97
+ end
98
+
83
99
  def new_customer_bank_account
84
100
  @links['new_customer_bank_account']
85
101
  end
@@ -104,6 +120,10 @@ module GoCardlessPro
104
120
  @links['payment']
105
121
  end
106
122
 
123
+ def payment_request_payment
124
+ @links['payment_request_payment']
125
+ end
126
+
107
127
  def payout
108
128
  @links['payout']
109
129
  end
@@ -15,6 +15,7 @@ module GoCardlessPro
15
15
  # Institutions that are supported when creating [Bank
16
16
  # Authorisations](#billing-requests-bank-authorisations).
17
17
  class Institution
18
+ attr_reader :country_code
18
19
  attr_reader :icon_url
19
20
  attr_reader :id
20
21
  attr_reader :logo_url
@@ -25,6 +26,7 @@ module GoCardlessPro
25
26
  def initialize(object, response = nil)
26
27
  @object = object
27
28
 
29
+ @country_code = object['country_code']
28
30
  @icon_url = object['icon_url']
29
31
  @id = object['id']
30
32
  @logo_url = object['logo_url']
@@ -49,6 +49,7 @@ module GoCardlessPro
49
49
  attr_reader :created_at
50
50
  attr_reader :description
51
51
  attr_reader :id
52
+ attr_reader :mandate_reference
52
53
  attr_reader :metadata
53
54
  attr_reader :redirect_url
54
55
  attr_reader :scheme
@@ -65,6 +66,7 @@ module GoCardlessPro
65
66
  @description = object['description']
66
67
  @id = object['id']
67
68
  @links = object['links']
69
+ @mandate_reference = object['mandate_reference']
68
70
  @metadata = object['metadata']
69
71
  @redirect_url = object['redirect_url']
70
72
  @scheme = object['scheme']
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -93,12 +93,12 @@ module GoCardlessPro
93
93
 
94
94
  # Updates a Billing Request Template, which will affect all future Billing
95
95
  # Requests created by this template.
96
- # Example URL: /billing_requests/:identity
96
+ # Example URL: /billing_request_templates/:identity
97
97
  #
98
98
  # @param identity # Unique identifier, beginning with "BRQ".
99
99
  # @param options [Hash] parameters as a hash, under a params key.
100
100
  def update(identity, options = {})
101
- path = sub_url('/billing_requests/:identity', 'identity' => identity)
101
+ path = sub_url('/billing_request_templates/:identity', 'identity' => identity)
102
102
 
103
103
  params = options.delete(:params) || {}
104
104
  options[:params] = {}
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -0,0 +1,223 @@
1
+ require_relative './base_service'
2
+
3
+ # encoding: utf-8
4
+ #
5
+ # This client is automatically generated from a template and JSON schema definition.
6
+ # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
7
+ #
8
+
9
+ module GoCardlessPro
10
+ module Services
11
+ # Service for making requests to the Block endpoints
12
+ class BlocksService < BaseService
13
+ # Creates a new Block of a given type. By default it will be active.
14
+ # Example URL: /blocks
15
+ # @param options [Hash] parameters as a hash, under a params key.
16
+ def create(options = {})
17
+ path = '/blocks'
18
+
19
+ params = options.delete(:params) || {}
20
+ options[:params] = {}
21
+ options[:params][envelope_key] = params
22
+
23
+ options[:retry_failures] = true
24
+
25
+ begin
26
+ response = make_request(:post, path, options)
27
+
28
+ # Response doesn't raise any errors until #body is called
29
+ response.tap(&:body)
30
+ rescue InvalidStateError => e
31
+ if e.idempotent_creation_conflict?
32
+ case @api_service.on_idempotency_conflict
33
+ when :raise
34
+ raise IdempotencyConflict, e.error
35
+ when :fetch
36
+ return get(e.conflicting_resource_id)
37
+ end
38
+ end
39
+
40
+ raise e
41
+ end
42
+
43
+ return if response.body.nil?
44
+
45
+ Resources::Block.new(unenvelope_body(response.body), response)
46
+ end
47
+
48
+ # Retrieves the details of an existing block.
49
+ # Example URL: /blocks/:identity
50
+ #
51
+ # @param identity # Unique identifier, beginning with "BLC".
52
+ # @param options [Hash] parameters as a hash, under a params key.
53
+ def get(identity, options = {})
54
+ path = sub_url('/blocks/:identity', 'identity' => identity)
55
+
56
+ options[:retry_failures] = true
57
+
58
+ response = make_request(:get, path, options)
59
+
60
+ return if response.body.nil?
61
+
62
+ Resources::Block.new(unenvelope_body(response.body), response)
63
+ end
64
+
65
+ # Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
66
+ # blocks.
67
+ # Example URL: /blocks
68
+ # @param options [Hash] parameters as a hash, under a params key.
69
+ def list(options = {})
70
+ path = '/blocks'
71
+
72
+ options[:retry_failures] = true
73
+
74
+ response = make_request(:get, path, options)
75
+
76
+ ListResponse.new(
77
+ response: response,
78
+ unenveloped_body: unenvelope_body(response.body),
79
+ resource_class: Resources::Block
80
+ )
81
+ end
82
+
83
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
84
+ #
85
+ # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
86
+ # Otherwise they will be the body of the request.
87
+ def all(options = {})
88
+ Paginator.new(
89
+ service: self,
90
+ options: options
91
+ ).enumerator
92
+ end
93
+
94
+ # Disables a block so that it no longer will prevent mandate creation.
95
+ # Example URL: /blocks/:identity/actions/disable
96
+ #
97
+ # @param identity # Unique identifier, beginning with "BLC".
98
+ # @param options [Hash] parameters as a hash, under a params key.
99
+ def disable(identity, options = {})
100
+ path = sub_url('/blocks/:identity/actions/disable', 'identity' => identity)
101
+
102
+ params = options.delete(:params) || {}
103
+ options[:params] = {}
104
+ options[:params]['data'] = params
105
+
106
+ options[:retry_failures] = false
107
+
108
+ begin
109
+ response = make_request(:post, path, options)
110
+
111
+ # Response doesn't raise any errors until #body is called
112
+ response.tap(&:body)
113
+ rescue InvalidStateError => e
114
+ if e.idempotent_creation_conflict?
115
+ case @api_service.on_idempotency_conflict
116
+ when :raise
117
+ raise IdempotencyConflict, e.error
118
+ when :fetch
119
+ return get(e.conflicting_resource_id)
120
+ end
121
+ end
122
+
123
+ raise e
124
+ end
125
+
126
+ return if response.body.nil?
127
+
128
+ Resources::Block.new(unenvelope_body(response.body), response)
129
+ end
130
+
131
+ # Enables a previously disabled block so that it will prevent mandate creation
132
+ # Example URL: /blocks/:identity/actions/enable
133
+ #
134
+ # @param identity # Unique identifier, beginning with "BLC".
135
+ # @param options [Hash] parameters as a hash, under a params key.
136
+ def enable(identity, options = {})
137
+ path = sub_url('/blocks/:identity/actions/enable', 'identity' => identity)
138
+
139
+ params = options.delete(:params) || {}
140
+ options[:params] = {}
141
+ options[:params]['data'] = params
142
+
143
+ options[:retry_failures] = false
144
+
145
+ begin
146
+ response = make_request(:post, path, options)
147
+
148
+ # Response doesn't raise any errors until #body is called
149
+ response.tap(&:body)
150
+ rescue InvalidStateError => e
151
+ if e.idempotent_creation_conflict?
152
+ case @api_service.on_idempotency_conflict
153
+ when :raise
154
+ raise IdempotencyConflict, e.error
155
+ when :fetch
156
+ return get(e.conflicting_resource_id)
157
+ end
158
+ end
159
+
160
+ raise e
161
+ end
162
+
163
+ return if response.body.nil?
164
+
165
+ Resources::Block.new(unenvelope_body(response.body), response)
166
+ end
167
+
168
+ # Creates new blocks for a given reference. By default blocks will be active.
169
+ # Returns 201 if at least one block was created. Returns 200 if there were no
170
+ # new
171
+ # blocks created.
172
+ # Example URL: /block_by_ref
173
+ # @param options [Hash] parameters as a hash, under a params key.
174
+ def block_by_ref(options = {})
175
+ path = '/block_by_ref'
176
+
177
+ params = options.delete(:params) || {}
178
+ options[:params] = {}
179
+ options[:params]['data'] = params
180
+
181
+ options[:retry_failures] = false
182
+
183
+ begin
184
+ response = make_request(:post, path, options)
185
+
186
+ # Response doesn't raise any errors until #body is called
187
+ response.tap(&:body)
188
+ rescue InvalidStateError => e
189
+ if e.idempotent_creation_conflict?
190
+ case @api_service.on_idempotency_conflict
191
+ when :raise
192
+ raise IdempotencyConflict, e.error
193
+ when :fetch
194
+ return get(e.conflicting_resource_id)
195
+ end
196
+ end
197
+
198
+ raise e
199
+ end
200
+
201
+ ListResponse.new(
202
+ response: response,
203
+ unenveloped_body: unenvelope_body(response.body),
204
+ resource_class: Resources::Block
205
+ )
206
+ end
207
+
208
+ private
209
+
210
+ # Unenvelope the response of the body using the service's `envelope_key`
211
+ #
212
+ # @param body [Hash]
213
+ def unenvelope_body(body)
214
+ body[envelope_key] || body['data']
215
+ end
216
+
217
+ # return the key which API responses will envelope data under
218
+ def envelope_key
219
+ 'blocks'
220
+ end
221
+ end
222
+ end
223
+ end
@@ -63,7 +63,7 @@ module GoCardlessPro
63
63
  )
64
64
  end
65
65
 
66
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
66
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
67
67
  #
68
68
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
69
69
  # Otherwise they will be the body of the request.
@@ -63,7 +63,7 @@ module GoCardlessPro
63
63
  )
64
64
  end
65
65
 
66
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
66
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
67
67
  #
68
68
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
69
69
  # Otherwise they will be the body of the request.
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -75,7 +75,7 @@ module GoCardlessPro
75
75
  )
76
76
  end
77
77
 
78
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
78
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
79
79
  #
80
80
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
81
81
  # Otherwise they will be the body of the request.
@@ -63,7 +63,7 @@ module GoCardlessPro
63
63
  )
64
64
  end
65
65
 
66
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
66
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
67
67
  #
68
68
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
69
69
  # Otherwise they will be the body of the request.
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -129,7 +129,7 @@ module GoCardlessPro
129
129
  )
130
130
  end
131
131
 
132
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
132
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
133
133
  #
134
134
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
135
135
  # Otherwise they will be the body of the request.
@@ -27,7 +27,7 @@ module GoCardlessPro
27
27
  )
28
28
  end
29
29
 
30
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
30
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
31
31
  #
32
32
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
33
33
  # Otherwise they will be the body of the request.
@@ -60,7 +60,7 @@ module GoCardlessPro
60
60
  )
61
61
  end
62
62
 
63
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
63
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
64
64
  #
65
65
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
66
66
  # Otherwise they will be the body of the request.
@@ -63,7 +63,7 @@ module GoCardlessPro
63
63
  )
64
64
  end
65
65
 
66
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
66
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
67
67
  #
68
68
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
69
69
  # Otherwise they will be the body of the request.
@@ -68,7 +68,7 @@ module GoCardlessPro
68
68
  )
69
69
  end
70
70
 
71
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
71
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
72
72
  #
73
73
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
74
74
  # Otherwise they will be the body of the request.
@@ -29,7 +29,7 @@ module GoCardlessPro
29
29
  )
30
30
  end
31
31
 
32
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
32
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
33
33
  #
34
34
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
35
35
  # Otherwise they will be the body of the request.
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -79,7 +79,7 @@ module GoCardlessPro
79
79
  )
80
80
  end
81
81
 
82
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
82
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
83
83
  #
84
84
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
85
85
  # Otherwise they will be the body of the request.
@@ -63,7 +63,7 @@ module GoCardlessPro
63
63
  )
64
64
  end
65
65
 
66
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
66
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
67
67
  #
68
68
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
69
69
  # Otherwise they will be the body of the request.
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -28,7 +28,7 @@ module GoCardlessPro
28
28
  )
29
29
  end
30
30
 
31
- # Get a lazily enumerated list of all the items returned. This is simmilar to the `list` method but will paginate for you automatically.
31
+ # Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
32
32
  #
33
33
  # @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
34
34
  # Otherwise they will be the body of the request.
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '2.28.0'.freeze
7
+ VERSION = '2.29.0'.freeze
8
8
  end
@@ -56,6 +56,9 @@ require_relative 'gocardless_pro/services/billing_request_flows_service'
56
56
  require_relative 'gocardless_pro/resources/billing_request_template'
57
57
  require_relative 'gocardless_pro/services/billing_request_templates_service'
58
58
 
59
+ require_relative 'gocardless_pro/resources/block'
60
+ require_relative 'gocardless_pro/services/blocks_service'
61
+
59
62
  require_relative 'gocardless_pro/resources/creditor'
60
63
  require_relative 'gocardless_pro/services/creditors_service'
61
64
 
@@ -466,7 +466,7 @@ describe GoCardlessPro::Resources::BillingRequestTemplate do
466
466
  let(:update_params) { { 'hello' => 'world' } }
467
467
 
468
468
  let!(:stub) do
469
- stub_url = '/billing_requests/:identity'.gsub(':identity', id)
469
+ stub_url = '/billing_request_templates/:identity'.gsub(':identity', id)
470
470
  stub_request(:put, /.*api.gocardless.com#{stub_url}/).to_return(
471
471
  body: {
472
472
  'billing_request_templates' => {