com.cloudesire.platform.apiclient.api.UserApi Maven / Gradle / Ivy
The newest version!
package com.cloudesire.platform.apiclient.api;
import com.cloudesire.platform.apiclient.dto.model.dto.CardDataDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.MyUserDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.PasswordRecoveryDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.PasswordResetDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.PaymentMethodDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.SepaDataDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.StripePaymentMethodDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.StripeTokenDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.changelog.ChangelogDTO;
import com.cloudesire.platform.apiclient.dto.model.dto.request.UserActivationDTO;
import com.cloudesire.platform.apiclient.dto.model.enums.UserRole;
import com.cloudesire.platform.apiclient.dto.model.patch.UserPatchDTO;
import com.cloudesire.platform.apiclient.query.UserQuery;
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.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;
import static com.cloudesire.platform.apiclient.dto.model.constants.Parameters.AS_COMPANY;
public interface UserApi
{
// Creates
@POST( "user" )
Call create( @Body MyUserDTO userDTO );
@POST( "user" )
Call create( @Body MyUserDTO userDTO, @QueryMap Map queryMap );
// Retrieves
@GET( "user" )
Call> getAll();
@GET( "user" )
Call> getAll( @QueryMap UserQuery request );
/**
* @deprecated by {@link #getAll(UserQuery)}
*/
@Deprecated
@GET( "user" )
Call> getAll( @Query( "textField" ) String textField, @Query( "companyId" ) Integer companyId,
@Query( "role" ) UserRole role, @Query( "disabled" ) Boolean disabled,
@QueryMap Map pageRequest );
@GET( "user/me" )
Call getMe();
@GET( "user/amIAdmin" )
Call amIAdmin();
@GET( "user/amISupervisor" )
Call amISupervisor();
@GET( "user/amIUser" )
Call amIUser();
@GET( "user/amIVendorOrAdmin" )
Call amIVendorOrAdmin();
@GET( "user/amIVendor" )
Call amIVendor();
@GET( "user/typeahead/{query}" )
Call> getTypeahead( @Path( "query" ) String query, @QueryMap Map pageRequest,
@Query( "role" ) String role );
@GET( "user/externalId/{externalId}" )
Call getUserByExternalId( @Path( "externalId" ) String externalId );
@GET( "user/email={email}" )
Call getByEmail( @Path( "email" ) String email );
@GET( "user/{id}" )
Call get( @Path( "id" ) int id );
@GET( "user/{id}/changelog" )
Call getChangelog( @Path( "id" ) int id );
/**
* @deprecated look for {@link MyUserDTO#isValidAddress()}
*/
@Deprecated
@GET( "user/isMyAddressValid" )
Call isMyAddressValid();
@GET( "user/{id}/metadata" )
Call