putSuppressedDestination method
Future<void>
putSuppressedDestination({
- required String emailAddress,
- required SuppressionListReason reason,
Adds an email address to the suppression list for your account.
May throw BadRequestException. May throw TooManyRequestsException.
Parameter emailAddress
:
The email address that should be added to the suppression list for your
account.
Parameter reason
:
The factors that should cause the email address to be added to the
suppression list for your account.
Implementation
Future<void> putSuppressedDestination({
required String emailAddress,
required SuppressionListReason reason,
}) async {
ArgumentError.checkNotNull(emailAddress, 'emailAddress');
ArgumentError.checkNotNull(reason, 'reason');
final $payload = <String, dynamic>{
'EmailAddress': emailAddress,
'Reason': reason.toValue(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/v2/email/suppression/addresses',
exceptionFnMap: _exceptionFns,
);
}