/* * 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 ActivateGiftCardGlobals = { merchantAccountId?: string | undefined; }; export type ActivateGiftCardRequest = { /** * A unique key that identifies this request. If supported by the gift card service, the value will be forwarded to make the activation idempotent. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. */ idempotencyKey?: string | null | undefined; /** * The ID of the merchant account to use for this request. */ merchantAccountId?: string | null | undefined; giftCardActivationCreate: components.GiftCardActivationCreate; }; /** @internal */ export type ActivateGiftCardRequest$Outbound = { "idempotency-key"?: string | null | undefined; merchantAccountId?: string | null | undefined; GiftCardActivationCreate: components.GiftCardActivationCreate$Outbound; }; /** @internal */ export const ActivateGiftCardRequest$outboundSchema: z.ZodType< ActivateGiftCardRequest$Outbound, z.ZodTypeDef, ActivateGiftCardRequest > = z.object({ idempotencyKey: z.nullable(z.string()).optional(), merchantAccountId: z.nullable(z.string()).optional(), giftCardActivationCreate: components.GiftCardActivationCreate$outboundSchema, }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency-key", giftCardActivationCreate: "GiftCardActivationCreate", }); }); export function activateGiftCardRequestToJSON( activateGiftCardRequest: ActivateGiftCardRequest, ): string { return JSON.stringify( ActivateGiftCardRequest$outboundSchema.parse(activateGiftCardRequest), ); }