upsertTemplateWithHttpInfo method
Future<Response>
upsertTemplateWithHttpInfo(
- String templateType,
- String slug, {
- UpsertTemplateRequest? upsertTemplateRequest,
Update a template for a given type and slug
Updates the existing template of the given type and slug
Note: This method returns the HTTP Response
.
Parameters:
-
String templateType (required): The type of template to update
-
String slug (required): The slug of the template to update
-
UpsertTemplateRequest upsertTemplateRequest:
Implementation
Future<http.Response> upsertTemplateWithHttpInfo(
String templateType,
String slug, {
UpsertTemplateRequest? upsertTemplateRequest,
}) async {
// ignore: prefer_const_declarations
final path = r'/templates/{template_type}/{slug}'
.replaceAll('{template_type}', templateType)
.replaceAll('{slug}', slug);
// ignore: prefer_final_locals
Object? postBody = upsertTemplateRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}