Interface CentralOrderApiClient
- All Known Implementing Classes:
DefaultCentralOrderApiClient
public interface CentralOrderApiClient
-
Method Summary
Modifier and TypeMethodDescription<T> org.springframework.http.ResponseEntity<T>voidpostEntity(org.springframework.web.util.UriComponents uriComponents, Object entity) default <T> TpostEntity(org.springframework.web.util.UriComponents uriComponents, Object entity, Class<T> response) Posts an entity to the specified URI and returns the response.
-
Method Details
-
postEntity
void postEntity(org.springframework.web.util.UriComponents uriComponents, Object entity) throws SapCentralOrderException - Parameters:
uriComponents-entity-- Throws:
SapCentralOrderException
-
getEntity
<T> org.springframework.http.ResponseEntity<T> getEntity(org.springframework.web.util.UriComponents uriComponents, Class<T> clazz) throws SapCentralOrderException - Type Parameters:
T-- Parameters:
uriComponents-clazz-- Returns:
org.springframework.http.ResponseEntity<T>- Throws:
SapCentralOrderException
-
postEntity
default <T> T postEntity(org.springframework.web.util.UriComponents uriComponents, Object entity, Class<T> response) throws SapCentralOrderException Posts an entity to the specified URI and returns the response. This method is used to send an HTTP POST request with an entity to the given URI and expects a response of the specified type. It can be used for various purposes such as creating or updating resources on a remote server.- Type Parameters:
T- The generic type of the expected response.- Parameters:
uriComponents- The URI components representing the target endpoint.entity- The entity object to be sent in the request body.response- The expected response type, usually a class representing the structure of the response data.- Returns:
- The response of the specified type.
- Throws:
SapCentralOrderException- If an error occurs during the HTTP request or if the server responds with an error status.
-