Sha256: 3a9cf19aeee3645f9b232c8167889c4748f56c9e039fe3cb928658641f5aeaf4

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 Bytes

Contents

module PensioAPI
  module Errors
    class GatewayError < StandardError
      include Mixins::HasTransactions
      attr_reader :request_time, :request_path, :cardholder_message

      def initialize(request)
        super(request.body['MerchantErrorMessage'])

        @raw = request.body

        @request_time = Time.parse(request.headers['Date'])
        @request_path = request.headers['Path']

        @cardholder_message = request.body['CardHolderErrorMessage']

        map_transactions
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pensio_api-0.3.5 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.3.4 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.3.3 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.3.2 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.3.1 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.3.0 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.2.3 lib/pensio_api/errors/gateway_error.rb
pensio_api-0.2.2 lib/pensio_api/errors/gateway_error.rb