updateTemplateActiveVersion method
Changes the status of a specific version of a message template to active.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw MethodNotAllowedException.
May throw NotFoundException.
May throw PayloadTooLargeException.
May throw TooManyRequestsException.
Parameter templateName :
The name of the message template. A template name must start with an
alphanumeric character and can contain a maximum of 128 characters. The
characters can be alphanumeric characters, underscores (_), or hyphens
(-). Template names are case sensitive.
Parameter templateType :
The type of channel that the message template is designed for. Valid
values are: EMAIL, PUSH, SMS, and VOICE.
Implementation
Future<UpdateTemplateActiveVersionResponse> updateTemplateActiveVersion({
required TemplateActiveVersionRequest templateActiveVersionRequest,
required String templateName,
required String templateType,
}) async {
final response = await _protocol.sendRaw(
payload: templateActiveVersionRequest,
method: 'PUT',
requestUri:
'/v1/templates/${Uri.encodeComponent(templateName)}/${Uri.encodeComponent(templateType)}/active-version',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateTemplateActiveVersionResponse(
messageBody: MessageBody.fromJson($json),
);
}