Class: MoneyS3::Parsers::VazbaType

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

Instance Method Summary collapse

Instance Method Details

#dokladObject



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

def doklad
  submodel_at(Doklad, 'Doklad')
end

#pod_typObject



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

def pod_typ
  at 'PodTyp'
end

#pod_typ_attributesObject



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

def pod_typ_attributes
  attributes_at 'PodTyp'
end

#to_hObject



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/money_s3/parsers/vazba_type.rb', line 26

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

  hash[:typ] = typ if has? 'Typ'
  hash[:typ_attributes] = typ_attributes if has? 'Typ'
  hash[:pod_typ] = pod_typ if has? 'PodTyp'
  hash[:pod_typ_attributes] = pod_typ_attributes if has? 'PodTyp'
  hash[:doklad] = doklad.to_h if has? 'Doklad'

  hash
end

#typObject



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

def typ
  at 'Typ'
end

#typ_attributesObject



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

def typ_attributes
  attributes_at 'Typ'
end