onSuccess

inline fun <T> ApiResult<T>.onSuccess(function: (model: T) -> Unit): ApiResult<T>