apiV2CustomerBookingsCancelCreateWithHttpInfo method

Future<Response> apiV2CustomerBookingsCancelCreateWithHttpInfo(
  1. int id,
  2. BookingCancel bookingCancel
)

Main viewset used by Customer to control own bookings. Provides a full list of fields for a Booking object. With filtering options.

Note: This method returns the HTTP Response.

Parameters:

  • int id (required): A unique integer value identifying this booking.

  • BookingCancel bookingCancel (required):

Implementation

Future<Response> apiV2CustomerBookingsCancelCreateWithHttpInfo(int id, BookingCancel bookingCancel,) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v2/customer/bookings/{id}/cancel/'
    .replaceAll('{id}', id.toString());

  // ignore: prefer_final_locals
  Object? postBody = bookingCancel;

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

  const contentTypes = <String>['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];


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