cancelContact method

Future<ContactIdResponse> cancelContact({
  1. required String contactId,
})

Cancels or stops a contact with a specified contact ID based on its position in the contact lifecycle.

For contacts that:

  • Have yet to start, the contact will be cancelled.
  • Have started but have yet to finish, the contact will be stopped.

May throw DependencyException. May throw InvalidParameterException. May throw ResourceNotFoundException.

Parameter contactId : UUID of a contact.

Implementation

Future<ContactIdResponse> cancelContact({
  required String contactId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/contact/${Uri.encodeComponent(contactId)}',
    exceptionFnMap: _exceptionFns,
  );
  return ContactIdResponse.fromJson(response);
}