Class: MoneyS3::Parsers::DoklRefType

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

Direct Known Subclasses

DokladHraz

Instance Method Summary collapse

Instance Method Details

#cislo_dokladuObject



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

def cislo_dokladu
  at 'CisloDokladu'
end

#cislo_dokladu_attributesObject



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

def cislo_dokladu_attributes
  attributes_at 'CisloDokladu'
end

#druh_dokladuObject



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

def druh_dokladu
  at 'DruhDokladu'
end

#druh_dokladu_attributesObject



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

def druh_dokladu_attributes
  attributes_at 'DruhDokladu'
end

#eetObject



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

def eet
  submodel_at(EETType, 'EET')
end

#id_dokladuObject



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

def id_dokladu
  at 'IDDokladu'
end

#id_dokladu_attributesObject



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

def id_dokladu_attributes
  attributes_at 'IDDokladu'
end

#rokObject



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

def rok
  at 'Rok'
end

#rok_attributesObject



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

def rok_attributes
  attributes_at 'Rok'
end

#to_hObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/money_s3/parsers/dokl_ref_type.rb', line 42

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

  hash[:id_dokladu] = id_dokladu if has? 'IDDokladu'
  hash[:id_dokladu_attributes] = id_dokladu_attributes if has? 'IDDokladu'
  hash[:cislo_dokladu] = cislo_dokladu if has? 'CisloDokladu'
  hash[:cislo_dokladu_attributes] = cislo_dokladu_attributes if has? 'CisloDokladu'
  hash[:druh_dokladu] = druh_dokladu if has? 'DruhDokladu'
  hash[:druh_dokladu_attributes] = druh_dokladu_attributes if has? 'DruhDokladu'
  hash[:rok] = rok if has? 'Rok'
  hash[:rok_attributes] = rok_attributes if has? 'Rok'
  hash[:eet] = eet.to_h if has? 'EET'

  hash
end