postCreateTicketsWithHttpInfo method

Future<Response> postCreateTicketsWithHttpInfo(
  1. String header,
  2. String message,
  3. TicketType ticketType, {
  4. int? ticketId,
})

Performs an HTTP 'POST /client/tickets' operation and returns the Response. Parameters:

Implementation

Future<Response> postCreateTicketsWithHttpInfo(String header, String message, TicketType ticketType, { int? ticketId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/client/tickets';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (ticketId != null) {
    queryParams.addAll(_queryParams('', 'TicketId', ticketId));
  }
    queryParams.addAll(_queryParams('', 'Header', header));
    queryParams.addAll(_queryParams('', 'Message', message));
    queryParams.addAll(_queryParams('', 'TicketType', ticketType));

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}