Class: APIClientBuilder::DeleteRequest
- Defined in:
- lib/api_client_builder/delete_request.rb
Instance Attribute Summary
Attributes inherited from Request
#body, #error_handlers_collection, #response_handler, #type
Instance Method Summary collapse
-
#response ⇒ JSON
Yields the response body if the response was successful.
Methods inherited from Request
#error_handlers, #initialize, #on_error
Constructor Details
This class inherits a constructor from APIClientBuilder::Request
Instance Method Details
#response ⇒ JSON
Yields the response body if the response was successful. Will call the response handlers if there was not a successful response.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/api_client_builder/delete_request.rb', line 7 def response response = response_handler.delete_request if response.success? response else error_handlers.each do |handler| handler.call(response, self) end end end |