/* * 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 openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; export const ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType = { Digital: "DIGITAL", Physical: "PHYSICAL", Hybrid: "HYBRID", } as const; export type ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType = OpenEnum; export type ForterAntiFraudOptionsCartItemDeliveryDetails = { /** * The type of delivery for this cart item. */ deliveryType?: | ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType | null | undefined; /** * The method of delivery for this cart item. */ deliveryMethod?: string | null | undefined; }; /** @internal */ export const ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType$outboundSchema: z.ZodType< string, z.ZodTypeDef, ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType > = openEnums.outboundSchema( ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType, ); /** @internal */ export type ForterAntiFraudOptionsCartItemDeliveryDetails$Outbound = { delivery_type?: string | null | undefined; delivery_method?: string | null | undefined; }; /** @internal */ export const ForterAntiFraudOptionsCartItemDeliveryDetails$outboundSchema: z.ZodType< ForterAntiFraudOptionsCartItemDeliveryDetails$Outbound, z.ZodTypeDef, ForterAntiFraudOptionsCartItemDeliveryDetails > = z.object({ deliveryType: z.nullable( ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType$outboundSchema, ).optional(), deliveryMethod: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { deliveryType: "delivery_type", deliveryMethod: "delivery_method", }); }); export function forterAntiFraudOptionsCartItemDeliveryDetailsToJSON( forterAntiFraudOptionsCartItemDeliveryDetails: ForterAntiFraudOptionsCartItemDeliveryDetails, ): string { return JSON.stringify( ForterAntiFraudOptionsCartItemDeliveryDetails$outboundSchema.parse( forterAntiFraudOptionsCartItemDeliveryDetails, ), ); }