
io.sphere.sdk.requests.CommandImpl Maven / Gradle / Ivy
package io.sphere.sdk.requests;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.base.Function;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.utils.JsonUtils;
public abstract class CommandImpl extends Base implements Command {
@Override
public Function resultMapper() {
return httpResponse -> JsonUtils.readObjectFromJsonString(typeReference(), httpResponse.getResponseBody());
}
protected abstract TypeReference typeReference();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy