Class: Belvo::EmploymentRecords
- Defined in:
- lib/belvo/resources.rb
Overview
Employment records
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ EmploymentRecords
constructor
A new instance of EmploymentRecords.
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve employment records from an existing government link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ EmploymentRecords
Returns a new instance of EmploymentRecords.
654 655 656 657 |
# File 'lib/belvo/resources.rb', line 654 def initialize(session) super(session) @endpoint = 'api/employment-records/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve employment records from an existing government link
664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/belvo/resources.rb', line 664 def retrieve(link:, options: nil) = EmploymentRecordsOptions.from() body = { link: link, save_data: .save_data || true, attach_pdf: .attach_pdf }.merge() body = clean body: body @session.post(@endpoint, body) end |