Sha256: fab12dbd91df6cbe745b03bf50e1b9904b456f2567d80d648910e6ed0e3ca496

Contents?: true

Size: 869 Bytes

Versions: 4

Compression:

Stored size: 869 Bytes

Contents

# frozen_string_literal: true

require_relative 'account'
require_relative 'currency'
require_relative 'customer'
require_relative 'payment_line_item'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Payment < QuickBooksOnline::Resource
        attribute :amount, type: Type::Integer
        attribute :memo, type: Type::String
        attribute :transaction_date, type: Type::Date
        attribute :exchange_rate, type: Type::Float
        attribute :reference_number, type: Type::String

        references_one :customer, to: Customer
        references_one :deposit_account, to: Account
        references_one :account, to: Account
        references_one :currency, to: Currency

        references_many :line_items, to: PaymentLineItem

        def name
          "Payment: #{amount} #{currency}"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ledger_sync-1.4.4 lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb