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