/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type VolumeByCustomerTypeError = { businessToBusinessPercentage?: string | undefined; consumerToBusinessPercentage?: string | undefined; }; /** @internal */ export const VolumeByCustomerTypeError$inboundSchema: z.ZodType< VolumeByCustomerTypeError, z.ZodTypeDef, unknown > = z.object({ businessToBusinessPercentage: z.string().optional(), consumerToBusinessPercentage: z.string().optional(), }); /** @internal */ export type VolumeByCustomerTypeError$Outbound = { businessToBusinessPercentage?: string | undefined; consumerToBusinessPercentage?: string | undefined; }; /** @internal */ export const VolumeByCustomerTypeError$outboundSchema: z.ZodType< VolumeByCustomerTypeError$Outbound, z.ZodTypeDef, VolumeByCustomerTypeError > = z.object({ businessToBusinessPercentage: z.string().optional(), consumerToBusinessPercentage: z.string().optional(), }); export function volumeByCustomerTypeErrorToJSON( volumeByCustomerTypeError: VolumeByCustomerTypeError, ): string { return JSON.stringify( VolumeByCustomerTypeError$outboundSchema.parse(volumeByCustomerTypeError), ); } export function volumeByCustomerTypeErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VolumeByCustomerTypeError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VolumeByCustomerTypeError' from JSON`, ); }