/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DecimalUpdate, DecimalUpdate$inboundSchema, DecimalUpdate$Outbound, DecimalUpdate$outboundSchema, } from "./decimalupdate.js"; /** * Details of withdrawal schedule transfers */ export type WithdrawalScheduleDetailsUpdate = { /** * A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][]. * * @remarks * * [BigDecimal]: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html */ amount?: DecimalUpdate | undefined; }; /** @internal */ export const WithdrawalScheduleDetailsUpdate$inboundSchema: z.ZodType< WithdrawalScheduleDetailsUpdate, z.ZodTypeDef, unknown > = z.object({ amount: DecimalUpdate$inboundSchema.optional(), }); /** @internal */ export type WithdrawalScheduleDetailsUpdate$Outbound = { amount?: DecimalUpdate$Outbound | undefined; }; /** @internal */ export const WithdrawalScheduleDetailsUpdate$outboundSchema: z.ZodType< WithdrawalScheduleDetailsUpdate$Outbound, z.ZodTypeDef, WithdrawalScheduleDetailsUpdate > = z.object({ amount: DecimalUpdate$outboundSchema.optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WithdrawalScheduleDetailsUpdate$ { /** @deprecated use `WithdrawalScheduleDetailsUpdate$inboundSchema` instead. */ export const inboundSchema = WithdrawalScheduleDetailsUpdate$inboundSchema; /** @deprecated use `WithdrawalScheduleDetailsUpdate$outboundSchema` instead. */ export const outboundSchema = WithdrawalScheduleDetailsUpdate$outboundSchema; /** @deprecated use `WithdrawalScheduleDetailsUpdate$Outbound` instead. */ export type Outbound = WithdrawalScheduleDetailsUpdate$Outbound; } export function withdrawalScheduleDetailsUpdateToJSON( withdrawalScheduleDetailsUpdate: WithdrawalScheduleDetailsUpdate, ): string { return JSON.stringify( WithdrawalScheduleDetailsUpdate$outboundSchema.parse( withdrawalScheduleDetailsUpdate, ), ); } export function withdrawalScheduleDetailsUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WithdrawalScheduleDetailsUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WithdrawalScheduleDetailsUpdate' from JSON`, ); }