/* * 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 { SDKValidationError } from "./sdk-validation-error.js"; export type MeterUsageAttribution = { externalCustomerId?: string | undefined; meterId?: string | undefined; qtyTotal?: string | undefined; }; /** @internal */ export const MeterUsageAttribution$inboundSchema: z.ZodMiniType< MeterUsageAttribution, unknown > = z.pipe( z.object({ external_customer_id: types.optional(types.string()), meter_id: types.optional(types.string()), qty_total: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "external_customer_id": "externalCustomerId", "meter_id": "meterId", "qty_total": "qtyTotal", }); }), ); export function meterUsageAttributionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MeterUsageAttribution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MeterUsageAttribution' from JSON`, ); }