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