belvo 0.17.2 → 0.18.0
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 +4 -4
- data/.circleci/config.yml +2 -1
- data/Gemfile.lock +2 -2
- data/README.md +8 -1
- data/lib/belvo/options.rb +8 -0
- data/lib/belvo/resources.rb +25 -1
- data/lib/belvo/version.rb +1 -1
- data/lib/belvo.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbba449f201c38edea545d7fe6872cc9a8c9889e4f80d8d8a40b7b61818cbe63
|
4
|
+
data.tar.gz: 5cf8afcb0d4399501fd3164574bc11b809d0b13fb424c903853c5de48af286f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee61c813d1e3ee24c121cbfa153177cd74b651a6f5166c34d233823d2dba0de28a823d572dc25f0be326b488dd5b69a522c203ed3a6fe2175a3ed0731b03dfc7
|
7
|
+
data.tar.gz: f13e6b50640906ba4bb72be13f5157eae26be7b5bb23c480ada64574e4e032d762832702bc2fc3f510374cc973995ecfcd90ed097dae6651c77b460d1d168fc8
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
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`.
|
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.
|
data/lib/belvo/resources.rb
CHANGED
@@ -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
|
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
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.
|
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-
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|