/* * 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 CompleteBankAccountVerification = { /** * Code provided by user from their bank account transactions */ code: string; }; /** @internal */ export const CompleteBankAccountVerification$inboundSchema: z.ZodType< CompleteBankAccountVerification, z.ZodTypeDef, unknown > = z.object({ code: z.string(), }); /** @internal */ export type CompleteBankAccountVerification$Outbound = { code: string; }; /** @internal */ export const CompleteBankAccountVerification$outboundSchema: z.ZodType< CompleteBankAccountVerification$Outbound, z.ZodTypeDef, CompleteBankAccountVerification > = z.object({ code: z.string(), }); export function completeBankAccountVerificationToJSON( completeBankAccountVerification: CompleteBankAccountVerification, ): string { return JSON.stringify( CompleteBankAccountVerification$outboundSchema.parse( completeBankAccountVerification, ), ); } export function completeBankAccountVerificationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CompleteBankAccountVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompleteBankAccountVerification' from JSON`, ); }