/* * 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"; import { BankAccountVerificationMethod, BankAccountVerificationMethod$inboundSchema, BankAccountVerificationMethod$outboundSchema, } from "./bankaccountverificationmethod.js"; import { BankAccountVerificationStatus, BankAccountVerificationStatus$inboundSchema, BankAccountVerificationStatus$outboundSchema, } from "./bankaccountverificationstatus.js"; export type BankAccountVerificationCreated = { verificationMethod: BankAccountVerificationMethod; status: BankAccountVerificationStatus; }; /** @internal */ export const BankAccountVerificationCreated$inboundSchema: z.ZodType< BankAccountVerificationCreated, z.ZodTypeDef, unknown > = z.object({ verificationMethod: BankAccountVerificationMethod$inboundSchema, status: BankAccountVerificationStatus$inboundSchema, }); /** @internal */ export type BankAccountVerificationCreated$Outbound = { verificationMethod: string; status: string; }; /** @internal */ export const BankAccountVerificationCreated$outboundSchema: z.ZodType< BankAccountVerificationCreated$Outbound, z.ZodTypeDef, BankAccountVerificationCreated > = z.object({ verificationMethod: BankAccountVerificationMethod$outboundSchema, status: BankAccountVerificationStatus$outboundSchema, }); export function bankAccountVerificationCreatedToJSON( bankAccountVerificationCreated: BankAccountVerificationCreated, ): string { return JSON.stringify( BankAccountVerificationCreated$outboundSchema.parse( bankAccountVerificationCreated, ), ); } export function bankAccountVerificationCreatedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BankAccountVerificationCreated$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BankAccountVerificationCreated' from JSON`, ); }