class Transfirst::TransfirstError

Constants

CODES

Attributes

error_code[RW]
error_string[RW]

Public Class Methods

new(e) click to toggle source
# File lib/transfirst/transfirst_error.rb, line 36
def initialize(e)
  @soap_fault = e
  @error_code = e.to_hash[:fault][:detail][:system_fault][:error_code]
  @error_string = CODES[@error_code]
end

Public Instance Methods

message() click to toggle source
# File lib/transfirst/transfirst_error.rb, line 42
def message
  err_string = 'Service Error'
  if !error_code.blank? and !error_string.blank?
    error_details = " -- #{@error_code} - #{@error_string}"
    err_string += error_details
  end
  err_string
end