updateContactList method

Future<void> updateContactList({
  1. required String contactListName,
  2. String? description,
  3. List<Topic>? topics,
})

Updates contact list metadata. This operation does a complete replacement.

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

Parameter contactListName : The name of the contact list.

Parameter description : A description of what the contact list is about.

Parameter topics : An interest group, theme, or label within a list. A contact list can have multiple topics.

Implementation

Future<void> updateContactList({
  required String contactListName,
  String? description,
  List<Topic>? topics,
}) async {
  ArgumentError.checkNotNull(contactListName, 'contactListName');
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (topics != null) 'Topics': topics,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/email/contact-lists/${Uri.encodeComponent(contactListName)}',
    exceptionFnMap: _exceptionFns,
  );
}