Exception: Ekam::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ekam-ruby/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, error, request_params) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
# File 'lib/ekam-ruby/error.rb', line 5

def initialize(code, error, request_params)
  super "Ekam responded with status #{code} (#{error})"
  @error = error
  @code = code
  @request_params = request_params
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/ekam-ruby/error.rb', line 3

def code
  @code
end

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/ekam-ruby/error.rb', line 3

def error
  @error
end

#request_paramsObject (readonly)

Returns the value of attribute request_params.



3
4
5
# File 'lib/ekam-ruby/error.rb', line 3

def request_params
  @request_params
end