postHelpTickets method
Files a customer support ticket into the public help center.
Files a customer support ticket into the public help center. It creates the ticket (status Open, source portal) with the customer's message on the description, then records that same message as the opening entry of the ticket's conversation thread; the description carries it regardless, so failing to write that entry loses nothing. Answers 201 with an opaque reference. A deployment with no help center answers 404, one whose center has not installed the Help model answers 503, and a body over 64 KiB answers 413 — in that order, which is the order the route has always decided them in.
Parameters:
- HelpTicketIntake helpTicketIntake (required):
Implementation
Future<HelpTicketFiled?> postHelpTickets(HelpTicketIntake helpTicketIntake,) async {
final response = await postHelpTicketsWithHttpInfo(helpTicketIntake,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HelpTicketFiled',) as HelpTicketFiled;
}
return null;
}