/* * 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 { CollectionMethod, CollectionMethod$outboundSchema, } from "./collection-method.js"; import { PaymentMethodType, PaymentMethodType$outboundSchema, } from "./payment-method-type.js"; export type CheckoutPaymentProviderConfig = { collectionMethod?: CollectionMethod | undefined; maxMandateLimit?: string | undefined; paymentMethod?: PaymentMethodType | undefined; }; /** @internal */ export type CheckoutPaymentProviderConfig$Outbound = { collection_method?: string | undefined; max_mandate_limit?: string | undefined; payment_method?: string | undefined; }; /** @internal */ export const CheckoutPaymentProviderConfig$outboundSchema: z.ZodMiniType< CheckoutPaymentProviderConfig$Outbound, CheckoutPaymentProviderConfig > = z.pipe( z.object({ collectionMethod: z.optional(CollectionMethod$outboundSchema), maxMandateLimit: z.optional(z.string()), paymentMethod: z.optional(PaymentMethodType$outboundSchema), }), z.transform((v) => { return remap$(v, { collectionMethod: "collection_method", maxMandateLimit: "max_mandate_limit", paymentMethod: "payment_method", }); }), ); export function checkoutPaymentProviderConfigToJSON( checkoutPaymentProviderConfig: CheckoutPaymentProviderConfig, ): string { return JSON.stringify( CheckoutPaymentProviderConfig$outboundSchema.parse( checkoutPaymentProviderConfig, ), ); }