/* * 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 { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The overview of the payroll totals. */ export type PayrollTotals = { /** * The total company debit for the payroll. */ companyDebit?: number | null | undefined; /** * The total tax debit for the payroll. */ taxDebit?: number | null | undefined; /** * The total check amount for the payroll. */ checkAmount?: number | null | undefined; /** * The net pay amount for the payroll. */ netPay?: number | null | undefined; /** * The gross pay amount for the payroll. */ grossPay?: number | null | undefined; /** * The total amount of employer paid taxes for the payroll. */ employerTaxes?: number | null | undefined; /** * The total amount of employee paid taxes for the payroll. */ employeeTaxes?: number | null | undefined; /** * The total amount of company contributed benefits for the payroll. */ employerBenefitContributions?: number | null | undefined; /** * The total amount of employee deducted benefits for the payroll. */ employeeBenefitDeductions?: number | null | undefined; }; /** @internal */ export const PayrollTotals$inboundSchema: z.ZodType< PayrollTotals, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ company_debit: z.nullable(types.number()).optional(), tax_debit: z.nullable(types.number()).optional(), check_amount: z.nullable(types.number()).optional(), net_pay: z.nullable(types.number()).optional(), gross_pay: z.nullable(types.number()).optional(), employer_taxes: z.nullable(types.number()).optional(), employee_taxes: z.nullable(types.number()).optional(), employer_benefit_contributions: z.nullable(types.number()).optional(), employee_benefit_deductions: z.nullable(types.number()).optional(), }).transform((v) => { return remap$(v, { "company_debit": "companyDebit", "tax_debit": "taxDebit", "check_amount": "checkAmount", "net_pay": "netPay", "gross_pay": "grossPay", "employer_taxes": "employerTaxes", "employee_taxes": "employeeTaxes", "employer_benefit_contributions": "employerBenefitContributions", "employee_benefit_deductions": "employeeBenefitDeductions", }); }) ); export function payrollTotalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayrollTotals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayrollTotals' from JSON`, ); }