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