delete
abstract suspend fun <T : Any> delete(endpoint: String, body: Any, responseCast: KClass<T>): Result<T>
Makes a DELETE request to the Fortress API with a JSON body and deserializes the response.
Return
A Result containing the deserialized object on success, or an exception on failure (network error, deserialization error, or HTTP error response).
Parameters
endpoint
The API endpoint path (e.g., "/shipments/{id}"). Will be appended to the base Fortress API URL.
body
The request body object to serialize as JSON.
responseCast
The Kotlin class to deserialize the response into.