retrieveEmailTemplatePreview method

Future<ClientResponse<PreviewResponse, Errors>> retrieveEmailTemplatePreview(
  1. PreviewRequest request
)

Creates a preview of the email template provided in the request. This allows you to preview an email template that hasn't been saved to the database yet. The entire email template does not need to be provided on the request. This will create the preview based on whatever is given.

@param {PreviewRequest} request The request that contains the email template and optionally a locale to render it in. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<PreviewResponse, Errors>> retrieveEmailTemplatePreview(
    PreviewRequest request) {
  return _start<PreviewResponse, Errors>()
      .withUri('/api/email/template/preview')
      .withJSONBody(request)
      .withMethod('POST')
      .withResponseHandler(
          defaultResponseHandlerBuilder((d) => PreviewResponse.fromJson(d)))
      .go();
}