Class: MoneyS3::Parsers::SubpolInvDType

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

Instance Method Summary collapse

Instance Method Details

#mn_sadaObject



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

def mn_sada
  at 'MnSada'
end

#mn_sada_attributesObject



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

def mn_sada_attributes
  attributes_at 'MnSada'
end

#polozkaObject



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

def polozka
  submodel_at(PolInvDoklType, 'Polozka')
end

#to_hObject



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

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

  hash[:mn_sada] = mn_sada if has? 'MnSada'
  hash[:mn_sada_attributes] = mn_sada_attributes if has? 'MnSada'
  hash[:polozka] = polozka.to_h if has? 'Polozka'

  hash
end