/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateTransferDestinationCard = { /** * An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field. */ dynamicDescriptor?: string | undefined; }; /** @internal */ export const CreateTransferDestinationCard$inboundSchema: z.ZodType< CreateTransferDestinationCard, z.ZodTypeDef, unknown > = z.object({ dynamicDescriptor: z.string().optional(), }); /** @internal */ export type CreateTransferDestinationCard$Outbound = { dynamicDescriptor?: string | undefined; }; /** @internal */ export const CreateTransferDestinationCard$outboundSchema: z.ZodType< CreateTransferDestinationCard$Outbound, z.ZodTypeDef, CreateTransferDestinationCard > = z.object({ dynamicDescriptor: z.string().optional(), }); export function createTransferDestinationCardToJSON( createTransferDestinationCard: CreateTransferDestinationCard, ): string { return JSON.stringify( CreateTransferDestinationCard$outboundSchema.parse( createTransferDestinationCard, ), ); } export function createTransferDestinationCardFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateTransferDestinationCard$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateTransferDestinationCard' from JSON`, ); }