/* * 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"; export type RecurringReimbursement = { /** * The unique identifier of this recurring reimbursement. */ uuid: string; /** * The UUID of the employee. */ employeeUuid: string; /** * The description of the reimbursement. */ description: string; /** * The dollar amount of the reimbursement. */ amount: string; /** * 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 timestamp when this reimbursement was created. */ createdAt?: string | undefined; /** * The timestamp when this reimbursement was last updated. */ updatedAt?: string | undefined; }; /** @internal */ export const RecurringReimbursement$inboundSchema: z.ZodType< RecurringReimbursement, z.ZodTypeDef, unknown > = z.object({ uuid: z.string(), employee_uuid: z.string(), description: z.string(), amount: z.string(), version: z.string(), created_at: z.string().optional(), updated_at: z.string().optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", "created_at": "createdAt", "updated_at": "updatedAt", }); }); export function recurringReimbursementFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RecurringReimbursement$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecurringReimbursement' from JSON`, ); }