Exception: Elements::ElementsError
- Inherits:
-
StandardError
- Object
- StandardError
- Elements::ElementsError
- Defined in:
- lib/elements/errors.rb
Direct Known Subclasses
APIConnectionError, AuthenticationError, CardError, GenericAPIError, IdempotencyError, InternalServerError, InvalidRequestError, PermissionError, RateLimitError
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_headers ⇒ Object
readonly
Returns the value of attribute http_headers.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message = nil, http_status: nil, http_headers: nil, http_body: nil) ⇒ ElementsError
constructor
A new instance of ElementsError.
Constructor Details
#initialize(message = nil, http_status: nil, http_headers: nil, http_body: nil) ⇒ ElementsError
Returns a new instance of ElementsError.
53 54 55 56 57 58 59 60 |
# File 'lib/elements/errors.rb', line 53 def initialize( = nil, http_status: nil, http_headers: nil, http_body: nil) super() @message = @http_status = http_status @http_headers = http_headers @http_body = http_body @error = ErrorDetails.from_http_body(http_body) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
49 50 51 |
# File 'lib/elements/errors.rb', line 49 def error @error end |
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
49 50 51 |
# File 'lib/elements/errors.rb', line 49 def http_body @http_body end |
#http_headers ⇒ Object (readonly)
Returns the value of attribute http_headers.
49 50 51 |
# File 'lib/elements/errors.rb', line 49 def http_headers @http_headers end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
49 50 51 |
# File 'lib/elements/errors.rb', line 49 def http_status @http_status end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
49 50 51 |
# File 'lib/elements/errors.rb', line 49 def @message end |
#response ⇒ Object
Returns the value of attribute response.
51 52 53 |
# File 'lib/elements/errors.rb', line 51 def response @response end |