/* * 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 { PricePrice, PricePrice$inboundSchema } from "./price-price.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type MatchedPrice = { meterId?: string | undefined; price?: PricePrice | undefined; priceId?: string | undefined; status?: string | undefined; }; /** @internal */ export const MatchedPrice$inboundSchema: z.ZodMiniType = z.pipe( z.object({ meter_id: types.optional(types.string()), price: types.optional(PricePrice$inboundSchema), price_id: types.optional(types.string()), status: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "meter_id": "meterId", "price_id": "priceId", }); }), ); export function matchedPriceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MatchedPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MatchedPrice' from JSON`, ); }