Sha256: a26628f1655ac3cf54c6d5d101962738036c5807cc9e7f9667ecdc0b11c1cc2f

Contents?: true

Size: 833 Bytes

Versions: 1

Compression:

Stored size: 833 Bytes

Contents

module MoneyS3
  module Builders
    class MsgPokDoklType < MessageType
      include ParserCore::BaseBuilder

      def builder
        root = Ox::Element.new(name)
        if data.key? :attributes
          data[:attributes].each { |k, v| root[k] = v }
        end

        super.nodes.each do |n|
          root << n
        end

        if data.key? :adresa
          root << MessageType.new('Adresa', data[:adresa]).builder
        end
        if data.key? :polozka
          data[:polozka].each { |i| root << MessageType.new('Polozka', i).builder }
        end
        if data.key? :uhrada
          data[:uhrada].each { |i| root << MessageType.new('Uhrada', i).builder }
        end
        if data.key? :data
          root << PokDoklType.new('Data', data[:data]).builder
        end

        root
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-1.0.0 lib/money_s3/builders/msg_pok_dokl_type.rb