Exception: Billingrails::ApiError
- Defined in:
- lib/billingrails/errors.rb
Overview
API error with detailed information
Direct Known Subclasses
AuthenticationError, InvalidRequestError, NotFoundError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(message, status: nil, code: nil, type: nil, details: nil) ⇒ ApiError
constructor
A new instance of ApiError.
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(, status: nil, code: nil, type: nil, details: nil) super() @status = status @code = code @type = type @details = details end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/billingrails/errors.rb', line 9 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
9 10 11 |
# File 'lib/billingrails/errors.rb', line 9 def details @details end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/billingrails/errors.rb', line 9 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/billingrails/errors.rb', line 9 def type @type end |