Class: MoneyS3::Parsers::PolInvDoklType

Inherits:
Object
  • Object
show all
Includes:
ParserCore::BaseParser
Defined in:
lib/money_s3/parsers/pol_inv_dokl_type.rb

Instance Method Summary collapse

Instance Method Details

#km_kartaObject



54
55
56
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 54

def km_karta
  submodel_at(KmKartaType, 'KmKarta')
end

#mjObject



30
31
32
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 30

def mj
  at 'MJ'
end

#mj_attributesObject



34
35
36
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 34

def mj_attributes
  attributes_at 'MJ'
end

#mn_invObject



38
39
40
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 38

def mn_inv
  at 'MnInv'
end

#mn_inv_attributesObject



42
43
44
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 42

def mn_inv_attributes
  attributes_at 'MnInv'
end

#popisObject



6
7
8
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 6

def popis
  at 'Popis'
end

#popis_attributesObject



10
11
12
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 10

def popis_attributes
  attributes_at 'Popis'
end

#seznam_vcObject



46
47
48
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 46

def seznam_vc
  array_of_at(VyrobniCislo, ['SeznamVC', 'VyrobniCislo'])
end

#skladObject



50
51
52
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 50

def sklad
  submodel_at(SkladType, 'Sklad')
end

#slozeniObject



58
59
60
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 58

def slozeni
  array_of_at(SubpolInvDType, ['Slozeni', 'SubPolozka'])
end

#slupinaObject



22
23
24
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 22

def slupina
  at 'Slupina'
end

#slupina_attributesObject



26
27
28
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 26

def slupina_attributes
  attributes_at 'Slupina'
end

#to_hObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 62

def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:popis] = popis if has? 'Popis'
  hash[:popis_attributes] = popis_attributes if has? 'Popis'
  hash[:zkrat] = zkrat if has? 'Zkrat'
  hash[:zkrat_attributes] = zkrat_attributes if has? 'Zkrat'
  hash[:slupina] = slupina if has? 'Slupina'
  hash[:slupina_attributes] = slupina_attributes if has? 'Slupina'
  hash[:mj] = mj if has? 'MJ'
  hash[:mj_attributes] = mj_attributes if has? 'MJ'
  hash[:mn_inv] = mn_inv if has? 'MnInv'
  hash[:mn_inv_attributes] = mn_inv_attributes if has? 'MnInv'
  hash[:seznam_vc] = seznam_vc.map(&:to_h) if has? 'SeznamVC'
  hash[:sklad] = sklad.to_h if has? 'Sklad'
  hash[:km_karta] = km_karta.to_h if has? 'KmKarta'
  hash[:slozeni] = slozeni.map(&:to_h) if has? 'Slozeni'

  hash
end

#zkratObject



14
15
16
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 14

def zkrat
  at 'Zkrat'
end

#zkrat_attributesObject



18
19
20
# File 'lib/money_s3/parsers/pol_inv_dokl_type.rb', line 18

def zkrat_attributes
  attributes_at 'Zkrat'
end