export type VagaroMerchantModelMongoCollectionVagaroCapitalLog = {id?: string | undefined, businessID?: number | undefined, merchantTokenId?: string | undefined, step?: string | undefined, request?: string | undefined, response?: string | undefined, createdBy?: number | undefined, createdDate?: string | undefined}; export type CreateApiGroupApiVVersionMerchantAddcapitalmongologArgs = {group: string, version: string, body: VagaroMerchantModelMongoCollectionVagaroCapitalLog}; export type CreateApiGroupApiVVersionMerchantAddcapitalmongologOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /{group}/api/v{version}/merchant/addcapitalmongolog */ export const createApiGroupApiVVersionMerchantAddcapitalmongolog = async (args: CreateApiGroupApiVVersionMerchantAddcapitalmongologArgs, options: CreateApiGroupApiVVersionMerchantAddcapitalmongologOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/${encodeURIComponent(String(args.group))}/api/v${encodeURIComponent(String(args.version))}/merchant/addcapitalmongolog${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };