/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type GiftCardCreate = { /** * The 16-19 digit number for the gift card. */ number: string; /** * The PIN for this gift card. */ pin: string; /** * The ID of the buyer to associate this gift card to. If this field is provided then the `buyer_external_identifier` field needs to be unset. */ buyerId?: string | null | undefined; /** * The `external_identifier` of the buyer to associate this gift card to. If this field is provided then the `buyer_id` field needs to be unset. */ buyerExternalIdentifier?: string | null | undefined; }; /** @internal */ export type GiftCardCreate$Outbound = { number: string; pin: string; buyer_id?: string | null | undefined; buyer_external_identifier?: string | null | undefined; }; /** @internal */ export const GiftCardCreate$outboundSchema: z.ZodType< GiftCardCreate$Outbound, z.ZodTypeDef, GiftCardCreate > = z.object({ number: z.string(), pin: z.string(), buyerId: z.nullable(z.string()).optional(), buyerExternalIdentifier: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { buyerId: "buyer_id", buyerExternalIdentifier: "buyer_external_identifier", }); }); export function giftCardCreateToJSON(giftCardCreate: GiftCardCreate): string { return JSON.stringify(GiftCardCreate$outboundSchema.parse(giftCardCreate)); }