export type UpdateApiV1FinanceQuotesQuoteIdRejectedArgs = {'Customer-Id': number, quoteId: number}; export type UpdateApiV1FinanceQuotesQuoteIdRejectedOptions = {baseUrl?: string | undefined, bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Mark a quote as rejected * * PUT /v1/finance/quotes/{quoteId}/rejected */ export const updateApiV1FinanceQuotesQuoteIdRejected = async (args: UpdateApiV1FinanceQuotesQuoteIdRejectedArgs, options?: UpdateApiV1FinanceQuotesQuoteIdRejectedOptions) => { const {baseUrl = "https://api.bigchange.com", fetch: fetchFn = fetch, bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['Customer-Id'] != null) headers.set("Customer-Id", String(args['Customer-Id'])) if (bearer !== undefined) headers.set('authorization', `Bearer ${bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/finance/quotes/${encodeURIComponent(String(args.quoteId))}/rejected${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 };