/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type CybersourceAntiFraudOptions = { /** * A list of merchant defined data to be passed to the Cybersource Decision Manager API. Each key needs to be a numeric string. */ merchantDefinedData?: { [k: string]: string } | null | undefined; /** * The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource Decision Manager, and this overrides the connector configuration. */ metaKeyMerchantId?: string | null | undefined; /** * The shipping method for this transaction. */ shippingMethod?: string | null | undefined; }; /** @internal */ export type CybersourceAntiFraudOptions$Outbound = { merchant_defined_data?: { [k: string]: string } | null | undefined; meta_key_merchant_id?: string | null | undefined; shipping_method?: string | null | undefined; }; /** @internal */ export const CybersourceAntiFraudOptions$outboundSchema: z.ZodType< CybersourceAntiFraudOptions$Outbound, z.ZodTypeDef, CybersourceAntiFraudOptions > = z.object({ merchantDefinedData: z.nullable(z.record(z.string())).optional(), metaKeyMerchantId: z.nullable(z.string()).optional(), shippingMethod: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { merchantDefinedData: "merchant_defined_data", metaKeyMerchantId: "meta_key_merchant_id", shippingMethod: "shipping_method", }); }); export function cybersourceAntiFraudOptionsToJSON( cybersourceAntiFraudOptions: CybersourceAntiFraudOptions, ): string { return JSON.stringify( CybersourceAntiFraudOptions$outboundSchema.parse( cybersourceAntiFraudOptions, ), ); }