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
customValidator
Fields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProject
(long accountId, CreateUpdateProjectRequest 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, CreateUpdateProjectRequest updateRequest) Update project dataMethods inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
validateRequestBodyAndThrowException
-
Constructor Details
-
ProjectsImpl
-
-
Method Details
-
createProject
Description copied from interface:Projects
Create a project- Specified by:
createProject
in 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:Projects
List projects and their inboxes to which the API token has access.- Specified by:
getProjects
in 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:Projects
Get the project and its inboxes- Specified by:
getProject
in 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
public ProjectsResponse updateProject(long accountId, long projectId, CreateUpdateProjectRequest updateRequest) Description copied from interface:Projects
Update project data- Specified by:
updateProject
in 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:Projects
Delete project and its inboxes- Specified by:
deleteProject
in interfaceProjects
- Parameters:
accountId
- unique account IDprojectId
- unique project ID- Returns:
- id of the deleted project
-