export type DeleteApiV3SuppliersSupplierIdInventoryObjectsIdArgs = {supplier_id: string, id: string, 'Accept-Language'?: string | undefined}; export type DeleteApiV3SuppliersSupplierIdInventoryObjectsIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE inventory_object * * DELETE /v3/suppliers/{supplier_id}/inventory_objects/{id} * * Also accepts auth: OAuth2 */ export const deleteApiV3SuppliersSupplierIdInventoryObjectsId = async (args: DeleteApiV3SuppliersSupplierIdInventoryObjectsIdArgs, options?: DeleteApiV3SuppliersSupplierIdInventoryObjectsIdOptions) => { 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/suppliers/${encodeURIComponent(String(args.supplier_id))}/inventory_objects/${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 };