Class: MoneyS3::Parsers::InvDoklType

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

Instance Method Summary collapse

Instance Method Details

#cislo_dObject



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

def cislo_d
  at 'CisloD'
end

#cislo_d_attributesObject



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

def cislo_d_attributes
  attributes_at 'CisloD'
end

#inv_idObject



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

def inv_id
  at 'InvID'
end

#inv_id_attributesObject



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

def inv_id_attributes
  attributes_at 'InvID'
end

#kontrObject



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

def kontr
  at 'Kontr'
end

#kontr_attributesObject



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

def kontr_attributes
  attributes_at 'Kontr'
end

#polozkaObject



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

def polozka
  array_of_at(PolInvDoklType, ['Polozka'])
end

#popisObject



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

def popis
  at 'Popis'
end

#popis_attributesObject



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

def popis_attributes
  attributes_at 'Popis'
end

#poznamkaObject



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

def poznamka
  at 'Poznamka'
end

#poznamka_attributesObject



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

def poznamka_attributes
  attributes_at 'Poznamka'
end

#pracObject



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

def prac
  at 'Prac'
end

#prac_attributesObject



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

def prac_attributes
  attributes_at 'Prac'
end

#to_hObject



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/money_s3/parsers/inv_dokl_type.rb', line 58

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

  hash[:cislo_d] = cislo_d if has? 'CisloD'
  hash[:cislo_d_attributes] = cislo_d_attributes if has? 'CisloD'
  hash[:inv_id] = inv_id if has? 'InvID'
  hash[:inv_id_attributes] = inv_id_attributes if has? 'InvID'
  hash[:popis] = popis if has? 'Popis'
  hash[:popis_attributes] = popis_attributes if has? 'Popis'
  hash[:prac] = prac if has? 'Prac'
  hash[:prac_attributes] = prac_attributes if has? 'Prac'
  hash[:kontr] = kontr if has? 'Kontr'
  hash[:kontr_attributes] = kontr_attributes if has? 'Kontr'
  hash[:poznamka] = poznamka if has? 'Poznamka'
  hash[:poznamka_attributes] = poznamka_attributes if has? 'Poznamka'
  hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'

  hash
end