Exception: NOWPayments::Error
- Inherits:
-
StandardError
- Object
- StandardError
- NOWPayments::Error
- Defined in:
- lib/nowpayments/errors.rb,
lib/nowpayments.rb
Overview
Base error class for all NOWPayments errors
Direct Known Subclasses
AuthenticationError, BadRequestError, ConnectionError, NotFoundError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(env_or_message) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(env_or_message) ⇒ Error
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/nowpayments/errors.rb', line 8 def initialize() if .is_a?(Hash) @status = [:status] @body = [:body] @headers = [:response_headers] super() else super end end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/nowpayments/errors.rb', line 6 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/nowpayments/errors.rb', line 6 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/nowpayments/errors.rb', line 6 def status @status end |