/* * 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 CybersourceOptions = { /** * The merchant ID to use for this transaction. This requires a meta key to be set up for use with Cybersource, and this overrides the connector configuration. */ metaKeyMerchantId?: string | null | undefined; /** * A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string. */ merchantDefinedInformation?: { [k: string]: string } | null | undefined; /** * The shipping method for this transaction. */ shipToMethod?: string | null | undefined; /** * Brief description of the order or any comment you wish to add to the order. */ comments?: string | null | undefined; }; /** @internal */ export type CybersourceOptions$Outbound = { meta_key_merchant_id?: string | null | undefined; merchant_defined_information?: { [k: string]: string } | null | undefined; ship_to_method?: string | null | undefined; comments?: string | null | undefined; }; /** @internal */ export const CybersourceOptions$outboundSchema: z.ZodType< CybersourceOptions$Outbound, z.ZodTypeDef, CybersourceOptions > = z.object({ metaKeyMerchantId: z.nullable(z.string()).optional(), merchantDefinedInformation: z.nullable(z.record(z.string())).optional(), shipToMethod: z.nullable(z.string()).optional(), comments: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { metaKeyMerchantId: "meta_key_merchant_id", merchantDefinedInformation: "merchant_defined_information", shipToMethod: "ship_to_method", }); }); export function cybersourceOptionsToJSON( cybersourceOptions: CybersourceOptions, ): string { return JSON.stringify( CybersourceOptions$outboundSchema.parse(cybersourceOptions), ); }