Exception: UnifiedPayment::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- UnifiedPayment::Error
- Defined in:
- lib/unified_payment/client.rb
Overview
This is the usual error raised on any UnifiedPayment related Errors
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#http_response ⇒ Object
Returns the value of attribute http_response.
-
#user_error ⇒ Object
Returns the value of attribute user_error.
Instance Method Summary collapse
-
#initialize(error, xml_response = nil, user_error = nil) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(error, xml_response = nil, user_error = nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 |
# File 'lib/unified_payment/client.rb', line 9 def initialize(error, xml_response=nil, user_error=nil) @error = error @xml_response = xml_response @user_error = user_error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
7 8 9 |
# File 'lib/unified_payment/client.rb', line 7 def error @error end |
#http_response ⇒ Object
Returns the value of attribute http_response.
7 8 9 |
# File 'lib/unified_payment/client.rb', line 7 def http_response @http_response end |
#user_error ⇒ Object
Returns the value of attribute user_error.
7 8 9 |
# File 'lib/unified_payment/client.rb', line 7 def user_error @user_error end |
Instance Method Details
#to_s ⇒ Object
15 16 17 18 |
# File 'lib/unified_payment/client.rb', line 15 def to_s return "#{ user_error } (#{ error })" if user_error "#{ error }" end |