listContactVersions method

Future<ListContactVersionsResponse> listContactVersions({
  1. required String contactId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of versions for a specified contact.

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

Parameter contactId : UUID of a contact.

Parameter maxResults : Maximum number of contact versions returned.

Parameter nextToken : Next token returned in the request of a previous ListContactVersions call. Used to get the next page of results.

Implementation

Future<ListContactVersionsResponse> listContactVersions({
  required String contactId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/contact/${Uri.encodeComponent(contactId)}/versions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListContactVersionsResponse.fromJson(response);
}