patch
abstract suspend fun <T : Any> patch(endpoint: String, body: Any, responseCast: KClass<T>): Result<T>
Makes a PATCH request to the Fortress API with a JSON body and deserializes the response. Used for partial updates to existing resources.
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.