Exception: BridgeBankin::API::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BridgeBankin::API::Error
- Defined in:
- lib/bridge_bankin/api/error.rb
Overview
Error is the base error from which all other more specific BridgeBankin errors derive.
Direct Known Subclasses
BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, TooManyRequestsError, UnauthorizedError, UnprocessableEntityError, UnsupportedMediaTypeError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#documentation_url ⇒ Object
readonly
Returns the value of attribute documentation_url.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(code, response_body = {}) ⇒ Error
constructor
Initializes Error.
Constructor Details
#initialize(code, response_body = {}) ⇒ Error
Initializes Error
18 19 20 21 22 23 24 25 |
# File 'lib/bridge_bankin/api/error.rb', line 18 def initialize(code, response_body = {}) @payload = response_body @code = code @type = payload[:type] @documentation_url = payload[:documentation_url] super(payload[:message]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
27 28 29 |
# File 'lib/bridge_bankin/api/error.rb', line 27 def code @code end |
#documentation_url ⇒ Object (readonly)
Returns the value of attribute documentation_url.
27 28 29 |
# File 'lib/bridge_bankin/api/error.rb', line 27 def documentation_url @documentation_url end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
27 28 29 |
# File 'lib/bridge_bankin/api/error.rb', line 27 def payload @payload end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
27 28 29 |
# File 'lib/bridge_bankin/api/error.rb', line 27 def type @type end |