class PaymentsApi::RequestErrorException
Format for 400 Errors
Attributes
message[RW]
Message indicating the source of the error in the request @return [String]
Public Class Methods
new(reason, response)
click to toggle source
The constructor. @param [String] The reason for raising an exception. @param [HttpResponse] The HttpReponse of the API call.
Calls superclass method
PaymentsApi::APIException::new
# File lib/payments_api/exceptions/request_error_exception.rb, line 16 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end
Public Instance Methods
unbox(hash)
click to toggle source
Populates this object by extracting properties from a hash. @param [Hash] The deserialized response sent by the server in the response body.
# File lib/payments_api/exceptions/request_error_exception.rb, line 25 def unbox(hash) @message = hash['message'] end