/* * 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"; /** * The details of a Plaid processor integration for a linked funding source. * * @remarks * * `sandbox` - When linking a bank account to a `sandbox` account using a Plaid processor token a default bank account * response will be used. The following default data will be used to generate the bank account in this flow: * * ``` * RoutingNumber: "011401533", * AccountNumber: "1111222233330000", * AccountType: "checking", * Mask: "0000" * ``` */ export type PlaidIntegration = { token: string; }; /** @internal */ export const PlaidIntegration$inboundSchema: z.ZodType< PlaidIntegration, z.ZodTypeDef, unknown > = z.object({ token: z.string(), }); /** @internal */ export type PlaidIntegration$Outbound = { token: string; }; /** @internal */ export const PlaidIntegration$outboundSchema: z.ZodType< PlaidIntegration$Outbound, z.ZodTypeDef, PlaidIntegration > = z.object({ token: z.string(), }); export function plaidIntegrationToJSON( plaidIntegration: PlaidIntegration, ): string { return JSON.stringify( PlaidIntegration$outboundSchema.parse(plaidIntegration), ); } export function plaidIntegrationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PlaidIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PlaidIntegration' from JSON`, ); }