class Express::Exception::APIError
Attributes
response[RW]
Public Class Methods
new(response = {})
click to toggle source
# File lib/express/exception/api_error.rb, line 5 def initialize(response = {}) @response = if response.is_a?(Hash) Response.new response else response end end
Public Instance Methods
message()
click to toggle source
# File lib/express/exception/api_error.rb, line 13 def message if response.respond_to?(:short_messages) && response.short_messages.any? "PayPal API Error: " << response.short_messages.map{ |m| "'#{m}'" }.join(", ") else "PayPal API Error" end end