toolsOzoneCommunicationUpdateTemplate function
Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.
Implementation
Future<XRPCResponse<TemplateView>> toolsOzoneCommunicationUpdateTemplate({
required String id,
String? name,
String? lang,
String? contentMarkdown,
String? subject,
String? updatedBy,
bool? disabled,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.toolsOzoneCommunicationUpdateTemplate,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'id': id,
if (name != null) 'name': name,
if (lang != null) 'lang': lang,
if (contentMarkdown != null) 'contentMarkdown': contentMarkdown,
if (subject != null) 'subject': subject,
if (updatedBy != null) 'updatedBy': updatedBy,
if (disabled != null) 'disabled': disabled,
},
to: const TemplateViewConverter().fromJson,
);