/* * 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 { PresentmentCurrency, PresentmentCurrency$outboundSchema, } from "./presentmentcurrency.js"; import { TaxBehaviorOption, TaxBehaviorOption$outboundSchema, } from "./taxbehavioroption.js"; /** * Schema to create a free price. */ export type ProductPriceFreeCreate = { amountType: "free"; priceCurrency?: PresentmentCurrency | undefined; /** * The tax behavior of the price. If not set, it will default to the organization's default tax behavior. */ taxBehavior?: TaxBehaviorOption | null | undefined; }; /** @internal */ export type ProductPriceFreeCreate$Outbound = { amount_type: "free"; price_currency?: string | undefined; tax_behavior?: string | null | undefined; }; /** @internal */ export const ProductPriceFreeCreate$outboundSchema: z.ZodMiniType< ProductPriceFreeCreate$Outbound, ProductPriceFreeCreate > = z.pipe( z.object({ amountType: z.literal("free"), priceCurrency: z.optional(PresentmentCurrency$outboundSchema), taxBehavior: z.optional(z.nullable(TaxBehaviorOption$outboundSchema)), }), z.transform((v) => { return remap$(v, { amountType: "amount_type", priceCurrency: "price_currency", taxBehavior: "tax_behavior", }); }), ); export function productPriceFreeCreateToJSON( productPriceFreeCreate: ProductPriceFreeCreate, ): string { return JSON.stringify( ProductPriceFreeCreate$outboundSchema.parse(productPriceFreeCreate), ); }