Sha256: 0224fa7a8cfebfccbcaf5ed408b252944c5165af1997b5dd43c0971be5200d52

Contents?: true

Size: 1.48 KB

Versions: 1

Compression:

Stored size: 1.48 KB

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class PredkontaceDEType
      include BaseBuilder

      def builder
        root = Ox::Element.new(element_name)

        if attributes.key? :zkrat
          element = Ox::Element.new('Zkrat')
          element << attributes[:zkrat] if attributes[:zkrat]
          root << element
        end

        if attributes.key? :popis
          element = Ox::Element.new('Popis')
          element << attributes[:popis] if attributes[:popis]
          root << element
        end

        if attributes.key? :typ
          element = Ox::Element.new('Typ')
          element << attributes[:typ] if attributes[:typ]
          root << element
        end

        if attributes.key? :poh_zak
          element = Ox::Element.new('PohZak')
          element << attributes[:poh_zak] if attributes[:poh_zak]
          root << element
        end

        if attributes.key? :zauct_dph
          element = Ox::Element.new('ZauctDPH')
          element << attributes[:zauct_dph] if attributes[:zauct_dph]
          root << element
        end

        if attributes.key? :cleneni
          element = Ox::Element.new('Cleneni')
          element << attributes[:cleneni] if attributes[:cleneni]
          root << element
        end

        if attributes.key? :pozn
          element = Ox::Element.new('Pozn')
          element << attributes[:pozn] if attributes[:pozn]
          root << element
        end

        root
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.5.0 lib/money_s3/builders/predkontace_de_type.rb