Sha256: 34ef7b5aadb34f1f8afce22f70b5e7de9f13b0c01f1967a2e31ca385d4aeab01

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

module MoneyS3
  module Parsers
    class MsgKomponentaType < MessageType
      include ParserCore::BaseParser

      def km_karta
        submodel_at(MessageType, 'KmKarta')
      end

      def sklad
        submodel_at(MessageType, 'Sklad')
      end

      def to_h_with_attrs
        hash = ParserCore::HashWithAttributes.new({}, attributes)

        hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
        hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'

        hash
        super.merge(hash)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/parsers/msg_komponenta_type.rb
money_s3-0.11.0 lib/money_s3/parsers/msg_komponenta_type.rb