belvo 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/belvo/options.rb +8 -0
- data/lib/belvo/resources.rb +24 -0
- 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: '08f8c79b4030cd51cf761a4e158721f669b2f5cd2003d8675156f5b956f6445b'
|
4
|
+
data.tar.gz: dc16cd3cb2ae3a9c248cd596940a3c2ed6a6c1cfc992ded399afdda299b74d76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53899dee07e04a593907700009de516caafa3cd1d7a98ead7f9156382841e6569e0a1ec05ef0850bdf380f65eedf51c96c4d31b8275ec31ec1d994cde1bd1c67
|
7
|
+
data.tar.gz: 226b8b4aec7e9ae60cda79a153f70afb6252d0cec45be354e6dbfc539175e8b945be1ccc715ccef137510164cab52edb017d6f4b91113fa22e6ab70c1bb31903
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -75,7 +75,7 @@ belvo = Belvo::Client.new(
|
|
75
75
|
|
76
76
|
begin
|
77
77
|
new_link = belvo.links.register( # Creating the link
|
78
|
-
institution: '
|
78
|
+
institution: 'erebor_mx_retail',
|
79
79
|
username: 'janedoe',
|
80
80
|
password: 'super-secret',
|
81
81
|
options: { access_mode: Belvo::Link::AccessMode::SINGLE }
|
data/lib/belvo/options.rb
CHANGED
@@ -107,6 +107,14 @@ module Belvo
|
|
107
107
|
)
|
108
108
|
end
|
109
109
|
|
110
|
+
# @!class RecurringExpensesOptions < Faraday::Options
|
111
|
+
# Contains configurable properties of a Recurring Expense
|
112
|
+
# @!attribute save_data [rw] Should data be persisted or not.
|
113
|
+
class RecurringExpensesOptions < Faraday::Options.new(
|
114
|
+
:save_data
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
110
118
|
# @!class TaxComplianceStatusOptions < Faraday::Options
|
111
119
|
# Contains configurable properties of a TaxComplianceStatus
|
112
120
|
# @!attribute save_data [rw] Should data be persisted or not.
|
data/lib/belvo/resources.rb
CHANGED
@@ -349,6 +349,30 @@ module Belvo
|
|
349
349
|
end
|
350
350
|
end
|
351
351
|
|
352
|
+
# Recurring Expenses contain a resume of one year
|
353
|
+
# of Transactions inside an Account.
|
354
|
+
class RecurringExpenses < Resource
|
355
|
+
def initialize(session)
|
356
|
+
super(session)
|
357
|
+
@endpoint = 'recurring-expenses/'
|
358
|
+
end
|
359
|
+
|
360
|
+
# Retrieve recurring expenses information from a specific banking link
|
361
|
+
# @param link [String] Link UUID
|
362
|
+
# @param options [RecurringExpensesOptions] Configurable properties
|
363
|
+
# @return [Hash] created incomes details
|
364
|
+
# @raise [RequestError] If response code is different than 2XX
|
365
|
+
def retrieve(link:, options: nil)
|
366
|
+
options = RecurringExpensesOptions.from(options)
|
367
|
+
body = {
|
368
|
+
link: link,
|
369
|
+
save_data: options.save_data || true
|
370
|
+
}.merge(options)
|
371
|
+
body = clean body: body
|
372
|
+
@session.post(@endpoint, body)
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
352
376
|
# A Tax compliance status is the representation of the tax situation
|
353
377
|
# of a person or a business to the tax authority in the country.
|
354
378
|
class TaxComplianceStatus < Resource
|
data/lib/belvo/version.rb
CHANGED
data/lib/belvo.rb
CHANGED
@@ -80,6 +80,12 @@ module Belvo
|
|
80
80
|
@invoices = Invoice.new @session
|
81
81
|
end
|
82
82
|
|
83
|
+
# Provides access to RecurringExpenses resource
|
84
|
+
# @return [RecurringExpense]
|
85
|
+
def recurring_expenses
|
86
|
+
@recurring_expenses = RecurringExpenses.new @session
|
87
|
+
end
|
88
|
+
|
83
89
|
# Provides access to TaxComplianceStatus resource
|
84
90
|
# @return [TaxComplianceStatus]
|
85
91
|
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.16.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
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|