export type GetApiApiV3RewardsInternalOrdersOrderIdPaymentsArgs = {orderId: string}; export type GetApiApiV3RewardsInternalOrdersOrderIdPaymentsOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 나(기업)의 특정 주문의 결제 로그 목록 조회 (시간순) * * GET /api/v3/rewards/internal/orders/{orderId}/payments */ export const getApiApiV3RewardsInternalOrdersOrderIdPayments = async (args: GetApiApiV3RewardsInternalOrdersOrderIdPaymentsArgs, options?: GetApiApiV3RewardsInternalOrdersOrderIdPaymentsOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/rewards/internal/orders/${encodeURIComponent(String(args.orderId))}/payments${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };