All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.apiclient.commands.ApiClientDeleteCommandImpl Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.apiclient.commands;

import com.fasterxml.jackson.databind.JavaType;
import io.sphere.sdk.apiclient.ApiClient;
import io.sphere.sdk.client.HttpRequestIntent;
import io.sphere.sdk.commands.CommandImpl;
import io.sphere.sdk.http.HttpMethod;
import io.sphere.sdk.json.SphereJsonUtils;

final class ApiClientDeleteCommandImpl extends CommandImpl implements ApiClientDeleteCommand{

    private final String id;

    ApiClientDeleteCommandImpl(final String id) {
        this.id = id;
    }

    @Override
    protected JavaType jacksonJavaType() {
        return SphereJsonUtils.convertToJavaType(ApiClient.typeReference());
    }

    @Override
    public HttpRequestIntent httpRequestIntent() {
        return HttpRequestIntent.of(HttpMethod.DELETE, String.format("/api-clients/%s", id));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy