Sha256: 6653e73a77b84be67f2bc9121f8de2d664d952b1704afbab3556c3379918c806

Contents?: true

Size: 946 Bytes

Versions: 5

Compression:

Stored size: 946 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/ekategorie_zasoba_type'

module MoneyS3
  module Builders
    class EshopZasobaType
      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('IN_Export', data[:in_export]) if data.key? :in_export
        root << build_element('IN_Changed', data[:in_changed]) if data.key? :in_changed
        root << build_element('IN_Deleted', data[:in_deleted]) if data.key? :in_deleted
        root << build_element('CisKarty', data[:cis_karty]) if data.key? :cis_karty
        root << build_element('CisSkladu', data[:cis_skladu]) if data.key? :cis_skladu

        if data.key? :e_skup
          data[:e_skup].each { |i| root << EkategorieZasobaType.new('eSkup', i).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/eshop_zasoba_type.rb
money_s3-0.9.0 lib/money_s3/builders/eshop_zasoba_type.rb
money_s3-0.8.0 lib/money_s3/builders/eshop_zasoba_type.rb
money_s3-0.7.0 lib/money_s3/builders/eshop_zasoba_type.rb
money_s3-0.6.0 lib/money_s3/builders/eshop_zasoba_type.rb