/* * 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 CreateApplePayDigitalWalletSessionGlobals = { merchantAccountId?: string | undefined; }; export type CreateApplePayDigitalWalletSessionRequest = { /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; applePaySessionRequest: components.ApplePaySessionRequest; }; /** @internal */ export type CreateApplePayDigitalWalletSessionRequest$Outbound = { merchantAccountId?: string | null | undefined; ApplePaySessionRequest: components.ApplePaySessionRequest$Outbound; }; /** @internal */ export const CreateApplePayDigitalWalletSessionRequest$outboundSchema: z.ZodType< CreateApplePayDigitalWalletSessionRequest$Outbound, z.ZodTypeDef, CreateApplePayDigitalWalletSessionRequest > = z.object({ merchantAccountId: z.nullable(z.string()).optional(), applePaySessionRequest: components.ApplePaySessionRequest$outboundSchema, }).transform((v) => { return remap$(v, { applePaySessionRequest: "ApplePaySessionRequest", }); }); export function createApplePayDigitalWalletSessionRequestToJSON( createApplePayDigitalWalletSessionRequest: CreateApplePayDigitalWalletSessionRequest, ): string { return JSON.stringify( CreateApplePayDigitalWalletSessionRequest$outboundSchema.parse( createApplePayDigitalWalletSessionRequest, ), ); }