/* * 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"; /** * Fixed recurring amount paid in the billing period regardless of usage. */ export type MonthlyPlatformFee = { /** * A 3-letter ISO 4217 currency code. */ currency: string; /** * A decimal-formatted numerical string that represents up to 9 decimal place precision. * * @remarks * * For example, $12.987654321 is '12.987654321'. */ valueDecimal: string; }; /** @internal */ export const MonthlyPlatformFee$inboundSchema: z.ZodType< MonthlyPlatformFee, z.ZodTypeDef, unknown > = z.object({ currency: z.string(), valueDecimal: z.string(), }); /** @internal */ export type MonthlyPlatformFee$Outbound = { currency: string; valueDecimal: string; }; /** @internal */ export const MonthlyPlatformFee$outboundSchema: z.ZodType< MonthlyPlatformFee$Outbound, z.ZodTypeDef, MonthlyPlatformFee > = z.object({ currency: z.string(), valueDecimal: z.string(), }); export function monthlyPlatformFeeToJSON( monthlyPlatformFee: MonthlyPlatformFee, ): string { return JSON.stringify( MonthlyPlatformFee$outboundSchema.parse(monthlyPlatformFee), ); } export function monthlyPlatformFeeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MonthlyPlatformFee$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MonthlyPlatformFee' from JSON`, ); }