Class: Belvo::TaxStatus
Overview
A Tax status is the representation of the tax situation of a person or a business to the tax authority in the country.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ TaxStatus
constructor
A new instance of TaxStatus.
- #resume(_session_id, _token, _link: nil) ⇒ Object
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve tax status information from a specific fiscal link.
Methods inherited from Resource
#clean, #delete, #detail, #list
Constructor Details
#initialize(session) ⇒ TaxStatus
Returns a new instance of TaxStatus.
563 564 565 566 |
# File 'lib/belvo/resources.rb', line 563 def initialize(session) super(session) @endpoint = 'api/tax-status/' end |
Instance Method Details
#resume(_session_id, _token, _link: nil) ⇒ Object
585 586 587 588 |
# File 'lib/belvo/resources.rb', line 585 def resume(_session_id, _token, _link: nil) raise NotImplementedError \ 'TaxRetentions does not support resuming a session.' end |
#retrieve(link:, options: nil) ⇒ Hash
Retrieve tax status information from a specific fiscal link.
573 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/belvo/resources.rb', line 573 def retrieve(link:, options: nil) = TaxStatusOptions.from() body = { link: link, token: .token, save_data: .save_data || true, attach_pdf: .attach_pdf }.merge() body = clean body: body @session.post(@endpoint, body) end |