Sha256: 0d8f1ca9fb54ed8e16f901668e8e62d0d951e3a6df1cd19cd755007c72390f36

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/nep_platidlo_type'

module MoneyS3
  module Builders
    class NepPlatbaType
      include BaseBuilder

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

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

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

        if attributes.key? :platidlo
          root << NepPlatidloType.new(attributes[:platidlo], 'Platidlo').builder
        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/nep_platba_type.rb