/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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"; export type Deduction = { /** * The name of the deduction. */ name?: string | null | undefined; /** * The amount deducted. */ amount?: number | null | undefined; }; /** @internal */ export const Deduction$inboundSchema: z.ZodType< Deduction, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.nullable(types.string()).optional(), amount: z.nullable(types.number()).optional(), }) ); export function deductionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Deduction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Deduction' from JSON`, ); }