/* * 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 bank account type. */ export const EmployeeBankAccountRequestAccountType = { Checking: "Checking", Savings: "Savings", } as const; /** * The bank account type. */ export type EmployeeBankAccountRequestAccountType = ClosedEnum< typeof EmployeeBankAccountRequestAccountType >; /** * Request body for creating or updating an employee bank account. Send these fields as top-level JSON keys (the API wraps them server-side). */ export type EmployeeBankAccountRequest = { /** * The bank routing number (nine digits). */ routingNumber: string; /** * The bank account number. */ accountNumber: string; /** * The bank account type. */ accountType: EmployeeBankAccountRequestAccountType; /** * A name for the bank account (e.g. "Primary Checking"). */ name: string; }; /** @internal */ export const EmployeeBankAccountRequestAccountType$outboundSchema: z.ZodNativeEnum = z.nativeEnum( EmployeeBankAccountRequestAccountType, ); /** @internal */ export type EmployeeBankAccountRequest$Outbound = { routing_number: string; account_number: string; account_type: string; name: string; }; /** @internal */ export const EmployeeBankAccountRequest$outboundSchema: z.ZodType< EmployeeBankAccountRequest$Outbound, z.ZodTypeDef, EmployeeBankAccountRequest > = z.object({ routingNumber: z.string(), accountNumber: z.string(), accountType: EmployeeBankAccountRequestAccountType$outboundSchema, name: z.string(), }).transform((v) => { return remap$(v, { routingNumber: "routing_number", accountNumber: "account_number", accountType: "account_type", }); }); export function employeeBankAccountRequestToJSON( employeeBankAccountRequest: EmployeeBankAccountRequest, ): string { return JSON.stringify( EmployeeBankAccountRequest$outboundSchema.parse(employeeBankAccountRequest), ); }