Sha256: ec56dc25779b7b14b46b0f2c3a3992ab1b15e99a88427233c851ceeb27beef3d

Contents?: true

Size: 787 Bytes

Versions: 5

Compression:

Stored size: 787 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/dokl_ref_type'

module MoneyS3
  module Builders
    class KurzRozd
      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('Typ', data[:typ]) if data.key? :typ
        root << build_element('Preceneni', data[:preceneni]) if data.key? :preceneni
        root << build_element('Castka', data[:castka]) if data.key? :castka
        root << build_element('KRPoradi', data[:kr_poradi]) if data.key? :kr_poradi

        if data.key? :doklad
          root << DoklRefType.new('Doklad', data[:doklad]).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/kurz_rozd.rb
money_s3-0.9.0 lib/money_s3/builders/kurz_rozd.rb
money_s3-0.8.0 lib/money_s3/builders/kurz_rozd.rb
money_s3-0.7.0 lib/money_s3/builders/kurz_rozd.rb
money_s3-0.6.0 lib/money_s3/builders/kurz_rozd.rb