Sha256: 01dc1a12813f1022350c425678ff057463bb158d20f759deadae698460793e4a

Contents?: true

Size: 775 Bytes

Versions: 2

Compression:

Stored size: 775 Bytes

Contents

module MoneyS3
  module Parsers
    class ErrorInfoType
      include ParserCore::BaseParser

      def error_type_coded
        at 'ErrorTypeCoded'
      end

      def error_type_other
        at 'ErrorTypeOther'
      end

      def error_code
        at 'ErrorCode'
      end

      def error_description
        at 'ErrorDescription'
      end

      def to_h_with_attrs
        hash = ParserCore::HashWithAttributes.new({}, attributes)

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

        hash
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/parsers/error_info_type.rb
money_s3-0.11.0 lib/money_s3/parsers/error_info_type.rb