belvo 0.17.2 → 0.18.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: 4f8989d1ceda36ab9e24ffc51abf4c4ae24240bb326c61c6f73334c2e158b91b
4
- data.tar.gz: 6f70b4441db3d4660b6556bc47a50dcc9f13849163f1dcb34bd5c20311ad70a5
3
+ metadata.gz: fbba449f201c38edea545d7fe6872cc9a8c9889e4f80d8d8a40b7b61818cbe63
4
+ data.tar.gz: 5cf8afcb0d4399501fd3164574bc11b809d0b13fb424c903853c5de48af286f8
5
5
  SHA512:
6
- metadata.gz: 63664183b35c4ca87b5420f092a55efe0f1ba4aac5f1d3c6426023328ed84812e30f0da71571671b2a0d7bbce987042a17e15b1962a645ce47621689de8f58e4
7
- data.tar.gz: 9ff161b2584cb17e00101b6b9f19080af9bad061959a931c8e67df894fe974a8db2741d786bcd6ef7733ef3d12dd07c2a2375b1abc897cf441ce6dec70ccd75e
6
+ metadata.gz: ee61c813d1e3ee24c121cbfa153177cd74b651a6f5166c34d233823d2dba0de28a823d572dc25f0be326b488dd5b69a522c203ed3a6fe2175a3ed0731b03dfc7
7
+ data.tar.gz: f13e6b50640906ba4bb72be13f5157eae26be7b5bb23c480ada64574e4e032d762832702bc2fc3f510374cc973995ecfcd90ed097dae6651c77b460d1d168fc8
data/.circleci/config.yml CHANGED
@@ -46,7 +46,8 @@ workflows:
46
46
  - test
47
47
  filters:
48
48
  branches:
49
- ignore: /.*/
49
+ only:
50
+ - master
50
51
  tags:
51
52
  only: /^v.*/
52
53
  context:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belvo (0.17.2)
4
+ belvo (0.18.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  typhoeus
@@ -141,4 +141,4 @@ DEPENDENCIES
141
141
  webmock
142
142
 
143
143
  BUNDLED WITH
144
- 2.1.4
144
+ 2.2.22
data/README.md CHANGED
@@ -96,7 +96,14 @@ end
96
96
 
97
97
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
98
98
 
99
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
99
+ To install this gem onto your local machine, run `bundle exec rake install`.
100
+
101
+ To release a new version:
102
+ - Create a new branch from master.
103
+ - Update the version number in `version.rb`
104
+ - Run `bundle exec rake install` to update `Gemfile.lock` version
105
+ - Create a new pull request for the new version.
106
+ - Once the new version is merged in `master`, create a `tag` matching the new version.
100
107
 
101
108
  ## Contributing
102
109
 
data/lib/belvo/options.rb CHANGED
@@ -115,6 +115,14 @@ module Belvo
115
115
  )
116
116
  end
117
117
 
118
+ # @!class RiskInsights < Faraday::Options
119
+ # Contains configurable properties of a RiskInsights object
120
+ # @!attribute save_data [rw] Should data be persisted or not.
121
+ class RiskInsightsOptions < Faraday::Options.new(
122
+ :save_data
123
+ )
124
+ end
125
+
118
126
  # @!class TaxComplianceStatusOptions < Faraday::Options
119
127
  # Contains configurable properties of a TaxComplianceStatus
120
128
  # @!attribute save_data [rw] Should data be persisted or not.
@@ -360,7 +360,7 @@ module Belvo
360
360
  # Retrieve recurring expenses information from a specific banking link
361
361
  # @param link [String] Link UUID
362
362
  # @param options [RecurringExpensesOptions] Configurable properties
363
- # @return [Hash] created incomes details
363
+ # @return [Hash] created RecurringExpenses details
364
364
  # @raise [RequestError] If response code is different than 2XX
365
365
  def retrieve(link:, options: nil)
366
366
  options = RecurringExpensesOptions.from(options)
@@ -373,6 +373,30 @@ module Belvo
373
373
  end
374
374
  end
375
375
 
376
+ # RiskInsights contain relevant metrics about
377
+ # the credit risk of a Link
378
+ class RiskInsights < Resource
379
+ def initialize(session)
380
+ super(session)
381
+ @endpoint = 'risk-insights/'
382
+ end
383
+
384
+ # Retrieve risk insights information from a specific banking link
385
+ # @param link [String] Link UUID
386
+ # @param options [RiskInsightsOptions] Configurable properties
387
+ # @return [Hash] created RiskInsights details
388
+ # @raise [RequestError] If response code is different than 2XX
389
+ def retrieve(link:, options: nil)
390
+ options = RiskInsightsOptions.from(options)
391
+ body = {
392
+ link: link,
393
+ save_data: options.save_data || true
394
+ }.merge(options)
395
+ body = clean body: body
396
+ @session.post(@endpoint, body)
397
+ end
398
+ end
399
+
376
400
  # A Tax compliance status is the representation of the tax situation
377
401
  # of a person or a business to the tax authority in the country.
378
402
  class TaxComplianceStatus < Resource
data/lib/belvo/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Belvo
4
4
  # belvo-ruby current version
5
- VERSION = '0.17.2'
5
+ VERSION = '0.18.0'
6
6
  end
data/lib/belvo.rb CHANGED
@@ -86,6 +86,12 @@ module Belvo
86
86
  @recurring_expenses = RecurringExpenses.new @session
87
87
  end
88
88
 
89
+ # Provides access to RiskInsights resource
90
+ # @return [RiskInsights]
91
+ def risk_insights
92
+ @risk_insights = RiskInsights.new @session
93
+ end
94
+
89
95
  # Provides access to TaxComplianceStatus resource
90
96
  # @return [TaxComplianceStatus]
91
97
  def tax_compliance_status
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.17.2
4
+ version: 0.18.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: 2021-11-17 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday