com.cloudesire.platform.apiclient.api.CartApi Maven / Gradle / Ivy
The newest version!
package com.cloudesire.platform.apiclient.api;
import com.cloudesire.platform.apiclient.dto.model.dto.CartDTO;
import com.cloudesire.platform.apiclient.query.CartQuery;
import com.cloudesire.platform.apiclient.query.ResellerCatalogQuery;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import java.util.List;
import java.util.Map;
public interface CartApi
{
@POST( "cart" )
Call create( @Body CartDTO cart );
@POST( "cart" )
Call create( @Body CartDTO cart, @QueryMap ResellerCatalogQuery query );
@GET( "cart" )
Call> getAll();
@GET( "cart" )
Call> getAll( @QueryMap CartQuery query );
/**
* @deprecated by {@link #getAll(CartQuery)}
*/
@Deprecated
@GET( "cart" )
Call> getAll( @Query( "customerId" ) int customerId );
@GET( "cart/{id}" )
Call get( @Path( "id" ) int id );
@GET( "cart/{id}" )
@Headers( { "Accept:text/csv" } )
@Streaming
Call getCsv( @Path( "id" ) int id );
@PUT( "cart/{id}" )
Call update( @Path( "id" ) int id, @Body CartDTO cart );
@POST( "cart/{id}/checkout" )
Call checkout( @Path( "id" ) int id );
@POST( "cart/{id}/copy" )
Call copy( @Path( "id" ) int id );
@DELETE( "cart/{id}" )
Call delete( @Path( "id" ) int id );
@GET( "cart/{id}/metadata" )
Call