destroy

public final DeleteResponse destroy(String bookingId, DestroyBookingRequest requestBody)

Destroy a booking with a request body.

This is a convenience overload for callers who need to send a DestroyBookingRequest but do not need query params or request overrides. It delegates to the full request-body overload below.

Return

The DeleteResponse object

Parameters

bookingId

The ID of the booking to destroy.

requestBody

The data to destroy the booking with.


public final DeleteResponse destroy(String bookingId, DestroyBookingRequest requestBody, DestroyBookingQueryParams queryParams, RequestOverrides overrides)

Destroy a booking with a request body.

This is the full request-body overload used for cancellation flows that need to send fields such as cancellation_reason while still supporting optional query params and request overrides.

Return

The DeleteResponse object

Parameters

bookingId

The ID of the booking to destroy.

requestBody

The data to destroy the booking with.

queryParams

Optional query parameters to apply

overrides

Optional request overrides to apply


public final DeleteResponse destroy(String bookingId, DestroyBookingQueryParams queryParams, RequestOverrides overrides)

Destroy a booking using the legacy no-body behavior.

This overload is kept for backward compatibility with existing SDK users. It preserves the previous method shape and sends the DELETE request without a request body.

Return

The DeleteResponse object

Parameters

bookingId

The ID of the booking to destroy.

queryParams

Optional query parameters to apply

overrides

Optional request overrides to apply