Exception: ActiveMerchant::ResponseError

Inherits:
ActiveMerchantError show all
Defined in:
lib/active_merchant/lib/connection.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message = nil) ⇒ ResponseError

Returns a new instance of ResponseError.



16
17
18
19
# File 'lib/active_merchant/lib/connection.rb', line 16

def initialize(response, message = nil)
  @response = response
  @message  = message
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



14
15
16
# File 'lib/active_merchant/lib/connection.rb', line 14

def response
  @response
end

Instance Method Details

#to_sObject



21
22
23
# File 'lib/active_merchant/lib/connection.rb', line 21

def to_s
  "Failed with #{response.code} #{response.message if response.respond_to?(:message)}"
end