export type DeleteApiApiAcceptorManagerDeleteAcceptorCodeMobileArgs = {acceptorCode: string, mobile: string}; export type DeleteApiApiAcceptorManagerDeleteAcceptorCodeMobileOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * delete * * DELETE /api/acceptor-manager/delete/{acceptorCode}/{mobile} */ export const deleteApiApiAcceptorManagerDeleteAcceptorCodeMobile = async (args: DeleteApiApiAcceptorManagerDeleteAcceptorCodeMobileArgs, options: DeleteApiApiAcceptorManagerDeleteAcceptorCodeMobileOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/acceptor-manager/delete/${encodeURIComponent(String(args.acceptorCode))}/${encodeURIComponent(String(args.mobile))}${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 };