/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { AffirmItineraryOptions, AffirmItineraryOptions$Outbound, AffirmItineraryOptions$outboundSchema, } from "./affirmitineraryoptions.js"; export type AffirmOptions = { /** * Passes additional discounts to the Affirm widget. */ discounts?: { [k: string]: { [k: string]: any } } | null | undefined; /** * Passes itinerary data to the Affirm API. */ itinerary?: AffirmItineraryOptions | null | undefined; }; /** @internal */ export type AffirmOptions$Outbound = { discounts?: { [k: string]: { [k: string]: any } } | null | undefined; itinerary?: AffirmItineraryOptions$Outbound | null | undefined; }; /** @internal */ export const AffirmOptions$outboundSchema: z.ZodType< AffirmOptions$Outbound, z.ZodTypeDef, AffirmOptions > = z.object({ discounts: z.nullable(z.record(z.record(z.any()))).optional(), itinerary: z.nullable(AffirmItineraryOptions$outboundSchema).optional(), }); export function affirmOptionsToJSON(affirmOptions: AffirmOptions): string { return JSON.stringify(AffirmOptions$outboundSchema.parse(affirmOptions)); }