Sha256: 4d809ad469a5b1151f5354b3e60dfd87f82411290e64545eec66b5ac255ce8c8

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

module MoneyS3
  module Parsers
    class MsgPolozType < 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_poloz_type.rb
money_s3-0.11.0 lib/money_s3/parsers/msg_poloz_type.rb