class Xendit::APIError

Attributes

error_code[R]
error_message[R]
http_status[R]

Public Class Methods

new(error_code, error_message, http_status) click to toggle source
Calls superclass method
# File lib/xendit/errors.rb, line 7
def initialize(error_code, error_message, http_status)
  @error_code = error_code
  @error_message = error_message
  @http_status = http_status

  super to_s
end

Public Instance Methods

to_s() click to toggle source
# File lib/xendit/errors.rb, line 15
def to_s
  status_string = @http_status.nil? ? '' : "(Status #{@http_status}) "
  error_code_string = @error_code.nil? ? '' : "#{error_code} - "
  "#{status_string}#{error_code_string}#{@error_message}"
end