/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * What type of tax entity the company is. One of: * * @remarks * - C-Corporation * - S-Corporation * - Sole proprietor * - LLC * - LLP * - Limited partnership * - Co-ownership * - Association * - Trusteeship * - General partnership * - Joint venture * - Non-Profit */ export const FederalTaxDetailsUpdateTaxPayerType = { CCorporation: "C-Corporation", SCorporation: "S-Corporation", SoleProprietor: "Sole proprietor", Llc: "LLC", Llp: "LLP", LimitedPartnership: "Limited partnership", CoOwnership: "Co-ownership", Association: "Association", Trusteeship: "Trusteeship", GeneralPartnership: "General partnership", JointVenture: "Joint venture", NonProfit: "Non-Profit", } as const; /** * What type of tax entity the company is. One of: * * @remarks * - C-Corporation * - S-Corporation * - Sole proprietor * - LLC * - LLP * - Limited partnership * - Co-ownership * - Association * - Trusteeship * - General partnership * - Joint venture * - Non-Profit */ export type FederalTaxDetailsUpdateTaxPayerType = ClosedEnum< typeof FederalTaxDetailsUpdateTaxPayerType >; /** * The form used by the company for federal tax filing. One of: * * @remarks * - 941 (Quarterly federal tax return form) * - 944 (Annual federal tax return form) */ export const FederalTaxDetailsUpdateFilingForm = { NineHundredAndFortyOne: "941", NineHundredAndFortyFour: "944", } as const; /** * The form used by the company for federal tax filing. One of: * * @remarks * - 941 (Quarterly federal tax return form) * - 944 (Annual federal tax return form) */ export type FederalTaxDetailsUpdateFilingForm = ClosedEnum< typeof FederalTaxDetailsUpdateFilingForm >; export type FederalTaxDetailsUpdate = { /** * The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. */ version: string; /** * The legal name of the company */ legalName?: string | undefined; /** * The company's Employer Identification Number (EIN). Must be 9 digits. Dashes are optional (e.g., '12-3456789' or '123456789'). */ ein?: string | undefined; /** * What type of tax entity the company is. One of: * * @remarks * - C-Corporation * - S-Corporation * - Sole proprietor * - LLC * - LLP * - Limited partnership * - Co-ownership * - Association * - Trusteeship * - General partnership * - Joint venture * - Non-Profit */ taxPayerType?: FederalTaxDetailsUpdateTaxPayerType | undefined; /** * The form used by the company for federal tax filing. One of: * * @remarks * - 941 (Quarterly federal tax return form) * - 944 (Annual federal tax return form) */ filingForm?: FederalTaxDetailsUpdateFilingForm | undefined; /** * Whether the company is taxed as an S-Corporation */ taxableAsScorp?: boolean | undefined; }; /** @internal */ export const FederalTaxDetailsUpdateTaxPayerType$outboundSchema: z.ZodNativeEnum = z.nativeEnum( FederalTaxDetailsUpdateTaxPayerType, ); /** @internal */ export const FederalTaxDetailsUpdateFilingForm$outboundSchema: z.ZodNativeEnum< typeof FederalTaxDetailsUpdateFilingForm > = z.nativeEnum(FederalTaxDetailsUpdateFilingForm); /** @internal */ export type FederalTaxDetailsUpdate$Outbound = { version: string; legal_name?: string | undefined; ein?: string | undefined; tax_payer_type?: string | undefined; filing_form?: string | undefined; taxable_as_scorp?: boolean | undefined; }; /** @internal */ export const FederalTaxDetailsUpdate$outboundSchema: z.ZodType< FederalTaxDetailsUpdate$Outbound, z.ZodTypeDef, FederalTaxDetailsUpdate > = z.object({ version: z.string(), legalName: z.string().optional(), ein: z.string().optional(), taxPayerType: FederalTaxDetailsUpdateTaxPayerType$outboundSchema.optional(), filingForm: FederalTaxDetailsUpdateFilingForm$outboundSchema.optional(), taxableAsScorp: z.boolean().optional(), }).transform((v) => { return remap$(v, { legalName: "legal_name", taxPayerType: "tax_payer_type", filingForm: "filing_form", taxableAsScorp: "taxable_as_scorp", }); }); export function federalTaxDetailsUpdateToJSON( federalTaxDetailsUpdate: FederalTaxDetailsUpdate, ): string { return JSON.stringify( FederalTaxDetailsUpdate$outboundSchema.parse(federalTaxDetailsUpdate), ); }