Exception: StarkitBanking::ApiFault

Inherits:
StandardError
  • Object
show all
Defined in:
lib/starkit_banking/api/fault.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fault) ⇒ ApiFault



5
6
7
8
9
10
# File 'lib/starkit_banking/api/fault.rb', line 5

def initialize(fault)
  @code = fault.code
  @subCode = fault.subCode || ''
  @reason = fault.reasonText || ''
  @message = "#{fault.code} : #{fault.subCode} : #{fault.reasonText}"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/starkit_banking/api/fault.rb', line 3

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/starkit_banking/api/fault.rb', line 3

def message
  @message
end

#reasonObject (readonly)

Returns the value of attribute reason.



3
4
5
# File 'lib/starkit_banking/api/fault.rb', line 3

def reason
  @reason
end

#subCodeObject (readonly)

Returns the value of attribute subCode.



3
4
5
# File 'lib/starkit_banking/api/fault.rb', line 3

def subCode
  @subCode
end