Sha256: 7b81739ef76992053226284910b903687f8086b3717bf88031d6f7db06058ea0

Contents?: true

Size: 502 Bytes

Versions: 1

Compression:

Stored size: 502 Bytes

Contents

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

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

      def data
        submodel_at(InvDoklType, 'Data')
      end

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

        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_inv_dokl_type.rb