Sha256: 957e2ed80b03490461946ea172057415fbba3cadbbd0aeb22f4ed5f658424d31
Contents?: true
Size: 803 Bytes
Versions: 6
Compression:
Stored size: 803 Bytes
Contents
module MoneyS3 module Parsers class Import2 < MessageType include ParserCore::BaseParser def dod_odb submodel_at(MsgFirmaType, 'DodOdb') end def konec_prij submodel_at(MsgFirmaType, 'KonecPrij') end def polozka array_of_at(MsgPolozType, ['Polozka']) end def nep_platba array_of_at(MessageType, ['NepPlatba']) end def to_h hash = {} hash[:attributes] = attributes hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb' hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij' hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka' hash[:nep_platba] = nep_platba.map(&:to_h) if has? 'NepPlatba' hash super.merge(hash) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems