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.
- checksums.yaml +4 -4
- data/README.md +1 -50
- data/lib/money_s3/hash_with_attributes.rb +40 -0
- data/lib/money_s3/parsers/adresa_type.rb +2 -3
- data/lib/money_s3/parsers/alternativa_prislusenstvi_type.rb +4 -5
- data/lib/money_s3/parsers/bank_dokl.rb +9 -10
- data/lib/money_s3/parsers/bank_spojeni_type.rb +2 -3
- data/lib/money_s3/parsers/bank_ucet_pokladna_type.rb +2 -3
- data/lib/money_s3/parsers/base_parser.rb +1 -3
- data/lib/money_s3/parsers/castky.rb +2 -3
- data/lib/money_s3/parsers/cena_type.rb +2 -3
- data/lib/money_s3/parsers/cenova_hladina.rb +3 -4
- data/lib/money_s3/parsers/cenova_hladina_type.rb +3 -4
- data/lib/money_s3/parsers/child_kusovnik_type.rb +3 -4
- data/lib/money_s3/parsers/cinnost.rb +2 -3
- data/lib/money_s3/parsers/clen_dph.rb +2 -3
- data/lib/money_s3/parsers/dalsi_sazba.rb +2 -3
- data/lib/money_s3/parsers/data.rb +4 -5
- data/lib/money_s3/parsers/def_sub_pol_type.rb +3 -4
- data/lib/money_s3/parsers/dl_prij.rb +13 -14
- data/lib/money_s3/parsers/dl_vyd.rb +13 -14
- data/lib/money_s3/parsers/dodavka_type.rb +2 -3
- data/lib/money_s3/parsers/dokl_ref_type.rb +3 -4
- data/lib/money_s3/parsers/doklad.rb +2 -3
- data/lib/money_s3/parsers/doklad_firma_type.rb +10 -11
- data/lib/money_s3/parsers/doklad_hraz.rb +3 -4
- data/lib/money_s3/parsers/e_shop_info.rb +2 -3
- data/lib/money_s3/parsers/eet_type.rb +4 -5
- data/lib/money_s3/parsers/ekategorie_type.rb +4 -5
- data/lib/money_s3/parsers/ekategorie_zasoba_type.rb +3 -4
- data/lib/money_s3/parsers/error_info_type.rb +2 -3
- data/lib/money_s3/parsers/eshop.rb +2 -3
- data/lib/money_s3/parsers/eshop_zasoba_type.rb +3 -4
- data/lib/money_s3/parsers/fakt_prij.rb +21 -22
- data/lib/money_s3/parsers/fakt_vyd.rb +21 -22
- data/lib/money_s3/parsers/faktura_type.rb +21 -22
- data/lib/money_s3/parsers/firma.rb +14 -15
- data/lib/money_s3/parsers/firma_type.rb +14 -15
- data/lib/money_s3/parsers/header_kusovnik_type.rb +3 -4
- data/lib/money_s3/parsers/import.rb +9 -10
- data/lib/money_s3/parsers/int_dokl.rb +9 -10
- data/lib/money_s3/parsers/inv_dokl_type.rb +3 -4
- data/lib/money_s3/parsers/km_karta.rb +6 -7
- data/lib/money_s3/parsers/km_karta_type.rb +6 -7
- data/lib/money_s3/parsers/komponenta_kusovnik_type.rb +4 -5
- data/lib/money_s3/parsers/komponenta_type.rb +5 -6
- data/lib/money_s3/parsers/konec_prij_firma_type.rb +7 -8
- data/lib/money_s3/parsers/kurz_listek.rb +3 -4
- data/lib/money_s3/parsers/kurz_rozd.rb +3 -4
- data/lib/money_s3/parsers/kurz_type.rb +2 -3
- data/lib/money_s3/parsers/kusovnik_type.rb +5 -6
- data/lib/money_s3/parsers/mena_type.rb +2 -3
- data/lib/money_s3/parsers/message_type.rb +4 -5
- data/lib/money_s3/parsers/moje_firma_type.rb +8 -9
- data/lib/money_s3/parsers/money_data.rb +50 -51
- data/lib/money_s3/parsers/msg_fakt_poloz_type.rb +3 -4
- data/lib/money_s3/parsers/msg_firma_type.rb +4 -5
- data/lib/money_s3/parsers/msg_poloz_type.rb +4 -5
- data/lib/money_s3/parsers/mz_priplatek.rb +3 -4
- data/lib/money_s3/parsers/mzda_type.rb +5 -6
- data/lib/money_s3/parsers/mzdove_obdobi_type.rb +3 -4
- data/lib/money_s3/parsers/nab_prij.rb +16 -17
- data/lib/money_s3/parsers/nab_vyd.rb +16 -17
- data/lib/money_s3/parsers/nep_platba_type.rb +3 -4
- data/lib/money_s3/parsers/nep_platidlo_type.rb +2 -3
- data/lib/money_s3/parsers/nepritomnost_type.rb +2 -3
- data/lib/money_s3/parsers/neskl_polozka.rb +3 -4
- data/lib/money_s3/parsers/norm_poloz_id_type.rb +2 -3
- data/lib/money_s3/parsers/norm_poloz_ud_type.rb +2 -3
- data/lib/money_s3/parsers/obdobi_dph.rb +2 -3
- data/lib/money_s3/parsers/obj_prij.rb +16 -17
- data/lib/money_s3/parsers/obj_vyd.rb +16 -17
- data/lib/money_s3/parsers/osoba_type.rb +6 -7
- data/lib/money_s3/parsers/parametr_karta_type.rb +3 -4
- data/lib/money_s3/parsers/parametr_type.rb +2 -3
- data/lib/money_s3/parsers/pc.rb +9 -10
- data/lib/money_s3/parsers/pohledavka_type.rb +10 -11
- data/lib/money_s3/parsers/pok_dokl.rb +10 -11
- data/lib/money_s3/parsers/pol_faktury_type.rb +6 -7
- data/lib/money_s3/parsers/pol_inv_dokl_type.rb +6 -7
- data/lib/money_s3/parsers/pol_objedn_type.rb +8 -9
- data/lib/money_s3/parsers/pol_skl_dokl_type.rb +7 -8
- data/lib/money_s3/parsers/popt_prij.rb +16 -17
- data/lib/money_s3/parsers/popt_vyd.rb +16 -17
- data/lib/money_s3/parsers/prac_pomer.rb +2 -3
- data/lib/money_s3/parsers/predkontace.rb +2 -3
- data/lib/money_s3/parsers/predkontace_de_type.rb +2 -3
- data/lib/money_s3/parsers/prepr_dopln_udaj_type.rb +2 -3
- data/lib/money_s3/parsers/prepravce_type.rb +2 -3
- data/lib/money_s3/parsers/prevodka.rb +13 -14
- data/lib/money_s3/parsers/prijemka.rb +13 -14
- data/lib/money_s3/parsers/prodejka.rb +13 -14
- data/lib/money_s3/parsers/reference.rb +4 -5
- data/lib/money_s3/parsers/reference_type.rb +2 -3
- data/lib/money_s3/parsers/rozuct_poloz_id_type.rb +2 -3
- data/lib/money_s3/parsers/rozuct_poloz_ud_type.rb +3 -4
- data/lib/money_s3/parsers/seznam_bank_dokl.rb +3 -4
- data/lib/money_s3/parsers/seznam_cen_hladin.rb +3 -4
- data/lib/money_s3/parsers/seznam_cinnosti.rb +3 -4
- data/lib/money_s3/parsers/seznam_clen_dph.rb +3 -4
- data/lib/money_s3/parsers/seznam_dl_prij.rb +3 -4
- data/lib/money_s3/parsers/seznam_dl_vyd.rb +3 -4
- data/lib/money_s3/parsers/seznam_fakt_prij.rb +3 -4
- data/lib/money_s3/parsers/seznam_fakt_vyd.rb +3 -4
- data/lib/money_s3/parsers/seznam_firem.rb +3 -4
- data/lib/money_s3/parsers/seznam_int_dokl.rb +3 -4
- data/lib/money_s3/parsers/seznam_inv_dokl.rb +3 -4
- data/lib/money_s3/parsers/seznam_km_karta.rb +3 -4
- data/lib/money_s3/parsers/seznam_kurz_listku.rb +3 -4
- data/lib/money_s3/parsers/seznam_mezd.rb +3 -4
- data/lib/money_s3/parsers/seznam_nab_prij.rb +3 -4
- data/lib/money_s3/parsers/seznam_nab_vyd.rb +3 -4
- data/lib/money_s3/parsers/seznam_obj_prij.rb +3 -4
- data/lib/money_s3/parsers/seznam_obj_vyd.rb +3 -4
- data/lib/money_s3/parsers/seznam_pok_dokl.rb +3 -4
- data/lib/money_s3/parsers/seznam_popt_prij.rb +3 -4
- data/lib/money_s3/parsers/seznam_popt_vyd.rb +3 -4
- data/lib/money_s3/parsers/seznam_predkontaci.rb +3 -4
- data/lib/money_s3/parsers/seznam_predkontaci_de.rb +3 -4
- data/lib/money_s3/parsers/seznam_prevodka.rb +3 -4
- data/lib/money_s3/parsers/seznam_prijemka.rb +3 -4
- data/lib/money_s3/parsers/seznam_prodejka.rb +3 -4
- data/lib/money_s3/parsers/seznam_skladu.rb +3 -4
- data/lib/money_s3/parsers/seznam_stredisek.rb +3 -4
- data/lib/money_s3/parsers/seznam_typ_kusovnik.rb +3 -4
- data/lib/money_s3/parsers/seznam_uc_osnov.rb +3 -4
- data/lib/money_s3/parsers/seznam_vazeb.rb +3 -4
- data/lib/money_s3/parsers/seznam_vydejka.rb +3 -4
- data/lib/money_s3/parsers/seznam_vyrobka.rb +3 -4
- data/lib/money_s3/parsers/seznam_zak_kusovnik.rb +3 -4
- data/lib/money_s3/parsers/seznam_zakazka.rb +3 -4
- data/lib/money_s3/parsers/seznam_zamestnancu.rb +3 -4
- data/lib/money_s3/parsers/seznam_zasoba.rb +3 -4
- data/lib/money_s3/parsers/sk_doklad_firma_type.rb +9 -10
- data/lib/money_s3/parsers/sklad.rb +5 -6
- data/lib/money_s3/parsers/sklad_type.rb +5 -6
- data/lib/money_s3/parsers/skupina_firem_type.rb +2 -3
- data/lib/money_s3/parsers/skupina_kusovnik_type.rb +2 -3
- data/lib/money_s3/parsers/skupina_zasob_type.rb +7 -8
- data/lib/money_s3/parsers/souhrn_dph_pol_type.rb +3 -4
- data/lib/money_s3/parsers/souhrn_dph_type.rb +3 -4
- data/lib/money_s3/parsers/stav_zasoby_type.rb +2 -3
- data/lib/money_s3/parsers/stredisko.rb +2 -3
- data/lib/money_s3/parsers/sub_pol_obj_type.rb +3 -4
- data/lib/money_s3/parsers/subpol_inv_d_type.rb +3 -4
- data/lib/money_s3/parsers/telefon_type.rb +2 -3
- data/lib/money_s3/parsers/typ_priplatku_type.rb +2 -3
- data/lib/money_s3/parsers/typ_zasilky_type.rb +2 -3
- data/lib/money_s3/parsers/uc_osnova_type.rb +2 -3
- data/lib/money_s3/parsers/uc_pohyb_type.rb +2 -3
- data/lib/money_s3/parsers/ucet.rb +2 -3
- data/lib/money_s3/parsers/ucty_pohybu_type.rb +2 -3
- data/lib/money_s3/parsers/uhrada_pduhrada.rb +2 -3
- data/lib/money_s3/parsers/uhrada_type.rb +8 -9
- data/lib/money_s3/parsers/valuty.rb +4 -5
- data/lib/money_s3/parsers/valuty_hraz.rb +3 -4
- data/lib/money_s3/parsers/valuty_uhr.rb +3 -4
- data/lib/money_s3/parsers/vazba_type.rb +3 -4
- data/lib/money_s3/parsers/vlajka_type.rb +2 -3
- data/lib/money_s3/parsers/vlajky.rb +4 -5
- data/lib/money_s3/parsers/vydejka.rb +13 -14
- data/lib/money_s3/parsers/vyrobka.rb +13 -14
- data/lib/money_s3/parsers/vyrobni_cislo.rb +2 -3
- data/lib/money_s3/parsers/vyrobni_cislo_type.rb +2 -3
- data/lib/money_s3/parsers/vysledek_odesl.rb +2 -3
- data/lib/money_s3/parsers/vzor_komponenta_type.rb +5 -6
- data/lib/money_s3/parsers/zakazka.rb +5 -6
- data/lib/money_s3/parsers/zamestnanec_type.rb +3 -4
- data/lib/money_s3/parsers/zasoba.rb +14 -15
- data/lib/money_s3/parsers/zauctovani_dph_detype.rb +3 -4
- data/lib/money_s3/parsers/zauctovani_dph_type.rb +3 -4
- data/lib/money_s3/parsers/zavazek_type.rb +9 -10
- data/lib/money_s3/string_with_attributes.rb +28 -0
- data/lib/money_s3.rb +2 -1
- data/money_s3.gemspec +1 -1
- metadata +4 -3
- data/lib/money_s3/with_attributes.rb +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca2b59d440f8a43c7432c0001b67b5d5d844997b
|
|
4
|
+
data.tar.gz: 2009e7a6620744674e145c219179f76a8ac3e32d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45beebb8cc5b5a3cdcf002140b90f0e6206d3f8341f6973949737d5c6f357f195615ca0aab0390b5ef9d4ceb75389406cc358d298d007d0afce98ddab5057855
|
|
7
|
+
data.tar.gz: 1709cd55aa484803f57ff1bfb50ba87339aa35899fbb24f3b2f10af540ded49d19de2df368e1dbf61cdb3b2dff6d0dae7ca1284b99bb07e977fe70dfed18e5b4
|
data/README.md
CHANGED
|
@@ -1,55 +1,6 @@
|
|
|
1
1
|
# MoneyS3
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Content:
|
|
6
|
-
1. [About](#about)
|
|
7
|
-
1. [Naming](#naming)
|
|
8
|
-
2. [What's missing](#whats-missing)
|
|
9
|
-
2. [Api](#api)
|
|
10
|
-
1. [Parsers](#parsers)
|
|
11
|
-
2. [Builder](#builder)
|
|
12
|
-
3. [Performance](#performance)
|
|
13
|
-
4. [External links](#external-links)
|
|
14
|
-
5. [License](#license)
|
|
15
|
-
|
|
16
|
-
## About
|
|
17
|
-
|
|
18
|
-
WIP
|
|
19
|
-
|
|
20
|
-
### Naming
|
|
21
|
-
|
|
22
|
-
WIP
|
|
23
|
-
|
|
24
|
-
#### Method names
|
|
25
|
-
|
|
26
|
-
WIP
|
|
27
|
-
|
|
28
|
-
#### Class names
|
|
29
|
-
|
|
30
|
-
WIP
|
|
31
|
-
|
|
32
|
-
### Missing parts
|
|
33
|
-
|
|
34
|
-
WIP
|
|
35
|
-
|
|
36
|
-
## Api
|
|
37
|
-
|
|
38
|
-
### Parsing a document
|
|
39
|
-
|
|
40
|
-
WIP
|
|
41
|
-
|
|
42
|
-
### Creating a document
|
|
43
|
-
|
|
44
|
-
WIP
|
|
45
|
-
|
|
46
|
-
## Performance
|
|
47
|
-
|
|
48
|
-
WIP
|
|
49
|
-
|
|
50
|
-
## External links
|
|
51
|
-
|
|
52
|
-
WIP
|
|
3
|
+
Unstable until 1.0.0
|
|
53
4
|
|
|
54
5
|
## License
|
|
55
6
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module MoneyS3
|
|
2
|
+
class HashWithAttributes
|
|
3
|
+
def initialize(hash, attributes = nil)
|
|
4
|
+
@hash = hash
|
|
5
|
+
@attributes = attributes if attributes
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def value
|
|
9
|
+
@hash
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def attributes
|
|
13
|
+
@attributes ||= {}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def attributes=(attributes)
|
|
17
|
+
@attributes = attributes
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def ==(other)
|
|
21
|
+
if other.respond_to? :attributes
|
|
22
|
+
value == other && other.attributes == attributes
|
|
23
|
+
else
|
|
24
|
+
value == other
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def key?(key)
|
|
29
|
+
value.key? key
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def [](key)
|
|
33
|
+
value[key]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def []=(key, key_value)
|
|
37
|
+
value[key] = key_value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -25,9 +25,8 @@ module MoneyS3
|
|
|
25
25
|
at 'KodStatu'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
def
|
|
29
|
-
hash =
|
|
30
|
-
hash.attributes = attributes
|
|
28
|
+
def to_h_with_attrs
|
|
29
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
31
30
|
|
|
32
31
|
hash[:ulice] = ulice if has? 'Ulice'
|
|
33
32
|
hash[:misto] = misto if has? 'Misto'
|
|
@@ -35,17 +35,16 @@ module MoneyS3
|
|
|
35
35
|
submodel_at(SkladType, 'Sklad')
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def
|
|
39
|
-
hash =
|
|
40
|
-
hash.attributes = attributes
|
|
38
|
+
def to_h_with_attrs
|
|
39
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
41
40
|
|
|
42
41
|
hash[:popis] = popis if has? 'Popis'
|
|
43
42
|
hash[:poc_mj] = poc_mj if has? 'PocMJ'
|
|
44
43
|
hash[:poradi] = poradi if has? 'Poradi'
|
|
45
44
|
hash[:druh_komp] = druh_komp if has? 'DruhKomp'
|
|
46
45
|
hash[:symetric] = symetric if has? 'Symetric'
|
|
47
|
-
hash[:km_karta] = km_karta.
|
|
48
|
-
hash[:sklad] = sklad.
|
|
46
|
+
hash[:km_karta] = km_karta.to_h_with_attrs if has? 'KmKarta'
|
|
47
|
+
hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
|
|
49
48
|
|
|
50
49
|
hash
|
|
51
50
|
end
|
|
@@ -176,9 +176,8 @@ module MoneyS3
|
|
|
176
176
|
array_of_at(String, ['Dokumenty', 'Dokument'])
|
|
177
177
|
end
|
|
178
178
|
|
|
179
|
-
def
|
|
180
|
-
hash =
|
|
181
|
-
hash.attributes = attributes
|
|
179
|
+
def to_h_with_attrs
|
|
180
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
182
181
|
|
|
183
182
|
hash[:vydej] = vydej if has? 'Vydej'
|
|
184
183
|
hash[:doklad] = doklad if has? 'Doklad'
|
|
@@ -213,13 +212,13 @@ module MoneyS3
|
|
|
213
212
|
hash[:vyst] = vyst if has? 'Vyst'
|
|
214
213
|
hash[:typ_dokl] = typ_dokl if has? 'TypDokl'
|
|
215
214
|
hash[:celkem] = celkem if has? 'Celkem'
|
|
216
|
-
hash[:adresa] = adresa.
|
|
217
|
-
hash[:valuty] = valuty.
|
|
218
|
-
hash[:ucet] = ucet.
|
|
219
|
-
hash[:vlajky] = vlajky.
|
|
220
|
-
hash[:souhrn_dph] = souhrn_dph.
|
|
221
|
-
hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:
|
|
222
|
-
hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:
|
|
215
|
+
hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
|
|
216
|
+
hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'
|
|
217
|
+
hash[:ucet] = ucet.to_h_with_attrs if has? 'Ucet'
|
|
218
|
+
hash[:vlajky] = vlajky.to_h_with_attrs if has? 'Vlajky'
|
|
219
|
+
hash[:souhrn_dph] = souhrn_dph.to_h_with_attrs if has? 'SouhrnDPH'
|
|
220
|
+
hash[:seznam_norm_polozek] = seznam_norm_polozek.map(&:to_h_with_attrs) if has? 'SeznamNormPolozek'
|
|
221
|
+
hash[:seznam_rozuct_polozek] = seznam_rozuct_polozek.map(&:to_h_with_attrs) if has? 'SeznamRozuctPolozek'
|
|
223
222
|
hash[:dokumenty] = dokumenty if has? 'Dokumenty'
|
|
224
223
|
|
|
225
224
|
hash
|
|
@@ -21,9 +21,8 @@ module MoneyS3
|
|
|
21
21
|
at 'Ucel'
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
hash =
|
|
26
|
-
hash.attributes = attributes
|
|
24
|
+
def to_h_with_attrs
|
|
25
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
27
26
|
|
|
28
27
|
hash[:ucet] = ucet if has? 'Ucet'
|
|
29
28
|
hash[:kod_banky] = kod_banky if has? 'KodBanky'
|
|
@@ -97,9 +97,8 @@ module MoneyS3
|
|
|
97
97
|
at 'Pozn'
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
def
|
|
101
|
-
hash =
|
|
102
|
-
hash.attributes = attributes
|
|
100
|
+
def to_h_with_attrs
|
|
101
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
103
102
|
|
|
104
103
|
hash[:zkrat] = zkrat if has? 'Zkrat'
|
|
105
104
|
hash[:popis] = popis if has? 'Popis'
|
|
@@ -61,9 +61,8 @@ module MoneyS3
|
|
|
61
61
|
at 'CerpZuct'
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
def
|
|
65
|
-
hash =
|
|
66
|
-
hash.attributes = attributes
|
|
64
|
+
def to_h_with_attrs
|
|
65
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
67
66
|
|
|
68
67
|
hash[:celkem] = celkem if has? 'Celkem'
|
|
69
68
|
hash[:zaklad_0] = zaklad_0 if has? 'Zaklad_0'
|
|
@@ -17,9 +17,8 @@ module MoneyS3
|
|
|
17
17
|
at 'Sleva'
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def
|
|
21
|
-
hash =
|
|
22
|
-
hash.attributes = attributes
|
|
20
|
+
def to_h_with_attrs
|
|
21
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
23
22
|
|
|
24
23
|
hash[:limit] = limit if has? 'Limit'
|
|
25
24
|
hash[:cena] = cena if has? 'Cena'
|
|
@@ -30,16 +30,15 @@ module MoneyS3
|
|
|
30
30
|
submodel_at(MenaType, 'Mena')
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def
|
|
34
|
-
hash =
|
|
35
|
-
hash.attributes = attributes
|
|
33
|
+
def to_h_with_attrs
|
|
34
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
36
35
|
|
|
37
36
|
hash[:zkrat] = zkrat if has? 'Zkrat'
|
|
38
37
|
hash[:nazev] = nazev if has? 'Nazev'
|
|
39
38
|
hash[:pozn] = pozn if has? 'Pozn'
|
|
40
39
|
hash[:skup] = skup if has? 'Skup'
|
|
41
40
|
hash[:ceny] = ceny if has? 'Ceny'
|
|
42
|
-
hash[:mena] = mena.
|
|
41
|
+
hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
|
|
43
42
|
|
|
44
43
|
hash
|
|
45
44
|
end
|
|
@@ -30,16 +30,15 @@ module MoneyS3
|
|
|
30
30
|
submodel_at(MenaType, 'Mena')
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def
|
|
34
|
-
hash =
|
|
35
|
-
hash.attributes = attributes
|
|
33
|
+
def to_h_with_attrs
|
|
34
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
36
35
|
|
|
37
36
|
hash[:zkrat] = zkrat if has? 'Zkrat'
|
|
38
37
|
hash[:nazev] = nazev if has? 'Nazev'
|
|
39
38
|
hash[:pozn] = pozn if has? 'Pozn'
|
|
40
39
|
hash[:skup] = skup if has? 'Skup'
|
|
41
40
|
hash[:ceny] = ceny if has? 'Ceny'
|
|
42
|
-
hash[:mena] = mena.
|
|
41
|
+
hash[:mena] = mena.to_h_with_attrs if has? 'Mena'
|
|
43
42
|
|
|
44
43
|
hash
|
|
45
44
|
end
|
|
@@ -102,9 +102,8 @@ module MoneyS3
|
|
|
102
102
|
submodel_at(SkladType, 'Sklad')
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
def
|
|
106
|
-
hash =
|
|
107
|
-
hash.attributes = attributes
|
|
105
|
+
def to_h_with_attrs
|
|
106
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
108
107
|
|
|
109
108
|
hash[:cislo] = cislo if has? 'Cislo'
|
|
110
109
|
hash[:typ] = typ if has? 'Typ'
|
|
@@ -129,7 +128,7 @@ module MoneyS3
|
|
|
129
128
|
hash[:zakazka] = zakazka if has? 'Zakazka'
|
|
130
129
|
hash[:stav] = stav if has? 'Stav'
|
|
131
130
|
hash[:poznamka] = poznamka if has? 'Poznamka'
|
|
132
|
-
hash[:sklad] = sklad.
|
|
131
|
+
hash[:sklad] = sklad.to_h_with_attrs if has? 'Sklad'
|
|
133
132
|
|
|
134
133
|
hash
|
|
135
134
|
end
|
|
@@ -17,9 +17,8 @@ module MoneyS3
|
|
|
17
17
|
at 'Pozn'
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def
|
|
21
|
-
hash =
|
|
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'
|
|
@@ -45,9 +45,8 @@ module MoneyS3
|
|
|
45
45
|
at 'Pozn'
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def
|
|
49
|
-
hash =
|
|
50
|
-
hash.attributes = attributes
|
|
48
|
+
def to_h_with_attrs
|
|
49
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
51
50
|
|
|
52
51
|
hash[:zkrat] = zkrat if has? 'Zkrat'
|
|
53
52
|
hash[:datum_od] = datum_od if has? 'DatumOd'
|
|
@@ -25,9 +25,8 @@ module MoneyS3
|
|
|
25
25
|
at 'DPH'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
def
|
|
29
|
-
hash =
|
|
30
|
-
hash.attributes = attributes
|
|
28
|
+
def to_h_with_attrs
|
|
29
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
31
30
|
|
|
32
31
|
hash[:popis] = popis if has? 'Popis'
|
|
33
32
|
hash[:hladina_dph] = hladina_dph if has? 'HladinaDPH'
|
|
@@ -14,12 +14,11 @@ module MoneyS3
|
|
|
14
14
|
submodel_at(FakturaType, 'FaktPrij')
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def
|
|
18
|
-
hash =
|
|
19
|
-
hash.attributes = attributes
|
|
17
|
+
def to_h_with_attrs
|
|
18
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
20
19
|
|
|
21
|
-
hash[:fakt_vyd] = fakt_vyd.
|
|
22
|
-
hash[:fakt_prij] = fakt_prij.
|
|
20
|
+
hash[:fakt_vyd] = fakt_vyd.to_h_with_attrs if has? 'FaktVyd'
|
|
21
|
+
hash[:fakt_prij] = fakt_prij.to_h_with_attrs if has? 'FaktPrij'
|
|
23
22
|
|
|
24
23
|
hash
|
|
25
24
|
end
|
|
@@ -14,12 +14,11 @@ module MoneyS3
|
|
|
14
14
|
submodel_at(PolSklDoklType, 'Polozka')
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def
|
|
18
|
-
hash =
|
|
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.
|
|
21
|
+
hash[:polozka] = polozka.to_h_with_attrs if has? 'Polozka'
|
|
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
|
|
224
|
-
hash =
|
|
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.
|
|
267
|
-
hash[:valuty] = valuty.
|
|
268
|
-
hash[:dod_odb] = dod_odb.
|
|
269
|
-
hash[:konec_prij] = konec_prij.
|
|
270
|
-
hash[:import] = import.
|
|
271
|
-
hash[:sklad_pro_pr] = sklad_pro_pr.
|
|
272
|
-
hash[:moje_firma] = moje_firma.
|
|
273
|
-
hash[:vlajky] = vlajky.
|
|
274
|
-
hash[:souhrn_dph] = souhrn_dph.
|
|
275
|
-
hash[:polozka] = polozka.map(&:
|
|
276
|
-
hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:
|
|
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
|
|
224
|
-
hash =
|
|
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.
|
|
267
|
-
hash[:valuty] = valuty.
|
|
268
|
-
hash[:dod_odb] = dod_odb.
|
|
269
|
-
hash[:konec_prij] = konec_prij.
|
|
270
|
-
hash[:import] = import.
|
|
271
|
-
hash[:sklad_pro_pr] = sklad_pro_pr.
|
|
272
|
-
hash[:moje_firma] = moje_firma.
|
|
273
|
-
hash[:vlajky] = vlajky.
|
|
274
|
-
hash[:souhrn_dph] = souhrn_dph.
|
|
275
|
-
hash[:polozka] = polozka.map(&:
|
|
276
|
-
hash[:seznam_nep_plateb] = seznam_nep_plateb.map(&:
|
|
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
|
|
@@ -21,9 +21,8 @@ module MoneyS3
|
|
|
21
21
|
at 'Cena'
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
hash =
|
|
26
|
-
hash.attributes = attributes
|
|
24
|
+
def to_h_with_attrs
|
|
25
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
27
26
|
|
|
28
27
|
hash[:oznaceni] = oznaceni if has? 'Oznaceni'
|
|
29
28
|
hash[:dat_exp] = dat_exp if has? 'DatExp'
|
|
@@ -26,15 +26,14 @@ module MoneyS3
|
|
|
26
26
|
submodel_at(EETType, 'EET')
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def
|
|
30
|
-
hash =
|
|
31
|
-
hash.attributes = attributes
|
|
29
|
+
def to_h_with_attrs
|
|
30
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
32
31
|
|
|
33
32
|
hash[:id_dokladu] = id_dokladu if has? 'IDDokladu'
|
|
34
33
|
hash[:cislo_dokladu] = cislo_dokladu if has? 'CisloDokladu'
|
|
35
34
|
hash[:druh_dokladu] = druh_dokladu if has? 'DruhDokladu'
|
|
36
35
|
hash[:rok] = rok if has? 'Rok'
|
|
37
|
-
hash[:eet] = eet.
|
|
36
|
+
hash[:eet] = eet.to_h_with_attrs if has? 'EET'
|
|
38
37
|
|
|
39
38
|
hash
|
|
40
39
|
end
|
|
@@ -37,9 +37,8 @@ module MoneyS3
|
|
|
37
37
|
at 'PlnenoDPH'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def
|
|
41
|
-
hash =
|
|
42
|
-
hash.attributes = attributes
|
|
40
|
+
def to_h_with_attrs
|
|
41
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
43
42
|
|
|
44
43
|
hash[:druh] = druh if has? 'Druh'
|
|
45
44
|
hash[:cislo] = cislo if has? 'Cislo'
|
|
@@ -109,9 +109,8 @@ module MoneyS3
|
|
|
109
109
|
submodel_at(Eshop, 'eshop')
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
-
def
|
|
113
|
-
hash =
|
|
114
|
-
hash.attributes = attributes
|
|
112
|
+
def to_h_with_attrs
|
|
113
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
115
114
|
|
|
116
115
|
hash[:obch_nazev] = obch_nazev if has? 'ObchNazev'
|
|
117
116
|
hash[:fakt_nazev] = fakt_nazev if has? 'FaktNazev'
|
|
@@ -130,14 +129,14 @@ module MoneyS3
|
|
|
130
129
|
hash[:v_symb] = v_symb if has? 'VSymb'
|
|
131
130
|
hash[:spec_sym] = spec_sym if has? 'SpecSym'
|
|
132
131
|
hash[:kod_partn] = kod_partn if has? 'KodPartn'
|
|
133
|
-
hash[:obch_adresa] = obch_adresa.
|
|
134
|
-
hash[:fakt_adresa] = fakt_adresa.
|
|
135
|
-
hash[:adresa] = adresa.
|
|
136
|
-
hash[:tel] = tel.
|
|
137
|
-
hash[:fax] = fax.
|
|
138
|
-
hash[:mobil] = mobil.
|
|
139
|
-
hash[:isdoc] = isdoc.
|
|
140
|
-
hash[:eshop] = eshop.
|
|
132
|
+
hash[:obch_adresa] = obch_adresa.to_h_with_attrs if has? 'ObchAdresa'
|
|
133
|
+
hash[:fakt_adresa] = fakt_adresa.to_h_with_attrs if has? 'FaktAdresa'
|
|
134
|
+
hash[:adresa] = adresa.to_h_with_attrs if has? 'Adresa'
|
|
135
|
+
hash[:tel] = tel.to_h_with_attrs if has? 'Tel'
|
|
136
|
+
hash[:fax] = fax.to_h_with_attrs if has? 'Fax'
|
|
137
|
+
hash[:mobil] = mobil.to_h_with_attrs if has? 'Mobil'
|
|
138
|
+
hash[:isdoc] = isdoc.to_h_with_attrs if has? 'ISDOC'
|
|
139
|
+
hash[:eshop] = eshop.to_h_with_attrs if has? 'eshop'
|
|
141
140
|
|
|
142
141
|
hash
|
|
143
142
|
end
|
|
@@ -26,15 +26,14 @@ module MoneyS3
|
|
|
26
26
|
submodel_at(EETType, 'EET')
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def
|
|
30
|
-
hash =
|
|
31
|
-
hash.attributes = attributes
|
|
29
|
+
def to_h_with_attrs
|
|
30
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
32
31
|
|
|
33
32
|
hash[:id_dokladu] = id_dokladu if has? 'IDDokladu'
|
|
34
33
|
hash[:cislo_dokladu] = cislo_dokladu if has? 'CisloDokladu'
|
|
35
34
|
hash[:druh_dokladu] = druh_dokladu if has? 'DruhDokladu'
|
|
36
35
|
hash[:rok] = rok if has? 'Rok'
|
|
37
|
-
hash[:eet] = eet.
|
|
36
|
+
hash[:eet] = eet.to_h_with_attrs if has? 'EET'
|
|
38
37
|
|
|
39
38
|
hash
|
|
40
39
|
end
|
|
@@ -17,9 +17,8 @@ module MoneyS3
|
|
|
17
17
|
at 'eSaleID'
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def
|
|
21
|
-
hash =
|
|
22
|
-
hash.attributes = attributes
|
|
20
|
+
def to_h_with_attrs
|
|
21
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
23
22
|
|
|
24
23
|
hash[:e_shop_id] = e_shop_id if has? 'eShopID'
|
|
25
24
|
hash[:e_shop_name] = e_shop_name if has? 'eShopName'
|
|
@@ -91,9 +91,8 @@ module MoneyS3
|
|
|
91
91
|
submodel_at(VysledekOdesl, 'VysledekOdesl')
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
def
|
|
95
|
-
hash =
|
|
96
|
-
hash.attributes = attributes
|
|
94
|
+
def to_h_with_attrs
|
|
95
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
97
96
|
|
|
98
97
|
hash[:eet_odesl] = eet_odesl if has? 'EETOdesl'
|
|
99
98
|
hash[:prod_misto] = prod_misto if has? 'ProdMisto'
|
|
@@ -114,8 +113,8 @@ module MoneyS3
|
|
|
114
113
|
hash[:fik] = fik if has? 'FIK'
|
|
115
114
|
hash[:cert_pkp] = cert_pkp if has? 'CertPKP'
|
|
116
115
|
hash[:cert_eet] = cert_eet if has? 'CertEET'
|
|
117
|
-
hash[:castky] = castky.
|
|
118
|
-
hash[:vysledek_odesl] = vysledek_odesl.
|
|
116
|
+
hash[:castky] = castky.to_h_with_attrs if has? 'Castky'
|
|
117
|
+
hash[:vysledek_odesl] = vysledek_odesl.to_h_with_attrs if has? 'VysledekOdesl'
|
|
119
118
|
|
|
120
119
|
hash
|
|
121
120
|
end
|
|
@@ -35,17 +35,16 @@ module MoneyS3
|
|
|
35
35
|
array_of_at(EkategorieType, ['SeznamPodrKategorii', 'eKategorie'])
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def
|
|
39
|
-
hash =
|
|
40
|
-
hash.attributes = attributes
|
|
38
|
+
def to_h_with_attrs
|
|
39
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
41
40
|
|
|
42
41
|
hash[:id] = id if has? 'ID'
|
|
43
42
|
hash[:name] = name if has? 'Name'
|
|
44
43
|
hash[:descript] = descript if has? 'Descript'
|
|
45
44
|
hash[:in_changed] = in_changed if has? 'IN_Changed'
|
|
46
45
|
hash[:no_public] = no_public if has? 'NoPublic'
|
|
47
|
-
hash[:e_shop_info] = e_shop_info.
|
|
48
|
-
hash[:seznam_podr_kategorii] = seznam_podr_kategorii.map(&:
|
|
46
|
+
hash[:e_shop_info] = e_shop_info.to_h_with_attrs if has? 'eShopInfo'
|
|
47
|
+
hash[:seznam_podr_kategorii] = seznam_podr_kategorii.map(&:to_h_with_attrs) if has? 'SeznamPodrKategorii'
|
|
49
48
|
|
|
50
49
|
hash
|
|
51
50
|
end
|
|
@@ -34,9 +34,8 @@ module MoneyS3
|
|
|
34
34
|
submodel_at(EkategorieZasobaType, 'Parent')
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def
|
|
38
|
-
hash =
|
|
39
|
-
hash.attributes = attributes
|
|
37
|
+
def to_h_with_attrs
|
|
38
|
+
hash = HashWithAttributes.new({}, attributes)
|
|
40
39
|
|
|
41
40
|
hash[:id] = id if has? 'ID'
|
|
42
41
|
hash[:name] = name if has? 'Name'
|
|
@@ -44,7 +43,7 @@ module MoneyS3
|
|
|
44
43
|
hash[:poznamka] = poznamka if has? 'Poznamka'
|
|
45
44
|
hash[:changed] = changed if has? 'Changed'
|
|
46
45
|
hash[:public] = public if has? 'Public'
|
|
47
|
-
hash[:parent] = parent.
|
|
46
|
+
hash[:parent] = parent.to_h_with_attrs if has? 'Parent'
|
|
48
47
|
|
|
49
48
|
hash
|
|
50
49
|
end
|