/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { DlocalPIXSubscriptionOptions, DlocalPIXSubscriptionOptions$Outbound, DlocalPIXSubscriptionOptions$outboundSchema, } from "./dlocalpixsubscriptionoptions.js"; export type DlocalPIXOptions = { /** * Passes `subscription` data to the dLocal API for those connectors that need it. */ subscription?: DlocalPIXSubscriptionOptions | null | undefined; /** * Defines scheduled payment start date. Must be provided in ISO 8601 format `(YYYY-MM-DD`). If not specified, The default is 2 days in the future. */ scheduledDate?: string | null | undefined; }; /** @internal */ export type DlocalPIXOptions$Outbound = { subscription?: DlocalPIXSubscriptionOptions$Outbound | null | undefined; scheduled_date?: string | null | undefined; }; /** @internal */ export const DlocalPIXOptions$outboundSchema: z.ZodType< DlocalPIXOptions$Outbound, z.ZodTypeDef, DlocalPIXOptions > = z.object({ subscription: z.nullable(DlocalPIXSubscriptionOptions$outboundSchema) .optional(), scheduledDate: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { scheduledDate: "scheduled_date", }); }); export function dlocalPIXOptionsToJSON( dlocalPIXOptions: DlocalPIXOptions, ): string { return JSON.stringify( DlocalPIXOptions$outboundSchema.parse(dlocalPIXOptions), ); }