/* * 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"; /** * Only applicable when a payroll is moved to four day processing instead of fast ach. */ export type PayrollPaymentSpeedChangedType = { /** * Original check date when fast ach applies. */ originalCheckDate?: string | undefined; /** * Current check date. */ currentCheckDate?: string | undefined; /** * Original debit date when fast ach applies. */ originalDebitDate?: string | undefined; /** * Current debit date. */ currentDebitDate?: string | undefined; /** * The reason why the payroll is moved to four day. */ reason?: string | undefined; }; /** @internal */ export const PayrollPaymentSpeedChangedType$inboundSchema: z.ZodType< PayrollPaymentSpeedChangedType, z.ZodTypeDef, unknown > = z.object({ original_check_date: z.string().optional(), current_check_date: z.string().optional(), original_debit_date: z.string().optional(), current_debit_date: z.string().optional(), reason: z.string().optional(), }).transform((v) => { return remap$(v, { "original_check_date": "originalCheckDate", "current_check_date": "currentCheckDate", "original_debit_date": "originalDebitDate", "current_debit_date": "currentDebitDate", }); }); export function payrollPaymentSpeedChangedTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayrollPaymentSpeedChangedType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayrollPaymentSpeedChangedType' from JSON`, ); }