createBooking function

Future<ApiResponse<Object?>> createBooking(
  1. ExsitedClient client,
  2. Object payload, {
  3. bool? raiseOnError,
  4. String? responseFormat,
})

POST /api/{api_version}/booking

Create a booking, the createOrder body under order; 201, answered under booking. Each line needs a labour and its booking times.

No typed view. Read response.map.

Implementation

Future<ApiResponse<Object?>> createBooking(
  ExsitedClient client,
  Object payload, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendPostRequest(BookingsUrls.booking,
        jsonBody: payload,
        raiseOnError: raiseOnError,
        responseFormat: responseFormat);