/* * 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 deposit that is pending review. FOR TESTING ONLY! */ export type ForceRejectAchDepositRequestCreate = { /** * The name of the ACH deposit to force reject. */ name: string; /** * Reason why the ACH deposit is being rejected. */ reason?: string | undefined; }; /** @internal */ export const ForceRejectAchDepositRequestCreate$inboundSchema: z.ZodType< ForceRejectAchDepositRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type ForceRejectAchDepositRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const ForceRejectAchDepositRequestCreate$outboundSchema: z.ZodType< ForceRejectAchDepositRequestCreate$Outbound, z.ZodTypeDef, ForceRejectAchDepositRequestCreate > = 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 ForceRejectAchDepositRequestCreate$ { /** @deprecated use `ForceRejectAchDepositRequestCreate$inboundSchema` instead. */ export const inboundSchema = ForceRejectAchDepositRequestCreate$inboundSchema; /** @deprecated use `ForceRejectAchDepositRequestCreate$outboundSchema` instead. */ export const outboundSchema = ForceRejectAchDepositRequestCreate$outboundSchema; /** @deprecated use `ForceRejectAchDepositRequestCreate$Outbound` instead. */ export type Outbound = ForceRejectAchDepositRequestCreate$Outbound; } export function forceRejectAchDepositRequestCreateToJSON( forceRejectAchDepositRequestCreate: ForceRejectAchDepositRequestCreate, ): string { return JSON.stringify( ForceRejectAchDepositRequestCreate$outboundSchema.parse( forceRejectAchDepositRequestCreate, ), ); } export function forceRejectAchDepositRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ForceRejectAchDepositRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ForceRejectAchDepositRequestCreate' from JSON`, ); }