Exception: SolidusBacktracs::Api::RequestError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- SolidusBacktracs::Api::RequestError
- Defined in:
- lib/solidus_backtracs/api/request_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
-
#response_headers ⇒ Object
readonly
Returns the value of attribute response_headers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response_code:, response_body:, response_headers:) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response_code:, response_body:, response_headers:) ⇒ RequestError
Returns a new instance of RequestError.
24 25 26 27 28 29 30 |
# File 'lib/solidus_backtracs/api/request_error.rb', line 24 def initialize(response_code:, response_body:, response_headers:) @response_code = response_code @response_body = response_body @response_headers = response_headers super(response_body) end |
Instance Attribute Details
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
6 7 8 |
# File 'lib/solidus_backtracs/api/request_error.rb', line 6 def response_body @response_body end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
6 7 8 |
# File 'lib/solidus_backtracs/api/request_error.rb', line 6 def response_code @response_code end |
#response_headers ⇒ Object (readonly)
Returns the value of attribute response_headers.
6 7 8 |
# File 'lib/solidus_backtracs/api/request_error.rb', line 6 def response_headers @response_headers end |
Class Method Details
.from_response(response) ⇒ Object
9 10 11 |
# File 'lib/solidus_backtracs/api/request_error.rb', line 9 def from_response(response) new(**(response)) end |