/* * 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 IssueGiftCardGlobals = { merchantAccountId?: string | undefined; }; export type IssueGiftCardRequest = { /** * A unique key forwarded to the gift card service to make the issuance idempotent. */ idempotencyKey?: string | null | undefined; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; giftCardIssuanceCreate: components.GiftCardIssuanceCreate; }; /** @internal */ export type IssueGiftCardRequest$Outbound = { "idempotency-key"?: string | null | undefined; merchantAccountId?: string | null | undefined; GiftCardIssuanceCreate: components.GiftCardIssuanceCreate$Outbound; }; /** @internal */ export const IssueGiftCardRequest$outboundSchema: z.ZodType< IssueGiftCardRequest$Outbound, z.ZodTypeDef, IssueGiftCardRequest > = z.object({ idempotencyKey: z.nullable(z.string()).optional(), merchantAccountId: z.nullable(z.string()).optional(), giftCardIssuanceCreate: components.GiftCardIssuanceCreate$outboundSchema, }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency-key", giftCardIssuanceCreate: "GiftCardIssuanceCreate", }); }); export function issueGiftCardRequestToJSON( issueGiftCardRequest: IssueGiftCardRequest, ): string { return JSON.stringify( IssueGiftCardRequest$outboundSchema.parse(issueGiftCardRequest), ); }