import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CouponDurationType } from "./coupondurationtype.js"; import { DiscountType } from "./discounttype.js"; export type CreateDiscountRequestEntity = { /** * The name of the discount. */ name: string; /** * Optional discount code. If left empty, a code will be generated. */ code?: string | undefined; /** * The type of the discount, either "percentage" or "fixed". */ type: DiscountType; /** * The fixed value for the discount. Only applicable if the type is "fixed". */ amount?: number | undefined; /** * The currency of the discount. Only required if type is "fixed". */ currency?: string | undefined; /** * The percentage value for the discount. Only applicable if the type is "percentage". */ percentage?: number | undefined; /** * The expiry date of the discount. */ expiryDate?: Date | undefined; /** * The maximum number of redemptions for the discount. */ maxRedemptions?: number | undefined; /** * The duration type for the discount. */ duration: CouponDurationType; /** * The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription. */ durationInMonths?: number | undefined; /** * The list of product IDs to which this discount applies. */ appliesToProducts: Array; }; /** @internal */ export declare const CreateDiscountRequestEntity$inboundSchema: z.ZodType; /** @internal */ export type CreateDiscountRequestEntity$Outbound = { name: string; code?: string | undefined; type: string; amount?: number | undefined; currency?: string | undefined; percentage?: number | undefined; expiry_date?: string | undefined; max_redemptions?: number | undefined; duration: string; duration_in_months?: number | undefined; applies_to_products: Array; }; /** @internal */ export declare const CreateDiscountRequestEntity$outboundSchema: z.ZodType; export declare function createDiscountRequestEntityToJSON(createDiscountRequestEntity: CreateDiscountRequestEntity): string; export declare function createDiscountRequestEntityFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=creatediscountrequestentity.d.ts.map