cancelWithHttpInfo method

Future<Response> cancelWithHttpInfo(
  1. int id,
  2. CancelledModel model, {
  3. required Object authorization,
})

Performs an HTTP 'POST /api/v1/Appointments/{id}/Cancelled' operation and returns the Response. Parameters:

Implementation

Future<Response> cancelWithHttpInfo(
  int id,
  CancelledModel model, {
  required Object authorization,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/Appointments/{id}/Cancelled'
      .replaceAll('{id}', id.toString());

  // ignore: prefer_final_locals
  Object postBody = model;

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

  headerParams[r'authorization'] = parameterToString(authorization);

  const authNames = <String>[];
  const contentTypes = <String>[
    'application/json',
    'text/json',
    'application/_*+json'
  ];

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