Sha256: d52cc4328947fa81aaaa29103ca214d7756c1423d90e995de1fef5d74c537055
Contents?: true
Size: 919 Bytes
Versions: 4
Compression:
Stored size: 919 Bytes
Contents
# frozen_string_literal: true require_relative '../reference/deserializer' module LedgerSync module Ledgers module QuickBooksOnline class DepositLineDetail class Deserializer < QuickBooksOnline::Deserializer references_one :Account, hash_attribute: 'AccountRef', deserializer: Reference::Deserializer references_one :Class, hash_attribute: 'ClassRef', deserializer: Reference::Deserializer attribute(:Entity) do |args = {}| hash = args.fetch(:hash) value = hash.fetch('Entity', nil) unless value.nil? Client.ledger_resource_for( type: value['type'] ).new( ledger_id: value['value'] ) end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems