/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; /** * The details used to issue a new virtual gift card. */ export type GiftCardIssuanceCreate = { /** * The provider theme code to issue the gift card against. */ theme: string; /** * The amount to load onto the gift card, in the smallest denomination for the currency. */ amount: number; /** * The ISO-4217 currency code for the `amount`. */ currency: string; /** * An optional external identifier for this issuance. */ externalIdentifier?: string | null | undefined; }; /** @internal */ export type GiftCardIssuanceCreate$Outbound = { theme: string; amount: number; currency: string; external_identifier?: string | null | undefined; }; /** @internal */ export const GiftCardIssuanceCreate$outboundSchema: z.ZodType< GiftCardIssuanceCreate$Outbound, z.ZodTypeDef, GiftCardIssuanceCreate > = z.object({ theme: z.string(), amount: z.number().int(), currency: z.string(), externalIdentifier: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { externalIdentifier: "external_identifier", }); }); export function giftCardIssuanceCreateToJSON( giftCardIssuanceCreate: GiftCardIssuanceCreate, ): string { return JSON.stringify( GiftCardIssuanceCreate$outboundSchema.parse(giftCardIssuanceCreate), ); }