export type DeleteApiApiQuotesQuoteIdDiscountLineItemArgs = {quoteId: string}; export type DeleteApiApiQuotesQuoteIdDiscountLineItemOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete the discount line item for a Quote * * DELETE /api/quotes/{quoteId}/discount-line-item */ export const deleteApiApiQuotesQuoteIdDiscountLineItem = async (args: DeleteApiApiQuotesQuoteIdDiscountLineItemArgs, options?: DeleteApiApiQuotesQuoteIdDiscountLineItemOptions) => { const {baseUrl = "https://api.fulcrumpro.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/quotes/${encodeURIComponent(String(args.quoteId))}/discount-line-item${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 };