Class: MoneyS3::Parsers::KurzListekType

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

Direct Known Subclasses

KurzListek

Instance Method Summary collapse

Instance Method Details

#bankaObject



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

def banka
  at 'Banka'
end

#banka_attributesObject



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

def banka_attributes
  attributes_at 'Banka'
end

#datumObject



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

def datum
  at 'Datum'
end

#datum_attributesObject



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

def datum_attributes
  attributes_at 'Datum'
end

#por_cisloObject



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

def por_cislo
  at 'PorCislo'
end

#por_cislo_attributesObject



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

def por_cislo_attributes
  attributes_at 'PorCislo'
end

#seznam_kurzuObject



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

def seznam_kurzu
  array_of_at(KurzType, ['SeznamKurzu', 'Kurz'])
end

#to_hObject



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/money_s3/parsers/kurz_listek_type.rb', line 34

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

  hash[:banka] = banka if has? 'Banka'
  hash[:banka_attributes] = banka_attributes if has? 'Banka'
  hash[:por_cislo] = por_cislo if has? 'PorCislo'
  hash[:por_cislo_attributes] = por_cislo_attributes if has? 'PorCislo'
  hash[:datum] = datum if has? 'Datum'
  hash[:datum_attributes] = datum_attributes if has? 'Datum'
  hash[:seznam_kurzu] = seznam_kurzu.map(&:to_h) if has? 'SeznamKurzu'

  hash
end