Package io.mailtrap.api.inboxes
Class InboxesImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.apiresource.ApiResourceWithValidation
io.mailtrap.api.inboxes.InboxesImpl
- All Implemented Interfaces:
Inboxes
-
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 TypeMethodDescriptioncleanInbox
(long accountId, long inboxId) Delete all messages (emails) from inboxcreateInbox
(long accountId, long projectId, CreateInboxRequest request) Create an inbox in a projectdeleteInbox
(long accountId, long inboxId) Delete an inbox with all its emailsenableEmailAddress
(long accountId, long inboxId) Turn the email address of the inbox on/offgetInboxAttributes
(long accountId, long inboxId) Get inbox attributes by inbox IDgetInboxes
(long accountId) Get a list of inboxesmarkAsRead
(long accountId, long inboxId) Mark all messages in the inbox as readresetCredentials
(long accountId, long inboxId) Reset SMTP credentials of the inboxresetEmailAddresses
(long accountId, long inboxId) Reset username of email address per inboxupdateInbox
(long accountId, long inboxId, UpdateInboxRequest request) Update inbox name, inbox email usernameMethods inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
validateRequestBodyAndThrowException
-
Constructor Details
-
InboxesImpl
-
-
Method Details
-
createInbox
Description copied from interface:Inboxes
Create an inbox in a project- Specified by:
createInbox
in interfaceInboxes
- Parameters:
accountId
- unique account IDprojectId
- unique project IDrequest
- inbox request data- Returns:
- the newly created inbox with its attributes
-
getInboxAttributes
Description copied from interface:Inboxes
Get inbox attributes by inbox ID- Specified by:
getInboxAttributes
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox
-
deleteInbox
Description copied from interface:Inboxes
Delete an inbox with all its emails- Specified by:
deleteInbox
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the deleted inbox
-
updateInbox
Description copied from interface:Inboxes
Update inbox name, inbox email username- Specified by:
updateInbox
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox IDrequest
- request data- Returns:
- the attributes of the updated inbox
-
cleanInbox
Description copied from interface:Inboxes
Delete all messages (emails) from inbox- Specified by:
cleanInbox
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox. permissions returns the permissions of the token for the inbox.
-
markAsRead
Description copied from interface:Inboxes
Mark all messages in the inbox as read- Specified by:
markAsRead
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox. permissions returns the permissions of the token for the inbox
-
resetCredentials
Description copied from interface:Inboxes
Reset SMTP credentials of the inbox- Specified by:
resetCredentials
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox. permissions returns the permissions of the token for the inbox
-
enableEmailAddress
Description copied from interface:Inboxes
Turn the email address of the inbox on/off- Specified by:
enableEmailAddress
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox. permissions returns the permissions of the token for the inbox
-
resetEmailAddresses
Description copied from interface:Inboxes
Reset username of email address per inbox- Specified by:
resetEmailAddresses
in interfaceInboxes
- Parameters:
accountId
- unique account IDinboxId
- unique inbox ID- Returns:
- the attributes of the inbox. permissions returns the permissions of the token for the inbox
-
getInboxes
Description copied from interface:Inboxes
Get a list of inboxes- Specified by:
getInboxes
in interfaceInboxes
- Parameters:
accountId
- unique account ID- Returns:
- the list of inboxes in the account to which the API token has access. permissions returns the permissions of the token for the inbox
-