/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { AdyenPixRecurringAmount, AdyenPixRecurringAmount$Outbound, AdyenPixRecurringAmount$outboundSchema, } from "./adyenpixrecurringamount.js"; export type AdyenPixRecurringOptions = { /** * The frequency at which the shopper will be charged. Possible values: weekly, monthly, quarterly, half-yearly, and yearly. */ frequency?: string | null | undefined; /** * For a billing plan where the payment amount is fixed, the currency and value for each recurring payment */ recurringAmount: AdyenPixRecurringAmount | null; /** * Start date of the billing plan, in YYYY-MM-DD format. */ startsAt?: string | null | undefined; /** * End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. */ endsAt?: string | null | undefined; /** * The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. */ recurringStatement?: string | null | undefined; }; /** @internal */ export type AdyenPixRecurringOptions$Outbound = { frequency?: string | null | undefined; recurringAmount: AdyenPixRecurringAmount$Outbound | null; startsAt?: string | null | undefined; endsAt?: string | null | undefined; recurringStatement?: string | null | undefined; }; /** @internal */ export const AdyenPixRecurringOptions$outboundSchema: z.ZodType< AdyenPixRecurringOptions$Outbound, z.ZodTypeDef, AdyenPixRecurringOptions > = z.object({ frequency: z.nullable(z.string()).optional(), recurringAmount: z.nullable(AdyenPixRecurringAmount$outboundSchema), startsAt: z.nullable(z.string()).optional(), endsAt: z.nullable(z.string()).optional(), recurringStatement: z.nullable(z.string()).optional(), }); export function adyenPixRecurringOptionsToJSON( adyenPixRecurringOptions: AdyenPixRecurringOptions, ): string { return JSON.stringify( AdyenPixRecurringOptions$outboundSchema.parse(adyenPixRecurringOptions), ); }