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
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(ClenDPH, ['ClenDPH'])
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[:clen_dph] = clen_dph.map(&:to_h) if has? 'ClenDPH'
16
+ hash[:clen_dph] = clen_dph.map(&:to_h_with_attrs) if has? 'ClenDPH'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(DLPrij, ['DLPrij'])
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[:dl_prij] = dl_prij.map(&:to_h) if has? 'DLPrij'
16
+ hash[:dl_prij] = dl_prij.map(&:to_h_with_attrs) if has? 'DLPrij'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(DLVyd, ['DLVyd'])
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[:dl_vyd] = dl_vyd.map(&:to_h) if has? 'DLVyd'
16
+ hash[:dl_vyd] = dl_vyd.map(&:to_h_with_attrs) if has? 'DLVyd'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(FaktPrij, ['FaktPrij'])
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[:fakt_prij] = fakt_prij.map(&:to_h) if has? 'FaktPrij'
16
+ hash[:fakt_prij] = fakt_prij.map(&:to_h_with_attrs) if has? 'FaktPrij'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(FaktVyd, ['FaktVyd'])
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[:fakt_vyd] = fakt_vyd.map(&:to_h) if has? 'FaktVyd'
16
+ hash[:fakt_vyd] = fakt_vyd.map(&:to_h_with_attrs) if has? 'FaktVyd'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Firma, ['Firma'])
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[:firma] = firma.map(&:to_h) if has? 'Firma'
16
+ hash[:firma] = firma.map(&:to_h_with_attrs) if has? 'Firma'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(IntDokl, ['IntDokl'])
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[:int_dokl] = int_dokl.map(&:to_h) if has? 'IntDokl'
16
+ hash[:int_dokl] = int_dokl.map(&:to_h_with_attrs) if has? 'IntDokl'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(InvDoklType, ['InvDoklad'])
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[:inv_doklad] = inv_doklad.map(&:to_h) if has? 'InvDoklad'
16
+ hash[:inv_doklad] = inv_doklad.map(&:to_h_with_attrs) if has? 'InvDoklad'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(KmKarta, ['KmKarta'])
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[:km_karta] = km_karta.map(&:to_h) if has? 'KmKarta'
16
+ hash[:km_karta] = km_karta.map(&:to_h_with_attrs) if has? 'KmKarta'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(KurzListek, ['KurzListek'])
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[:kurz_listek] = kurz_listek.map(&:to_h) if has? 'KurzListek'
16
+ hash[:kurz_listek] = kurz_listek.map(&:to_h_with_attrs) if has? 'KurzListek'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(MzdaType, ['Mzda'])
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[:mzda] = mzda.map(&:to_h) if has? 'Mzda'
16
+ hash[:mzda] = mzda.map(&:to_h_with_attrs) if has? 'Mzda'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(NabPrij, ['NabPrij'])
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[:nab_prij] = nab_prij.map(&:to_h) if has? 'NabPrij'
16
+ hash[:nab_prij] = nab_prij.map(&:to_h_with_attrs) if has? 'NabPrij'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(NabVyd, ['NabVyd'])
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[:nab_vyd] = nab_vyd.map(&:to_h) if has? 'NabVyd'
16
+ hash[:nab_vyd] = nab_vyd.map(&:to_h_with_attrs) if has? 'NabVyd'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(ObjPrij, ['ObjPrij'])
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[:obj_prij] = obj_prij.map(&:to_h) if has? 'ObjPrij'
16
+ hash[:obj_prij] = obj_prij.map(&:to_h_with_attrs) if has? 'ObjPrij'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(ObjVyd, ['ObjVyd'])
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[:obj_vyd] = obj_vyd.map(&:to_h) if has? 'ObjVyd'
16
+ hash[:obj_vyd] = obj_vyd.map(&:to_h_with_attrs) if has? 'ObjVyd'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(PokDokl, ['PokDokl'])
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[:pok_dokl] = pok_dokl.map(&:to_h) if has? 'PokDokl'
16
+ hash[:pok_dokl] = pok_dokl.map(&:to_h_with_attrs) if has? 'PokDokl'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(PoptPrij, ['PoptPrij'])
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[:popt_prij] = popt_prij.map(&:to_h) if has? 'PoptPrij'
16
+ hash[:popt_prij] = popt_prij.map(&:to_h_with_attrs) if has? 'PoptPrij'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(PoptVyd, ['PoptVyd'])
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[:popt_vyd] = popt_vyd.map(&:to_h) if has? 'PoptVyd'
16
+ hash[:popt_vyd] = popt_vyd.map(&:to_h_with_attrs) if has? 'PoptVyd'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Predkontace, ['Predkontace'])
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[:predkontace] = predkontace.map(&:to_h) if has? 'Predkontace'
16
+ hash[:predkontace] = predkontace.map(&:to_h_with_attrs) if has? 'Predkontace'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(PredkontaceDEType, ['PredkontaceDE'])
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[:predkontace_de] = predkontace_de.map(&:to_h) if has? 'PredkontaceDE'
16
+ hash[:predkontace_de] = predkontace_de.map(&:to_h_with_attrs) if has? 'PredkontaceDE'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Prevodka, ['Prevodka'])
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[:prevodka] = prevodka.map(&:to_h) if has? 'Prevodka'
16
+ hash[:prevodka] = prevodka.map(&:to_h_with_attrs) if has? 'Prevodka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Prijemka, ['Prijemka'])
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[:prijemka] = prijemka.map(&:to_h) if has? 'Prijemka'
16
+ hash[:prijemka] = prijemka.map(&:to_h_with_attrs) if has? 'Prijemka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Prodejka, ['Prodejka'])
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[:prodejka] = prodejka.map(&:to_h) if has? 'Prodejka'
16
+ hash[:prodejka] = prodejka.map(&:to_h_with_attrs) if has? 'Prodejka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Sklad, ['Sklad'])
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[:sklad] = sklad.map(&:to_h) if has? 'Sklad'
16
+ hash[:sklad] = sklad.map(&:to_h_with_attrs) if has? 'Sklad'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Stredisko, ['Stredisko'])
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[:stredisko] = stredisko.map(&:to_h) if has? 'Stredisko'
16
+ hash[:stredisko] = stredisko.map(&:to_h_with_attrs) if has? 'Stredisko'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(KusovnikType, ['TypKusovnik'])
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[:typ_kusovnik] = typ_kusovnik.map(&:to_h) if has? 'TypKusovnik'
16
+ hash[:typ_kusovnik] = typ_kusovnik.map(&:to_h_with_attrs) if has? 'TypKusovnik'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(UcOsnovaType, ['UcOsnova'])
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[:uc_osnova] = uc_osnova.map(&:to_h) if has? 'UcOsnova'
16
+ hash[:uc_osnova] = uc_osnova.map(&:to_h_with_attrs) if has? 'UcOsnova'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  submodel_at(VazbaType, 'Vazba')
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[:vazba] = vazba.to_h if has? 'Vazba'
16
+ hash[:vazba] = vazba.to_h_with_attrs if has? 'Vazba'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Vydejka, ['Vydejka'])
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[:vydejka] = vydejka.map(&:to_h) if has? 'Vydejka'
16
+ hash[:vydejka] = vydejka.map(&:to_h_with_attrs) if has? 'Vydejka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Vyrobka, ['Vyrobka'])
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[:vyrobka] = vyrobka.map(&:to_h) if has? 'Vyrobka'
16
+ hash[:vyrobka] = vyrobka.map(&:to_h_with_attrs) if has? 'Vyrobka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(KusovnikType, ['ZakKusovnik'])
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[:zak_kusovnik] = zak_kusovnik.map(&:to_h) if has? 'ZakKusovnik'
16
+ hash[:zak_kusovnik] = zak_kusovnik.map(&:to_h_with_attrs) if has? 'ZakKusovnik'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Zakazka, ['Zakazka'])
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[:zakazka] = zakazka.map(&:to_h) if has? 'Zakazka'
16
+ hash[:zakazka] = zakazka.map(&:to_h_with_attrs) if has? 'Zakazka'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(ZamestnanecType, ['Zamestnanec'])
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[:zamestnanec] = zamestnanec.map(&:to_h) if has? 'Zamestnanec'
16
+ hash[:zamestnanec] = zamestnanec.map(&:to_h_with_attrs) if has? 'Zamestnanec'
18
17
 
19
18
  hash
20
19
  end
@@ -10,11 +10,10 @@ module MoneyS3
10
10
  array_of_at(Zasoba, ['Zasoba'])
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[:zasoba] = zasoba.map(&:to_h) if has? 'Zasoba'
16
+ hash[:zasoba] = zasoba.map(&:to_h_with_attrs) if has? 'Zasoba'
18
17
 
19
18
  hash
20
19
  end
@@ -104,9 +104,8 @@ module MoneyS3
104
104
  submodel_at(Eshop, 'eshop')
105
105
  end
106
106
 
107
- def to_h
108
- hash = WithAttributes.new({})
109
- hash.attributes = attributes
107
+ def to_h_with_attrs
108
+ hash = HashWithAttributes.new({}, attributes)
110
109
 
111
110
  hash[:obch_nazev] = obch_nazev if has? 'ObchNazev'
112
111
  hash[:fakt_nazev] = fakt_nazev if has? 'FaktNazev'
@@ -125,13 +124,13 @@ module MoneyS3
125
124
  hash[:v_symb] = v_symb if has? 'VSymb'
126
125
  hash[:spec_sym] = spec_sym if has? 'SpecSym'
127
126
  hash[:kod_partn] = kod_partn if has? 'KodPartn'
128
- hash[:obch_adresa] = obch_adresa.to_h if has? 'ObchAdresa'
129
- hash[:fakt_adresa] = fakt_adresa.to_h if has? 'FaktAdresa'
130
- hash[:adresa] = adresa.to_h if has? 'Adresa'
131
- hash[:tel] = tel.to_h if has? 'Tel'
132
- hash[:fax] = fax.to_h if has? 'Fax'
133
- hash[:mobil] = mobil.to_h if has? 'Mobil'
134
- hash[:eshop] = eshop.to_h if has? 'eshop'
127
+ hash[:obch_adresa] = obch_adresa.to_h_with_attrs if has? 'ObchAdresa'
128
+ hash[:fakt_adresa] = fakt_adresa.to_h_with_attrs if has? 'FaktAdresa'
129
+ hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
130
+ hash[:tel] = tel.to_h_with_attrs if has? 'Tel'
131
+ hash[:fax] = fax.to_h_with_attrs if has? 'Fax'
132
+ hash[:mobil] = mobil.to_h_with_attrs if has? 'Mobil'
133
+ hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
135
134
 
136
135
  hash
137
136
  end
@@ -90,9 +90,8 @@ module MoneyS3
90
90
  submodel_at(UctyPohybuType, 'UcPohybV')
91
91
  end
92
92
 
93
- def to_h
94
- hash = WithAttributes.new({})
95
- hash.attributes = attributes
93
+ def to_h_with_attrs
94
+ hash = HashWithAttributes.new({}, attributes)
96
95
 
97
96
  hash[:nazev] = nazev if has? 'Nazev'
98
97
  hash[:kod_skladu] = kod_skladu if has? 'KodSkladu'
@@ -112,9 +111,9 @@ module MoneyS3
112
111
  hash[:prodejk_vz] = prodejk_vz if has? 'ProdejkVz'
113
112
  hash[:v_dod_lst_vz] = v_dod_lst_vz if has? 'VDodLstVz'
114
113
  hash[:p_dod_lst_vz] = p_dod_lst_vz if has? 'PDodLstVz'
115
- hash[:uc_pohyb_m] = uc_pohyb_m.to_h if has? 'UcPohybM'
116
- hash[:uc_pohyb_z] = uc_pohyb_z.to_h if has? 'UcPohybZ'
117
- hash[:uc_pohyb_v] = uc_pohyb_v.to_h if has? 'UcPohybV'
114
+ hash[:uc_pohyb_m] = uc_pohyb_m.to_h_with_attrs if has? 'UcPohybM'
115
+ hash[:uc_pohyb_z] = uc_pohyb_z.to_h_with_attrs if has? 'UcPohybZ'
116
+ hash[:uc_pohyb_v] = uc_pohyb_v.to_h_with_attrs if has? 'UcPohybV'
118
117
 
119
118
  hash
120
119
  end
@@ -90,9 +90,8 @@ module MoneyS3
90
90
  submodel_at(UctyPohybuType, 'UcPohybV')
91
91
  end
92
92
 
93
- def to_h
94
- hash = WithAttributes.new({})
95
- hash.attributes = attributes
93
+ def to_h_with_attrs
94
+ hash = HashWithAttributes.new({}, attributes)
96
95
 
97
96
  hash[:nazev] = nazev if has? 'Nazev'
98
97
  hash[:kod_skladu] = kod_skladu if has? 'KodSkladu'
@@ -112,9 +111,9 @@ module MoneyS3
112
111
  hash[:prodejk_vz] = prodejk_vz if has? 'ProdejkVz'
113
112
  hash[:v_dod_lst_vz] = v_dod_lst_vz if has? 'VDodLstVz'
114
113
  hash[:p_dod_lst_vz] = p_dod_lst_vz if has? 'PDodLstVz'
115
- hash[:uc_pohyb_m] = uc_pohyb_m.to_h if has? 'UcPohybM'
116
- hash[:uc_pohyb_z] = uc_pohyb_z.to_h if has? 'UcPohybZ'
117
- hash[:uc_pohyb_v] = uc_pohyb_v.to_h if has? 'UcPohybV'
114
+ hash[:uc_pohyb_m] = uc_pohyb_m.to_h_with_attrs if has? 'UcPohybM'
115
+ hash[:uc_pohyb_z] = uc_pohyb_z.to_h_with_attrs if has? 'UcPohybZ'
116
+ hash[:uc_pohyb_v] = uc_pohyb_v.to_h_with_attrs if has? 'UcPohybV'
118
117
 
119
118
  hash
120
119
  end
@@ -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'