/* * 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 { BillingDetails, BillingDetails$Outbound, BillingDetails$outboundSchema, } from "./billingdetails.js"; /** * Request body for updating an existing buyer */ export type BuyerUpdate = { /** * The display name for the buyer. */ displayName?: string | null | undefined; /** * The merchant identifier for this buyer. */ externalIdentifier?: string | null | undefined; /** * The buyer account number */ accountNumber?: string | null | undefined; /** * The billing name, address, email, and other fields for this buyer. */ billingDetails?: BillingDetails | null | undefined; }; /** @internal */ export type BuyerUpdate$Outbound = { display_name?: string | null | undefined; external_identifier?: string | null | undefined; account_number?: string | null | undefined; billing_details?: BillingDetails$Outbound | null | undefined; }; /** @internal */ export const BuyerUpdate$outboundSchema: z.ZodType< BuyerUpdate$Outbound, z.ZodTypeDef, BuyerUpdate > = z.object({ displayName: z.nullable(z.string()).optional(), externalIdentifier: z.nullable(z.string()).optional(), accountNumber: z.nullable(z.string()).optional(), billingDetails: z.nullable(BillingDetails$outboundSchema).optional(), }).transform((v) => { return remap$(v, { displayName: "display_name", externalIdentifier: "external_identifier", accountNumber: "account_number", billingDetails: "billing_details", }); }); export function buyerUpdateToJSON(buyerUpdate: BuyerUpdate): string { return JSON.stringify(BuyerUpdate$outboundSchema.parse(buyerUpdate)); }