export type UpdateApiV2AccountsIcanInternationaldetailsArgs = {ican: number}; export type UpdateApiV2AccountsIcanInternationaldetailsOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Request international account details * * PUT /v2/accounts/{ican}/internationaldetails */ export const updateApiV2AccountsIcanInternationaldetails = async (args: UpdateApiV2AccountsIcanInternationaldetailsArgs, options?: UpdateApiV2AccountsIcanInternationaldetailsOptions) => { const {baseUrl = "https://api.fire.com/business", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v2/accounts/${encodeURIComponent(String(args.ican))}/internationaldetails${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };