Class: MoneyS3::Parsers::MsgSklDoklType

Inherits:
MessageType show all
Includes:
ParserCore::BaseParser
Defined in:
lib/money_s3/parsers/msg_skl_dokl_type.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_skl_dokl_type.rb', line 6

def dod_odb
  submodel_at(MsgFirmaType, 'DodOdb')
end

#konec_prijObject



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

def konec_prij
  submodel_at(MsgFirmaType, 'KonecPrij')
end

#nep_platbaObject



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

def nep_platba
  array_of_at(MessageType, ['NepPlatba'])
end

#polozkaObject



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

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

#to_hObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/money_s3/parsers/msg_skl_dokl_type.rb', line 22

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

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

  hash
  super.merge(hash)
end