Sha256: 966d161d03e25b9bafd00a6e93db424f14844aaf7a4fa2dafe36cab8046a6a07
Contents?: true
Size: 948 Bytes
Versions: 6
Compression:
Stored size: 948 Bytes
Contents
module MoneyS3 module Parsers class MessageType include ParserCore::BaseParser def status at 'Status' end def status_attributes attributes_at 'Status' end def reference array_of_at(String, ['Reference', 'ID']) end def error_info array_of_at(ErrorInfoType, ['ErrorInfo']) end def data at 'Data' end def data_attributes attributes_at 'Data' end 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[:data] = data if has? 'Data' hash[:data_attributes] = data_attributes if has? 'Data' hash end end end end
Version data entries
6 entries across 6 versions & 1 rubygems