Sha256: 9757a77fa76c34d6109982206449c497e3a12627d66ac446d0c9a6724fa0ebc0

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

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

      def adresa
        submodel_at(MessageType, 'Adresa')
      end

      def polozka
        array_of_at(MessageType, ['Polozka'])
      end

      def to_h
        hash = {}
        hash[:attributes] = attributes

        hash[:adresa] = adresa.to_h if has? 'Adresa'
        hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'

        hash
        super.merge(hash)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/msg_pohledavka_type.rb
money_s3-2.4.0 lib/money_s3/parsers/msg_pohledavka_type.rb
money_s3-2.3.0 lib/money_s3/parsers/msg_pohledavka_type.rb
money_s3-2.2.0 lib/money_s3/parsers/msg_pohledavka_type.rb
money_s3-2.1.0 lib/money_s3/parsers/msg_pohledavka_type.rb
money_s3-2.0.0 lib/money_s3/parsers/msg_pohledavka_type.rb