Class: MoneyS3::Parsers::ErrorInfoType

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

Instance Method Summary collapse

Instance Method Details

#error_codeObject



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

def error_code
  at 'ErrorCode'
end

#error_code_attributesObject



26
27
28
# File 'lib/money_s3/parsers/error_info_type.rb', line 26

def error_code_attributes
  attributes_at 'ErrorCode'
end

#error_descriptionObject



30
31
32
# File 'lib/money_s3/parsers/error_info_type.rb', line 30

def error_description
  at 'ErrorDescription'
end

#error_description_attributesObject



34
35
36
# File 'lib/money_s3/parsers/error_info_type.rb', line 34

def error_description_attributes
  attributes_at 'ErrorDescription'
end

#error_type_codedObject



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

def error_type_coded
  at 'ErrorTypeCoded'
end

#error_type_coded_attributesObject



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

def error_type_coded_attributes
  attributes_at 'ErrorTypeCoded'
end

#error_type_otherObject



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

def error_type_other
  at 'ErrorTypeOther'
end

#error_type_other_attributesObject



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

def error_type_other_attributes
  attributes_at 'ErrorTypeOther'
end

#to_hObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/money_s3/parsers/error_info_type.rb', line 38

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

  hash[:error_type_coded] = error_type_coded if has? 'ErrorTypeCoded'
  hash[:error_type_coded_attributes] = error_type_coded_attributes if has? 'ErrorTypeCoded'
  hash[:error_type_other] = error_type_other if has? 'ErrorTypeOther'
  hash[:error_type_other_attributes] = error_type_other_attributes if has? 'ErrorTypeOther'
  hash[:error_code] = error_code if has? 'ErrorCode'
  hash[:error_code_attributes] = error_code_attributes if has? 'ErrorCode'
  hash[:error_description] = error_description if has? 'ErrorDescription'
  hash[:error_description_attributes] = error_description_attributes if has? 'ErrorDescription'

  hash
end