Class: PapierkramApi::V1::BusinessIntelligence::ExpensesByCategory
- Inherits:
-
Object
- Object
- PapierkramApi::V1::BusinessIntelligence::ExpensesByCategory
- Defined in:
- lib/papierkram_api/v1/business_intelligence/expenses_by_category.rb
Overview
Business Intelligence for Expenses
Instance Method Summary collapse
-
#call(expense_vouchers:, &block) ⇒ <Type>
Calculate the expenses by category.
Instance Method Details
#call(expense_vouchers:, &block) ⇒ <Type>
Calculate the expenses by category
17 18 19 20 21 22 23 24 |
# File 'lib/papierkram_api/v1/business_intelligence/expenses_by_category.rb', line 17 def call(expense_vouchers:, &block) return {} if expense_vouchers.is_a?(Array) && expense_vouchers.empty? validate_expense_vouchers!(expense_vouchers) return results(expense_vouchers, &block) if block results(expense_vouchers) end |