/* * 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"; import { MicroDepositAmountsCreate, MicroDepositAmountsCreate$inboundSchema, MicroDepositAmountsCreate$Outbound, MicroDepositAmountsCreate$outboundSchema, } from "./microdepositamountscreate.js"; /** * Verifies micro deposits for a pending relationship. */ export type VerifyMicroDepositsRequestCreate = { /** * The micro deposits sent to verify a pending bank relationship. FOR TESTING ONLY! */ amounts: MicroDepositAmountsCreate; /** * The name of the relationship to verify. */ name: string; }; /** @internal */ export const VerifyMicroDepositsRequestCreate$inboundSchema: z.ZodType< VerifyMicroDepositsRequestCreate, z.ZodTypeDef, unknown > = z.object({ amounts: MicroDepositAmountsCreate$inboundSchema, name: z.string(), }); /** @internal */ export type VerifyMicroDepositsRequestCreate$Outbound = { amounts: MicroDepositAmountsCreate$Outbound; name: string; }; /** @internal */ export const VerifyMicroDepositsRequestCreate$outboundSchema: z.ZodType< VerifyMicroDepositsRequestCreate$Outbound, z.ZodTypeDef, VerifyMicroDepositsRequestCreate > = z.object({ amounts: MicroDepositAmountsCreate$outboundSchema, 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 VerifyMicroDepositsRequestCreate$ { /** @deprecated use `VerifyMicroDepositsRequestCreate$inboundSchema` instead. */ export const inboundSchema = VerifyMicroDepositsRequestCreate$inboundSchema; /** @deprecated use `VerifyMicroDepositsRequestCreate$outboundSchema` instead. */ export const outboundSchema = VerifyMicroDepositsRequestCreate$outboundSchema; /** @deprecated use `VerifyMicroDepositsRequestCreate$Outbound` instead. */ export type Outbound = VerifyMicroDepositsRequestCreate$Outbound; } export function verifyMicroDepositsRequestCreateToJSON( verifyMicroDepositsRequestCreate: VerifyMicroDepositsRequestCreate, ): string { return JSON.stringify( VerifyMicroDepositsRequestCreate$outboundSchema.parse( verifyMicroDepositsRequestCreate, ), ); } export function verifyMicroDepositsRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VerifyMicroDepositsRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VerifyMicroDepositsRequestCreate' from JSON`, ); }