Sha256: 79721b340111091fbd6a0b84ed33bd4c2cf6fba5acf9c878e6ce0a8af458458f

Contents?: true

Size: 1.39 KB

Versions: 5

Compression:

Stored size: 1.39 KB

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class NormPolozIDType
      include 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('Popis', data[:popis]) if data.key? :popis
        root << build_element('Zkratka', data[:zkratka]) if data.key? :zkratka
        root << build_element('Cena', data[:cena]) if data.key? :cena
        root << build_element('CenaTyp', data[:cena_typ]) if data.key? :cena_typ
        root << build_element('SazbaDPH', data[:sazba_dph]) if data.key? :sazba_dph
        root << build_element('TextMJ', data[:text_mj]) if data.key? :text_mj
        root << build_element('PocetMJ', data[:pocet_mj]) if data.key? :pocet_mj
        root << build_element('PrKont', data[:pr_kont]) if data.key? :pr_kont
        root << build_element('Cleneni', data[:cleneni]) if data.key? :cleneni
        root << build_element('Stred', data[:stred]) if data.key? :stred
        root << build_element('Zakazka', data[:zakazka]) if data.key? :zakazka
        root << build_element('Cinnost', data[:cinnost]) if data.key? :cinnost
        root << build_element('Poznamka', data[:poznamka]) if data.key? :poznamka

        root
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/builders/norm_poloz_id_type.rb
money_s3-0.9.0 lib/money_s3/builders/norm_poloz_id_type.rb
money_s3-0.8.0 lib/money_s3/builders/norm_poloz_id_type.rb
money_s3-0.7.0 lib/money_s3/builders/norm_poloz_id_type.rb
money_s3-0.6.0 lib/money_s3/builders/norm_poloz_id_type.rb