lib/money_s3/builders/valuty.rb in money_s3-0.10.0 vs lib/money_s3/builders/valuty.rb in money_s3-0.11.0

- old
+ new

@@ -1,28 +1,19 @@ -require 'money_s3/builders/base_builder' -require 'money_s3/builders/mena_type' -require 'money_s3/builders/souhrn_dph_type' - module MoneyS3 module Builders class Valuty - include BaseBuilder + 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('Celkem', data[:celkem]) if data.key? :celkem - - if data.key? :mena - root << MenaType.new('Mena', data[:mena]).builder - end - - if data.key? :souhrn_dph - root << SouhrnDPHType.new('SouhrnDPH', data[:souhrn_dph]).builder - end + root << build_element('Zaklad_MJ', data[:zaklad_mj]) if data.key? :zaklad_mj + root << build_element('DPH_MJ', data[:dph_mj]) if data.key? :dph_mj + root << build_element('Zaklad', data[:zaklad]) if data.key? :zaklad + root << build_element('DPH', data[:dph]) if data.key? :dph root end end end \ No newline at end of file