module MoneyS3 module Builders class KonecPrijFirmaType include ParserCore::BaseBuilder def builder root = Ox::Element.new(name) root = add_attributes_and_namespaces(root) root << build_element('Nazev', data[:nazev], data[:nazev_attributes]) if data.key? :nazev if data.key? :adresa root << AdresaType.new('Adresa', data[:adresa]).builder end root << build_element('GUID', data[:guid], data[:guid_attributes]) if data.key? :guid if data.key? :tel root << TelefonType.new('Tel', data[:tel]).builder end if data.key? :fax root << TelefonType.new('Fax', data[:fax]).builder end if data.key? :mobil root << TelefonType.new('Mobil', data[:mobil]).builder end root << build_element('EMail', data[:e_mail], data[:e_mail_attributes]) if data.key? :e_mail root << build_element('EMailKopie', data[:e_mail_kopie], data[:e_mail_kopie_attributes]) if data.key? :e_mail_kopie root << build_element('EMailSkryt', data[:e_mail_skryt], data[:e_mail_skryt_attributes]) if data.key? :e_mail_skryt root << build_element('WWW', data[:www], data[:www_attributes]) if data.key? :www root << build_element('ICO', data[:ico], data[:ico_attributes]) if data.key? :ico root << build_element('DIC', data[:dic], data[:dic_attributes]) if data.key? :dic root << build_element('DICSK', data[:dicsk], data[:dicsk_attributes]) if data.key? :dicsk root << build_element('PlatceDPH', data[:platce_dph], data[:platce_dph_attributes]) if data.key? :platce_dph root << build_element('FyzOsoba', data[:fyz_osoba], data[:fyz_osoba_attributes]) if data.key? :fyz_osoba root << build_element('Banka', data[:banka], data[:banka_attributes]) if data.key? :banka root << build_element('Ucet', data[:ucet], data[:ucet_attributes]) if data.key? :ucet root << build_element('KodBanky', data[:kod_banky], data[:kod_banky_attributes]) if data.key? :kod_banky root << build_element('VSymb', data[:v_symb], data[:v_symb_attributes]) if data.key? :v_symb root << build_element('SpecSym', data[:spec_sym], data[:spec_sym_attributes]) if data.key? :spec_sym root << build_element('KodPartn', data[:kod_partn], data[:kod_partn_attributes]) if data.key? :kod_partn root << build_element('ISDOC', data[:isdoc], data[:isdoc_attributes]) if data.key? :isdoc if data.key? :eshop root << Eshop2.new('eshop', data[:eshop]).builder end if data.key? :seznam_bank_spojeni element = Ox::Element.new('SeznamBankSpojeni') data[:seznam_bank_spojeni].each { |i| element << BankSpojeniType.new('BankSpojeni', i).builder } root << element end if data.key? :vlajky root << Vlajky.new('Vlajky', data[:vlajky]).builder end root end end end end