Class: LedgerSync::Ledgers::QuickBooksOnline::Expense
- Defined in:
- lib/ledger_sync/ledgers/quickbooks_online/expense/searcher.rb,
lib/ledger_sync/ledgers/quickbooks_online/resources/expense.rb,
lib/ledger_sync/ledgers/quickbooks_online/expense/serializer.rb,
lib/ledger_sync/ledgers/quickbooks_online/expense/deserializer.rb,
lib/ledger_sync/ledgers/quickbooks_online/expense/operations/find.rb,
lib/ledger_sync/ledgers/quickbooks_online/expense/operations/create.rb,
lib/ledger_sync/ledgers/quickbooks_online/expense/operations/update.rb
Defined Under Namespace
Modules: Operations Classes: Deserializer, Searcher, Serializer
Constant Summary collapse
- PAYMENT_TYPES =
BillPayment::PAYMENT_TYPES
Constants inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#==, #assign_attribute, #assign_attributes, #changed?, #changes, #class_from_resource_type, inherited, operations, resource_module_str, resource_type, serialize_attribute?, #to_h
Methods included from Mixins::InferClientMixin
Methods included from Util::Mixins::DupableMixin
Methods included from ResourceAttribute::Reference::Many::Mixin
Methods included from ResourceAttribute::Reference::One::Mixin
Methods included from ResourceAttribute::Mixin
#assign_attribute, #assign_attributes, included, #initialize, #resource_attributes, #save, #serialize_attributes
Methods included from Validatable
#valid?, #validate, #validate_or_fail
Instance Method Details
#amount ⇒ Object
30 31 32 |
# File 'lib/ledger_sync/ledgers/quickbooks_online/resources/expense.rb', line 30 def amount line_items.map(&:amount).sum end |
#name ⇒ Object
34 35 36 |
# File 'lib/ledger_sync/ledgers/quickbooks_online/resources/expense.rb', line 34 def name "Purchase: #{amount} #{currency.try(:symbol)}" end |