testRenderTemplate method
Creates a preview of the MIME content of an email when provided with a template and a set of replacement data.
You can execute this operation no more than once per second.
May throw InvalidRenderingParameterException.
May throw MissingRenderingAttributeException.
May throw TemplateDoesNotExistException.
Parameter templateData :
A list of replacement values to apply to the template. This parameter is a
JSON object, typically consisting of key-value pairs in which the keys
correspond to replacement tags in the email template.
Parameter templateName :
The name of the template to render.
Implementation
Future<TestRenderTemplateResponse> testRenderTemplate({
required String templateData,
required String templateName,
}) async {
final $request = <String, String>{
'TemplateData': templateData,
'TemplateName': templateName,
};
final $result = await _protocol.send(
$request,
action: 'TestRenderTemplate',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'TestRenderTemplateResult',
);
return TestRenderTemplateResponse.fromXml($result);
}