class Voucherify::VoucherifyError
Attributes
code[R]
details[R]
key[R]
response[R]
Public Class Methods
new(restClientError)
click to toggle source
Calls superclass method
# File lib/voucherify/client.rb, line 134 def initialize (restClientError) if restClientError.is_a? RestClient::Exceptions::Timeout @response = restClientError @details = restClientError super(restClientError) else @response = restClientError.response parsedResponse = JSON.parse(@response) @code = parsedResponse['code'] @details = parsedResponse['details'] @key = parsedResponse['key'] super(parsedResponse['message']) end end