/* * 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"; /** * Request to force rejection of an existing ACH withdrawal that is pending review. FOR TESTING ONLY! */ export type ForceRejectAchWithdrawalRequestCreate = { /** * The name of the ACH withdrawal to force reject. */ name: string; /** * Reason why the ACH withdrawal is being rejected. */ reason?: string | undefined; }; /** @internal */ export const ForceRejectAchWithdrawalRequestCreate$inboundSchema: z.ZodType< ForceRejectAchWithdrawalRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type ForceRejectAchWithdrawalRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const ForceRejectAchWithdrawalRequestCreate$outboundSchema: z.ZodType< ForceRejectAchWithdrawalRequestCreate$Outbound, z.ZodTypeDef, ForceRejectAchWithdrawalRequestCreate > = z.object({ name: z.string(), reason: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ForceRejectAchWithdrawalRequestCreate$ { /** @deprecated use `ForceRejectAchWithdrawalRequestCreate$inboundSchema` instead. */ export const inboundSchema = ForceRejectAchWithdrawalRequestCreate$inboundSchema; /** @deprecated use `ForceRejectAchWithdrawalRequestCreate$outboundSchema` instead. */ export const outboundSchema = ForceRejectAchWithdrawalRequestCreate$outboundSchema; /** @deprecated use `ForceRejectAchWithdrawalRequestCreate$Outbound` instead. */ export type Outbound = ForceRejectAchWithdrawalRequestCreate$Outbound; } export function forceRejectAchWithdrawalRequestCreateToJSON( forceRejectAchWithdrawalRequestCreate: ForceRejectAchWithdrawalRequestCreate, ): string { return JSON.stringify( ForceRejectAchWithdrawalRequestCreate$outboundSchema.parse( forceRejectAchWithdrawalRequestCreate, ), ); } export function forceRejectAchWithdrawalRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ForceRejectAchWithdrawalRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ForceRejectAchWithdrawalRequestCreate' from JSON`, ); }