Sha256: 8b9ea4e3c764f5653914fe258523da080199f0fdc52f5948f7daddb73b858639

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

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

      def adresa
        submodel_at(MessageType, 'Adresa')
      end

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

      def data
        submodel_at(IntDoklType, 'Data')
      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[:data] = data.to_h if has? 'Data'

        hash
        super.merge(hash)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-1.0.0 lib/money_s3/parsers/msg_int_dokl_type.rb