Sha256: 283b7af272fa417d2d7376cae74a5307b3c32671610cb1b32f9b91259dcf8146

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

module MoneyS3
  module Builders
    class ZauctovaniDPHDetype
      include ParserCore::BaseBuilder

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

        root << build_element('Zkrat', data[:zkrat], data[:zkrat_attributes]) if data.key? :zkrat
        root << build_element('Typ', data[:typ], data[:typ_attributes]) if data.key? :typ
        root << build_element('Popis', data[:popis], data[:popis_attributes]) if data.key? :popis
        root << build_element('PohDSS', data[:poh_dss], data[:poh_dss_attributes]) if data.key? :poh_dss
        root << build_element('PohDZS', data[:poh_dzs], data[:poh_dzs_attributes]) if data.key? :poh_dzs
        root << build_element('Pozn', data[:pozn], data[:pozn_attributes]) if data.key? :pozn
        if data.key? :seznam_obdobi_dph
          element = Ox::Element.new('SeznamObdobiDPH')
          data[:seznam_obdobi_dph].each { |i| element << ObdobiDPH2.new('ObdobiDPH', i).builder }
          root << element
        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/zauctovani_dph_detype.rb