export type PatchApiCompaniesCompanyEnrollmentProfileArgs = {body: {employee_count?: number | undefined, contractor_count?: number | undefined, pay_period_amount?: number | undefined, previous_payroll_provider?: ('accupay' | 'adp_enterprise' | 'adp_payforce' | 'adp_pcpw' | 'adp_run' | 'adp_totalsource' | 'adp_workforce_now' | 'benefit_mall_compupay' | 'cbiz' | 'ceridian' | 'emangrove' | 'evolution' | 'execupay' | 'gusto' | 'heartland_payroll' | 'isolved' | 'microsoft_dynamics_gp' | 'mint' | 'netpay' | 'onpay' | 'patriot' | 'paychex_flex' | 'paychex_go' | 'paychex_preview' | 'paycom' | 'paycor' | 'paydayonesource' | 'payrollmatters' | 'payroll_people' | 'paylocity' | 'payworks' | 'prime_pay' | 'proliant' | 'quickbooks_online' | 'quickbooks_desktop' | 'rasi' | 'rippling' | 'sage_100' | 'sage_300' | 'sage_hr' | 'square_payroll' | 'sure' | 'toast' | 'trinet' | 'trupay' | 'ultipro_online' | 'ultipro_pc' | 'wave' | 'zeal' | 'zendona' | 'zenefits' | 'manual' | 'accountant' | 'other') | undefined, previous_payroll_provider_other?: string | undefined, first_payroll?: boolean | undefined, first_payroll_of_year?: boolean | undefined, user_since?: string | undefined, expected_first_payday?: string | undefined, approved_for_payment_processing?: boolean | undefined, existing_payroll_customer_processing_period?: string | undefined, average_monthly_revenue?: number | undefined, earliest_known_revenue?: string | undefined, months_on_previous_payroll_provider?: number | undefined, social_media?: Array | undefined, products_actively_used?: Array | undefined, account_contacts?: Array | undefined, fraud_score?: number | undefined, predicted_fraud?: boolean | undefined, paying_user?: boolean | undefined, missed_payments_count?: number | undefined, payroll_history_access_method?: ('"authorized_access_to_previous_provider"' | '"provided_credentials"' | '"provided_reports"') | undefined, implementation_services_submission_comment?: string | undefined}}; export type PatchApiCompaniesCompanyEnrollmentProfileOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update the enrollment profile * * PATCH /companies/{company}/enrollment_profile */ export const patchApiCompaniesCompanyEnrollmentProfile = async (args: PatchApiCompaniesCompanyEnrollmentProfileArgs, options?: PatchApiCompaniesCompanyEnrollmentProfileOptions) => { const {baseUrl = "https://sandbox.checkhq.com", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (sec0 !== undefined) headers.set("Authorization", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/companies/${encodeURIComponent(String(args.company))}/enrollment_profile${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 (await res.json()) as unknown };