/* * 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 PaymentServiceTokenCreate = { /** * The 3 or 4 digit security code often found on the card. This often referred to as the CVV or CVD. */ securityCode?: string | null | undefined; /** * The ID of the payment method to use. */ paymentServiceId: string; /** * The redirect URL to redirect a buyer to after they have authorized the payment method. */ redirectUrl: string; }; /** @internal */ export type PaymentServiceTokenCreate$Outbound = { security_code?: string | null | undefined; payment_service_id: string; redirect_url: string; }; /** @internal */ export const PaymentServiceTokenCreate$outboundSchema: z.ZodType< PaymentServiceTokenCreate$Outbound, z.ZodTypeDef, PaymentServiceTokenCreate > = z.object({ securityCode: z.nullable(z.string()).optional(), paymentServiceId: z.string(), redirectUrl: z.string(), }).transform((v) => { return remap$(v, { securityCode: "security_code", paymentServiceId: "payment_service_id", redirectUrl: "redirect_url", }); }); export function paymentServiceTokenCreateToJSON( paymentServiceTokenCreate: PaymentServiceTokenCreate, ): string { return JSON.stringify( PaymentServiceTokenCreate$outboundSchema.parse(paymentServiceTokenCreate), ); }