Class: MoneyS3::Builders::Eshop2

Inherits:
Object
  • Object
show all
Includes:
ParserCore::BaseBuilder
Defined in:
lib/money_s3/builders/eshop2.rb

Instance Method Summary collapse

Instance Method Details

#builderObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/money_s3/builders/eshop2.rb', line 6

def builder
  root = Ox::Element.new(name)
  root = add_attributes_and_namespaces(root)

  root << build_element('IN_Export', data[:in_export], data[:in_export_attributes]) if data.key? :in_export
  root << build_element('IN_Changed', data[:in_changed], data[:in_changed_attributes]) if data.key? :in_changed
  root << build_element('IN_Id', data[:in_id], data[:in_id_attributes]) if data.key? :in_id
  root << build_element('IN_Jmeno', data[:in_jmeno], data[:in_jmeno_attributes]) if data.key? :in_jmeno
  root << build_element('IN_Heslo', data[:in_heslo], data[:in_heslo_attributes]) if data.key? :in_heslo
  root << build_element('IN_Dealer', data[:in_dealer], data[:in_dealer_attributes]) if data.key? :in_dealer
  root << build_element('IN_DSkup', data[:in_d_skup], data[:in_d_skup_attributes]) if data.key? :in_d_skup
  root << build_element('IN_IndSlev', data[:in_ind_slev], data[:in_ind_slev_attributes]) if data.key? :in_ind_slev
  root << build_element('IN_Soukrom', data[:in_soukrom], data[:in_soukrom_attributes]) if data.key? :in_soukrom
  root << build_element('IN_DSkupZkratka', data[:in_d_skup_zkratka], data[:in_d_skup_zkratka_attributes]) if data.key? :in_d_skup_zkratka

  root
end