belvo 0.6.1 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8746f7636ac5bd7c67d0041ec84aa9240d9477687d98f826c28ea22135beb9c7
4
- data.tar.gz: 91849cb78edce6d00eb636c29334b6eb4c958cf4e089ce734e5bda2f74fe3f54
3
+ metadata.gz: f7e008d86a0b4f4ff368e9027711fc3b32a81886e8a5f392d5c67f84bb417c89
4
+ data.tar.gz: 7aa7a82b3ee88a0b0cb6f837edaab45996fc8f6eed41024996711cdebd3f9905
5
5
  SHA512:
6
- metadata.gz: 7e9f1c00f82387e356be66ce824cf97b0eb11472e8eb738e5e5db759317e957b9908238187f199b74844587fac9db3f4f4854c7eaf855b58cbf46ee1a395c886
7
- data.tar.gz: 4d88c38fca8ca0e206844f7e0bedd33b323e6fba76f14cc30aa1adee405d252978cd373282952dacb581aede77af9b6db8046078e90c054545b6af88e179bbed
6
+ metadata.gz: a03bc5b178bf8065bdbd8a04eaf94ba627abbabe212c272ec64d782ba4edf804a22eae7e5c75275857501e22d23708eab6efe3521dc0d589a862ce01c61ee7a8
7
+ data.tar.gz: 28f60a6dc881c85b213a64c6881eca73fac7f18659a534e16a3bc6eff5c4013c09db9d635a79c2f3c59af90c5214311559335d989f37f35e401db0273610e29f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belvo (0.6.1)
4
+ belvo (0.6.2)
5
5
  faraday
6
6
  faraday_middleware
7
7
  typhoeus
@@ -120,6 +120,19 @@ module Belvo
120
120
  response.body
121
121
  end
122
122
 
123
+ # Perform a POST request to an API endpoint
124
+ # @param path [String] API endpoint
125
+ # @param id [String] Resource UUID
126
+ # @param data [object] JSON parseable object
127
+ # @return [Hash] Response details
128
+ # @raise [RequestError] If response code is different than 2XX
129
+ def token(path, id, data)
130
+ resource_path = format('%<path>s%<id>s/token/', path: path, id: id)
131
+ response = @session.post(resource_path, data.to_json)
132
+ raise_for_status response
133
+ response.body
134
+ end
135
+
123
136
  # Perform a POST request to an API endpoint
124
137
  # @param path [String] API endpoint
125
138
  # @param data [object] JSON parseable object
@@ -122,6 +122,18 @@ module Belvo
122
122
  body = clean body: body
123
123
  @session.put(@endpoint, id, body)
124
124
  end
125
+
126
+ # Allows to create a token with client-specified scope and short TTL.
127
+ # @param id [String] Link UUID
128
+ # @param scopes [String] Configurable scopes eg: "read_links,write_links"
129
+ # @return [Hash] with a "refresh" and "access" token
130
+ # @raise [RequestError] If response code is different than 2XX
131
+ def token(id:, scopes:)
132
+ body = {
133
+ scopes: scopes
134
+ }
135
+ @session.token(@endpoint, id, body)
136
+ end
125
137
  end
126
138
 
127
139
  # An Account is the representation of a bank account inside a financial
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Belvo
4
4
  # belvo-ruby current version
5
- VERSION = '0.6.1'
5
+ VERSION = '0.6.2'
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: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Belvo Finance S.L.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -176,7 +176,7 @@ metadata:
176
176
  homepage_uri: https://github.com/belvo-finance/belvo-ruby
177
177
  source_code_uri: https://github.com/belvo-finance/belvo-ruby
178
178
  changelog_uri: https://github.com/belvo-finance/belvo-ruby/blob/master/README.md
179
- post_install_message:
179
+ post_install_message:
180
180
  rdoc_options: []
181
181
  require_paths:
182
182
  - lib
@@ -191,8 +191,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  requirements: []
194
- rubygems_version: 3.0.8
195
- signing_key:
194
+ rubygems_version: 3.1.4
195
+ signing_key:
196
196
  specification_version: 4
197
197
  summary: The Ruby gem for the Belvo API
198
198
  test_files: []