/* * 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 * as components from "../components/index.js"; export type CreateCheckoutSessionGlobals = { merchantAccountId?: string | undefined; }; export type CreateCheckoutSessionRequest = { /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; checkoutSessionCreate?: components.CheckoutSessionCreate | undefined; }; /** @internal */ export type CreateCheckoutSessionRequest$Outbound = { merchantAccountId?: string | null | undefined; CheckoutSessionCreate?: components.CheckoutSessionCreate$Outbound | undefined; }; /** @internal */ export const CreateCheckoutSessionRequest$outboundSchema: z.ZodType< CreateCheckoutSessionRequest$Outbound, z.ZodTypeDef, CreateCheckoutSessionRequest > = z.object({ merchantAccountId: z.nullable(z.string()).optional(), checkoutSessionCreate: components.CheckoutSessionCreate$outboundSchema .optional(), }).transform((v) => { return remap$(v, { checkoutSessionCreate: "CheckoutSessionCreate", }); }); export function createCheckoutSessionRequestToJSON( createCheckoutSessionRequest: CreateCheckoutSessionRequest, ): string { return JSON.stringify( CreateCheckoutSessionRequest$outboundSchema.parse( createCheckoutSessionRequest, ), ); }