/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; export const ListPaymentsOrder = { Asc: "asc", Desc: "desc", } as const; export type ListPaymentsOrder = ClosedEnum; export const ListPaymentsStatus = { Published: "published", Deleted: "deleted", Archived: "archived", } as const; export type ListPaymentsStatus = ClosedEnum; export type ListPaymentsRequest = { currency?: string | undefined; destinationId?: string | undefined; destinationType?: string | undefined; endTime?: string | undefined; expand?: string | undefined; gatewayPaymentId?: string | undefined; /** * For filtering by gateway tracking ID */ gatewayTrackingId?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: ListPaymentsOrder | undefined; paymentGateway?: string | undefined; paymentIds?: Array | undefined; paymentMethodType?: string | undefined; paymentStatus?: string | undefined; sort?: string | undefined; startTime?: string | undefined; status?: ListPaymentsStatus | undefined; }; /** @internal */ export const ListPaymentsOrder$outboundSchema: z.ZodMiniEnum< typeof ListPaymentsOrder > = z.enum(ListPaymentsOrder); /** @internal */ export const ListPaymentsStatus$outboundSchema: z.ZodMiniEnum< typeof ListPaymentsStatus > = z.enum(ListPaymentsStatus); /** @internal */ export type ListPaymentsRequest$Outbound = { currency?: string | undefined; destination_id?: string | undefined; destination_type?: string | undefined; end_time?: string | undefined; expand?: string | undefined; gateway_payment_id?: string | undefined; gateway_tracking_id?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: string | undefined; payment_gateway?: string | undefined; payment_ids?: Array | undefined; payment_method_type?: string | undefined; payment_status?: string | undefined; sort?: string | undefined; start_time?: string | undefined; status?: string | undefined; }; /** @internal */ export const ListPaymentsRequest$outboundSchema: z.ZodMiniType< ListPaymentsRequest$Outbound, ListPaymentsRequest > = z.pipe( z.object({ currency: z.optional(z.string()), destinationId: z.optional(z.string()), destinationType: z.optional(z.string()), endTime: z.optional(z.string()), expand: z.optional(z.string()), gatewayPaymentId: z.optional(z.string()), gatewayTrackingId: z.optional(z.string()), limit: z.optional(z.int()), offset: z.optional(z.int()), order: z.optional(ListPaymentsOrder$outboundSchema), paymentGateway: z.optional(z.string()), paymentIds: z.optional(z.array(z.string())), paymentMethodType: z.optional(z.string()), paymentStatus: z.optional(z.string()), sort: z.optional(z.string()), startTime: z.optional(z.string()), status: z.optional(ListPaymentsStatus$outboundSchema), }), z.transform((v) => { return remap$(v, { destinationId: "destination_id", destinationType: "destination_type", endTime: "end_time", gatewayPaymentId: "gateway_payment_id", gatewayTrackingId: "gateway_tracking_id", paymentGateway: "payment_gateway", paymentIds: "payment_ids", paymentMethodType: "payment_method_type", paymentStatus: "payment_status", startTime: "start_time", }); }), ); export function listPaymentsRequestToJSON( listPaymentsRequest: ListPaymentsRequest, ): string { return JSON.stringify( ListPaymentsRequest$outboundSchema.parse(listPaymentsRequest), ); }