Exception: Billingrails::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/billingrails/errors.rb

Overview

API error with detailed information

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, code: nil, type: nil, details: nil) ⇒ ApiError

Returns a new instance of ApiError.



11
12
13
14
15
16
17
# File 'lib/billingrails/errors.rb', line 11

def initialize(message, status: nil, code: nil, type: nil, details: nil)
  super(message)
  @status = status
  @code = code
  @type = type
  @details = details
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



9
10
11
# File 'lib/billingrails/errors.rb', line 9

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



9
10
11
# File 'lib/billingrails/errors.rb', line 9

def details
  @details
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/billingrails/errors.rb', line 9

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'lib/billingrails/errors.rb', line 9

def type
  @type
end