/* * 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 UpdateBuyerGlobals = { merchantAccountId?: string | undefined; }; export type UpdateBuyerRequest = { /** * The ID of the buyer to edit. */ buyerId: string; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; buyerUpdate: components.BuyerUpdate; }; /** @internal */ export type UpdateBuyerRequest$Outbound = { buyer_id: string; merchantAccountId?: string | null | undefined; BuyerUpdate: components.BuyerUpdate$Outbound; }; /** @internal */ export const UpdateBuyerRequest$outboundSchema: z.ZodType< UpdateBuyerRequest$Outbound, z.ZodTypeDef, UpdateBuyerRequest > = z.object({ buyerId: z.string(), merchantAccountId: z.nullable(z.string()).optional(), buyerUpdate: components.BuyerUpdate$outboundSchema, }).transform((v) => { return remap$(v, { buyerId: "buyer_id", buyerUpdate: "BuyerUpdate", }); }); export function updateBuyerRequestToJSON( updateBuyerRequest: UpdateBuyerRequest, ): string { return JSON.stringify( UpdateBuyerRequest$outboundSchema.parse(updateBuyerRequest), ); }