money_s3 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Poznamka'
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[:zkratka] = zkratka if has? 'Zkratka'
25
24
  hash[:nazev] = nazev if has? 'Nazev'
@@ -100,9 +100,8 @@ module MoneyS3
100
100
  submodel_at(UctyPohybuType, 'UcPohybV')
101
101
  end
102
102
 
103
- def to_h
104
- hash = WithAttributes.new({})
105
- hash.attributes = attributes
103
+ def to_h_with_attrs
104
+ hash = HashWithAttributes.new({}, attributes)
106
105
 
107
106
  hash[:zkratka] = zkratka if has? 'Zkratka'
108
107
  hash[:nazev] = nazev if has? 'Nazev'
@@ -122,11 +121,11 @@ module MoneyS3
122
121
  hash[:prodejk_vz] = prodejk_vz if has? 'ProdejkVz'
123
122
  hash[:v_dod_lst_vz] = v_dod_lst_vz if has? 'VDodLstVz'
124
123
  hash[:p_dod_lst_vz] = p_dod_lst_vz if has? 'PDodLstVz'
125
- hash[:konfigurace] = konfigurace.to_h if has? 'konfigurace'
126
- hash[:definice_ceny] = definice_ceny.to_h if has? 'definiceCeny'
127
- hash[:uc_pohyb_m] = uc_pohyb_m.to_h if has? 'UcPohybM'
128
- hash[:uc_pohyb_z] = uc_pohyb_z.to_h if has? 'UcPohybZ'
129
- hash[:uc_pohyb_v] = uc_pohyb_v.to_h if has? 'UcPohybV'
124
+ hash[:konfigurace] = konfigurace.to_h_with_attrs if has? 'konfigurace'
125
+ hash[:definice_ceny] = definice_ceny.to_h_with_attrs if has? 'definiceCeny'
126
+ hash[:uc_pohyb_m] = uc_pohyb_m.to_h_with_attrs if has? 'UcPohybM'
127
+ hash[:uc_pohyb_z] = uc_pohyb_z.to_h_with_attrs if has? 'UcPohybZ'
128
+ hash[:uc_pohyb_v] = uc_pohyb_v.to_h_with_attrs if has? 'UcPohybV'
130
129
 
131
130
  hash
132
131
  end
@@ -26,15 +26,14 @@ module MoneyS3
26
26
  submodel_at(Valuty, 'Valuty')
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[:zaklad_mj] = zaklad_mj if has? 'Zaklad_MJ'
34
33
  hash[:dph_mj] = dph_mj if has? 'DPH_MJ'
35
34
  hash[:zaklad] = zaklad if has? 'Zaklad'
36
35
  hash[:dph] = dph if has? 'DPH'
37
- hash[:valuty] = valuty.to_h if has? 'Valuty'
36
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
38
37
 
39
38
  hash
40
39
  end
@@ -30,16 +30,15 @@ module MoneyS3
30
30
  array_of_at(DalsiSazba, ['SeznamDalsiSazby', 'DalsiSazba'])
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[:zaklad0] = zaklad0 if has? 'Zaklad0'
38
37
  hash[:zaklad5] = zaklad5 if has? 'Zaklad5'
39
38
  hash[:zaklad22] = zaklad22 if has? 'Zaklad22'
40
39
  hash[:dph5] = dph5 if has? 'DPH5'
41
40
  hash[:dph22] = dph22 if has? 'DPH22'
42
- hash[:seznam_dalsi_sazby] = seznam_dalsi_sazby.map(&:to_h) if has? 'SeznamDalsiSazby'
41
+ hash[:seznam_dalsi_sazby] = seznam_dalsi_sazby.map(&:to_h_with_attrs) if has? 'SeznamDalsiSazby'
43
42
 
44
43
  hash
45
44
  end
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Objednano'
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[:zasoba] = zasoba if has? 'Zasoba'
25
24
  hash[:rezervace] = rezervace if has? 'Rezervace'
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Pozn'
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[:zkrat] = zkrat if has? 'Zkrat'
25
24
  hash[:nazev] = nazev if has? 'Nazev'
@@ -14,12 +14,11 @@ module MoneyS3
14
14
  submodel_at(PolObjednType, 'Polozka')
15
15
  end
16
16
 
17
- def to_h
18
- hash = WithAttributes.new({})
19
- hash.attributes = attributes
17
+ def to_h_with_attrs
18
+ hash = HashWithAttributes.new({}, attributes)
20
19
 
21
20
  hash[:mj_na_sadu] = mj_na_sadu if has? 'MJNaSadu'
22
- hash[:polozka] = polozka.to_h if has? 'Polozka'
21
+ hash[:polozka] = polozka.to_h_with_attrs if has? 'Polozka'
23
22
 
24
23
  hash
25
24
  end
@@ -14,12 +14,11 @@ module MoneyS3
14
14
  submodel_at(PolInvDoklType, 'Polozka')
15
15
  end
16
16
 
17
- def to_h
18
- hash = WithAttributes.new({})
19
- hash.attributes = attributes
17
+ def to_h_with_attrs
18
+ hash = HashWithAttributes.new({}, attributes)
20
19
 
21
20
  hash[:mn_sada] = mn_sada if has? 'MnSada'
22
- hash[:polozka] = polozka.to_h if has? 'Polozka'
21
+ hash[:polozka] = polozka.to_h_with_attrs if has? 'Polozka'
23
22
 
24
23
  hash
25
24
  end
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Klap'
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[:pred] = pred if has? 'Pred'
25
24
  hash[:cislo] = cislo if has? 'Cislo'
@@ -37,9 +37,8 @@ module MoneyS3
37
37
  at 'PrNahOff'
38
38
  end
39
39
 
40
- def to_h
41
- hash = WithAttributes.new({})
42
- hash.attributes = attributes
40
+ def to_h_with_attrs
41
+ hash = HashWithAttributes.new({}, attributes)
43
42
 
44
43
  hash[:zkratka] = zkratka if has? 'Zkratka'
45
44
  hash[:popis] = popis if has? 'Popis'
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'Poznamka'
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[:zkrat] = zkrat if has? 'Zkrat'
25
24
  hash[:popis] = popis if has? 'Popis'
@@ -65,9 +65,8 @@ module MoneyS3
65
65
  at 'DruhCin'
66
66
  end
67
67
 
68
- def to_h
69
- hash = WithAttributes.new({})
70
- hash.attributes = attributes
68
+ def to_h_with_attrs
69
+ hash = HashWithAttributes.new({}, attributes)
71
70
 
72
71
  hash[:ucet] = ucet if has? 'Ucet'
73
72
  hash[:nazev] = nazev if has? 'Nazev'
@@ -25,9 +25,8 @@ module MoneyS3
25
25
  at 'Pozn'
26
26
  end
27
27
 
28
- def to_h
29
- hash = WithAttributes.new({})
30
- hash.attributes = attributes
28
+ def to_h_with_attrs
29
+ hash = HashWithAttributes.new({}, attributes)
31
30
 
32
31
  hash[:zkrat] = zkrat if has? 'Zkrat'
33
32
  hash[:popis] = popis if has? 'Popis'
@@ -21,9 +21,8 @@ module MoneyS3
21
21
  at 'BNazev'
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[:zkrat] = zkrat if has? 'Zkrat'
29
28
  hash[:ucet] = ucet if has? 'Ucet'
@@ -37,9 +37,8 @@ module MoneyS3
37
37
  at 'UcPreb'
38
38
  end
39
39
 
40
- def to_h
41
- hash = WithAttributes.new({})
42
- hash.attributes = attributes
40
+ def to_h_with_attrs
41
+ hash = HashWithAttributes.new({}, attributes)
43
42
 
44
43
  hash[:uc_prodejk] = uc_prodejk if has? 'UcProdejk'
45
44
  hash[:uc_prijemk] = uc_prijemk if has? 'UcPrijemk'
@@ -49,9 +49,8 @@ module MoneyS3
49
49
  at 'WLDPH2'
50
50
  end
51
51
 
52
- def to_h
53
- hash = WithAttributes.new({})
54
- hash.attributes = attributes
52
+ def to_h_with_attrs
53
+ hash = HashWithAttributes.new({}, attributes)
55
54
 
56
55
  hash[:poradi] = poradi if has? 'Poradi'
57
56
  hash[:kontace] = kontace if has? 'Kontace'
@@ -67,9 +67,8 @@ module MoneyS3
67
67
  array_of_at(UhradaPduhrada, ['SeznamPDUhrad', 'Uhrada_PDUhrada'])
68
68
  end
69
69
 
70
- def to_h
71
- hash = WithAttributes.new({})
72
- hash.attributes = attributes
70
+ def to_h_with_attrs
71
+ hash = HashWithAttributes.new({}, attributes)
73
72
 
74
73
  hash[:prijem] = prijem if has? 'Prijem'
75
74
  hash[:poradi] = poradi if has? 'Poradi'
@@ -79,12 +78,12 @@ module MoneyS3
79
78
  hash[:castka] = castka if has? 'Castka'
80
79
  hash[:zpusob_uhr] = zpusob_uhr if has? 'ZpusobUhr'
81
80
  hash[:platidlo] = platidlo if has? 'Platidlo'
82
- hash[:doklad_uhr] = doklad_uhr.to_h if has? 'DokladUhr'
83
- hash[:doklad_hraz] = doklad_hraz.to_h if has? 'DokladHraz'
84
- hash[:valuty_hraz] = valuty_hraz.to_h if has? 'ValutyHraz'
85
- hash[:valuty_uhr] = valuty_uhr.to_h if has? 'ValutyUhr'
86
- hash[:kurz_rozd] = kurz_rozd.to_h if has? 'KurzRozd'
87
- hash[:seznam_pd_uhrad] = seznam_pd_uhrad.map(&:to_h) if has? 'SeznamPDUhrad'
81
+ hash[:doklad_uhr] = doklad_uhr.to_h_with_attrs if has? 'DokladUhr'
82
+ hash[:doklad_hraz] = doklad_hraz.to_h_with_attrs if has? 'DokladHraz'
83
+ hash[:valuty_hraz] = valuty_hraz.to_h_with_attrs if has? 'ValutyHraz'
84
+ hash[:valuty_uhr] = valuty_uhr.to_h_with_attrs if has? 'ValutyUhr'
85
+ hash[:kurz_rozd] = kurz_rozd.to_h_with_attrs if has? 'KurzRozd'
86
+ hash[:seznam_pd_uhrad] = seznam_pd_uhrad.map(&:to_h_with_attrs) if has? 'SeznamPDUhrad'
88
87
 
89
88
  hash
90
89
  end
@@ -19,13 +19,12 @@ module MoneyS3
19
19
  submodel_at(SouhrnDPHType, 'SouhrnDPH')
20
20
  end
21
21
 
22
- def to_h
23
- hash = WithAttributes.new({})
24
- hash.attributes = attributes
22
+ def to_h_with_attrs
23
+ hash = HashWithAttributes.new({}, attributes)
25
24
 
26
25
  hash[:celkem] = celkem if has? 'Celkem'
27
- hash[:mena] = mena.to_h if has? 'Mena'
28
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
26
+ hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
27
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
29
28
 
30
29
  hash
31
30
  end
@@ -14,12 +14,11 @@ module MoneyS3
14
14
  submodel_at(MenaType, 'Mena')
15
15
  end
16
16
 
17
- def to_h
18
- hash = WithAttributes.new({})
19
- hash.attributes = attributes
17
+ def to_h_with_attrs
18
+ hash = HashWithAttributes.new({}, attributes)
20
19
 
21
20
  hash[:castka] = castka if has? 'Castka'
22
- hash[:mena] = mena.to_h if has? 'Mena'
21
+ hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
23
22
 
24
23
  hash
25
24
  end
@@ -14,12 +14,11 @@ module MoneyS3
14
14
  submodel_at(MenaType, 'Mena')
15
15
  end
16
16
 
17
- def to_h
18
- hash = WithAttributes.new({})
19
- hash.attributes = attributes
17
+ def to_h_with_attrs
18
+ hash = HashWithAttributes.new({}, attributes)
20
19
 
21
20
  hash[:castka] = castka if has? 'Castka'
22
- hash[:mena] = mena.to_h if has? 'Mena'
21
+ hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
23
22
 
24
23
  hash
25
24
  end
@@ -18,13 +18,12 @@ module MoneyS3
18
18
  submodel_at(Doklad, 'Doklad')
19
19
  end
20
20
 
21
- def to_h
22
- hash = WithAttributes.new({})
23
- hash.attributes = attributes
21
+ def to_h_with_attrs
22
+ hash = HashWithAttributes.new({}, attributes)
24
23
 
25
24
  hash[:typ] = typ if has? 'Typ'
26
25
  hash[:pod_typ] = pod_typ if has? 'PodTyp'
27
- hash[:doklad] = doklad.to_h if has? 'Doklad'
26
+ hash[:doklad] = doklad.to_h_with_attrs if has? 'Doklad'
28
27
 
29
28
  hash
30
29
  end
@@ -37,9 +37,8 @@ module MoneyS3
37
37
  at 'RFHeight'
38
38
  end
39
39
 
40
- def to_h
41
- hash = WithAttributes.new({})
42
- hash.attributes = attributes
40
+ def to_h_with_attrs
41
+ hash = HashWithAttributes.new({}, attributes)
43
42
 
44
43
  hash[:id_user] = id_user if has? 'IDUser'
45
44
  hash[:name_user] = name_user if has? 'NameUser'
@@ -14,12 +14,11 @@ module MoneyS3
14
14
  submodel_at(VlajkaType, 'User')
15
15
  end
16
16
 
17
- def to_h
18
- hash = WithAttributes.new({})
19
- hash.attributes = attributes
17
+ def to_h_with_attrs
18
+ hash = HashWithAttributes.new({}, attributes)
20
19
 
21
- hash[:global] = global.to_h if has? 'Global'
22
- hash[:user] = user.to_h if has? 'User'
20
+ hash[:global] = global.to_h_with_attrs if has? 'Global'
21
+ hash[:user] = user.to_h_with_attrs if has? 'User'
23
22
 
24
23
  hash
25
24
  end
@@ -220,9 +220,8 @@ module MoneyS3
220
220
  array_of_at(String, ['Dokumenty', 'Dokument'])
221
221
  end
222
222
 
223
- def to_h
224
- hash = WithAttributes.new({})
225
- hash.attributes = attributes
223
+ def to_h_with_attrs
224
+ hash = HashWithAttributes.new({}, attributes)
226
225
 
227
226
  hash[:cislo_dokla] = cislo_dokla if has? 'CisloDokla'
228
227
  hash[:zpusob_uctovani] = zpusob_uctovani if has? 'ZpusobUctovani'
@@ -263,17 +262,17 @@ module MoneyS3
263
262
  hash[:i_doklad_id] = i_doklad_id if has? 'iDokladID'
264
263
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
265
264
  hash[:celkem] = celkem if has? 'Celkem'
266
- hash[:eet] = eet.to_h if has? 'EET'
267
- hash[:valuty] = valuty.to_h if has? 'Valuty'
268
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
269
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
270
- hash[:import] = import.to_h if has? 'Import'
271
- hash[:sklad_pro_pr] = sklad_pro_pr.to_h if has? 'SkladProPr'
272
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
273
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
274
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
275
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
276
- hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h) if has? 'SeznamNepPlateb'
265
+ hash[:eet] = eet.to_h_with_attrs if has? 'EET'
266
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
267
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
268
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
269
+ hash[:import] = import.to_h_with_attrs if has? 'Import'
270
+ hash[:sklad_pro_pr] = sklad_pro_pr.to_h_with_attrs if has? 'SkladProPr'
271
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
272
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
273
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
274
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
275
+ hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h_with_attrs) if has? 'SeznamNepPlateb'
277
276
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
278
277
 
279
278
  hash
@@ -220,9 +220,8 @@ module MoneyS3
220
220
  array_of_at(String, ['Dokumenty', 'Dokument'])
221
221
  end
222
222
 
223
- def to_h
224
- hash = WithAttributes.new({})
225
- hash.attributes = attributes
223
+ def to_h_with_attrs
224
+ hash = HashWithAttributes.new({}, attributes)
226
225
 
227
226
  hash[:cislo_dokla] = cislo_dokla if has? 'CisloDokla'
228
227
  hash[:zpusob_uctovani] = zpusob_uctovani if has? 'ZpusobUctovani'
@@ -263,17 +262,17 @@ module MoneyS3
263
262
  hash[:i_doklad_id] = i_doklad_id if has? 'iDokladID'
264
263
  hash[:i_dokl_agend] = i_dokl_agend if has? 'iDoklAgend'
265
264
  hash[:celkem] = celkem if has? 'Celkem'
266
- hash[:eet] = eet.to_h if has? 'EET'
267
- hash[:valuty] = valuty.to_h if has? 'Valuty'
268
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
269
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
270
- hash[:import] = import.to_h if has? 'Import'
271
- hash[:sklad_pro_pr] = sklad_pro_pr.to_h if has? 'SkladProPr'
272
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
273
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
274
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
275
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
276
- hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h) if has? 'SeznamNepPlateb'
265
+ hash[:eet] = eet.to_h_with_attrs if has? 'EET'
266
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
267
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
268
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
269
+ hash[:import] = import.to_h_with_attrs if has? 'Import'
270
+ hash[:sklad_pro_pr] = sklad_pro_pr.to_h_with_attrs if has? 'SkladProPr'
271
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
272
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
273
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
274
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
275
+ hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:to_h_with_attrs) if has? 'SeznamNepPlateb'
277
276
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
278
277
 
279
278
  hash
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'CarKod'
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[:vyrobni_cis] = vyrobni_cis if has? 'VyrobniCis'
25
24
  hash[:dat_vyr] = dat_vyr if has? 'DatVyr'
@@ -17,9 +17,8 @@ module MoneyS3
17
17
  at 'CarovyKod'
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[:vyrobni_cis] = vyrobni_cis if has? 'VyrobniCis'
25
24
  hash[:datum_vyrob] = datum_vyrob if has? 'DatumVyrob'
@@ -13,9 +13,8 @@ module MoneyS3
13
13
  array_of_at(String, ['Varovani'])
14
14
  end
15
15
 
16
- def to_h
17
- hash = WithAttributes.new({})
18
- hash.attributes = attributes
16
+ def to_h_with_attrs
17
+ hash = HashWithAttributes.new({}, attributes)
19
18
 
20
19
  hash[:chyba] = chyba if has? 'Chyba'
21
20
  hash[:varovani] = varovani if has? 'Varovani'
@@ -20,13 +20,12 @@ module MoneyS3
20
20
  submodel_at(KmKartaType, 'KmKarta')
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[:km_karta] = km_karta.to_h if has? 'KmKarta'
26
+ hash[:header] = header.to_h_with_attrs if has? 'Header'
27
+ hash[:child] = child.to_h_with_attrs if has? 'Child'
28
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
30
29
 
31
30
  hash
32
31
  end
@@ -88,9 +88,8 @@ module MoneyS3
88
88
  array_of_at(String, ['Dokumenty', 'Dokument'])
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[:zkrat] = zkrat if has? 'Zkrat'
96
95
  hash[:nazev] = nazev if has? 'Nazev'
@@ -108,9 +107,9 @@ module MoneyS3
108
107
  hash[:hodnoceni] = hodnoceni if has? 'Hodnoceni'
109
108
  hash[:c_objednavk] = c_objednavk if has? 'CObjednavk'
110
109
  hash[:vystavil] = vystavil if has? 'Vystavil'
111
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
112
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
113
- hash[:seznam_zakazkovy_kusovnik] = seznam_zakazkovy_kusovnik.map(&:to_h) if has? 'SeznamZakazkovyKusovnik'
110
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
111
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
112
+ hash[:seznam_zakazkovy_kusovnik] = seznam_zakazkovy_kusovnik.map(&:to_h_with_attrs) if has? 'SeznamZakazkovyKusovnik'
114
113
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
115
114
 
116
115
  hash
@@ -30,16 +30,15 @@ module MoneyS3
30
30
  array_of_at(MzdoveObdobiType, ['SeznamMzdovychObdobi', 'MzdoveObdobi'])
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[:os_cislo] = os_cislo if has? 'OsCislo'
38
37
  hash[:jmeno] = jmeno if has? 'Jmeno'
39
38
  hash[:stredisko] = stredisko if has? 'Stredisko'
40
39
  hash[:dat_nastup] = dat_nastup if has? 'DatNastup'
41
40
  hash[:dat_odchod] = dat_odchod if has? 'DatOdchod'
42
- hash[:seznam_mzdovych_obdobi] = seznam_mzdovych_obdobi.map(&:to_h) if has? 'SeznamMzdovychObdobi'
41
+ hash[:seznam_mzdovych_obdobi] = seznam_mzdovych_obdobi.map(&:to_h_with_attrs) if has? 'SeznamMzdovychObdobi'
43
42
 
44
43
  hash
45
44
  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[:nak_cena] = nak_cena if has? 'Nak_Cena'
177
176
  hash[:posl_n_cen] = posl_n_cen if has? 'Posl_N_Cen'
@@ -198,18 +197,18 @@ module MoneyS3
198
197
  hash[:uc_vyrobk_v] = uc_vyrobk_v if has? 'UcVyrobkV'
199
198
  hash[:dat_inv] = dat_inv if has? 'DatInv'
200
199
  hash[:mn_inv] = mn_inv if has? 'MnInv'
201
- hash[:konfigurace] = konfigurace.to_h if has? 'konfigurace'
202
- hash[:stav_zasoby] = stav_zasoby.to_h if has? 'StavZasoby'
203
- hash[:uc_pohyb] = uc_pohyb.to_h if has? 'UcPohyb'
204
- hash[:eshop] = eshop.to_h if has? 'eshop'
205
- hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
206
- hash[:sklad] = sklad.to_h if has? 'Sklad'
207
- hash[:skupina] = skupina.to_h if has? 'Skupina'
208
- hash[:posl_dod] = posl_dod.to_h if has? 'Posl_Dod'
209
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
210
- hash[:pc] = pc.map(&:to_h) if has? 'PC'
211
- hash[:seznam_alternativ] = seznam_alternativ.map(&:to_h) if has? 'SeznamAlternativ'
212
- hash[:seznam_prislusenstvi] = seznam_prislusenstvi.map(&:to_h) if has? 'SeznamPrislusenstvi'
200
+ hash[:konfigurace] = konfigurace.to_h_with_attrs if has? 'konfigurace'
201
+ hash[:stav_zasoby] = stav_zasoby.to_h_with_attrs if has? 'StavZasoby'
202
+ hash[:uc_pohyb] = uc_pohyb.to_h_with_attrs if has? 'UcPohyb'
203
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
204
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
205
+ hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
206
+ hash[:skupina] = skupina.to_h_with_attrs if has? 'Skupina'
207
+ hash[:posl_dod] = posl_dod.to_h_with_attrs if has? 'Posl_Dod'
208
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
209
+ hash[:pc] = pc.map(&:to_h_with_attrs) if has? 'PC'
210
+ hash[:seznam_alternativ] = seznam_alternativ.map(&:to_h_with_attrs) if has? 'SeznamAlternativ'
211
+ hash[:seznam_prislusenstvi] = seznam_prislusenstvi.map(&:to_h_with_attrs) if has? 'SeznamPrislusenstvi'
213
212
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
214
213
 
215
214
  hash
@@ -34,9 +34,8 @@ module MoneyS3
34
34
  array_of_at(ObdobiDPH, ['SeznamObdobiDPH', 'ObdobiDPH'])
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[:zkrat] = zkrat if has? 'Zkrat'
42
41
  hash[:typ] = typ if has? 'Typ'
@@ -44,7 +43,7 @@ module MoneyS3
44
43
  hash[:poh_dss] = poh_dss if has? 'PohDSS'
45
44
  hash[:poh_dzs] = poh_dzs if has? 'PohDZS'
46
45
  hash[:pozn] = pozn if has? 'Pozn'
47
- hash[:seznam_obdobi_dph] = seznam_obdobi_dph.map(&:to_h) if has? 'SeznamObdobiDPH'
46
+ hash[:seznam_obdobi_dph] = seznam_obdobi_dph.map(&:to_h_with_attrs) if has? 'SeznamObdobiDPH'
48
47
 
49
48
  hash
50
49
  end