export type DeleteApiV3AdministrationsAdministrationIdPaymentHandlersIdArgs = {administration_id: string, id: string, 'Accept-Language'?: string | undefined}; export type DeleteApiV3AdministrationsAdministrationIdPaymentHandlersIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE payment handler * * DELETE /v3/administrations/{administration_id}/payment_handlers/{id} * * Also accepts auth: OAuth2 */ export const deleteApiV3AdministrationsAdministrationIdPaymentHandlersId = async (args: DeleteApiV3AdministrationsAdministrationIdPaymentHandlersIdArgs, options?: DeleteApiV3AdministrationsAdministrationIdPaymentHandlersIdOptions) => { const {baseUrl = "https://api.bookingexperts.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['Accept-Language'] != null) headers.set("Accept-Language", String(args['Accept-Language'])) if (ApiKeyAuth !== undefined) headers.set("X-API-KEY", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v3/administrations/${encodeURIComponent(String(args.administration_id))}/payment_handlers/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };