Package com.onfido
Class ApplicantManager
- java.lang.Object
-
- com.onfido.api.ResourceManager
-
- com.onfido.ApplicantManager
-
public class ApplicantManager extends ResourceManager
Manager class for the Applicant resource type. Contains resource-specific methods for interacting with the API.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedApplicantManager(Config config, okhttp3.OkHttpClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Applicantcreate(Applicant.Request request)Creates a single applicant.voiddelete(String applicantId)Deletes a single applicant.Applicantfind(String applicantId)Retrieves a single applicant.List<Applicant>list(int page, int perPage, boolean includedDeleted)Lists all applicants you’ve created, sorted by creation date in descending order.voidrestore(String applicantId)Restores a single applicant scheduled for deletion.Applicantupdate(String applicantId, Applicant.Request request)Updates an applicant’s information.-
Methods inherited from class com.onfido.api.ResourceManager
addFormDataParam, deleteRequest, downloadRequest, get, post, put, readInputStream, uploadRequest
-
-
-
-
Constructor Detail
-
ApplicantManager
protected ApplicantManager(Config config, okhttp3.OkHttpClient client)
-
-
Method Detail
-
create
public Applicant create(Applicant.Request request) throws OnfidoException
Creates a single applicant.- Parameters:
request- the request body- Returns:
- an Applicant
- Throws:
OnfidoException- the onfido exception
-
find
public Applicant find(String applicantId) throws OnfidoException
Retrieves a single applicant.- Parameters:
applicantId- the applicant id- Returns:
- an Applicant
- Throws:
OnfidoException- the onfido exception
-
update
public Applicant update(String applicantId, Applicant.Request request) throws OnfidoException
Updates an applicant’s information.- Parameters:
applicantId- the applicant idrequest- the request body- Returns:
- an Applicant
- Throws:
OnfidoException- the onfido exception
-
delete
public void delete(String applicantId) throws OnfidoException
Deletes a single applicant. If successful, returns a 204 No Content response.- Parameters:
applicantId- the applicant id- Throws:
OnfidoException- the onfido exception
-
restore
public void restore(String applicantId) throws OnfidoException
Restores a single applicant scheduled for deletion. If successful, returns a 204 No Content response.- Parameters:
applicantId- the applicant id- Throws:
OnfidoException- the onfido exception
-
list
public List<Applicant> list(int page, int perPage, boolean includedDeleted) throws OnfidoException
Lists all applicants you’ve created, sorted by creation date in descending order.- Parameters:
page- the pageperPage- the amount of applicants per pageincludedDeleted- boolean to include applicants scheduled for deletion- Returns:
- the list of Applicants
- Throws:
OnfidoException- the onfido exception
-
-