export type PaymentToolCommand = {acceptorAcceptorName?: string | undefined, acceptorId?: number | undefined, accountBank?: ('EGHTESAD_NOVID' | 'ANSAR' | 'IRAN_ZAMIN' | 'PARSIAN' | 'PASARGAD' | 'TAT' | 'TEJARAT' | 'TOSAE_TAVON' | 'TOSAE_SADERAT' | 'HEKMAT_IRANIAN' | 'DAY' | 'REFAH' | 'SAMAN' | 'SEPAH' | 'SARMAYEH' | 'SINA' | 'SHAHR' | 'SADERAT' | 'SANAT_O_MADAN' | 'MEHR' | 'GHAVAMIN' | 'KAR_AFARIN' | 'KESHAVARZI' | 'GARDESHGARI' | 'MARKAZI' | 'MASKAN' | 'MELLAT' | 'MELLI' | 'MEHR_EGHTESAD' | 'POST' | 'TOSAE' | 'KOSAR' | 'MIDDLE_EAST' | 'OTHER') | undefined, accountBranch?: string | undefined, accountBranchCode?: string | undefined, accountName?: string | undefined, accountNumber?: string | undefined, accountSheba?: string | undefined, confirmed?: boolean | undefined, id?: number | undefined, merchant?: string | undefined, name?: string | undefined, password?: string | undefined, picked?: boolean | undefined, posType?: ('GPRS' | 'TYPICAL' | 'LAN' | 'M' | 'PC' | 'WIFI') | undefined, sent?: boolean | undefined, sentMessage?: string | undefined, serial?: string | undefined, terminal?: string | undefined, type: 'WALLET' | 'POS' | 'IPG', username?: string | undefined}; export type UpdateApiApiPaymentToolsArgs = {body: PaymentToolCommand}; export type UpdateApiApiPaymentToolsOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updatePaymentTool * * PUT /api/payment-tools */ export const updateApiApiPaymentTools = async (args: UpdateApiApiPaymentToolsArgs, options: UpdateApiApiPaymentToolsOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/payment-tools${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };