/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Ytd Benefit Amounts From Different Company */ export type YtdBenefitAmountsFromDifferentCompany = { /** * The unique identifier for this benefit amount record. */ uuid: string; /** * The benefit type supported by Gusto. See [Benefit Types](https://docs.gusto.com/embedded-payroll/reference/get-v1-benefits) for more information. */ benefitType: number; /** * The year-to-date employee deduction made outside the current company. */ ytdEmployeeDeductionAmount: string; /** * The year-to-date company contribution made outside the current company. */ ytdCompanyContributionAmount: string; }; /** @internal */ export const YtdBenefitAmountsFromDifferentCompany$inboundSchema: z.ZodType< YtdBenefitAmountsFromDifferentCompany, z.ZodTypeDef, unknown > = z.object({ uuid: z.string(), benefit_type: z.number().int(), ytd_employee_deduction_amount: z.string(), ytd_company_contribution_amount: z.string(), }).transform((v) => { return remap$(v, { "benefit_type": "benefitType", "ytd_employee_deduction_amount": "ytdEmployeeDeductionAmount", "ytd_company_contribution_amount": "ytdCompanyContributionAmount", }); }); export function ytdBenefitAmountsFromDifferentCompanyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => YtdBenefitAmountsFromDifferentCompany$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'YtdBenefitAmountsFromDifferentCompany' from JSON`, ); }