export type DeleteApiBapiV3RewardsOrdersIdArgs = {id: string}; export type DeleteApiBapiV3RewardsOrdersIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 리워드 주문 즉시 취소 * * DELETE /bapi/v3/rewards/orders/{id} */ export const deleteApiBapiV3RewardsOrdersId = async (args: DeleteApiBapiV3RewardsOrdersIdArgs, options?: DeleteApiBapiV3RewardsOrdersIdOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v3/rewards/orders/${encodeURIComponent(String(args.id))}${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 };