class Payfort::PayfortError

Attributes

code[R]
http_status[R]
message[R]

Public Class Methods

new(message=nil, code=nil, http_status=nil) click to toggle source
# File lib/payfort/errors/payfort_error.rb, line 7
def initialize(message=nil, code=nil, http_status=nil)
  @message = message
  @code = code
  @http_status = http_status
end

Public Instance Methods

to_s() click to toggle source
# File lib/payfort/errors/payfort_error.rb, line 13
def to_s
  status_string = @http_status.nil? ? "" : "(#{@code}Error - Status #{@http_status}) "
  "#{status_string}#{@message}"
end