/* * 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 LinkedTaxRate = { /** * The ID of the object. */ id?: string | null | undefined; /** * Tax rate code */ code?: string | null | undefined; /** * Name of the tax rate */ name?: string | null | undefined; /** * Rate of the tax rate */ rate?: number | null | undefined; }; /** @internal */ export const LinkedTaxRate$inboundSchema: z.ZodType< LinkedTaxRate, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ id: z.nullable(types.string()).optional(), code: z.nullable(types.string()).optional(), name: z.nullable(types.string()).optional(), rate: z.nullable(types.number()).optional(), }) ); export function linkedTaxRateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LinkedTaxRate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LinkedTaxRate' from JSON`, ); }