/* * 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 cancel an ACH withdrawal transfer schedule */ export type CancelAchWithdrawalScheduleRequestCreate = { /** * A comment as to why the ACH withdrawal schedule is being canceled */ comment?: string | undefined; /** * The name of the ACH withdrawal transfer schedule to cancel */ name: string; }; /** @internal */ export const CancelAchWithdrawalScheduleRequestCreate$inboundSchema: z.ZodType< CancelAchWithdrawalScheduleRequestCreate, z.ZodTypeDef, unknown > = z.object({ comment: z.string().optional(), name: z.string(), }); /** @internal */ export type CancelAchWithdrawalScheduleRequestCreate$Outbound = { comment?: string | undefined; name: string; }; /** @internal */ export const CancelAchWithdrawalScheduleRequestCreate$outboundSchema: z.ZodType< CancelAchWithdrawalScheduleRequestCreate$Outbound, z.ZodTypeDef, CancelAchWithdrawalScheduleRequestCreate > = z.object({ comment: z.string().optional(), name: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelAchWithdrawalScheduleRequestCreate$ { /** @deprecated use `CancelAchWithdrawalScheduleRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelAchWithdrawalScheduleRequestCreate$inboundSchema; /** @deprecated use `CancelAchWithdrawalScheduleRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelAchWithdrawalScheduleRequestCreate$outboundSchema; /** @deprecated use `CancelAchWithdrawalScheduleRequestCreate$Outbound` instead. */ export type Outbound = CancelAchWithdrawalScheduleRequestCreate$Outbound; } export function cancelAchWithdrawalScheduleRequestCreateToJSON( cancelAchWithdrawalScheduleRequestCreate: CancelAchWithdrawalScheduleRequestCreate, ): string { return JSON.stringify( CancelAchWithdrawalScheduleRequestCreate$outboundSchema.parse( cancelAchWithdrawalScheduleRequestCreate, ), ); } export function cancelAchWithdrawalScheduleRequestCreateFromJSON( jsonString: string, ): SafeParseResult< CancelAchWithdrawalScheduleRequestCreate, SDKValidationError > { return safeParse( jsonString, (x) => CancelAchWithdrawalScheduleRequestCreate$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CancelAchWithdrawalScheduleRequestCreate' from JSON`, ); }