Exception: Multicard::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Multicard::Error
- Defined in:
- lib/multicard/errors.rb
Direct Known Subclasses
AuthenticationError, CallbackTimeoutError, DebitUnknownError, NetworkError, NotFoundError, RateLimitError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_details ⇒ Object
readonly
Returns the value of attribute error_details.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
Instance Method Summary collapse
-
#initialize(message = nil, http_status: nil, error_code: nil, error_details: nil, response_body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, http_status: nil, error_code: nil, error_details: nil, response_body: nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 |
# File 'lib/multicard/errors.rb', line 7 def initialize( = nil, http_status: nil, error_code: nil, error_details: nil, response_body: nil) @http_status = http_status @error_code = error_code @error_details = error_details @response_body = response_body super( || error_details || 'Multicard API error') end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
5 6 7 |
# File 'lib/multicard/errors.rb', line 5 def error_code @error_code end |
#error_details ⇒ Object (readonly)
Returns the value of attribute error_details.
5 6 7 |
# File 'lib/multicard/errors.rb', line 5 def error_details @error_details end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
5 6 7 |
# File 'lib/multicard/errors.rb', line 5 def http_status @http_status end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
5 6 7 |
# File 'lib/multicard/errors.rb', line 5 def response_body @response_body end |