Class: LedgerSync::QuickBooksOnline::Expense
- Inherits:
-
Resource
- Object
- Resource
- Resource
- LedgerSync::QuickBooksOnline::Expense
show all
- Defined in:
- lib/ledger_sync/quickbooks_online/expense/searcher.rb,
lib/ledger_sync/quickbooks_online/resources/expense.rb,
lib/ledger_sync/quickbooks_online/expense/serializer.rb,
lib/ledger_sync/quickbooks_online/expense/deserializer.rb,
lib/ledger_sync/quickbooks_online/expense/operations/find.rb,
lib/ledger_sync/quickbooks_online/expense/operations/create.rb,
lib/ledger_sync/quickbooks_online/expense/operations/update.rb
Defined Under Namespace
Modules: Operations
Classes: Deserializer, Searcher, Serializer
Constant Summary
collapse
- PAYMENT_TYPES =
BillPayment::PAYMENT_TYPES
Instance Method Summary
collapse
Instance Method Details
#amount ⇒ Object
29
30
31
|
# File 'lib/ledger_sync/quickbooks_online/resources/expense.rb', line 29
def amount
line_items.inject(0) { |sum, li| sum + li.Amount }
end
|
#name ⇒ Object
33
34
35
|
# File 'lib/ledger_sync/quickbooks_online/resources/expense.rb', line 33
def name
"Purchase: #{amount} #{self.Currency.try(:symbol)}"
end
|