Sha256: d09f42f1614ca5390b611e76055e7f17843a8a3adf43843e5ced7f23fd0c6f5b

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

module MoneyS3
  module Builders
    class UhradaPduhrada
      include ParserCore::BaseBuilder

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

        root << build_element('Poradi', data[:poradi]) if data.key? :poradi
        root << build_element('Kontace', data[:kontace]) if data.key? :kontace
        root << build_element('Stredisko', data[:stredisko]) if data.key? :stredisko
        root << build_element('Zakazka', data[:zakazka]) if data.key? :zakazka
        root << build_element('Cinnost', data[:cinnost]) if data.key? :cinnost
        root << build_element('Zaklad', data[:zaklad]) if data.key? :zaklad
        root << build_element('DPHZS', data[:dphzs]) if data.key? :dphzs
        root << build_element('DPHSS', data[:dphss]) if data.key? :dphss
        root << build_element('WLZaklady', data[:wl_zaklady]) if data.key? :wl_zaklady
        root << build_element('WLDPH1', data[:wldph1]) if data.key? :wldph1
        root << build_element('WLDPH2', data[:wldph2]) if data.key? :wldph2

        root
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/builders/uhrada_pduhrada.rb
money_s3-0.11.0 lib/money_s3/builders/uhrada_pduhrada.rb