export type DeleteApiBillingActiveServicesActiveServiceIdArgs = {active_service_id: number}; export type DeleteApiBillingActiveServicesActiveServiceIdOptions = {baseUrl?: string | undefined, OAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Cancel active service * * DELETE /billing/active-services/{active_service_id}/ * * Also accepts auth: PersonalAccessToken */ export const deleteApiBillingActiveServicesActiveServiceId = async (args: DeleteApiBillingActiveServicesActiveServiceIdArgs, options?: DeleteApiBillingActiveServicesActiveServiceIdOptions) => { const {baseUrl = "https://api.angelcam.com/v1", fetch: fetchFn = fetch, OAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (OAuth2 !== undefined) headers.set('authorization', `Bearer ${OAuth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/billing/active-services/${encodeURIComponent(String(args.active_service_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 };