/* * 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 { SourceAccountV2, SourceAccountV2$inboundSchema, } from "./sourceaccountv2.js"; /** * Status details and corresponding object of the `Create account` operation. */ export type SourceAccountV2BatchCreateResult = { /** * The HTTP status code for the creation of the source account */ statusCode?: number | undefined; /** * A brief description of the error. */ error?: string | null | undefined; /** * The target bank account in a supported accounting software for ingestion into a bank feed. */ account?: SourceAccountV2 | undefined; }; /** @internal */ export const SourceAccountV2BatchCreateResult$inboundSchema: z.ZodType< SourceAccountV2BatchCreateResult, z.ZodTypeDef, unknown > = z.object({ statusCode: z.number().int().optional(), error: z.nullable(z.string()).optional(), account: SourceAccountV2$inboundSchema.optional(), }); export function sourceAccountV2BatchCreateResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SourceAccountV2BatchCreateResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SourceAccountV2BatchCreateResult' from JSON`, ); }