/* * 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 BillingPeriodInfo = { endTime?: Date | undefined; /** * e.g., "monthly", "yearly" */ period?: string | undefined; startTime?: Date | undefined; }; /** @internal */ export const BillingPeriodInfo$inboundSchema: z.ZodMiniType< BillingPeriodInfo, unknown > = z.pipe( z.object({ end_time: types.optional(types.date()), period: types.optional(types.string()), start_time: types.optional(types.date()), }), z.transform((v) => { return remap$(v, { "end_time": "endTime", "start_time": "startTime", }); }), ); export function billingPeriodInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BillingPeriodInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BillingPeriodInfo' from JSON`, ); }