/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { AdyenAutoRescueSepaScenariosEnum, AdyenAutoRescueSepaScenariosEnum$outboundSchema, } from "./adyenautorescuesepascenariosenum.js"; export type AdyenSepaOptions = { /** * Set to `true` to enable Auto Rescue for a transaction. Use the `maxDaysToRescue` to specify a rescue window. */ autoRescue?: boolean | null | undefined; /** * The rescue window for a transaction, in days, when `autoRescue` is set to `true`. You can specify a value between 1 and 48. For cards, the default is one calendar month. For SEPA, the default is 42 days. */ maxDaysToRescue?: number | null | undefined; /** * Passes additional data to the Adyen API when creating a transaction. */ additionalData?: { [k: string]: string } | null | undefined; /** * The rescue scenario to simulate for a transaction, when `autoRescue` is set to `true`. */ autoRescueSepaScenario?: AdyenAutoRescueSepaScenariosEnum | null | undefined; /** * The name on the SEPA bank account. */ ownerName?: string | null | undefined; }; /** @internal */ export type AdyenSepaOptions$Outbound = { autoRescue?: boolean | null | undefined; maxDaysToRescue?: number | null | undefined; additionalData?: { [k: string]: string } | null | undefined; autoRescueSepaScenario?: string | null | undefined; ownerName?: string | null | undefined; }; /** @internal */ export const AdyenSepaOptions$outboundSchema: z.ZodType< AdyenSepaOptions$Outbound, z.ZodTypeDef, AdyenSepaOptions > = z.object({ autoRescue: z.nullable(z.boolean()).optional(), maxDaysToRescue: z.nullable(z.number().int()).optional(), additionalData: z.nullable(z.record(z.string())).optional(), autoRescueSepaScenario: z.nullable( AdyenAutoRescueSepaScenariosEnum$outboundSchema, ).optional(), ownerName: z.nullable(z.string()).optional(), }); export function adyenSepaOptionsToJSON( adyenSepaOptions: AdyenSepaOptions, ): string { return JSON.stringify( AdyenSepaOptions$outboundSchema.parse(adyenSepaOptions), ); }