export type UpdateApiApiPaymentToolsIdConfirmArgs = {id: number}; export type UpdateApiApiPaymentToolsIdConfirmOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * confirmPaymentTool * * PUT /api/payment-tools/{id}/confirm */ export const updateApiApiPaymentToolsIdConfirm = async (args: UpdateApiApiPaymentToolsIdConfirmArgs, options: UpdateApiApiPaymentToolsIdConfirmOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/payment-tools/${encodeURIComponent(String(args.id))}/confirm${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };