export type PosAcceptorCommand = {acceptorNO?: string | undefined, acceptorType?: string | undefined, address?: string | undefined, businessCategoryCode?: string | undefined, businessCertificateNumber?: string | undefined, businessSubCategoryCode?: string | undefined, certificateExpiryDate?: string | undefined, certificateIssueDate?: string | undefined, cityCode?: string | undefined, email?: string | undefined, enStoreName?: string | undefined, enamadExist?: string | undefined, enamadExpireDate?: string | undefined, enamadIssueDate?: string | undefined, enamadType?: string | undefined, ownershipType?: string | undefined, pcposRequest?: boolean | undefined, phoneNumber?: string | undefined, phoneNumberPrefix?: string | undefined, postalCode?: string | undefined, rentalContractExpireDate?: string | undefined, rentalContractNumber?: string | undefined, storeName?: string | undefined, taxTrackingCode?: string | undefined, terminalCount?: number | undefined, terminalNO?: string | undefined, trackingCode?: string | undefined, webSite?: string | undefined}; export type PosPersonCommand = {address?: string | undefined, brithDate?: string | undefined, cityCode?: string | undefined, enFatherName?: string | undefined, enFirstName?: string | undefined, enLastName?: string | undefined, fatherName?: string | undefined, firstName?: string | undefined, foreignPervasiveCode?: string | undefined, gender?: string | undefined, lastName?: string | undefined, lifeStatus?: string | undefined, mobileNumber?: string | undefined, nationalCode?: string | undefined, nationality?: string | undefined, passportExpireDate?: string | undefined, passportNumber?: string | undefined, phoneNumber?: string | undefined, phoneNumberPrefix?: string | undefined, postalCode?: string | undefined}; export type PosAccountCommand = {acceptorNo?: string | undefined, accountNumber?: string | undefined, bankCode: number, bankTitle?: string | undefined, branchCode?: string | undefined, distAmount?: number | undefined, iban?: string | undefined, isMainAccount?: boolean | undefined, person?: Array | undefined}; export type PosCustomerCommand = {cityCode?: string | undefined, commercialCode?: string | undefined, companyName?: string | undefined, customerType?: string | undefined, enCompanyName?: string | undefined, fax?: string | undefined, nationalId?: string | undefined, registerDate?: string | undefined, registerNumber?: string | undefined}; export type PspPosRegisterCommand = {acceptor?: PosAcceptorCommand | undefined, account?: Array | undefined, customer?: PosCustomerCommand | undefined, person?: PosPersonCommand | undefined}; export type UpdateApiApiPaymentToolsIdSendArgs = {body: PspPosRegisterCommand}; export type UpdateApiApiPaymentToolsIdSendOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * sendPaymentTool * * PUT /api/payment-tools/{id}/send */ export const updateApiApiPaymentToolsIdSend = async (args: UpdateApiApiPaymentToolsIdSendArgs, options: UpdateApiApiPaymentToolsIdSendOptions) => { 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/${encodeURIComponent(String(args.id))}/send${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() };