Sha256: ef348f0d06ffed6a78697461836d07d8392722e6614af9537eb73033902777b1

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

require_relative '../currency/serializer'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Account
        class Serializer < QuickBooksOnline::Serializer
          id

          attribute 'Name',
                    resource_attribute: :name
          mapping 'AccountType',
                  resource_attribute: :account_type,
                  hash: Account::TYPES
          mapping 'AccountSubType',
                  resource_attribute: :account_sub_type,
                  hash: Account::SUB_TYPES
          attribute 'AcctNum',
                    resource_attribute: :number
          mapping 'Classification',
                  resource_attribute: :classification,
                  hash: Account::CLASSIFICATIONS
          attribute 'Description',
                    resource_attribute: :description
          attribute 'Active',
                    resource_attribute: :active

          references_one :CurrencyRef,
                         resource_attribute: :currency,
                         serializer: Currency::Serializer
        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/account/serializer.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/account/serializer.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/account/serializer.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/account/serializer.rb