/* * 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 * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; /** * Indicates the amount type unit for the subscription. Allowed values are: `FIXED`, `VARIABLE`. */ export const DlocalPIXSubscriptionAmountOptionsType = { Fixed: "FIXED", Variable: "VARIABLE", } as const; /** * Indicates the amount type unit for the subscription. Allowed values are: `FIXED`, `VARIABLE`. */ export type DlocalPIXSubscriptionAmountOptionsType = OpenEnum< typeof DlocalPIXSubscriptionAmountOptionsType >; export type DlocalPIXSubscriptionAmountOptions = { /** * Indicates the amount type unit for the subscription. Allowed values are: `FIXED`, `VARIABLE`. */ type: DlocalPIXSubscriptionAmountOptionsType; /** * Fixed subscription amount in local currency. Required only for fixed amount subscriptions depending on the payment method. */ value?: string | null | undefined; /** * Minimum payer enrollment limit, not minimum recurring charge amount. */ minValue: string | null; }; /** @internal */ export const DlocalPIXSubscriptionAmountOptionsType$outboundSchema: z.ZodType< string, z.ZodTypeDef, DlocalPIXSubscriptionAmountOptionsType > = openEnums.outboundSchema(DlocalPIXSubscriptionAmountOptionsType); /** @internal */ export type DlocalPIXSubscriptionAmountOptions$Outbound = { type: string; value?: string | null | undefined; min_value: string | null; }; /** @internal */ export const DlocalPIXSubscriptionAmountOptions$outboundSchema: z.ZodType< DlocalPIXSubscriptionAmountOptions$Outbound, z.ZodTypeDef, DlocalPIXSubscriptionAmountOptions > = z.object({ type: DlocalPIXSubscriptionAmountOptionsType$outboundSchema, value: z.nullable(z.string()).optional(), minValue: z.nullable(z.string()), }).transform((v) => { return remap$(v, { minValue: "min_value", }); }); export function dlocalPIXSubscriptionAmountOptionsToJSON( dlocalPIXSubscriptionAmountOptions: DlocalPIXSubscriptionAmountOptions, ): string { return JSON.stringify( DlocalPIXSubscriptionAmountOptions$outboundSchema.parse( dlocalPIXSubscriptionAmountOptions, ), ); }