/* * 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"; /** * The subtotals for the payroll. */ export type PayrollTotalsType = { /** * The total company debit for the payroll. */ companyDebit?: string | undefined; /** * The total company net pay for the payroll. */ netPayDebit?: string | undefined; /** * The total tax debit for the payroll. */ taxDebit?: string | undefined; /** * The total reimbursement debit for the payroll. */ reimbursementDebit?: string | undefined; /** * The total child support debit for the payroll. */ childSupportDebit?: string | undefined; /** * The total reimbursements for the payroll. */ reimbursements?: string | undefined; /** * The net pay amount for the payroll. */ netPay?: string | undefined; /** * The gross pay amount for the payroll. */ grossPay?: string | undefined; /** * The total employee bonuses amount for the payroll. */ employeeBonuses?: string | undefined; /** * The total employee commissions amount for the payroll. */ employeeCommissions?: string | undefined; /** * The total employee cash tips amount for the payroll. */ employeeCashTips?: string | undefined; /** * The total employee paycheck tips amount for the payroll. */ employeePaycheckTips?: string | undefined; /** * The total additional earnings amount for the payroll. */ additionalEarnings?: string | undefined; /** * The total owner's draw for the payroll. */ ownersDraw?: string | undefined; /** * The total check amount for the payroll. */ checkAmount?: string | undefined; /** * The total amount of employer paid taxes for the payroll. */ employerTaxes?: string | undefined; /** * The total amount of employee paid taxes for the payroll. */ employeeTaxes?: string | undefined; /** * The total amount of company contributed benefits for the payroll. */ benefits?: string | undefined; /** * The total amount of employee deducted benefits for the payroll. */ employeeBenefitsDeductions?: string | undefined; /** * The total amount of imputed pay for the payroll. */ imputedPay?: string | undefined; /** * The total amount of payroll taxes deferred for the payroll, such as allowed by the CARES act. */ deferredPayrollTaxes?: string | undefined; /** * The total amount of deductions for the payroll. */ otherDeductions?: string | undefined; }; /** @internal */ export const PayrollTotalsType$inboundSchema: z.ZodType< PayrollTotalsType, z.ZodTypeDef, unknown > = z.object({ company_debit: z.string().optional(), net_pay_debit: z.string().optional(), tax_debit: z.string().optional(), reimbursement_debit: z.string().optional(), child_support_debit: z.string().optional(), reimbursements: z.string().optional(), net_pay: z.string().optional(), gross_pay: z.string().optional(), employee_bonuses: z.string().optional(), employee_commissions: z.string().optional(), employee_cash_tips: z.string().optional(), employee_paycheck_tips: z.string().optional(), additional_earnings: z.string().optional(), owners_draw: z.string().optional(), check_amount: z.string().optional(), employer_taxes: z.string().optional(), employee_taxes: z.string().optional(), benefits: z.string().optional(), employee_benefits_deductions: z.string().optional(), imputed_pay: z.string().optional(), deferred_payroll_taxes: z.string().optional(), other_deductions: z.string().optional(), }).transform((v) => { return remap$(v, { "company_debit": "companyDebit", "net_pay_debit": "netPayDebit", "tax_debit": "taxDebit", "reimbursement_debit": "reimbursementDebit", "child_support_debit": "childSupportDebit", "net_pay": "netPay", "gross_pay": "grossPay", "employee_bonuses": "employeeBonuses", "employee_commissions": "employeeCommissions", "employee_cash_tips": "employeeCashTips", "employee_paycheck_tips": "employeePaycheckTips", "additional_earnings": "additionalEarnings", "owners_draw": "ownersDraw", "check_amount": "checkAmount", "employer_taxes": "employerTaxes", "employee_taxes": "employeeTaxes", "employee_benefits_deductions": "employeeBenefitsDeductions", "imputed_pay": "imputedPay", "deferred_payroll_taxes": "deferredPayrollTaxes", "other_deductions": "otherDeductions", }); }); export function payrollTotalsTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayrollTotalsType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayrollTotalsType' from JSON`, ); }