/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * The owner type of the bank account */ export const OwnerType = { Company: "Company", } as const; /** * The owner type of the bank account */ export type OwnerType = ClosedEnum; /** * Request body for creating a verified company bank account from a Plaid processor token. */ export type PlaidProcessorTokenRequest = { /** * The owner type of the bank account */ ownerType: OwnerType; /** * The owner UUID of the bank account */ ownerId: string; /** * The Plaid processor token */ processorToken: string; }; /** @internal */ export const OwnerType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(OwnerType); /** @internal */ export type PlaidProcessorTokenRequest$Outbound = { owner_type: string; owner_id: string; processor_token: string; }; /** @internal */ export const PlaidProcessorTokenRequest$outboundSchema: z.ZodType< PlaidProcessorTokenRequest$Outbound, z.ZodTypeDef, PlaidProcessorTokenRequest > = z.object({ ownerType: OwnerType$outboundSchema, ownerId: z.string(), processorToken: z.string(), }).transform((v) => { return remap$(v, { ownerType: "owner_type", ownerId: "owner_id", processorToken: "processor_token", }); }); export function plaidProcessorTokenRequestToJSON( plaidProcessorTokenRequest: PlaidProcessorTokenRequest, ): string { return JSON.stringify( PlaidProcessorTokenRequest$outboundSchema.parse(plaidProcessorTokenRequest), ); }