Class: MoneyS3::Parsers::MessageRootType
- Inherits:
-
Object
- Object
- MoneyS3::Parsers::MessageRootType
- Includes:
- ParserCore::BaseParser
- Defined in:
- lib/money_s3/parsers/message_root_type.rb
Direct Known Subclasses
Instance Method Summary collapse
- #error_info ⇒ Object
- #reference ⇒ Object
- #status ⇒ Object
- #status_attributes ⇒ Object
- #to_h ⇒ Object
Instance Method Details
#error_info ⇒ Object
18 19 20 |
# File 'lib/money_s3/parsers/message_root_type.rb', line 18 def error_info array_of_at(ErrorInfoType, ['ErrorInfo']) end |
#reference ⇒ Object
14 15 16 |
# File 'lib/money_s3/parsers/message_root_type.rb', line 14 def reference array_of_at(String, ['Reference', 'ID']) end |
#status ⇒ Object
6 7 8 |
# File 'lib/money_s3/parsers/message_root_type.rb', line 6 def status at 'Status' end |
#status_attributes ⇒ Object
10 11 12 |
# File 'lib/money_s3/parsers/message_root_type.rb', line 10 def status_attributes attributes_at 'Status' end |
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/money_s3/parsers/message_root_type.rb', line 22 def to_h hash = {} hash[:attributes] = attributes hash[:status] = status if has? 'Status' hash[:status_attributes] = status_attributes if has? 'Status' hash[:reference] = reference if has? 'Reference' hash[:error_info] = error_info.map(&:to_h) if has? 'ErrorInfo' hash end |