/* * 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 { ForterAntiFraudOptionsCartItemBasicItemData, ForterAntiFraudOptionsCartItemBasicItemData$Outbound, ForterAntiFraudOptionsCartItemBasicItemData$outboundSchema, } from "./forterantifraudoptionscartitembasicitemdata.js"; import { ForterAntiFraudOptionsCartItemBeneficiary, ForterAntiFraudOptionsCartItemBeneficiary$Outbound, ForterAntiFraudOptionsCartItemBeneficiary$outboundSchema, } from "./forterantifraudoptionscartitembeneficiary.js"; import { ForterAntiFraudOptionsCartItemDeliveryDetails, ForterAntiFraudOptionsCartItemDeliveryDetails$Outbound, ForterAntiFraudOptionsCartItemDeliveryDetails$outboundSchema, } from "./forterantifraudoptionscartitemdeliverydetails.js"; export type ForterAntiFraudOptionsCartItem = { /** * Basic information about the cart item. */ basicItemData?: | ForterAntiFraudOptionsCartItemBasicItemData | null | undefined; /** * Details about how the item will be delivered. */ deliveryDetails?: | ForterAntiFraudOptionsCartItemDeliveryDetails | null | undefined; /** * List of beneficiaries who will receive this item. */ beneficiaries?: | Array | null | undefined; }; /** @internal */ export type ForterAntiFraudOptionsCartItem$Outbound = { basic_item_data?: | ForterAntiFraudOptionsCartItemBasicItemData$Outbound | null | undefined; delivery_details?: | ForterAntiFraudOptionsCartItemDeliveryDetails$Outbound | null | undefined; beneficiaries?: | Array | null | undefined; }; /** @internal */ export const ForterAntiFraudOptionsCartItem$outboundSchema: z.ZodType< ForterAntiFraudOptionsCartItem$Outbound, z.ZodTypeDef, ForterAntiFraudOptionsCartItem > = z.object({ basicItemData: z.nullable( ForterAntiFraudOptionsCartItemBasicItemData$outboundSchema, ).optional(), deliveryDetails: z.nullable( ForterAntiFraudOptionsCartItemDeliveryDetails$outboundSchema, ).optional(), beneficiaries: z.nullable( z.array(ForterAntiFraudOptionsCartItemBeneficiary$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { basicItemData: "basic_item_data", deliveryDetails: "delivery_details", }); }); export function forterAntiFraudOptionsCartItemToJSON( forterAntiFraudOptionsCartItem: ForterAntiFraudOptionsCartItem, ): string { return JSON.stringify( ForterAntiFraudOptionsCartItem$outboundSchema.parse( forterAntiFraudOptionsCartItem, ), ); }