com.cloudesire.platform.apiclient.api.OrderApi Maven / Gradle / Ivy
The newest version!
package com.cloudesire.platform.apiclient.api;
import com.cloudesire.platform.apiclient.dto.model.dto.OrderDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.OrderInputDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.OrderPatchDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.changelog.ChangelogDTO;
import com.cloudesire.platform.apiclient.query.OrderQuery;
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.PATCH;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import java.util.List;
import java.util.Map;
public interface OrderApi
{
@POST( "order" )
Call create( @Body OrderInputDTO input );
@DELETE( "order/{id}" )
Call delete( @Path( "id" ) Integer id );
@GET( "order" )
Call> getAll();
@GET( "order" )
Call> getAll( @QueryMap OrderQuery query );
/**
* @deprecated by {@link #getAll(OrderQuery)}
*/
@Deprecated
@GET( "order" )
Call> getAll( @QueryMap Map pageRequest );
@GET( "order" )
@Headers( { "Accept:text/csv" } )
@Streaming
Call getCsv();
@GET( "order" )
@Headers( { "Accept:text/csv" } )
@Streaming
Call getCsv( @QueryMap OrderQuery query );
@GET( "order/externalReference={externalReference}" )
Call getByExternalReference( @Path( "externalReference" ) String externalReference );
@GET( "order/{id}" )
Call get( @Path( "id" ) Integer id );
@GET( "order/{id}/changelog" )
Call getChangelog( @Path( "id" ) int id );
@POST( "order/{id}/notify" )
Call notify( @Path( "id" ) Integer id );
@POST( "order/{id}/approve" )
Call approve( @Path( "id" ) Integer id );
@POST( "order/{id}/reject" )
Call reject( @Path( "id" ) Integer id );
@PATCH( "order/{id}" )
Call partialUpdate( @Path( "id" ) int id, @Body OrderPatchDTO input );
/**
* @deprecated by {@link #getCsv(OrderQuery)}
*/
@Deprecated
@Streaming
@GET( "order" )
@Headers( { "Accept:text/csv" } )
Call getCsv( @QueryMap Map pageRequest );
}