belvo 0.5.0 → 0.6.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: cd5733a59d486efcc6a6d9e62331a2d6734304bc231e76a19f27a285f7b4c47f
4
- data.tar.gz: 408ae0cb0d7a27e8b4f8f4f8a9b7a7a6b3a6d08539d5f938e328af137f26bcb4
3
+ metadata.gz: 5c1dcb245d74ddc040cd5e0f820ff9ecefa761e0135ee16fe5b08a6bf89dae26
4
+ data.tar.gz: d2a243cd3f86fd7bb295a8fd85dab1e7226aa95f60ee5d8c30a5b3905dcd9918
5
5
  SHA512:
6
- metadata.gz: 84f3d999c67f38697b1c18973a70503787a2a4009d41b4bb7d9525bfbc8844451cdfb7f9b1bb71b150df5e1cf76f6164c527d92c4129d49696a80f5526662fbf
7
- data.tar.gz: ff94f967de7f91895bc8323f0c6265d405991f4ce547582b920ec657b4c76926225adb6ddade63c72fe3b0e4f1c2e80ea6a7d12764c4ac9d7c3d83c93c6583dc
6
+ metadata.gz: 96a5bafd4609f9502bb7d228b7fab60064560d35b10b78250c525981e797b2d052cce96e89ce3aa5edfd017a6fbafde24a44c6f96a8f63b392f27ec3c0b599d7
7
+ data.tar.gz: ac7a333d2ef31d24d9563dd63eabbfb9cc187140df38b6c0044d641a748d2d6326690d0222152e66810464371c43dcf92310677bbf32662c603e555558701a18
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belvo (0.5.0)
4
+ belvo (0.6.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  typhoeus
@@ -74,7 +74,7 @@ GEM
74
74
  term-ansicolor (1.7.1)
75
75
  tins (~> 1.0)
76
76
  thor (1.0.1)
77
- tins (1.24.1)
77
+ tins (1.25.0)
78
78
  sync
79
79
  typhoeus (1.4.0)
80
80
  ethon (>= 0.9.0)
@@ -86,5 +86,11 @@ module Belvo
86
86
  def institutions
87
87
  @institutions = Institution.new @session
88
88
  end
89
+
90
+ # Provides access to WidgetToken resource
91
+ # @return [WidgetToken]
92
+ def widget_token
93
+ @widget_token = WidgetToken.new @session
94
+ end
89
95
  end
90
96
  end
@@ -11,6 +11,9 @@ require 'belvo/exceptions'
11
11
  module Belvo
12
12
  # Describes a Belvo API session
13
13
  class APISession
14
+ attr_reader :key_id
15
+ attr_reader :key_password
16
+
14
17
  # @param url [String] Belvo API host url
15
18
  # @return [Faraday::Connection]
16
19
  def initialize(url)
@@ -383,4 +383,23 @@ module Belvo
383
383
  @endpoint = 'institutions/'
384
384
  end
385
385
  end
386
+
387
+ # A WidgetToken is a limited scope with short time to live token, that
388
+ # contains access and refresh keys to allow you embedding Belvo's Connect
389
+ # Widget into your app.
390
+ class WidgetToken < Resource
391
+ def initialize(session)
392
+ super(session)
393
+ @endpoint = 'token/'
394
+ end
395
+
396
+ def create
397
+ body = {
398
+ id: @session.key_id,
399
+ password: @session.key_password,
400
+ scopes: 'read_institutions,write_links,read_links,delete_links'
401
+ }
402
+ @session.post(@endpoint, body)
403
+ end
404
+ end
386
405
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Belvo
4
4
  # belvo-ruby current version
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.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: 0.5.0
4
+ version: 0.6.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: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -191,8 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  requirements: []
194
- rubyforge_project:
195
- rubygems_version: 2.7.6
194
+ rubygems_version: 3.1.2
196
195
  signing_key:
197
196
  specification_version: 4
198
197
  summary: The Ruby gem for the Belvo API