Sha256: f853bda53d387a7b43cf30f125016f8a306520952f2347b4783dfd8c197d8046

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module Adaptors
    module QuickBooksOnline
      module DepositLineItem
        class LedgerSerializer < QuickBooksOnline::LedgerSerializer
          id

          attribute ledger_attribute: 'DetailType' do
            'DepositLineDetail'
          end

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

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

          attribute ledger_attribute: 'DepositLineDetail.Entity',
                    resource_attribute: :entity,
                    type: LedgerSerializerType::EntityReferenceType

          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/deposit_line_item/ledger_serializer.rb
ledger_sync-1.3.4 lib/ledger_sync/adaptors/quickbooks_online/deposit_line_item/ledger_serializer.rb
ledger_sync-1.3.3 lib/ledger_sync/adaptors/quickbooks_online/deposit_line_item/ledger_serializer.rb