Class: MoneyS3::Parsers::ParametrKartaType

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

Instance Method Summary collapse

Instance Method Details

#parametrObject



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

def parametr
  submodel_at(ParametrType, 'Parametr')
end

#poradiObject



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

def poradi
  at 'Poradi'
end

#poradi_attributesObject



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

def poradi_attributes
  attributes_at 'Poradi'
end

#to_hObject



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

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

  hash[:parametr] = parametr.to_h if has? 'Parametr'
  hash[:poradi] = poradi if has? 'Poradi'
  hash[:poradi_attributes] = poradi_attributes if has? 'Poradi'
  hash[:value] = value if has? 'Value'
  hash[:value_attributes] = value_attributes if has? 'Value'

  hash
end

#valueObject



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

def value
  at 'Value'
end

#value_attributesObject



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

def value_attributes
  attributes_at 'Value'
end