Sha256: 4bf6d5b14ac13ad8e72b9388fa9769f3b8f9fd422894699c84531e353b02699e

Contents?: true

Size: 702 Bytes

Versions: 5

Compression:

Stored size: 702 Bytes

Contents

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

      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
      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/valuty.rb
money_s3-0.9.0 lib/money_s3/builders/valuty.rb
money_s3-0.8.0 lib/money_s3/builders/valuty.rb
money_s3-0.7.0 lib/money_s3/builders/valuty.rb
money_s3-0.6.0 lib/money_s3/builders/valuty.rb