Class: Myfinance::Resources::Tax
- Defined in:
- lib/myfinance/resources/tax.rb
Overview
A wrapper to Myfinance taxes API
[API] Documentation: https://app.myfinance.com.br/docs/api/taxes
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#find(id) ⇒ Object
Show a tax.
-
#find_all ⇒ Object
List all taxes.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Myfinance::Resources::Base
Instance Method Details
#find(id) ⇒ Object
Show a tax
[API] Method: GET /taxes/:id
Documentation: https://app.myfinance.com.br/docs/api/taxes#get_show
32 33 34 35 36 |
# File 'lib/myfinance/resources/tax.rb', line 32 def find(id) http.get("/taxes/#{id}", body: {}) do |response| respond_with_object(response, "tax") end end |
#find_all ⇒ Object
List all taxes
[API] Method: GET /taxes
Documentation: https://app.myfinance.com.br/docs/api/taxes#get_index
18 19 20 21 22 |
# File 'lib/myfinance/resources/tax.rb', line 18 def find_all http.get("/taxes", body: {}) do |response| respond_with_collection(response) end end |