export type DeleteApiFulfillmentPlansSellerIdPlanWhenIdArgs = {sellerId: number, planWhenId: number}; export type DeleteApiFulfillmentPlansSellerIdPlanWhenIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the given fulfillment plan when entry for the given seller * * DELETE /fulfillmentPlans/{sellerId}/{planWhenId} */ export const deleteApiFulfillmentPlansSellerIdPlanWhenId = async (args: DeleteApiFulfillmentPlansSellerIdPlanWhenIdArgs, options?: DeleteApiFulfillmentPlansSellerIdPlanWhenIdOptions) => { const {baseUrl = "https://api.quivo.co", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/fulfillmentPlans/${encodeURIComponent(String(args.sellerId))}/${encodeURIComponent(String(args.planWhenId))}${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 };