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
@@ -33,9 +33,8 @@ module MoneyS3
33
33
  at 'Hodnoty'
34
34
  end
35
35
 
36
- def to_h
37
- hash = WithAttributes.new({})
38
- hash.attributes = attributes
36
+ def to_h_with_attrs
37
+ hash = HashWithAttributes.new({}, attributes)
39
38
 
40
39
  hash[:id] = id if has? 'ID'
41
40
  hash[:nazev] = nazev if has? 'Nazev'
@@ -72,9 +72,8 @@ module MoneyS3
72
72
  submodel_at(CenaType, 'Cena5')
73
73
  end
74
74
 
75
- def to_h
76
- hash = WithAttributes.new({})
77
- hash.attributes = attributes
75
+ def to_h_with_attrs
76
+ hash = HashWithAttributes.new({}, attributes)
78
77
 
79
78
  hash[:dealer_skupina] = dealer_skupina if has? 'DealerSkupina'
80
79
  hash[:sdph] = sdph if has? 'SDPH'
@@ -85,13 +84,13 @@ module MoneyS3
85
84
  hash[:zpusob_zm_a] = zpusob_zm_a if has? 'ZpusobZmA'
86
85
  hash[:vych_b] = vych_b if has? 'VychB'
87
86
  hash[:zpusob_zm_b] = zpusob_zm_b if has? 'ZpusobZmB'
88
- hash[:hladina] = hladina.to_h if has? 'Hladina'
89
- hash[:mena] = mena.to_h if has? 'Mena'
90
- hash[:cena1] = cena1.to_h if has? 'Cena1'
91
- hash[:cena2] = cena2.to_h if has? 'Cena2'
92
- hash[:cena3] = cena3.to_h if has? 'Cena3'
93
- hash[:cena4] = cena4.to_h if has? 'Cena4'
94
- hash[:cena5] = cena5.to_h if has? 'Cena5'
87
+ hash[:hladina] = hladina.to_h_with_attrs if has? 'Hladina'
88
+ hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
89
+ hash[:cena1] = cena1.to_h_with_attrs if has? 'Cena1'
90
+ hash[:cena2] = cena2.to_h_with_attrs if has? 'Cena2'
91
+ hash[:cena3] = cena3.to_h_with_attrs if has? 'Cena3'
92
+ hash[:cena4] = cena4.to_h_with_attrs if has? 'Cena4'
93
+ hash[:cena5] = cena5.to_h_with_attrs if has? 'Cena5'
95
94
 
96
95
  hash
97
96
  end
@@ -221,9 +221,8 @@ module MoneyS3
221
221
  array_of_at(String, ['Dokumenty', 'Dokument'])
222
222
  end
223
223
 
224
- def to_h
225
- hash = WithAttributes.new({})
226
- hash.attributes = attributes
224
+ def to_h_with_attrs
225
+ hash = HashWithAttributes.new({}, attributes)
227
226
 
228
227
  hash[:doklad] = doklad if has? 'Doklad'
229
228
  hash[:ev_cis_dokl] = ev_cis_dokl if has? 'EvCisDokl'
@@ -268,14 +267,14 @@ module MoneyS3
268
267
  hash[:zjedn_d] = zjedn_d if has? 'ZjednD'
269
268
  hash[:vyst] = vyst if has? 'Vyst'
270
269
  hash[:celkem] = celkem if has? 'Celkem'
271
- hash[:eet] = eet.to_h if has? 'EET'
272
- hash[:adresa] = adresa.to_h if has? 'Adresa'
273
- hash[:valuty] = valuty.to_h if has? 'Valuty'
274
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
275
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
276
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
277
- hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:to_h) if has? 'SeznamRozuctPolozek'
278
- hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:to_h) if has? 'SeznamNormPolozek'
270
+ hash[:eet] = eet.to_h_with_attrs if has? 'EET'
271
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
272
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
273
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
274
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
275
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
276
+ hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:to_h_with_attrs) if has? 'SeznamRozuctPolozek'
277
+ hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:to_h_with_attrs) if has? 'SeznamNormPolozek'
279
278
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
280
279
 
281
280
  hash
@@ -165,9 +165,8 @@ module MoneyS3
165
165
  array_of_at(String, ['Dokumenty', 'Dokument'])
166
166
  end
167
167
 
168
- def to_h
169
- hash = WithAttributes.new({})
170
- hash.attributes = attributes
168
+ def to_h_with_attrs
169
+ hash = HashWithAttributes.new({}, attributes)
171
170
 
172
171
  hash[:vydej] = vydej if has? 'Vydej'
173
172
  hash[:doklad] = doklad if has? 'Doklad'
@@ -198,14 +197,14 @@ module MoneyS3
198
197
  hash[:typ_dokl] = typ_dokl if has? 'TypDokl'
199
198
  hash[:zjedn_d] = zjedn_d if has? 'ZjednD'
200
199
  hash[:celkem] = celkem if has? 'Celkem'
201
- hash[:eet] = eet.to_h if has? 'EET'
202
- hash[:adresa] = adresa.to_h if has? 'Adresa'
203
- hash[:valuty] = valuty.to_h if has? 'Valuty'
204
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
205
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
206
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
207
- hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:to_h) if has? 'SeznamNormPolozek'
208
- hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:to_h) if has? 'SeznamRozuctPolozek'
200
+ hash[:eet] = eet.to_h_with_attrs if has? 'EET'
201
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
202
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
203
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
204
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
205
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
206
+ hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:to_h_with_attrs) if has? 'SeznamNormPolozek'
207
+ hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:to_h_with_attrs) if has? 'SeznamRozuctPolozek'
209
208
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
210
209
 
211
210
  hash
@@ -97,9 +97,8 @@ module MoneyS3
97
97
  submodel_at(SeznamVazeb, 'SeznamVazeb')
98
98
  end
99
99
 
100
- def to_h
101
- hash = WithAttributes.new({})
102
- hash.attributes = attributes
100
+ def to_h_with_attrs
101
+ hash = HashWithAttributes.new({}, attributes)
103
102
 
104
103
  hash[:popis] = popis if has? 'Popis'
105
104
  hash[:poznamka] = poznamka if has? 'Poznamka'
@@ -119,10 +118,10 @@ module MoneyS3
119
118
  hash[:zvl_rezim] = zvl_rezim if has? 'ZvlRezim'
120
119
  hash[:zvl_dph] = zvl_dph if has? 'ZvlDPH'
121
120
  hash[:rezim_eet] = rezim_eet if has? 'RezimEET'
122
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
123
- hash[:neskl_polozka] = neskl_polozka.to_h if has? 'NesklPolozka'
124
- hash[:skl_polozka] = skl_polozka.to_h if has? 'SklPolozka'
125
- hash[:seznam_vazeb] = seznam_vazeb.to_h if has? 'SeznamVazeb'
121
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
122
+ hash[:neskl_polozka] = neskl_polozka.to_h_with_attrs if has? 'NesklPolozka'
123
+ hash[:skl_polozka] = skl_polozka.to_h_with_attrs if has? 'SklPolozka'
124
+ hash[:seznam_vazeb] = seznam_vazeb.to_h_with_attrs if has? 'SeznamVazeb'
126
125
 
127
126
  hash
128
127
  end
@@ -45,19 +45,18 @@ module MoneyS3
45
45
  array_of_at(SubpolInvDType, ['Slozeni', 'SubPolozka'])
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[:popis] = popis if has? 'Popis'
53
52
  hash[:zkrat] = zkrat if has? 'Zkrat'
54
53
  hash[:slupina] = slupina if has? 'Slupina'
55
54
  hash[:mj] = mj if has? 'MJ'
56
55
  hash[:mn_inv] = mn_inv if has? 'MnInv'
57
- hash[:sklad] = sklad.to_h if has? 'Sklad'
58
- hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
59
- hash[:seznam_vc] = seznam_vc.map(&:to_h) if has? 'SeznamVC'
60
- hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'
56
+ hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
57
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
58
+ hash[:seznam_vc] = seznam_vc.map(&:to_h_with_attrs) if has? 'SeznamVC'
59
+ hash[:slozeni] = slozeni.map(&:to_h_with_attrs) if has? 'Slozeni'
61
60
 
62
61
  hash
63
62
  end
@@ -139,9 +139,8 @@ module MoneyS3
139
139
  array_of_at(SubPolObjType, ['Slozeni', 'SubPolozka'])
140
140
  end
141
141
 
142
- def to_h
143
- hash = WithAttributes.new({})
144
- hash.attributes = attributes
142
+ def to_h_with_attrs
143
+ hash = HashWithAttributes.new({}, attributes)
145
144
 
146
145
  hash[:popis] = popis if has? 'Popis'
147
146
  hash[:poznamka] = poznamka if has? 'Poznamka'
@@ -169,12 +168,12 @@ module MoneyS3
169
168
  hash[:zvl_dph] = zvl_dph if has? 'ZvlDPH'
170
169
  hash[:rezim_eet] = rezim_eet if has? 'RezimEET'
171
170
  hash[:pred_pc] = pred_pc if has? 'PredPC'
172
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
173
- hash[:sklad] = sklad.to_h if has? 'Sklad'
174
- hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
175
- hash[:neskl_polozka] = neskl_polozka.to_h if has? 'NesklPolozka'
176
- hash[:seznam_vc] = seznam_vc.map(&:to_h) if has? 'SeznamVC'
177
- hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'
171
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
172
+ hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
173
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
174
+ hash[:neskl_polozka] = neskl_polozka.to_h_with_attrs if has? 'NesklPolozka'
175
+ hash[:seznam_vc] = seznam_vc.map(&:to_h_with_attrs) if has? 'SeznamVC'
176
+ hash[:slozeni] = slozeni.map(&:to_h_with_attrs) if has? 'Slozeni'
178
177
 
179
178
  hash
180
179
  end
@@ -122,9 +122,8 @@ module MoneyS3
122
122
  array_of_at(DefSubPolType, ['Slozeni', 'SubPolozka'])
123
123
  end
124
124
 
125
- def to_h
126
- hash = WithAttributes.new({})
127
- hash.attributes = attributes
125
+ def to_h_with_attrs
126
+ hash = HashWithAttributes.new({}, attributes)
128
127
 
129
128
  hash[:nazev] = nazev if has? 'Nazev'
130
129
  hash[:pocet_mj] = pocet_mj if has? 'PocetMJ'
@@ -149,11 +148,11 @@ module MoneyS3
149
148
  hash[:zvl_rezim] = zvl_rezim if has? 'ZvlRezim'
150
149
  hash[:zvl_dph] = zvl_dph if has? 'ZvlDPH'
151
150
  hash[:rezim_eet] = rezim_eet if has? 'RezimEET'
152
- hash[:sklad] = sklad.to_h if has? 'Sklad'
153
- hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
154
- hash[:seznam_vc] = seznam_vc.map(&:to_h) if has? 'SeznamVC'
155
- hash[:seznam_dodavek] = seznam_dodavek.map(&:to_h) if has? 'SeznamDodavek'
156
- hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'
151
+ hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
152
+ hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
153
+ hash[:seznam_vc] = seznam_vc.map(&:to_h_with_attrs) if has? 'SeznamVC'
154
+ hash[:seznam_dodavek] = seznam_dodavek.map(&:to_h_with_attrs) if has? 'SeznamDodavek'
155
+ hash[:slozeni] = slozeni.map(&:to_h_with_attrs) if has? 'Slozeni'
157
156
 
158
157
  hash
159
158
  end
@@ -237,9 +237,8 @@ module MoneyS3
237
237
  array_of_at(String, ['Dokumenty', 'Dokument'])
238
238
  end
239
239
 
240
- def to_h
241
- hash = WithAttributes.new({})
242
- hash.attributes = attributes
240
+ def to_h_with_attrs
241
+ hash = HashWithAttributes.new({}, attributes)
243
242
 
244
243
  hash[:doklad] = doklad if has? 'Doklad'
245
244
  hash[:popis] = popis if has? 'Popis'
@@ -281,20 +280,20 @@ module MoneyS3
281
280
  hash[:sleva] = sleva if has? 'Sleva'
282
281
  hash[:pojisteno] = pojisteno if has? 'Pojisteno'
283
282
  hash[:celkem] = celkem if has? 'Celkem'
284
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
285
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
286
- hash[:valuty] = valuty.to_h if has? 'Valuty'
287
- hash[:eshop] = eshop.to_h if has? 'eshop'
288
- hash[:prepravce] = prepravce.to_h if has? 'Prepravce'
289
- hash[:typ_zasillky] = typ_zasillky.to_h if has? 'TypZasillky'
290
- hash[:prepr_vyplatne] = prepr_vyplatne.to_h if has? 'Prepr_Vyplatne'
291
- hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h if has? 'Prepr_UhradaDobirky'
292
- hash[:prepr_trida] = prepr_trida.to_h if has? 'Prepr_Trida'
293
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
294
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
295
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
296
- hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h) if has? 'Prepr_SeznamSluzeb'
297
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
283
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
284
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
285
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
286
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
287
+ hash[:prepravce] = prepravce.to_h_with_attrs if has? 'Prepravce'
288
+ hash[:typ_zasillky] = typ_zasillky.to_h_with_attrs if has? 'TypZasillky'
289
+ hash[:prepr_vyplatne] = prepr_vyplatne.to_h_with_attrs if has? 'Prepr_Vyplatne'
290
+ hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h_with_attrs if has? 'Prepr_UhradaDobirky'
291
+ hash[:prepr_trida] = prepr_trida.to_h_with_attrs if has? 'Prepr_Trida'
292
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
293
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
294
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
295
+ hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h_with_attrs) if has? 'Prepr_SeznamSluzeb'
296
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
298
297
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
299
298
 
300
299
  hash
@@ -237,9 +237,8 @@ module MoneyS3
237
237
  array_of_at(String, ['Dokumenty', 'Dokument'])
238
238
  end
239
239
 
240
- def to_h
241
- hash = WithAttributes.new({})
242
- hash.attributes = attributes
240
+ def to_h_with_attrs
241
+ hash = HashWithAttributes.new({}, attributes)
243
242
 
244
243
  hash[:doklad] = doklad if has? 'Doklad'
245
244
  hash[:popis] = popis if has? 'Popis'
@@ -281,20 +280,20 @@ module MoneyS3
281
280
  hash[:sleva] = sleva if has? 'Sleva'
282
281
  hash[:pojisteno] = pojisteno if has? 'Pojisteno'
283
282
  hash[:celkem] = celkem if has? 'Celkem'
284
- hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
285
- hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
286
- hash[:valuty] = valuty.to_h if has? 'Valuty'
287
- hash[:eshop] = eshop.to_h if has? 'eshop'
288
- hash[:prepravce] = prepravce.to_h if has? 'Prepravce'
289
- hash[:typ_zasillky] = typ_zasillky.to_h if has? 'TypZasillky'
290
- hash[:prepr_vyplatne] = prepr_vyplatne.to_h if has? 'Prepr_Vyplatne'
291
- hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h if has? 'Prepr_UhradaDobirky'
292
- hash[:prepr_trida] = prepr_trida.to_h if has? 'Prepr_Trida'
293
- hash[:moje_firma] = moje_firma.to_h if has? 'MojeFirma'
294
- hash[:vlajky] = vlajky.to_h if has? 'Vlajky'
295
- hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
296
- hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h) if has? 'Prepr_SeznamSluzeb'
297
- hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
283
+ hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
284
+ hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
285
+ hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
286
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
287
+ hash[:prepravce] = prepravce.to_h_with_attrs if has? 'Prepravce'
288
+ hash[:typ_zasillky] = typ_zasillky.to_h_with_attrs if has? 'TypZasillky'
289
+ hash[:prepr_vyplatne] = prepr_vyplatne.to_h_with_attrs if has? 'Prepr_Vyplatne'
290
+ hash[:prepr_uhrada_dobirky] = prepr_uhrada_dobirky.to_h_with_attrs if has? 'Prepr_UhradaDobirky'
291
+ hash[:prepr_trida] = prepr_trida.to_h_with_attrs if has? 'Prepr_Trida'
292
+ hash[:moje_firma] = moje_firma.to_h_with_attrs if has? 'MojeFirma'
293
+ hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
294
+ hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
295
+ hash[:prepr_seznam_sluzeb] = prepr_seznam_sluzeb.map(&:to_h_with_attrs) if has? 'Prepr_SeznamSluzeb'
296
+ hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
298
297
  hash[:dokumenty] = dokumenty if has? 'Dokumenty'
299
298
 
300
299
  hash
@@ -21,9 +21,8 @@ module MoneyS3
21
21
  at 'Pozn'
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[:popis] = popis if has? 'Popis'
@@ -53,9 +53,8 @@ module MoneyS3
53
53
  at 'Pozn'
54
54
  end
55
55
 
56
- def to_h
57
- hash = WithAttributes.new({})
58
- hash.attributes = attributes
56
+ def to_h_with_attrs
57
+ hash = HashWithAttributes.new({}, attributes)
59
58
 
60
59
  hash[:zkrat] = zkrat if has? 'Zkrat'
61
60
  hash[:typ] = typ if has? 'Typ'
@@ -33,9 +33,8 @@ module MoneyS3
33
33
  at 'Pozn'
34
34
  end
35
35
 
36
- def to_h
37
- hash = WithAttributes.new({})
38
- hash.attributes = attributes
36
+ def to_h_with_attrs
37
+ hash = HashWithAttributes.new({}, attributes)
39
38
 
40
39
  hash[:zkrat] = zkrat if has? 'Zkrat'
41
40
  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'
@@ -21,9 +21,8 @@ module MoneyS3
21
21
  at 'KodOdesil'
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[:nazev] = nazev if has? 'Nazev'
@@ -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
@@ -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
@@ -15,12 +15,11 @@ module MoneyS3
15
15
  submodel_at(VzorKomponentaType, 'Vzor')
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[:typ_kusovnik] = typ_kusovnik.to_h if has? 'TypKusovnik'
23
- hash[:vzor] = vzor.to_h if has? 'Vzor'
21
+ hash[:typ_kusovnik] = typ_kusovnik.to_h_with_attrs if has? 'TypKusovnik'
22
+ hash[:vzor] = vzor.to_h_with_attrs if has? 'Vzor'
24
23
 
25
24
  hash
26
25
  end
@@ -9,9 +9,8 @@ module MoneyS3
9
9
  array_of_at(String, ['ID'])
10
10
  end
11
11
 
12
- def to_h
13
- hash = WithAttributes.new({})
14
- hash.attributes = attributes
12
+ def to_h_with_attrs
13
+ hash = HashWithAttributes.new({}, attributes)
15
14
 
16
15
  hash[:id] = id if has? 'ID'
17
16
 
@@ -53,9 +53,8 @@ module MoneyS3
53
53
  at 'SazbaDPH'
54
54
  end
55
55
 
56
- def to_h
57
- hash = WithAttributes.new({})
58
- hash.attributes = attributes
56
+ def to_h_with_attrs
57
+ hash = HashWithAttributes.new({}, attributes)
59
58
 
60
59
  hash[:popis] = popis if has? 'Popis'
61
60
  hash[:uc_md] = uc_md if has? 'UcMD'
@@ -62,9 +62,8 @@ module MoneyS3
62
62
  submodel_at(FirmaType, 'Adresa')
63
63
  end
64
64
 
65
- def to_h
66
- hash = WithAttributes.new({})
67
- hash.attributes = attributes
65
+ def to_h_with_attrs
66
+ hash = HashWithAttributes.new({}, attributes)
68
67
 
69
68
  hash[:popis] = popis if has? 'Popis'
70
69
  hash[:castka] = castka if has? 'Castka'
@@ -79,7 +78,7 @@ module MoneyS3
79
78
  hash[:pohyb] = pohyb if has? 'Pohyb'
80
79
  hash[:par_sym] = par_sym if has? 'ParSym'
81
80
  hash[:var_sym] = var_sym if has? 'VarSym'
82
- hash[:adresa] = adresa.to_h if has? 'Adresa'
81
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
83
82
 
84
83
  hash
85
84
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(BankDokl, ['BankDokl'])
11
11
  end
12
12
 
13
- def to_h
14
- hash = WithAttributes.new({})
15
- hash.attributes = attributes
13
+ def to_h_with_attrs
14
+ hash = HashWithAttributes.new({}, attributes)
16
15
 
17
- hash[:bank_dokl] = bank_dokl.map(&:to_h) if has? 'BankDokl'
16
+ hash[:bank_dokl] = bank_dokl.map(&:to_h_with_attrs) if has? 'BankDokl'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(CenovaHladina, ['CenovaHladina'])
11
11
  end
12
12
 
13
- def to_h
14
- hash = WithAttributes.new({})
15
- hash.attributes = attributes
13
+ def to_h_with_attrs
14
+ hash = HashWithAttributes.new({}, attributes)
16
15
 
17
- hash[:cenova_hladina] = cenova_hladina.map(&:to_h) if has? 'CenovaHladina'
16
+ hash[:cenova_hladina] = cenova_hladina.map(&:to_h_with_attrs) if has? 'CenovaHladina'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Cinnost, ['Cinnost'])
11
11
  end
12
12
 
13
- def to_h
14
- hash = WithAttributes.new({})
15
- hash.attributes = attributes
13
+ def to_h_with_attrs
14
+ hash = HashWithAttributes.new({}, attributes)
16
15
 
17
- hash[:cinnost] = cinnost.map(&:to_h) if has? 'Cinnost'
16
+ hash[:cinnost] = cinnost.map(&:to_h_with_attrs) if has? 'Cinnost'
18
17
 
19
18
  hash
20
19
  end