Exception: BillForward::ClientException

Inherits:
Exception
  • Object
show all
Defined in:
lib/bill_forward/client.rb

Direct Known Subclasses

ApiTokenException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ ClientException

Returns a new instance of ClientException.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/bill_forward/client.rb', line 5

def initialize(message, response=nil)
  super(message)

  begin
    if response.nil?
      self.response = nil
    else
      self.response = JSON.parse response
    end
  rescue => e
    self.response = nil
  end
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/bill_forward/client.rb', line 3

def response
  @response
end