/* * 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 CompanyBankAccountRequestAccountType = { Checking: "Checking", Savings: "Savings", } as const; /** * The bank account type */ export type CompanyBankAccountRequestAccountType = ClosedEnum< typeof CompanyBankAccountRequestAccountType >; export type CompanyBankAccountRequest = { /** * The bank routing number */ routingNumber: string; /** * The bank account number */ accountNumber: string; /** * The bank account type */ accountType: CompanyBankAccountRequestAccountType; }; /** @internal */ export const CompanyBankAccountRequestAccountType$outboundSchema: z.ZodNativeEnum = z.nativeEnum( CompanyBankAccountRequestAccountType, ); /** @internal */ export type CompanyBankAccountRequest$Outbound = { routing_number: string; account_number: string; account_type: string; }; /** @internal */ export const CompanyBankAccountRequest$outboundSchema: z.ZodType< CompanyBankAccountRequest$Outbound, z.ZodTypeDef, CompanyBankAccountRequest > = z.object({ routingNumber: z.string(), accountNumber: z.string(), accountType: CompanyBankAccountRequestAccountType$outboundSchema, }).transform((v) => { return remap$(v, { routingNumber: "routing_number", accountNumber: "account_number", accountType: "account_type", }); }); export function companyBankAccountRequestToJSON( companyBankAccountRequest: CompanyBankAccountRequest, ): string { return JSON.stringify( CompanyBankAccountRequest$outboundSchema.parse(companyBankAccountRequest), ); }