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

com.cloudesire.platform.apiclient.api.DistributorApi Maven / Gradle / Ivy

The newest version!
package com.cloudesire.platform.apiclient.api;

import com.cloudesire.platform.apiclient.dto.model.dto.DistributorDTO;
import com.cloudesire.platform.apiclient.dto.model.patch.BaseCompanyPatchDTO;
import com.cloudesire.platform.apiclient.query.DistributorQuery;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

import java.util.List;
import java.util.Map;

public interface DistributorApi
{
    @POST( "distributor" )
    Call create( @Body DistributorDTO distributor );

    @GET( "distributor/{id}" )
    Call get( @Path( "id" ) int id );

    @GET( "distributor" )
    Call> getAll( @QueryMap DistributorQuery query );

    /**
     * @deprecated by {@link #getAll(DistributorQuery)}
     */
    @Deprecated( since = "20240905", forRemoval = true )
    @GET( "distributor" )
    Call> getAll(
            @Query( "textField" ) String textField,
            @QueryMap Map pageRequest );

    /**
     * @deprecated by {@link #getAll(DistributorQuery)}
     */
    @Deprecated( since = "20240905", forRemoval = true )
    @GET( "distributor" )
    Call> getAll(
            @Query( "textField" ) String textField,
            @Query( "enabled" ) Boolean enabled,
            @QueryMap Map pageRequest );

    @PUT( "distributor/{id}" )
    Call update( @Path( "id" ) int id, @Body DistributorDTO distributor );

    @PATCH( "distributor/{id}" )
    Call partialUpdate( @Path( "id" ) int id, @Body BaseCompanyPatchDTO patch );

    @DELETE( "distributor/{id}" )
    Call delete( @Path( "id" ) int id );

    @GET( "distributor/{id}/metadata" )
    Call> getMetadata( @Path( "id" ) int id );

    @PUT( "distributor/{id}/metadata" )
    Call updateMetadata( @Path( "id" ) int id, @Body Map payload );

    @DELETE( "distributor/{id}/metadata/{key}" )
    Call deleteMetadata( @Path( "id" ) int id, @Path( "key" ) String key );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy