money_s3 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -50
  3. data/lib/money_s3/hash_with_attributes.rb +40 -0
  4. data/lib/money_s3/parsers/adresa_type.rb +2 -3
  5. data/lib/money_s3/parsers/alternativa_prislusenstvi_type.rb +4 -5
  6. data/lib/money_s3/parsers/bank_dokl.rb +9 -10
  7. data/lib/money_s3/parsers/bank_spojeni_type.rb +2 -3
  8. data/lib/money_s3/parsers/bank_ucet_pokladna_type.rb +2 -3
  9. data/lib/money_s3/parsers/base_parser.rb +1 -3
  10. data/lib/money_s3/parsers/castky.rb +2 -3
  11. data/lib/money_s3/parsers/cena_type.rb +2 -3
  12. data/lib/money_s3/parsers/cenova_hladina.rb +3 -4
  13. data/lib/money_s3/parsers/cenova_hladina_type.rb +3 -4
  14. data/lib/money_s3/parsers/child_kusovnik_type.rb +3 -4
  15. data/lib/money_s3/parsers/cinnost.rb +2 -3
  16. data/lib/money_s3/parsers/clen_dph.rb +2 -3
  17. data/lib/money_s3/parsers/dalsi_sazba.rb +2 -3
  18. data/lib/money_s3/parsers/data.rb +4 -5
  19. data/lib/money_s3/parsers/def_sub_pol_type.rb +3 -4
  20. data/lib/money_s3/parsers/dl_prij.rb +13 -14
  21. data/lib/money_s3/parsers/dl_vyd.rb +13 -14
  22. data/lib/money_s3/parsers/dodavka_type.rb +2 -3
  23. data/lib/money_s3/parsers/dokl_ref_type.rb +3 -4
  24. data/lib/money_s3/parsers/doklad.rb +2 -3
  25. data/lib/money_s3/parsers/doklad_firma_type.rb +10 -11
  26. data/lib/money_s3/parsers/doklad_hraz.rb +3 -4
  27. data/lib/money_s3/parsers/e_shop_info.rb +2 -3
  28. data/lib/money_s3/parsers/eet_type.rb +4 -5
  29. data/lib/money_s3/parsers/ekategorie_type.rb +4 -5
  30. data/lib/money_s3/parsers/ekategorie_zasoba_type.rb +3 -4
  31. data/lib/money_s3/parsers/error_info_type.rb +2 -3
  32. data/lib/money_s3/parsers/eshop.rb +2 -3
  33. data/lib/money_s3/parsers/eshop_zasoba_type.rb +3 -4
  34. data/lib/money_s3/parsers/fakt_prij.rb +21 -22
  35. data/lib/money_s3/parsers/fakt_vyd.rb +21 -22
  36. data/lib/money_s3/parsers/faktura_type.rb +21 -22
  37. data/lib/money_s3/parsers/firma.rb +14 -15
  38. data/lib/money_s3/parsers/firma_type.rb +14 -15
  39. data/lib/money_s3/parsers/header_kusovnik_type.rb +3 -4
  40. data/lib/money_s3/parsers/import.rb +9 -10
  41. data/lib/money_s3/parsers/int_dokl.rb +9 -10
  42. data/lib/money_s3/parsers/inv_dokl_type.rb +3 -4
  43. data/lib/money_s3/parsers/km_karta.rb +6 -7
  44. data/lib/money_s3/parsers/km_karta_type.rb +6 -7
  45. data/lib/money_s3/parsers/komponenta_kusovnik_type.rb +4 -5
  46. data/lib/money_s3/parsers/komponenta_type.rb +5 -6
  47. data/lib/money_s3/parsers/konec_prij_firma_type.rb +7 -8
  48. data/lib/money_s3/parsers/kurz_listek.rb +3 -4
  49. data/lib/money_s3/parsers/kurz_rozd.rb +3 -4
  50. data/lib/money_s3/parsers/kurz_type.rb +2 -3
  51. data/lib/money_s3/parsers/kusovnik_type.rb +5 -6
  52. data/lib/money_s3/parsers/mena_type.rb +2 -3
  53. data/lib/money_s3/parsers/message_type.rb +4 -5
  54. data/lib/money_s3/parsers/moje_firma_type.rb +8 -9
  55. data/lib/money_s3/parsers/money_data.rb +50 -51
  56. data/lib/money_s3/parsers/msg_fakt_poloz_type.rb +3 -4
  57. data/lib/money_s3/parsers/msg_firma_type.rb +4 -5
  58. data/lib/money_s3/parsers/msg_poloz_type.rb +4 -5
  59. data/lib/money_s3/parsers/mz_priplatek.rb +3 -4
  60. data/lib/money_s3/parsers/mzda_type.rb +5 -6
  61. data/lib/money_s3/parsers/mzdove_obdobi_type.rb +3 -4
  62. data/lib/money_s3/parsers/nab_prij.rb +16 -17
  63. data/lib/money_s3/parsers/nab_vyd.rb +16 -17
  64. data/lib/money_s3/parsers/nep_platba_type.rb +3 -4
  65. data/lib/money_s3/parsers/nep_platidlo_type.rb +2 -3
  66. data/lib/money_s3/parsers/nepritomnost_type.rb +2 -3
  67. data/lib/money_s3/parsers/neskl_polozka.rb +3 -4
  68. data/lib/money_s3/parsers/norm_poloz_id_type.rb +2 -3
  69. data/lib/money_s3/parsers/norm_poloz_ud_type.rb +2 -3
  70. data/lib/money_s3/parsers/obdobi_dph.rb +2 -3
  71. data/lib/money_s3/parsers/obj_prij.rb +16 -17
  72. data/lib/money_s3/parsers/obj_vyd.rb +16 -17
  73. data/lib/money_s3/parsers/osoba_type.rb +6 -7
  74. data/lib/money_s3/parsers/parametr_karta_type.rb +3 -4
  75. data/lib/money_s3/parsers/parametr_type.rb +2 -3
  76. data/lib/money_s3/parsers/pc.rb +9 -10
  77. data/lib/money_s3/parsers/pohledavka_type.rb +10 -11
  78. data/lib/money_s3/parsers/pok_dokl.rb +10 -11
  79. data/lib/money_s3/parsers/pol_faktury_type.rb +6 -7
  80. data/lib/money_s3/parsers/pol_inv_dokl_type.rb +6 -7
  81. data/lib/money_s3/parsers/pol_objedn_type.rb +8 -9
  82. data/lib/money_s3/parsers/pol_skl_dokl_type.rb +7 -8
  83. data/lib/money_s3/parsers/popt_prij.rb +16 -17
  84. data/lib/money_s3/parsers/popt_vyd.rb +16 -17
  85. data/lib/money_s3/parsers/prac_pomer.rb +2 -3
  86. data/lib/money_s3/parsers/predkontace.rb +2 -3
  87. data/lib/money_s3/parsers/predkontace_de_type.rb +2 -3
  88. data/lib/money_s3/parsers/prepr_dopln_udaj_type.rb +2 -3
  89. data/lib/money_s3/parsers/prepravce_type.rb +2 -3
  90. data/lib/money_s3/parsers/prevodka.rb +13 -14
  91. data/lib/money_s3/parsers/prijemka.rb +13 -14
  92. data/lib/money_s3/parsers/prodejka.rb +13 -14
  93. data/lib/money_s3/parsers/reference.rb +4 -5
  94. data/lib/money_s3/parsers/reference_type.rb +2 -3
  95. data/lib/money_s3/parsers/rozuct_poloz_id_type.rb +2 -3
  96. data/lib/money_s3/parsers/rozuct_poloz_ud_type.rb +3 -4
  97. data/lib/money_s3/parsers/seznam_bank_dokl.rb +3 -4
  98. data/lib/money_s3/parsers/seznam_cen_hladin.rb +3 -4
  99. data/lib/money_s3/parsers/seznam_cinnosti.rb +3 -4
  100. data/lib/money_s3/parsers/seznam_clen_dph.rb +3 -4
  101. data/lib/money_s3/parsers/seznam_dl_prij.rb +3 -4
  102. data/lib/money_s3/parsers/seznam_dl_vyd.rb +3 -4
  103. data/lib/money_s3/parsers/seznam_fakt_prij.rb +3 -4
  104. data/lib/money_s3/parsers/seznam_fakt_vyd.rb +3 -4
  105. data/lib/money_s3/parsers/seznam_firem.rb +3 -4
  106. data/lib/money_s3/parsers/seznam_int_dokl.rb +3 -4
  107. data/lib/money_s3/parsers/seznam_inv_dokl.rb +3 -4
  108. data/lib/money_s3/parsers/seznam_km_karta.rb +3 -4
  109. data/lib/money_s3/parsers/seznam_kurz_listku.rb +3 -4
  110. data/lib/money_s3/parsers/seznam_mezd.rb +3 -4
  111. data/lib/money_s3/parsers/seznam_nab_prij.rb +3 -4
  112. data/lib/money_s3/parsers/seznam_nab_vyd.rb +3 -4
  113. data/lib/money_s3/parsers/seznam_obj_prij.rb +3 -4
  114. data/lib/money_s3/parsers/seznam_obj_vyd.rb +3 -4
  115. data/lib/money_s3/parsers/seznam_pok_dokl.rb +3 -4
  116. data/lib/money_s3/parsers/seznam_popt_prij.rb +3 -4
  117. data/lib/money_s3/parsers/seznam_popt_vyd.rb +3 -4
  118. data/lib/money_s3/parsers/seznam_predkontaci.rb +3 -4
  119. data/lib/money_s3/parsers/seznam_predkontaci_de.rb +3 -4
  120. data/lib/money_s3/parsers/seznam_prevodka.rb +3 -4
  121. data/lib/money_s3/parsers/seznam_prijemka.rb +3 -4
  122. data/lib/money_s3/parsers/seznam_prodejka.rb +3 -4
  123. data/lib/money_s3/parsers/seznam_skladu.rb +3 -4
  124. data/lib/money_s3/parsers/seznam_stredisek.rb +3 -4
  125. data/lib/money_s3/parsers/seznam_typ_kusovnik.rb +3 -4
  126. data/lib/money_s3/parsers/seznam_uc_osnov.rb +3 -4
  127. data/lib/money_s3/parsers/seznam_vazeb.rb +3 -4
  128. data/lib/money_s3/parsers/seznam_vydejka.rb +3 -4
  129. data/lib/money_s3/parsers/seznam_vyrobka.rb +3 -4
  130. data/lib/money_s3/parsers/seznam_zak_kusovnik.rb +3 -4
  131. data/lib/money_s3/parsers/seznam_zakazka.rb +3 -4
  132. data/lib/money_s3/parsers/seznam_zamestnancu.rb +3 -4
  133. data/lib/money_s3/parsers/seznam_zasoba.rb +3 -4
  134. data/lib/money_s3/parsers/sk_doklad_firma_type.rb +9 -10
  135. data/lib/money_s3/parsers/sklad.rb +5 -6
  136. data/lib/money_s3/parsers/sklad_type.rb +5 -6
  137. data/lib/money_s3/parsers/skupina_firem_type.rb +2 -3
  138. data/lib/money_s3/parsers/skupina_kusovnik_type.rb +2 -3
  139. data/lib/money_s3/parsers/skupina_zasob_type.rb +7 -8
  140. data/lib/money_s3/parsers/souhrn_dph_pol_type.rb +3 -4
  141. data/lib/money_s3/parsers/souhrn_dph_type.rb +3 -4
  142. data/lib/money_s3/parsers/stav_zasoby_type.rb +2 -3
  143. data/lib/money_s3/parsers/stredisko.rb +2 -3
  144. data/lib/money_s3/parsers/sub_pol_obj_type.rb +3 -4
  145. data/lib/money_s3/parsers/subpol_inv_d_type.rb +3 -4
  146. data/lib/money_s3/parsers/telefon_type.rb +2 -3
  147. data/lib/money_s3/parsers/typ_priplatku_type.rb +2 -3
  148. data/lib/money_s3/parsers/typ_zasilky_type.rb +2 -3
  149. data/lib/money_s3/parsers/uc_osnova_type.rb +2 -3
  150. data/lib/money_s3/parsers/uc_pohyb_type.rb +2 -3
  151. data/lib/money_s3/parsers/ucet.rb +2 -3
  152. data/lib/money_s3/parsers/ucty_pohybu_type.rb +2 -3
  153. data/lib/money_s3/parsers/uhrada_pduhrada.rb +2 -3
  154. data/lib/money_s3/parsers/uhrada_type.rb +8 -9
  155. data/lib/money_s3/parsers/valuty.rb +4 -5
  156. data/lib/money_s3/parsers/valuty_hraz.rb +3 -4
  157. data/lib/money_s3/parsers/valuty_uhr.rb +3 -4
  158. data/lib/money_s3/parsers/vazba_type.rb +3 -4
  159. data/lib/money_s3/parsers/vlajka_type.rb +2 -3
  160. data/lib/money_s3/parsers/vlajky.rb +4 -5
  161. data/lib/money_s3/parsers/vydejka.rb +13 -14
  162. data/lib/money_s3/parsers/vyrobka.rb +13 -14
  163. data/lib/money_s3/parsers/vyrobni_cislo.rb +2 -3
  164. data/lib/money_s3/parsers/vyrobni_cislo_type.rb +2 -3
  165. data/lib/money_s3/parsers/vysledek_odesl.rb +2 -3
  166. data/lib/money_s3/parsers/vzor_komponenta_type.rb +5 -6
  167. data/lib/money_s3/parsers/zakazka.rb +5 -6
  168. data/lib/money_s3/parsers/zamestnanec_type.rb +3 -4
  169. data/lib/money_s3/parsers/zasoba.rb +14 -15
  170. data/lib/money_s3/parsers/zauctovani_dph_detype.rb +3 -4
  171. data/lib/money_s3/parsers/zauctovani_dph_type.rb +3 -4
  172. data/lib/money_s3/parsers/zavazek_type.rb +9 -10
  173. data/lib/money_s3/string_with_attributes.rb +28 -0
  174. data/lib/money_s3.rb +2 -1
  175. data/money_s3.gemspec +1 -1
  176. metadata +4 -3
  177. data/lib/money_s3/with_attributes.rb +0 -13
@@ -21,9 +21,8 @@ module MoneyS3
21
21
  at 'ErrorDescription'
22
22
  end
23
23
 
24
- def to_h
25
- hash = WithAttributes.new({})
26
- hash.attributes = attributes
24
+ def to_h_with_attrs
25
+ hash = HashWithAttributes.new({}, attributes)
27
26
 
28
27
  hash[:error_type_coded] = error_type_coded if has? 'ErrorTypeCoded'
29
28
  hash[:error_type_other] = error_type_other if has? 'ErrorTypeOther'
@@ -45,9 +45,8 @@ module MoneyS3
45
45
  at 'IN_DSkupZkratka'
46
46
  end
47
47
 
48
- def to_h
49
- hash = WithAttributes.new({})
50
- hash.attributes = attributes
48
+ def to_h_with_attrs
49
+ hash = HashWithAttributes.new({}, attributes)
51
50
 
52
51
  hash[:in_export] = in_export if has? 'IN_Export'
53
52
  hash[:in_changed] = in_changed if has? 'IN_Changed'
@@ -30,16 +30,15 @@ module MoneyS3
30
30
  array_of_at(EkategorieZasobaType, ['eSkup'])
31
31
  end
32
32
 
33
- def to_h
34
- hash = WithAttributes.new({})
35
- hash.attributes = attributes
33
+ def to_h_with_attrs
34
+ hash = HashWithAttributes.new({}, attributes)
36
35
 
37
36
  hash[:in_export] = in_export if has? 'IN_Export'
38
37
  hash[:in_changed] = in_changed if has? 'IN_Changed'
39
38
  hash[:in_deleted] = in_deleted if has? 'IN_Deleted'
40
39
  hash[:cis_karty] = cis_karty if has? 'CisKarty'
41
40
  hash[:cis_skladu] = cis_skladu if has? 'CisSkladu'
42
- hash[:e_skup] = e_skup.map(&:to_h) if has? 'eSkup'
41
+ hash[:e_skup] = e_skup.map(&:to_h_with_attrs) if has? 'eSkup'
43
42
 
44
43
  hash
45
44
  end
@@ -390,9 +390,8 @@ module MoneyS3
390
390
  array_of_at(String, ['Dokumenty', 'Dokument'])
391
391
  end
392
392
 
393
- def to_h
394
- hash = WithAttributes.new({})
395
- hash.attributes = attributes
393
+ def to_h_with_attrs
394
+ hash = HashWithAttributes.new({}, attributes)
396
395
 
397
396
  hash[:doklad] = doklad if has? 'Doklad'
398
397
  hash[:ev_cis_dokl] = ev_cis_dokl if has? 'EvCisDokl'
@@ -466,25 +465,25 @@ module MoneyS3
466
465
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
467
466
  hash[:pojisteno] = pojisteno if has? 'Pojisteno'
468
467
  hash[:celkem] = celkem if has? 'Celkem'
469
- hash[:valuty] = valuty.to_h if has? 'Valuty'
470
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
471
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
472
- hash[:import] = import.to_h if has? 'Import'
473
- hash[:eshop] = eshop.to_h if has? 'eshop'
474
- hash[:prepravce] = prepravce.to_h if has? 'Prepravce'
475
- hash[:typ_zasillky] = typ_zasillky.to_h if has? 'TypZasillky'
476
- hash[:prepr_vyplatne] = prepr_vyplatne.to_h if has? 'Prepr_Vyplatne'
477
- hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h if has? 'Prepr_UhradaDobirky'
478
- hash[:prepr_trida] = prepr_trida.to_h if has? 'Prepr_Trida'
479
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
480
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
481
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
482
- hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h) if has? 'Prepr_SeznamSluzeb'
483
- hash[:seznam_polozek] = seznam_polozek.map(&:to_h) if has? 'SeznamPolozek'
484
- hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h) if has? 'SeznamZalPolozek'
485
- hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h) if has? 'SeznamUhrad'
486
- hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h) if has? 'SeznamNepPlateb'
487
- hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h) if has? 'SeznamVazeb'
468
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
469
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
470
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
471
+ hash[:import] = import.to_h_with_attrs if has? 'Import'
472
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
473
+ hash[:prepravce] = prepravce.to_h_with_attrs if has? 'Prepravce'
474
+ hash[:typ_zasillky] = typ_zasillky.to_h_with_attrs if has? 'TypZasillky'
475
+ hash[:prepr_vyplatne] = prepr_vyplatne.to_h_with_attrs if has? 'Prepr_Vyplatne'
476
+ hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h_with_attrs if has? 'Prepr_UhradaDobirky'
477
+ hash[:prepr_trida] = prepr_trida.to_h_with_attrs if has? 'Prepr_Trida'
478
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
479
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
480
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
481
+ hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h_with_attrs) if has? 'Prepr_SeznamSluzeb'
482
+ hash[:seznam_polozek] = seznam_polozek.map(&:to_h_with_attrs) if has? 'SeznamPolozek'
483
+ hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h_with_attrs) if has? 'SeznamZalPolozek'
484
+ hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h_with_attrs) if has? 'SeznamUhrad'
485
+ hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h_with_attrs) if has? 'SeznamNepPlateb'
486
+ hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h_with_attrs) if has? 'SeznamVazeb'
488
487
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
489
488
 
490
489
  hash
@@ -390,9 +390,8 @@ module MoneyS3
390
390
  array_of_at(String, ['Dokumenty', 'Dokument'])
391
391
  end
392
392
 
393
- def to_h
394
- hash = WithAttributes.new({})
395
- hash.attributes = attributes
393
+ def to_h_with_attrs
394
+ hash = HashWithAttributes.new({}, attributes)
396
395
 
397
396
  hash[:doklad] = doklad if has? 'Doklad'
398
397
  hash[:ev_cis_dokl] = ev_cis_dokl if has? 'EvCisDokl'
@@ -466,25 +465,25 @@ module MoneyS3
466
465
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
467
466
  hash[:pojisteno] = pojisteno if has? 'Pojisteno'
468
467
  hash[:celkem] = celkem if has? 'Celkem'
469
- hash[:valuty] = valuty.to_h if has? 'Valuty'
470
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
471
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
472
- hash[:import] = import.to_h if has? 'Import'
473
- hash[:eshop] = eshop.to_h if has? 'eshop'
474
- hash[:prepravce] = prepravce.to_h if has? 'Prepravce'
475
- hash[:typ_zasillky] = typ_zasillky.to_h if has? 'TypZasillky'
476
- hash[:prepr_vyplatne] = prepr_vyplatne.to_h if has? 'Prepr_Vyplatne'
477
- hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h if has? 'Prepr_UhradaDobirky'
478
- hash[:prepr_trida] = prepr_trida.to_h if has? 'Prepr_Trida'
479
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
480
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
481
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
482
- hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h) if has? 'Prepr_SeznamSluzeb'
483
- hash[:seznam_polozek] = seznam_polozek.map(&:to_h) if has? 'SeznamPolozek'
484
- hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h) if has? 'SeznamZalPolozek'
485
- hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h) if has? 'SeznamUhrad'
486
- hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h) if has? 'SeznamNepPlateb'
487
- hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h) if has? 'SeznamVazeb'
468
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
469
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
470
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
471
+ hash[:import] = import.to_h_with_attrs if has? 'Import'
472
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
473
+ hash[:prepravce] = prepravce.to_h_with_attrs if has? 'Prepravce'
474
+ hash[:typ_zasillky] = typ_zasillky.to_h_with_attrs if has? 'TypZasillky'
475
+ hash[:prepr_vyplatne] = prepr_vyplatne.to_h_with_attrs if has? 'Prepr_Vyplatne'
476
+ hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h_with_attrs if has? 'Prepr_UhradaDobirky'
477
+ hash[:prepr_trida] = prepr_trida.to_h_with_attrs if has? 'Prepr_Trida'
478
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
479
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
480
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
481
+ hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h_with_attrs) if has? 'Prepr_SeznamSluzeb'
482
+ hash[:seznam_polozek] = seznam_polozek.map(&:to_h_with_attrs) if has? 'SeznamPolozek'
483
+ hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h_with_attrs) if has? 'SeznamZalPolozek'
484
+ hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h_with_attrs) if has? 'SeznamUhrad'
485
+ hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h_with_attrs) if has? 'SeznamNepPlateb'
486
+ hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h_with_attrs) if has? 'SeznamVazeb'
488
487
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
489
488
 
490
489
  hash
@@ -390,9 +390,8 @@ module MoneyS3
390
390
  array_of_at(String, ['Dokumenty', 'Dokument'])
391
391
  end
392
392
 
393
- def to_h
394
- hash = WithAttributes.new({})
395
- hash.attributes = attributes
393
+ def to_h_with_attrs
394
+ hash = HashWithAttributes.new({}, attributes)
396
395
 
397
396
  hash[:doklad] = doklad if has? 'Doklad'
398
397
  hash[:ev_cis_dokl] = ev_cis_dokl if has? 'EvCisDokl'
@@ -466,25 +465,25 @@ module MoneyS3
466
465
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
467
466
  hash[:pojisteno] = pojisteno if has? 'Pojisteno'
468
467
  hash[:celkem] = celkem if has? 'Celkem'
469
- hash[:valuty] = valuty.to_h if has? 'Valuty'
470
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
471
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
472
- hash[:import] = import.to_h if has? 'Import'
473
- hash[:eshop] = eshop.to_h if has? 'eshop'
474
- hash[:prepravce] = prepravce.to_h if has? 'Prepravce'
475
- hash[:typ_zasillky] = typ_zasillky.to_h if has? 'TypZasillky'
476
- hash[:prepr_vyplatne] = prepr_vyplatne.to_h if has? 'Prepr_Vyplatne'
477
- hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h if has? 'Prepr_UhradaDobirky'
478
- hash[:prepr_trida] = prepr_trida.to_h if has? 'Prepr_Trida'
479
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
480
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
481
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
482
- hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h) if has? 'Prepr_SeznamSluzeb'
483
- hash[:seznam_polozek] = seznam_polozek.map(&:to_h) if has? 'SeznamPolozek'
484
- hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h) if has? 'SeznamZalPolozek'
485
- hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h) if has? 'SeznamUhrad'
486
- hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h) if has? 'SeznamNepPlateb'
487
- hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h) if has? 'SeznamVazeb'
468
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
469
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
470
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
471
+ hash[:import] = import.to_h_with_attrs if has? 'Import'
472
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
473
+ hash[:prepravce] = prepravce.to_h_with_attrs if has? 'Prepravce'
474
+ hash[:typ_zasillky] = typ_zasillky.to_h_with_attrs if has? 'TypZasillky'
475
+ hash[:prepr_vyplatne] = prepr_vyplatne.to_h_with_attrs if has? 'Prepr_Vyplatne'
476
+ hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h_with_attrs if has? 'Prepr_UhradaDobirky'
477
+ hash[:prepr_trida] = prepr_trida.to_h_with_attrs if has? 'Prepr_Trida'
478
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
479
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
480
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
481
+ hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h_with_attrs) if has? 'Prepr_SeznamSluzeb'
482
+ hash[:seznam_polozek] = seznam_polozek.map(&:to_h_with_attrs) if has? 'SeznamPolozek'
483
+ hash[:seznam_zal_polozek] = seznam_zal_polozek.map(&:to_h_with_attrs) if has? 'SeznamZalPolozek'
484
+ hash[:seznam_uhrad] = seznam_uhrad.map(&:to_h_with_attrs) if has? 'SeznamUhrad'
485
+ hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h_with_attrs) if has? 'SeznamNepPlateb'
486
+ hash[:seznam_vazeb] = seznam_vazeb.map(&:to_h_with_attrs) if has? 'SeznamVazeb'
488
487
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
489
488
 
490
489
  hash
@@ -205,9 +205,8 @@ module MoneyS3
205
205
  array_of_at(String, ['Dokumenty', 'Dokument'])
206
206
  end
207
207
 
208
- def to_h
209
- hash = WithAttributes.new({})
210
- hash.attributes = attributes
208
+ def to_h_with_attrs
209
+ hash = HashWithAttributes.new({}, attributes)
211
210
 
212
211
  hash[:guid] = guid if has? 'GUID'
213
212
  hash[:nazev] = nazev if has? 'Nazev'
@@ -244,18 +243,18 @@ module MoneyS3
244
243
  hash[:zprava] = zprava if has? 'Zprava'
245
244
  hash[:poznamka] = poznamka if has? 'Poznamka'
246
245
  hash[:kod_partn] = kod_partn if has? 'KodPartn'
247
- hash[:adresa] = adresa.to_h if has? 'Adresa'
248
- hash[:obch_adresa] = obch_adresa.to_h if has? 'ObchAdresa'
249
- hash[:fakt_adresa] = fakt_adresa.to_h if has? 'FaktAdresa'
250
- hash[:tel] = tel.to_h if has? 'Tel'
251
- hash[:fax] = fax.to_h if has? 'Fax'
252
- hash[:mobil] = mobil.to_h if has? 'Mobil'
253
- hash[:isdoc] = isdoc.to_h if has? 'ISDOC'
254
- hash[:eshop] = eshop.to_h if has? 'eshop'
255
- hash[:skupina] = skupina.to_h if has? 'Skupina'
256
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
257
- hash[:osoba] = osoba.map(&:to_h) if has? 'Osoba'
258
- hash[:seznam_bank_spojeni] = seznam_bank_spojeni.map(&:to_h) if has? 'SeznamBankSpojeni'
246
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
247
+ hash[:obch_adresa] = obch_adresa.to_h_with_attrs if has? 'ObchAdresa'
248
+ hash[:fakt_adresa] = fakt_adresa.to_h_with_attrs if has? 'FaktAdresa'
249
+ hash[:tel] = tel.to_h_with_attrs if has? 'Tel'
250
+ hash[:fax] = fax.to_h_with_attrs if has? 'Fax'
251
+ hash[:mobil] = mobil.to_h_with_attrs if has? 'Mobil'
252
+ hash[:isdoc] = isdoc.to_h_with_attrs if has? 'ISDOC'
253
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
254
+ hash[:skupina] = skupina.to_h_with_attrs if has? 'Skupina'
255
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
256
+ hash[:osoba] = osoba.map(&:to_h_with_attrs) if has? 'Osoba'
257
+ hash[:seznam_bank_spojeni] = seznam_bank_spojeni.map(&:to_h_with_attrs) if has? 'SeznamBankSpojeni'
259
258
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
260
259
 
261
260
  hash
@@ -205,9 +205,8 @@ module MoneyS3
205
205
  array_of_at(String, ['Dokumenty', 'Dokument'])
206
206
  end
207
207
 
208
- def to_h
209
- hash = WithAttributes.new({})
210
- hash.attributes = attributes
208
+ def to_h_with_attrs
209
+ hash = HashWithAttributes.new({}, attributes)
211
210
 
212
211
  hash[:guid] = guid if has? 'GUID'
213
212
  hash[:nazev] = nazev if has? 'Nazev'
@@ -244,18 +243,18 @@ module MoneyS3
244
243
  hash[:zprava] = zprava if has? 'Zprava'
245
244
  hash[:poznamka] = poznamka if has? 'Poznamka'
246
245
  hash[:kod_partn] = kod_partn if has? 'KodPartn'
247
- hash[:adresa] = adresa.to_h if has? 'Adresa'
248
- hash[:obch_adresa] = obch_adresa.to_h if has? 'ObchAdresa'
249
- hash[:fakt_adresa] = fakt_adresa.to_h if has? 'FaktAdresa'
250
- hash[:tel] = tel.to_h if has? 'Tel'
251
- hash[:fax] = fax.to_h if has? 'Fax'
252
- hash[:mobil] = mobil.to_h if has? 'Mobil'
253
- hash[:isdoc] = isdoc.to_h if has? 'ISDOC'
254
- hash[:eshop] = eshop.to_h if has? 'eshop'
255
- hash[:skupina] = skupina.to_h if has? 'Skupina'
256
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
257
- hash[:osoba] = osoba.map(&:to_h) if has? 'Osoba'
258
- hash[:seznam_bank_spojeni] = seznam_bank_spojeni.map(&:to_h) if has? 'SeznamBankSpojeni'
246
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
247
+ hash[:obch_adresa] = obch_adresa.to_h_with_attrs if has? 'ObchAdresa'
248
+ hash[:fakt_adresa] = fakt_adresa.to_h_with_attrs if has? 'FaktAdresa'
249
+ hash[:tel] = tel.to_h_with_attrs if has? 'Tel'
250
+ hash[:fax] = fax.to_h_with_attrs if has? 'Fax'
251
+ hash[:mobil] = mobil.to_h_with_attrs if has? 'Mobil'
252
+ hash[:isdoc] = isdoc.to_h_with_attrs if has? 'ISDOC'
253
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
254
+ hash[:skupina] = skupina.to_h_with_attrs if has? 'Skupina'
255
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
256
+ hash[:osoba] = osoba.map(&:to_h_with_attrs) if has? 'Osoba'
257
+ hash[:seznam_bank_spojeni] = seznam_bank_spojeni.map(&:to_h_with_attrs) if has? 'SeznamBankSpojeni'
259
258
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
260
259
 
261
260
  hash
@@ -86,9 +86,8 @@ module MoneyS3
86
86
  submodel_at(SkupinaKusovnikType, 'Skupina')
87
87
  end
88
88
 
89
- def to_h
90
- hash = WithAttributes.new({})
91
- hash.attributes = attributes
89
+ def to_h_with_attrs
90
+ hash = HashWithAttributes.new({}, attributes)
92
91
 
93
92
  hash[:cislo] = cislo if has? 'Cislo'
94
93
  hash[:druh] = druh if has? 'Druh'
@@ -109,7 +108,7 @@ module MoneyS3
109
108
  hash[:id_uziv] = id_uziv if has? 'IDUziv'
110
109
  hash[:datum_zmeny] = datum_zmeny if has? 'DatumZmeny'
111
110
  hash[:cas_zmeny] = cas_zmeny if has? 'CasZmeny'
112
- hash[:skupina] = skupina.to_h if has? 'Skupina'
111
+ hash[:skupina] = skupina.to_h_with_attrs if has? 'Skupina'
113
112
 
114
113
  hash
115
114
  end
@@ -43,18 +43,17 @@ module MoneyS3
43
43
  array_of_at(ErrorInfoType, ['ErrorInfo'])
44
44
  end
45
45
 
46
- def to_h
47
- hash = WithAttributes.new({})
48
- hash.attributes = attributes
46
+ def to_h_with_attrs
47
+ hash = HashWithAttributes.new({}, attributes)
49
48
 
50
49
  hash[:status] = status if has? 'Status'
51
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
52
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
53
- hash[:data] = data.to_h if has? 'Data'
54
- hash[:reference] = reference.to_h if has? 'Reference'
55
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
56
- hash[:uhrada] = uhrada.map(&:to_h) if has? 'Uhrada'
57
- hash[:error_info] = error_info.map(&:to_h) if has? 'ErrorInfo'
50
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
51
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
52
+ hash[:data] = data.to_h_with_attrs if has? 'Data'
53
+ hash[:reference] = reference.to_h_with_attrs if has? 'Reference'
54
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
55
+ hash[:uhrada] = uhrada.map(&:to_h_with_attrs) if has? 'Uhrada'
56
+ hash[:error_info] = error_info.map(&:to_h_with_attrs) if has? 'ErrorInfo'
58
57
 
59
58
  hash
60
59
  end
@@ -156,9 +156,8 @@ module MoneyS3
156
156
  array_of_at(String, ['Dokumenty', 'Dokument'])
157
157
  end
158
158
 
159
- def to_h
160
- hash = WithAttributes.new({})
161
- hash.attributes = attributes
159
+ def to_h_with_attrs
160
+ hash = HashWithAttributes.new({}, attributes)
162
161
 
163
162
  hash[:doklad] = doklad if has? 'Doklad'
164
163
  hash[:zpusob_uctovani] = zpusob_uctovani if has? 'ZpusobUctovani'
@@ -188,13 +187,13 @@ module MoneyS3
188
187
  hash[:korekce_cen] = korekce_cen if has? 'KorekceCen'
189
188
  hash[:typ_dokl] = typ_dokl if has? 'TypDokl'
190
189
  hash[:celkem] = celkem if has? 'Celkem'
191
- hash[:eet] = eet.to_h if has? 'EET'
192
- hash[:adresa] = adresa.to_h if has? 'Adresa'
193
- hash[:valuty] = valuty.to_h if has? 'Valuty'
194
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
195
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
196
- hash[:rozuct_polozka] = rozuct_polozka.map(&:to_h) if has? 'RozuctPolozka'
197
- hash[:norm_polozka] = norm_polozka.map(&:to_h) if has? 'NormPolozka'
190
+ hash[:eet] = eet.to_h_with_attrs if has? 'EET'
191
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
192
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
193
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
194
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
195
+ hash[:rozuct_polozka] = rozuct_polozka.map(&:to_h_with_attrs) if has? 'RozuctPolozka'
196
+ hash[:norm_polozka] = norm_polozka.map(&:to_h_with_attrs) if has? 'NormPolozka'
198
197
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
199
198
 
200
199
  hash
@@ -34,9 +34,8 @@ module MoneyS3
34
34
  array_of_at(PolInvDoklType, ['Polozka'])
35
35
  end
36
36
 
37
- def to_h
38
- hash = WithAttributes.new({})
39
- hash.attributes = attributes
37
+ def to_h_with_attrs
38
+ hash = HashWithAttributes.new({}, attributes)
40
39
 
41
40
  hash[:cislo_d] = cislo_d if has? 'CisloD'
42
41
  hash[:inv_id] = inv_id if has? 'InvID'
@@ -44,7 +43,7 @@ module MoneyS3
44
43
  hash[:prac] = prac if has? 'Prac'
45
44
  hash[:kontr] = kontr if has? 'Kontr'
46
45
  hash[:poznamka] = poznamka if has? 'Poznamka'
47
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
46
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
48
47
 
49
48
  hash
50
49
  end
@@ -169,9 +169,8 @@ module MoneyS3
169
169
  array_of_at(String, ['Dokumenty', 'Dokument'])
170
170
  end
171
171
 
172
- def to_h
173
- hash = WithAttributes.new({})
174
- hash.attributes = attributes
172
+ def to_h_with_attrs
173
+ hash = HashWithAttributes.new({}, attributes)
175
174
 
176
175
  hash[:popis] = popis if has? 'Popis'
177
176
  hash[:zkrat] = zkrat if has? 'Zkrat'
@@ -208,10 +207,10 @@ module MoneyS3
208
207
  hash[:zboz_kuch] = zboz_kuch if has? 'ZbozKuch'
209
208
  hash[:i_dokl_pol] = i_dokl_pol if has? 'iDoklPol'
210
209
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
211
- hash[:konfigurace] = konfigurace.to_h if has? 'konfigurace'
212
- hash[:definice_ceny] = definice_ceny.to_h if has? 'definiceCeny'
213
- hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'
214
- hash[:seznam_parametru_karty] = seznam_parametru_karty.map(&:to_h) if has? 'SeznamParametruKarty'
210
+ hash[:konfigurace] = konfigurace.to_h_with_attrs if has? 'konfigurace'
211
+ hash[:definice_ceny] = definice_ceny.to_h_with_attrs if has? 'definiceCeny'
212
+ hash[:slozeni] = slozeni.map(&:to_h_with_attrs) if has? 'Slozeni'
213
+ hash[:seznam_parametru_karty] = seznam_parametru_karty.map(&:to_h_with_attrs) if has? 'SeznamParametruKarty'
215
214
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
216
215
 
217
216
  hash
@@ -169,9 +169,8 @@ module MoneyS3
169
169
  array_of_at(String, ['Dokumenty', 'Dokument'])
170
170
  end
171
171
 
172
- def to_h
173
- hash = WithAttributes.new({})
174
- hash.attributes = attributes
172
+ def to_h_with_attrs
173
+ hash = HashWithAttributes.new({}, attributes)
175
174
 
176
175
  hash[:popis] = popis if has? 'Popis'
177
176
  hash[:zkrat] = zkrat if has? 'Zkrat'
@@ -208,10 +207,10 @@ module MoneyS3
208
207
  hash[:zboz_kuch] = zboz_kuch if has? 'ZbozKuch'
209
208
  hash[:i_dokl_pol] = i_dokl_pol if has? 'iDoklPol'
210
209
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
211
- hash[:konfigurace] = konfigurace.to_h if has? 'konfigurace'
212
- hash[:definice_ceny] = definice_ceny.to_h if has? 'definiceCeny'
213
- hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'
214
- hash[:seznam_parametru_karty] = seznam_parametru_karty.map(&:to_h) if has? 'SeznamParametruKarty'
210
+ hash[:konfigurace] = konfigurace.to_h_with_attrs if has? 'konfigurace'
211
+ hash[:definice_ceny] = definice_ceny.to_h_with_attrs if has? 'definiceCeny'
212
+ hash[:slozeni] = slozeni.map(&:to_h_with_attrs) if has? 'Slozeni'
213
+ hash[:seznam_parametru_karty] = seznam_parametru_karty.map(&:to_h_with_attrs) if has? 'SeznamParametruKarty'
215
214
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
216
215
 
217
216
  hash
@@ -15,12 +15,11 @@ module MoneyS3
15
15
  submodel_at(Reference, 'Reference')
16
16
  end
17
17
 
18
- def to_h
19
- hash = WithAttributes.new({})
20
- hash.attributes = attributes
18
+ def to_h_with_attrs
19
+ hash = HashWithAttributes.new({}, attributes)
21
20
 
22
- hash[:child] = child.to_h if has? 'Child'
23
- hash[:reference] = reference.to_h if has? 'Reference'
21
+ hash[:child] = child.to_h_with_attrs if has? 'Child'
22
+ hash[:reference] = reference.to_h_with_attrs if has? 'Reference'
24
23
 
25
24
  hash
26
25
  end
@@ -24,14 +24,13 @@ module MoneyS3
24
24
  submodel_at(SkladType, 'Sklad')
25
25
  end
26
26
 
27
- def to_h
28
- hash = WithAttributes.new({})
29
- hash.attributes = attributes
27
+ def to_h_with_attrs
28
+ hash = HashWithAttributes.new({}, attributes)
30
29
 
31
30
  hash[:poc_mj] = poc_mj if has? 'PocMJ'
32
- hash[:stav_zasoby] = stav_zasoby.to_h if has? 'StavZasoby'
33
- hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
34
- hash[:sklad] = sklad.to_h if has? 'Sklad'
31
+ hash[:stav_zasoby] = stav_zasoby.to_h_with_attrs if has? 'StavZasoby'
32
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
33
+ hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
35
34
 
36
35
  hash
37
36
  end
@@ -88,9 +88,8 @@ module MoneyS3
88
88
  submodel_at(Eshop, 'eshop')
89
89
  end
90
90
 
91
- def to_h
92
- hash = WithAttributes.new({})
93
- hash.attributes = attributes
91
+ def to_h_with_attrs
92
+ hash = HashWithAttributes.new({}, attributes)
94
93
 
95
94
  hash[:nazev] = nazev if has? 'Nazev'
96
95
  hash[:guid] = guid if has? 'GUID'
@@ -107,11 +106,11 @@ module MoneyS3
107
106
  hash[:v_symb] = v_symb if has? 'VSymb'
108
107
  hash[:spec_sym] = spec_sym if has? 'SpecSym'
109
108
  hash[:kod_partn] = kod_partn if has? 'KodPartn'
110
- hash[:adresa] = adresa.to_h if has? 'Adresa'
111
- hash[:tel] = tel.to_h if has? 'Tel'
112
- hash[:fax] = fax.to_h if has? 'Fax'
113
- hash[:mobil] = mobil.to_h if has? 'Mobil'
114
- hash[:eshop] = eshop.to_h if has? 'eshop'
109
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
110
+ hash[:tel] = tel.to_h_with_attrs if has? 'Tel'
111
+ hash[:fax] = fax.to_h_with_attrs if has? 'Fax'
112
+ hash[:mobil] = mobil.to_h_with_attrs if has? 'Mobil'
113
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
115
114
 
116
115
  hash
117
116
  end
@@ -22,14 +22,13 @@ module MoneyS3
22
22
  array_of_at(KurzType, ['SeznamKurzu', 'Kurz'])
23
23
  end
24
24
 
25
- def to_h
26
- hash = WithAttributes.new({})
27
- hash.attributes = attributes
25
+ def to_h_with_attrs
26
+ hash = HashWithAttributes.new({}, attributes)
28
27
 
29
28
  hash[:banka] = banka if has? 'Banka'
30
29
  hash[:por_cislo] = por_cislo if has? 'PorCislo'
31
30
  hash[:datum] = datum if has? 'Datum'
32
- hash[:seznam_kurzu] = seznam_kurzu.map(&:to_h) if has? 'SeznamKurzu'
31
+ hash[:seznam_kurzu] = seznam_kurzu.map(&:to_h_with_attrs) if has? 'SeznamKurzu'
33
32
 
34
33
  hash
35
34
  end
@@ -26,15 +26,14 @@ module MoneyS3
26
26
  submodel_at(DoklRefType, 'Doklad')
27
27
  end
28
28
 
29
- def to_h
30
- hash = WithAttributes.new({})
31
- hash.attributes = attributes
29
+ def to_h_with_attrs
30
+ hash = HashWithAttributes.new({}, attributes)
32
31
 
33
32
  hash[:typ] = typ if has? 'Typ'
34
33
  hash[:preceneni] = preceneni if has? 'Preceneni'
35
34
  hash[:castka] = castka if has? 'Castka'
36
35
  hash[:kr_poradi] = kr_poradi if has? 'KRPoradi'
37
- hash[:doklad] = doklad.to_h if has? 'Doklad'
36
+ hash[:doklad] = doklad.to_h_with_attrs if has? 'Doklad'
38
37
 
39
38
  hash
40
39
  end
@@ -45,9 +45,8 @@ module MoneyS3
45
45
  at 'ValutyProdej'
46
46
  end
47
47
 
48
- def to_h
49
- hash = WithAttributes.new({})
50
- hash.attributes = attributes
48
+ def to_h_with_attrs
49
+ hash = HashWithAttributes.new({}, attributes)
51
50
 
52
51
  hash[:banka] = banka if has? 'Banka'
53
52
  hash[:datum] = datum if has? 'Datum'
@@ -20,13 +20,12 @@ module MoneyS3
20
20
  array_of_at(KomponentaKusovnikType, ['SeznamKomponent', 'Komponenta'])
21
21
  end
22
22
 
23
- def to_h
24
- hash = WithAttributes.new({})
25
- hash.attributes = attributes
23
+ def to_h_with_attrs
24
+ hash = HashWithAttributes.new({}, attributes)
26
25
 
27
- hash[:header] = header.to_h if has? 'Header'
28
- hash[:child] = child.to_h if has? 'Child'
29
- hash[:seznam_komponent] = seznam_komponent.map(&:to_h) if has? 'SeznamKomponent'
26
+ hash[:header] = header.to_h_with_attrs if has? 'Header'
27
+ hash[:child] = child.to_h_with_attrs if has? 'Child'
28
+ hash[:seznam_komponent] = seznam_komponent.map(&:to_h_with_attrs) if has? 'SeznamKomponent'
30
29
 
31
30
  hash
32
31
  end
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Kurs'
18
18
  end
19
19
 
20
- def to_h
21
- hash = WithAttributes.new({})
22
- hash.attributes = attributes
20
+ def to_h_with_attrs
21
+ hash = HashWithAttributes.new({}, attributes)
23
22
 
24
23
  hash[:kod] = kod if has? 'Kod'
25
24
  hash[:mnozstvi] = mnozstvi if has? 'Mnozstvi'