export type CreateApiOrdersV3MarketplaceTechnicalCodeAccountIdBeezUPOrderIdClearMerchantOrderInfoArgs = {marketplaceTechnicalCode: unknown, accountId: number, beezUPOrderId: unknown, testMode?: boolean | undefined}; export type CreateApiOrdersV3MarketplaceTechnicalCodeAccountIdBeezUPOrderIdClearMerchantOrderInfoOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Clear an Order's merchant information * * POST /orders/v3//{marketplaceTechnicalCode}/{accountId}/{beezUPOrderId}/clearMerchantOrderInfo */ export const createApiOrdersV3MarketplaceTechnicalCodeAccountIdBeezUPOrderIdClearMerchantOrderInfo = async (args: CreateApiOrdersV3MarketplaceTechnicalCodeAccountIdBeezUPOrderIdClearMerchantOrderInfoArgs, options?: CreateApiOrdersV3MarketplaceTechnicalCodeAccountIdBeezUPOrderIdClearMerchantOrderInfoOptions) => { const {baseUrl = "https://api.beezup.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.testMode != null) query.append("testMode", String(args.testMode)) const url = `${baseUrl.replace(/\/+$/, '')}/orders/v3//${encodeURIComponent(String(args.marketplaceTechnicalCode))}/${encodeURIComponent(String(args.accountId))}/${encodeURIComponent(String(args.beezUPOrderId))}/clearMerchantOrderInfo${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };