Package io.mailtrap.api.suppressions
Class SuppressionsImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.suppressions.SuppressionsImpl
- All Implemented Interfaces:
Suppressions
-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSuppression(long accountId, CreateSuppressionRequest request) Add an email address to the account's suppression list.deleteSuppression(long accountId, String suppressionId) Delete a suppression by ID.search(long accountId, SuppressionListFilter filter) List and search suppressions.List and search suppressions by email.
-
Constructor Details
-
SuppressionsImpl
-
-
Method Details
-
search
Description copied from interface:SuppressionsList and search suppressions by email. The endpoint returns up to 1000 suppressions per request.- Specified by:
searchin interfaceSuppressions- Parameters:
accountId- - unique account IDemail- - search suppressions for this email- Returns:
- a list of suppressions
-
search
Description copied from interface:SuppressionsList and search suppressions. The endpoint returns up to 1000 suppressions per request; pass the last returned ID aslastIdto fetch the next page.- Specified by:
searchin interfaceSuppressions- Parameters:
accountId- - unique account IDfilter- - optional filtering and pagination parameters- Returns:
- a list of suppressions
-
createSuppression
Description copied from interface:SuppressionsAdd an email address to the account's suppression list.- Specified by:
createSuppressionin interfaceSuppressions- Parameters:
accountId- - unique account IDrequest- - request data- Returns:
- the created suppression
-
deleteSuppression
Description copied from interface:SuppressionsDelete a suppression by ID. Mailtrap will no longer prevent sending to this email unless it's recorded in suppressions again.- Specified by:
deleteSuppressionin interfaceSuppressions- Parameters:
accountId- - unique account IDsuppressionId- - unique suppression ID- Returns:
- the attributes of the deleted suppression
-