/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { RoundType, RoundType$inboundSchema } from "./round-type.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type PriceJSONBTransformQuantity = { /** * Divide quantity by this number */ divideBy?: number | undefined; round?: RoundType | undefined; }; /** @internal */ export const PriceJSONBTransformQuantity$inboundSchema: z.ZodMiniType< PriceJSONBTransformQuantity, unknown > = z.pipe( z.object({ divide_by: types.optional(types.number()), round: types.optional(RoundType$inboundSchema), }), z.transform((v) => { return remap$(v, { "divide_by": "divideBy", }); }), ); export function priceJSONBTransformQuantityFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PriceJSONBTransformQuantity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PriceJSONBTransformQuantity' from JSON`, ); }