getContact method
Returns a contact from a contact list.
May throw BadRequestException. May throw TooManyRequestsException. May throw NotFoundException.
Parameter contactListName
:
The name of the contact list to which the contact belongs.
Parameter emailAddress
:
The contact's email addres.
Implementation
Future<GetContactResponse> getContact({
required String contactListName,
required String emailAddress,
}) async {
ArgumentError.checkNotNull(contactListName, 'contactListName');
ArgumentError.checkNotNull(emailAddress, 'emailAddress');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/email/contact-lists/${Uri.encodeComponent(contactListName)}/contacts/${Uri.encodeComponent(emailAddress)}',
exceptionFnMap: _exceptionFns,
);
return GetContactResponse.fromJson(response);
}