/* * 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 deposit transfer schedule */ export type CancelAchDepositScheduleRequestCreate = { /** * A comment as to why the ACH deposit schedule is being canceled */ comment?: string | undefined; /** * The name of the ACH deposit transfer schedule to cancel */ name: string; }; /** @internal */ export const CancelAchDepositScheduleRequestCreate$inboundSchema: z.ZodType< CancelAchDepositScheduleRequestCreate, z.ZodTypeDef, unknown > = z.object({ comment: z.string().optional(), name: z.string(), }); /** @internal */ export type CancelAchDepositScheduleRequestCreate$Outbound = { comment?: string | undefined; name: string; }; /** @internal */ export const CancelAchDepositScheduleRequestCreate$outboundSchema: z.ZodType< CancelAchDepositScheduleRequestCreate$Outbound, z.ZodTypeDef, CancelAchDepositScheduleRequestCreate > = 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 CancelAchDepositScheduleRequestCreate$ { /** @deprecated use `CancelAchDepositScheduleRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelAchDepositScheduleRequestCreate$inboundSchema; /** @deprecated use `CancelAchDepositScheduleRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelAchDepositScheduleRequestCreate$outboundSchema; /** @deprecated use `CancelAchDepositScheduleRequestCreate$Outbound` instead. */ export type Outbound = CancelAchDepositScheduleRequestCreate$Outbound; } export function cancelAchDepositScheduleRequestCreateToJSON( cancelAchDepositScheduleRequestCreate: CancelAchDepositScheduleRequestCreate, ): string { return JSON.stringify( CancelAchDepositScheduleRequestCreate$outboundSchema.parse( cancelAchDepositScheduleRequestCreate, ), ); } export function cancelAchDepositScheduleRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelAchDepositScheduleRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelAchDepositScheduleRequestCreate' from JSON`, ); }