Sha256: b50323336da7003dbf250fa74c300a93bab8d016e172821ce85374eec4abbdf6

Contents?: true

Size: 985 Bytes

Versions: 3

Compression:

Stored size: 985 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module Adaptors
    module QuickBooksOnline
      module ExpenseLineItem
        class LedgerSerializer < QuickBooksOnline::LedgerSerializer
          attribute ledger_attribute: 'Id', resource_attribute: :ledger_id

          attribute ledger_attribute: 'DetailType' do
            'AccountBasedExpenseLineDetail'
          end

          attribute ledger_attribute: 'AccountBasedExpenseLineDetail.AccountRef.value',
                    resource_attribute: 'account.ledger_id'

          attribute ledger_attribute: 'AccountBasedExpenseLineDetail.ClassRef.value',
                    resource_attribute: 'ledger_class.ledger_id'

          attribute ledger_attribute: 'Amount',
                    resource_attribute: :amount,
                    type: LedgerSerializerType::AmountType

          attribute ledger_attribute: 'Description',
                    resource_attribute: :description
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.3.5 lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb
ledger_sync-1.3.4 lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb
ledger_sync-1.3.3 lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb