/* * 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 AddBuyerShippingDetailsGlobals = { merchantAccountId?: string | undefined; }; export type AddBuyerShippingDetailsRequest = { /** * The ID of the buyer to add shipping details to. */ buyerId: string; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; shippingDetailsCreate: components.ShippingDetailsCreate; }; /** @internal */ export type AddBuyerShippingDetailsRequest$Outbound = { buyer_id: string; merchantAccountId?: string | null | undefined; ShippingDetailsCreate: components.ShippingDetailsCreate$Outbound; }; /** @internal */ export const AddBuyerShippingDetailsRequest$outboundSchema: z.ZodType< AddBuyerShippingDetailsRequest$Outbound, z.ZodTypeDef, AddBuyerShippingDetailsRequest > = z.object({ buyerId: z.string(), merchantAccountId: z.nullable(z.string()).optional(), shippingDetailsCreate: components.ShippingDetailsCreate$outboundSchema, }).transform((v) => { return remap$(v, { buyerId: "buyer_id", shippingDetailsCreate: "ShippingDetailsCreate", }); }); export function addBuyerShippingDetailsRequestToJSON( addBuyerShippingDetailsRequest: AddBuyerShippingDetailsRequest, ): string { return JSON.stringify( AddBuyerShippingDetailsRequest$outboundSchema.parse( addBuyerShippingDetailsRequest, ), ); }