export type FeeId = string; export type DeleteApiV1AccountsAccountIdPartnerFeesFeeIdArgs = {account_id: string, fee_id: FeeId}; export type DeleteApiV1AccountsAccountIdPartnerFeesFeeIdOptions = {baseUrl?: string | undefined, Authorization?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /v1/accounts/{account_id}/partner-fees/{fee_id} */ export const deleteApiV1AccountsAccountIdPartnerFeesFeeId = async (args: DeleteApiV1AccountsAccountIdPartnerFeesFeeIdArgs, options?: DeleteApiV1AccountsAccountIdPartnerFeesFeeIdOptions) => { const {baseUrl = "https://api.1money.com", fetch: fetchFn = fetch, Authorization} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Authorization !== undefined) headers.set('authorization', `Bearer ${Authorization}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/accounts/${encodeURIComponent(String(args.account_id))}/partner-fees/${encodeURIComponent(String(args.fee_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };