Class: MoneyS3::Parsers::SubPolObjType

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

Instance Method Summary collapse

Instance Method Details

#mj_na_saduObject



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

def mj_na_sadu
  at 'MJNaSadu'
end

#mj_na_sadu_attributesObject



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

def mj_na_sadu_attributes
  attributes_at 'MJNaSadu'
end

#polozkaObject



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

def polozka
  submodel_at(PolObjednType, 'Polozka')
end

#to_hObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/money_s3/parsers/sub_pol_obj_type.rb', line 18

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

  hash[:mj_na_sadu] = mj_na_sadu if has? 'MJNaSadu'
  hash[:mj_na_sadu_attributes] = mj_na_sadu_attributes if has? 'MJNaSadu'
  hash[:polozka] = polozka.to_h if has? 'Polozka'

  hash
end