export type UpdateApiV1ShopsShopIdPaymentMethodsPaymentMethodIdArgs = {body: {type: 'CUSTOMERBALANCE' | 'BTC' | 'LTC' | 'ETH' | 'ETH_USDT' | 'ETH_USDC' | 'SOL' | 'SOL_USDT' | 'SOL_USDC' | 'PAYPAL' | 'STRIPE' | 'SQUARE' | 'CASHAPP' | 'VENMO' | 'ZELLE' | 'REWARBLE' | 'PAYPALFF' | 'AMAZONPS' | 'SUMUP' | 'MOLLIE' | 'SKRILL' | 'SKRILLP2P' | 'AUTHORIZENET' | 'REVOLUTBUSINESS' | 'LEMONSQUEEZY' | 'NMI' | 'OVERPAY' | 'MONEI' | 'RAZORPAY' | 'MERCADOPAGO' | 'PANDABASE' | 'VENPAYR' | 'MISTICPAY' | 'OVGC' | 'WHOP' | 'DODOPAYMENTS' | 'PAYMONGO' | 'SHOPIFY' | 'MANUAL', name: string, checkout_name?: (string | null) | undefined, icon_image_id?: (number | null) | undefined, label?: (string | null) | undefined, fixed_fee?: (number | null) | undefined, percentage_fee?: (number | null) | undefined, min_amount?: (number | null) | undefined, max_amount?: (number | null) | undefined, currency_override?: (string | null) | undefined, hide_powered_by?: (boolean | null) | undefined, is_active?: (boolean | null) | undefined, settings?: (Record | null) | undefined, password?: (string | null) | undefined, otp?: (string | null) | undefined, tfa_code?: (string | null) | undefined, remember_mfa?: (boolean | null) | undefined}}; export type UpdateApiV1ShopsShopIdPaymentMethodsPaymentMethodIdOptions = {baseUrl?: string | undefined, defaultValue?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update Payment Method * * PUT /v1/shops/{shopId}/payment-methods/{paymentMethodId} */ export const updateApiV1ShopsShopIdPaymentMethodsPaymentMethodId = async (args: UpdateApiV1ShopsShopIdPaymentMethodsPaymentMethodIdArgs, options?: UpdateApiV1ShopsShopIdPaymentMethodsPaymentMethodIdOptions) => { const {baseUrl = "https://api.sellauth.com", fetch: fetchFn = fetch, defaultValue} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (defaultValue !== undefined) headers.set('authorization', `Bearer ${defaultValue}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/shops/${encodeURIComponent(String(args.shopId))}/payment-methods/${encodeURIComponent(String(args.paymentMethodId))}${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 undefined };