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

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

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

import com.cloudesire.platform.apiclient.dto.model.dto.MinimalCompanyDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.UserCompanyDTO;
import com.cloudesire.platform.apiclient.dto.model.patch.BaseCompanyPatchDTO;
import com.cloudesire.platform.apiclient.query.PageRequestQuery;
import com.cloudesire.platform.apiclient.query.UserCompanyQuery;
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 UserCompanyApi
{
    @POST( "userCompany" )
    Call create( @Body UserCompanyDTO company );

    /**
     * @deprecated by {@link #create(UserCompanyDTO)}
     */
    @Deprecated
    @POST( "userCompany" )
    Call create( @Body MinimalCompanyDTO company );

    @GET( "userCompany" )
    Call> getAll();

    @GET( "userCompany" )
    Call> getAll( @QueryMap UserCompanyQuery query );

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

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

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

    @PUT( "userCompany/{id}" )
    Call update( @Path( "id" ) int id, @Body UserCompanyDTO company );

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy