export type UpdateApiApiAcceptorBankDefaultIdPaymentToolIdCheckedArgs = {checked: boolean, id: number, paymentToolId: number}; export type UpdateApiApiAcceptorBankDefaultIdPaymentToolIdCheckedOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updateDefaultBank * * PUT /api/acceptor/bank-default/{id}/{paymentToolId}/{checked} */ export const updateApiApiAcceptorBankDefaultIdPaymentToolIdChecked = async (args: UpdateApiApiAcceptorBankDefaultIdPaymentToolIdCheckedArgs, options: UpdateApiApiAcceptorBankDefaultIdPaymentToolIdCheckedOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/acceptor/bank-default/${encodeURIComponent(String(args.id))}/${encodeURIComponent(String(args.paymentToolId))}/${encodeURIComponent(String(args.checked))}${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 res.blob() };