export type DeleteApiV1BankBilletBatchesIdArgs = {'User-Agent'?: string | undefined, id: string}; export type DeleteApiV1BankBilletBatchesIdOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Excluir o lote * * DELETE /v1/bank_billet_batches/{id}/ */ export const deleteApiV1BankBilletBatchesId = async (args: DeleteApiV1BankBilletBatchesIdArgs, options?: DeleteApiV1BankBilletBatchesIdOptions) => { const {baseUrl = "https://api-sandbox.kobana.com.br", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['User-Agent'] != null) headers.set("User-Agent", String(args['User-Agent'])) if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/bank_billet_batches/${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 };