export type PatchApiApiV1Orders1ActionsMarkPendingPaymentOptions = {baseUrl: string, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Mark pending payment action * * PATCH /api/v1/orders/1/-actions/mark-pending-payment */ export const patchApiApiV1Orders1ActionsMarkPendingPayment = async (options: PatchApiApiV1Orders1ActionsMarkPendingPaymentOptions) => { const {baseUrl, fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/orders/1/-actions/mark-pending-payment${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };