import {z} from 'zod'
export type Link = {href?: string | undefined, rel?: string | undefined} | null;
export type LinkWS = {href?: string | undefined, id?: string | undefined} | null;
export type Currency = 'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN';
export type GatewayResponseWS = {avs?: boolean | undefined, code?: (string | null) | undefined, cvv?: boolean | undefined, message?: (string | null) | undefined};
export type PaymentMethod = 'CREDIT_CARD' | 'PAYPAL' | 'MANUAL' | 'EXTERNAL_INVOICE' | 'MARKETPLACE_CREDITS';
export type PaymentResult = 'SUCCESSFUL' | 'FAILED' | 'GATEWAY_NOT_AVAILABLE' | 'MANUAL';
export type PaymentWS = {links?: Array | undefined, amount?: (number | null) | undefined, company?: LinkWS | undefined, currency?: Currency | undefined, date?: (number | null) | undefined, gatewayResponse?: GatewayResponseWS | undefined, id?: (number | null) | undefined, method?: PaymentMethod | undefined, result?: PaymentResult | undefined, transactionId?: (string | null) | undefined, user?: LinkWS | undefined} | null;
export type CreateApiBillingV1InvoicesInvoiceNumberPaymentsArgs = {invoiceNumber: number, body: PaymentWS};
export type CreateApiBillingV1InvoicesInvoiceNumberPaymentsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined};
export const link = z.object({href: z.string().optional(), rel: z.string().optional()}).nullable();
export const linkWS = z.object({href: z.string().optional(), id: z.string().optional()}).nullable();
export const currency = z.enum(["USD", "CAD", "EUR", "JPY", "GBP", "KRW", "CHF", "SEK", "SGD", "MYR", "AUD", "MXN", "INR", "BRL", "DKK", "NZD", "NOK", "ZAR", "PHP", "CNY", "SAR", "GTQ", "IDR", "ARS", "COP", "PEN"]);
export const gatewayResponseWS = z.object({avs: z.boolean().optional(), code: z.string().nullable().optional(), cvv: z.boolean().optional(), message: z.string().nullable().optional()});
export const paymentMethod = z.enum(["CREDIT_CARD", "PAYPAL", "MANUAL", "EXTERNAL_INVOICE", "MARKETPLACE_CREDITS"]);
export const paymentResult = z.enum(["SUCCESSFUL", "FAILED", "GATEWAY_NOT_AVAILABLE", "MANUAL"]);
export const paymentWS = z.object({links: z.array(link).optional(), amount: z.number().nullable().optional(), company: linkWS.optional(), currency: currency.optional(), date: z.number().nullable().optional(), gatewayResponse: gatewayResponseWS.optional(), id: z.number().nullable().optional(), method: paymentMethod.optional(), result: paymentResult.optional(), transactionId: z.string().nullable().optional(), user: linkWS.optional()}).nullable();
export const validateResponse = async