Exception: Paypal::Exception::APIError
- Inherits:
-
Paypal::Exception
- Object
- StandardError
- Paypal::Exception
- Paypal::Exception::APIError
- Defined in:
- lib/paypal/exception/api_error.rb
Defined Under Namespace
Classes: Response
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response = {}) ⇒ APIError
constructor
A new instance of APIError.
- #message ⇒ Object
Constructor Details
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
4 5 6 |
# File 'lib/paypal/exception/api_error.rb', line 4 def response @response end |
Instance Method Details
#message ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/paypal/exception/api_error.rb', line 13 def if response.respond_to?(:short_messages) && response..any? "PayPal API Error: " << response..map{ |m| "'#{m}'" }.join(", ") else "PayPal API Error" end end |