/* * 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 { ForterAntiFraudOptionsCartItemBeneficiaryAddress, ForterAntiFraudOptionsCartItemBeneficiaryAddress$Outbound, ForterAntiFraudOptionsCartItemBeneficiaryAddress$outboundSchema, } from "./forterantifraudoptionscartitembeneficiaryaddress.js"; import { ForterAntiFraudOptionsCartItemBeneficiaryComments, ForterAntiFraudOptionsCartItemBeneficiaryComments$Outbound, ForterAntiFraudOptionsCartItemBeneficiaryComments$outboundSchema, } from "./forterantifraudoptionscartitembeneficiarycomments.js"; import { ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails, ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails$Outbound, ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails$outboundSchema, } from "./forterantifraudoptionscartitembeneficiarypersonaldetails.js"; import { ForterAntiFraudOptionsCartItemBeneficiaryPhone, ForterAntiFraudOptionsCartItemBeneficiaryPhone$Outbound, ForterAntiFraudOptionsCartItemBeneficiaryPhone$outboundSchema, } from "./forterantifraudoptionscartitembeneficiaryphone.js"; export type ForterAntiFraudOptionsCartItemBeneficiary = { personalDetails: ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails; /** * Address information of the beneficiary. */ address?: ForterAntiFraudOptionsCartItemBeneficiaryAddress | null | undefined; /** * Phone numbers associated with the beneficiary. */ phone?: | Array | null | undefined; /** * Comments related to the beneficiary. */ comments?: | ForterAntiFraudOptionsCartItemBeneficiaryComments | null | undefined; }; /** @internal */ export type ForterAntiFraudOptionsCartItemBeneficiary$Outbound = { personal_details: ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails$Outbound; address?: | ForterAntiFraudOptionsCartItemBeneficiaryAddress$Outbound | null | undefined; phone?: | Array | null | undefined; comments?: | ForterAntiFraudOptionsCartItemBeneficiaryComments$Outbound | null | undefined; }; /** @internal */ export const ForterAntiFraudOptionsCartItemBeneficiary$outboundSchema: z.ZodType< ForterAntiFraudOptionsCartItemBeneficiary$Outbound, z.ZodTypeDef, ForterAntiFraudOptionsCartItemBeneficiary > = z.object({ personalDetails: ForterAntiFraudOptionsCartItemBeneficiaryPersonalDetails$outboundSchema, address: z.nullable( ForterAntiFraudOptionsCartItemBeneficiaryAddress$outboundSchema, ).optional(), phone: z.nullable( z.array(ForterAntiFraudOptionsCartItemBeneficiaryPhone$outboundSchema), ).optional(), comments: z.nullable( ForterAntiFraudOptionsCartItemBeneficiaryComments$outboundSchema, ).optional(), }).transform((v) => { return remap$(v, { personalDetails: "personal_details", }); }); export function forterAntiFraudOptionsCartItemBeneficiaryToJSON( forterAntiFraudOptionsCartItemBeneficiary: ForterAntiFraudOptionsCartItemBeneficiary, ): string { return JSON.stringify( ForterAntiFraudOptionsCartItemBeneficiary$outboundSchema.parse( forterAntiFraudOptionsCartItemBeneficiary, ), ); }