export type CreateApiApiAdminWalletSwitchPlanIpgIpgCompanyArgs = {ipgCompany: 'SEPEHR' | 'FANAVA' | 'NOVIN' | 'SAMAN' | 'IKC' | 'ASAN' | 'PAYSTAR' | 'APG_CLIENT'}; export type CreateApiApiAdminWalletSwitchPlanIpgIpgCompanyOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * switchPlanIpg * * POST /api/admin/wallet/switchPlanIpg/{ipgCompany} */ export const createApiApiAdminWalletSwitchPlanIpgIpgCompany = async (args: CreateApiApiAdminWalletSwitchPlanIpgIpgCompanyArgs, options: CreateApiApiAdminWalletSwitchPlanIpgIpgCompanyOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/admin/wallet/switchPlanIpg/${encodeURIComponent(String(args.ipgCompany))}${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 res.blob() };