deleteContact method

Future<void> deleteContact({
  1. required String contactListName,
  2. required String emailAddress,
})

Removes a contact from a contact list.

May throw BadRequestException. May throw TooManyRequestsException. May throw NotFoundException.

Parameter contactListName : The name of the contact list from which the contact should be removed.

Parameter emailAddress : The contact's email address.

Implementation

Future<void> deleteContact({
  required String contactListName,
  required String emailAddress,
}) async {
  ArgumentError.checkNotNull(contactListName, 'contactListName');
  ArgumentError.checkNotNull(emailAddress, 'emailAddress');
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v2/email/contact-lists/${Uri.encodeComponent(contactListName)}/contacts/${Uri.encodeComponent(emailAddress)}',
    exceptionFnMap: _exceptionFns,
  );
}