export type MindbodyRestApiCommonModelsSiteBusinessInformation = {Id?: number | undefined, Industry?: string | undefined, BusinessName?: string | undefined, TimeZoneOffsetMinutes?: number | undefined, ReplyEmail?: string | undefined, ReplyName?: string | undefined, BusinessEmail?: string | undefined, CountryCode?: string | undefined, StateProvCode?: string | undefined, City?: string | undefined, BusinessAutoEmailReplyName?: string | undefined, BusinessAutoEmailReplyAddress?: string | undefined, BusinessDescription?: string | undefined}; export type UpdateApiSubscribersBusinessinformationArgs = {Authorization: string, SiteId: number, body: MindbodyRestApiCommonModelsSiteBusinessInformation}; export type UpdateApiSubscribersBusinessinformationOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Replaces the business information for a business with the given resource. * * PUT /Subscribers/Businessinformation */ export const updateApiSubscribersBusinessinformation = async (args: UpdateApiSubscribersBusinessinformationArgs, options?: UpdateApiSubscribersBusinessinformationOptions) => { const {baseUrl = "https://api.mindbodyonline.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args.SiteId != null) headers.set("SiteId", String(args.SiteId)) const url = `${baseUrl.replace(/\/+$/, '')}/Subscribers/Businessinformation${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 };