/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { PazeShippingAddress, PazeShippingAddress$Outbound, PazeShippingAddress$outboundSchema, } from "./pazeshippingaddress.js"; export type PazeEcomData = { /** * Whether the current transaction includes a gift card purchase. */ cartContainsGiftCard?: boolean | null | undefined; /** * Whether the consumer order will be picked up rather than shipped. */ orderForPickup?: boolean | null | undefined; /** * Dollar value of the most expensive item ordered. */ orderHighestCost?: string | null | undefined; /** * Number of items ordered. */ orderQuantity?: string | null | undefined; /** * The selected shipping address. Returned only when `shippingPreference` is not `NONE`. */ finalShippingAddress?: PazeShippingAddress | null | undefined; }; /** @internal */ export type PazeEcomData$Outbound = { cartContainsGiftCard?: boolean | null | undefined; orderForPickup?: boolean | null | undefined; orderHighestCost?: string | null | undefined; orderQuantity?: string | null | undefined; finalShippingAddress?: PazeShippingAddress$Outbound | null | undefined; }; /** @internal */ export const PazeEcomData$outboundSchema: z.ZodType< PazeEcomData$Outbound, z.ZodTypeDef, PazeEcomData > = z.object({ cartContainsGiftCard: z.nullable(z.boolean()).optional(), orderForPickup: z.nullable(z.boolean()).optional(), orderHighestCost: z.nullable(z.string()).optional(), orderQuantity: z.nullable(z.string()).optional(), finalShippingAddress: z.nullable(PazeShippingAddress$outboundSchema) .optional(), }); export function pazeEcomDataToJSON(pazeEcomData: PazeEcomData): string { return JSON.stringify(PazeEcomData$outboundSchema.parse(pazeEcomData)); }