Class: MoneyS3::Parsers::MsgFaktDpptype

Inherits:
MessageType show all
Includes:
ParserCore::BaseParser
Defined in:
lib/money_s3/parsers/msg_fakt_dpptype.rb

Instance Method Summary collapse

Methods inherited from MessageType

#data, #data_attributes, #error_info, #reference, #status, #status_attributes

Instance Method Details

#dod_odbObject



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

def dod_odb
  submodel_at(MsgFirmaType, 'DodOdb')
end

#polozkaObject



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

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

#to_hObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/money_s3/parsers/msg_fakt_dpptype.rb', line 14

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

  hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
  hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'

  hash
  super.merge(hash)
end