/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { MoovError } from "./mooverror.js"; export type ListTransfersValidationErrorData = { accountIDs?: string | undefined; status?: string | undefined; startDateTime?: string | undefined; endDateTime?: string | undefined; skip?: string | undefined; count?: string | undefined; groupID?: string | undefined; foreignID?: string | undefined; scheduleID?: string | undefined; paymentLinkCode?: string | undefined; refunded?: string | undefined; disputed?: string | undefined; }; export class ListTransfersValidationError extends MoovError { accountIDs?: string | undefined; status?: string | undefined; startDateTime?: string | undefined; endDateTime?: string | undefined; skip?: string | undefined; count?: string | undefined; groupID?: string | undefined; foreignID?: string | undefined; scheduleID?: string | undefined; paymentLinkCode?: string | undefined; refunded?: string | undefined; disputed?: string | undefined; /** The original data that was passed to this error instance. */ data$: ListTransfersValidationErrorData; constructor( err: ListTransfersValidationErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.accountIDs != null) this.accountIDs = err.accountIDs; if (err.status != null) this.status = err.status; if (err.startDateTime != null) this.startDateTime = err.startDateTime; if (err.endDateTime != null) this.endDateTime = err.endDateTime; if (err.skip != null) this.skip = err.skip; if (err.count != null) this.count = err.count; if (err.groupID != null) this.groupID = err.groupID; if (err.foreignID != null) this.foreignID = err.foreignID; if (err.scheduleID != null) this.scheduleID = err.scheduleID; if (err.paymentLinkCode != null) this.paymentLinkCode = err.paymentLinkCode; if (err.refunded != null) this.refunded = err.refunded; if (err.disputed != null) this.disputed = err.disputed; this.name = "ListTransfersValidationError"; } } /** @internal */ export const ListTransfersValidationError$inboundSchema: z.ZodType< ListTransfersValidationError, z.ZodTypeDef, unknown > = z.object({ accountIDs: z.string().optional(), status: z.string().optional(), startDateTime: z.string().optional(), endDateTime: z.string().optional(), skip: z.string().optional(), count: z.string().optional(), groupID: z.string().optional(), foreignID: z.string().optional(), scheduleID: z.string().optional(), paymentLinkCode: z.string().optional(), refunded: z.string().optional(), disputed: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new ListTransfersValidationError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type ListTransfersValidationError$Outbound = { accountIDs?: string | undefined; status?: string | undefined; startDateTime?: string | undefined; endDateTime?: string | undefined; skip?: string | undefined; count?: string | undefined; groupID?: string | undefined; foreignID?: string | undefined; scheduleID?: string | undefined; paymentLinkCode?: string | undefined; refunded?: string | undefined; disputed?: string | undefined; }; /** @internal */ export const ListTransfersValidationError$outboundSchema: z.ZodType< ListTransfersValidationError$Outbound, z.ZodTypeDef, ListTransfersValidationError > = z.instanceof(ListTransfersValidationError) .transform(v => v.data$) .pipe(z.object({ accountIDs: z.string().optional(), status: z.string().optional(), startDateTime: z.string().optional(), endDateTime: z.string().optional(), skip: z.string().optional(), count: z.string().optional(), groupID: z.string().optional(), foreignID: z.string().optional(), scheduleID: z.string().optional(), paymentLinkCode: z.string().optional(), refunded: z.string().optional(), disputed: z.string().optional(), }));