Sha256: 58281c84aebc119c20a9912bbdf2dc598e48eb0218a398d2a438e942071e4f48

Contents?: true

Size: 791 Bytes

Versions: 4

Compression:

Stored size: 791 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class ErrorInfoType
      include 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 = 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

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/error_info_type.rb
money_s3-0.9.0 lib/money_s3/parsers/error_info_type.rb
money_s3-0.8.0 lib/money_s3/parsers/error_info_type.rb
money_s3-0.7.0 lib/money_s3/parsers/error_info_type.rb