/* * 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 CreatePaymentServiceSessionGlobals = { merchantAccountId?: string | undefined; }; export type CreatePaymentServiceSessionRequest = { /** * the ID of the payment service */ paymentServiceId: string; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; requestBody: { [k: string]: any }; }; /** @internal */ export type CreatePaymentServiceSessionRequest$Outbound = { payment_service_id: string; merchantAccountId?: string | null | undefined; RequestBody: { [k: string]: any }; }; /** @internal */ export const CreatePaymentServiceSessionRequest$outboundSchema: z.ZodType< CreatePaymentServiceSessionRequest$Outbound, z.ZodTypeDef, CreatePaymentServiceSessionRequest > = z.object({ paymentServiceId: z.string(), merchantAccountId: z.nullable(z.string()).optional(), requestBody: z.record(z.any()), }).transform((v) => { return remap$(v, { paymentServiceId: "payment_service_id", requestBody: "RequestBody", }); }); export function createPaymentServiceSessionRequestToJSON( createPaymentServiceSessionRequest: CreatePaymentServiceSessionRequest, ): string { return JSON.stringify( CreatePaymentServiceSessionRequest$outboundSchema.parse( createPaymentServiceSessionRequest, ), ); }