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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b7f8335b754a94a4223c81da12e6968e3dfe266a39e3b20e10f2d20a129a3dc
4
- data.tar.gz: 1ac5dc601938bd343f480c391f3951b6e1e8cc2261397c38c540094b6bd78428
3
+ metadata.gz: '08f8c79b4030cd51cf761a4e158721f669b2f5cd2003d8675156f5b956f6445b'
4
+ data.tar.gz: dc16cd3cb2ae3a9c248cd596940a3c2ed6a6c1cfc992ded399afdda299b74d76
5
5
  SHA512:
6
- metadata.gz: 683c82016ad8b0c264d3c76b9559a432986a639645416f6ee82ff7925810c0a004325ddc880841ff6a4f140a268e6b01863a1a395bf1d790f34b43391871e89d
7
- data.tar.gz: a4072bb4ffe6d220deefddcebdef857e0e9c9d06cdd0f6255520b5bbea72223e9a4451c0f93c5dbfc4485c9e2f9dbc43723d5916cd304fd63e02e97225310dd8
6
+ metadata.gz: 53899dee07e04a593907700009de516caafa3cd1d7a98ead7f9156382841e6569e0a1ec05ef0850bdf380f65eedf51c96c4d31b8275ec31ec1d994cde1bd1c67
7
+ data.tar.gz: 226b8b4aec7e9ae60cda79a153f70afb6252d0cec45be354e6dbfc539175e8b945be1ccc715ccef137510164cab52edb017d6f4b91113fa22e6ab70c1bb31903
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belvo (0.15.0)
4
+ belvo (0.16.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  typhoeus
@@ -142,4 +142,4 @@ DEPENDENCIES
142
142
  webmock
143
143
 
144
144
  BUNDLED WITH
145
- 2.1.4
145
+ 2.2.22
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: 'banamex_mx_retail',
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.
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Belvo
4
4
  # belvo-ruby current version
5
- VERSION = '0.15.0'
5
+ VERSION = '0.16.0'
6
6
  end
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.15.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-08-13 00:00:00.000000000 Z
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday