Sha256: 67659f09456f8c7654c452821c1084c68d1233ee1125e32399e408794f61c91f

Contents?: true

Size: 809 Bytes

Versions: 6

Compression:

Stored size: 809 Bytes

Contents

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

      def builder
        root = Ox::Element.new(name)
        root = add_attributes_and_namespaces(root)

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

        if data.key? :dod_odb
          root << MsgFirmaType.new('DodOdb', data[:dod_odb]).builder
        end
        if data.key? :konec_prij
          root << MsgFirmaType.new('KonecPrij', data[:konec_prij]).builder
        end
        if data.key? :polozka
          data[:polozka].each { |i| root << MsgPolozType.new('Polozka', i).builder }
        end
        if data.key? :nep_platba
          data[:nep_platba].each { |i| root << MessageType.new('NepPlatba', i).builder }
        end

        root
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/builders/import2.rb
money_s3-2.4.0 lib/money_s3/builders/import2.rb
money_s3-2.3.0 lib/money_s3/builders/import2.rb
money_s3-2.2.0 lib/money_s3/builders/import2.rb
money_s3-2.1.0 lib/money_s3/builders/import2.rb
money_s3-2.0.0 lib/money_s3/builders/import2.rb