/* * 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 * as components from "../components/index.js"; export type AddBuyerGlobals = { merchantAccountId?: string | undefined; }; export type AddBuyerRequest = { /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; buyerCreate: components.BuyerCreate; }; /** @internal */ export type AddBuyerRequest$Outbound = { merchantAccountId?: string | null | undefined; BuyerCreate: components.BuyerCreate$Outbound; }; /** @internal */ export const AddBuyerRequest$outboundSchema: z.ZodType< AddBuyerRequest$Outbound, z.ZodTypeDef, AddBuyerRequest > = z.object({ merchantAccountId: z.nullable(z.string()).optional(), buyerCreate: components.BuyerCreate$outboundSchema, }).transform((v) => { return remap$(v, { buyerCreate: "BuyerCreate", }); }); export function addBuyerRequestToJSON( addBuyerRequest: AddBuyerRequest, ): string { return JSON.stringify(AddBuyerRequest$outboundSchema.parse(addBuyerRequest)); }