/* * 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 { Address, Address$Outbound, Address$outboundSchema, } from "./address.js"; export type ShippingDetailsUpdate = { /** * The first name(s) or given name for the buyer. */ firstName?: string | null | undefined; /** * The last name, or family name, of the buyer. */ lastName?: string | null | undefined; /** * The email address for the buyer. */ emailAddress?: string | null | undefined; /** * The phone number for the buyer which should be formatted according to the E164 number standard. */ phoneNumber?: string | null | undefined; /** * The billing address for the buyer. */ address?: Address | null | undefined; }; /** @internal */ export type ShippingDetailsUpdate$Outbound = { first_name?: string | null | undefined; last_name?: string | null | undefined; email_address?: string | null | undefined; phone_number?: string | null | undefined; address?: Address$Outbound | null | undefined; }; /** @internal */ export const ShippingDetailsUpdate$outboundSchema: z.ZodType< ShippingDetailsUpdate$Outbound, z.ZodTypeDef, ShippingDetailsUpdate > = z.object({ firstName: z.nullable(z.string()).optional(), lastName: z.nullable(z.string()).optional(), emailAddress: z.nullable(z.string()).optional(), phoneNumber: z.nullable(z.string()).optional(), address: z.nullable(Address$outboundSchema).optional(), }).transform((v) => { return remap$(v, { firstName: "first_name", lastName: "last_name", emailAddress: "email_address", phoneNumber: "phone_number", }); }); export function shippingDetailsUpdateToJSON( shippingDetailsUpdate: ShippingDetailsUpdate, ): string { return JSON.stringify( ShippingDetailsUpdate$outboundSchema.parse(shippingDetailsUpdate), ); }