Package io.mailtrap.api.projects
Class ProjectsImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.apiresource.ApiResourceWithValidation
io.mailtrap.api.projects.ProjectsImpl
- All Implemented Interfaces:
Projects
-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
mailtrapValidatorFields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProject(long accountId, ProjectRequest request) Create a projectdeleteProject(long accountId, long projectId) Delete project and its inboxesgetProject(long accountId, long projectId) Get the project and its inboxesgetProjects(long accountId) List projects and their inboxes to which the API token has access.updateProject(long accountId, long projectId, ProjectRequest updateRequest) Update project dataMethods inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
validateRequestBodyAndThrowException
-
Constructor Details
-
ProjectsImpl
-
-
Method Details
-
createProject
Description copied from interface:ProjectsCreate a project- Specified by:
createProjectin interfaceProjects- Parameters:
accountId- unique account IDrequest- request data- Returns:
- Returns attributes of the created project. permissions returns the permissions of the token for the project
-
getProjects
Description copied from interface:ProjectsList projects and their inboxes to which the API token has access.- Specified by:
getProjectsin interfaceProjects- Parameters:
accountId- unique account ID- Returns:
- the list of projects with nested inboxes. permissions returns the permissions of the token for the project
-
getProject
Description copied from interface:ProjectsGet the project and its inboxes- Specified by:
getProjectin interfaceProjects- Parameters:
accountId- unique account IDprojectId- unique project ID- Returns:
- project attributes and inboxes of this project with their attributes. permissions returns the permissions of the token for the project
-
updateProject
Description copied from interface:ProjectsUpdate project data- Specified by:
updateProjectin interfaceProjects- Parameters:
accountId- unique account IDprojectId- unique project IDupdateRequest- request data- Returns:
- project attributes and inboxes of this project with their attributes. permissions returns the permissions of the token for the project
-
deleteProject
Description copied from interface:ProjectsDelete project and its inboxes- Specified by:
deleteProjectin interfaceProjects- Parameters:
accountId- unique account IDprojectId- unique project ID- Returns:
- id of the deleted project
-