belvo 1.1.1 → 1.2.0

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: 92940ff5820a09ee1a7cd694581a1111f6161fe15ba34481c80b4f36c5dd4bfd
4
- data.tar.gz: 6c34e09989c39e0f7e45d569ba359f4e02064b49bede2c8a40c6c4f3fbe71e52
3
+ metadata.gz: d7c835bc36e3ffa4aed0c08effb1c7a7ec0f64b46955f4fb59bd9bd4aabd6e98
4
+ data.tar.gz: 24fa5cb7a3ec5b0581eac4b04b2e58ffa9a08bd332d91512b0d33641a3185264
5
5
  SHA512:
6
- metadata.gz: 7dff5481b7fb7e757527821765e8d6da859b1ba4c737288eba95171363f6dfdb8763600e932271a72bbaa9da663f94d41889cb1d59e6aa60aef299103ed0f1c5
7
- data.tar.gz: c902eecfffea0a1beaeb4fa968b19aa26b57b5fc319cfc73280401952a3c4abd25870a0ec3707e02c4bf39f127b449c8c663d466bfe3f67699f9269d162019e7
6
+ metadata.gz: 7f7843ca0c81834407decbcccc5a136ad29800041c4d5a090cfae523a27521e0aa0e8a44abd69310ad01aa403a80114341e7735ac9168fa53f6345eb1336146e
7
+ data.tar.gz: 1fc654b148a1c0ff31480f593741064371baefef276d7e7df2f70d74fbe95dd8e31e15cf49e109f0468e48060d05d2b923b6a375675cf7c78d6771c1265ef0c3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belvo (1.1.1)
4
+ belvo (1.2.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  typhoeus
@@ -3,6 +3,7 @@
3
3
  require 'date'
4
4
  require 'belvo/options'
5
5
  require 'belvo/utils'
6
+ require 'belvo/exceptions'
6
7
 
7
8
  module Belvo
8
9
  # Represents a consumable REST resource from Belvo API
@@ -185,6 +186,24 @@ module Belvo
185
186
  @endpoint = 'api/transactions/'
186
187
  end
187
188
 
189
+ # List all transactions for specific link id
190
+ # @param id [String] Resource ID
191
+ # @param params [Hash] Extra parameters sent as query strings.
192
+ # @return [Array] List of results when no block is passed.
193
+ # @yield [Hash] Each result to be processed individually.
194
+ # @raise [RequestError] If response code is different than 2XX
195
+ def list(params: nil)
196
+ params = {} if params.nil?
197
+ unless params.key?(:link)
198
+ raise RequestError.new(
199
+ 'Link id required',
200
+ 400,
201
+ 'A link ID is required to list transactions'
202
+ )
203
+ end
204
+ @session.list(@endpoint, params: params)
205
+ end
206
+
188
207
  # Retrieve transactions from an existing link
189
208
  # @param link [String] Link UUID
190
209
  # @param date_from [String] Date string (YYYY-MM-DD)
data/lib/belvo/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Belvo
4
4
  # belvo-ruby current version
5
- VERSION = '1.1.1'
5
+ VERSION = '1.2.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: belvo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Belvo Finance S.L.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-03 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday