import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EnvironmentMode } from "./environmentmode.js"; /** * The status of the discount (e.g., active, inactive). */ export declare const DiscountEntityStatus: { readonly Deleted: "deleted"; readonly Active: "active"; readonly Draft: "draft"; readonly Expired: "expired"; readonly Scheduled: "scheduled"; }; /** * The status of the discount (e.g., active, inactive). */ export type DiscountEntityStatus = ClosedEnum; /** * The type of the discount, either "percentage" or "fixed". */ export declare const Type: { readonly Percentage: "percentage"; readonly Fixed: "fixed"; }; /** * The type of the discount, either "percentage" or "fixed". */ export type Type = ClosedEnum; /** * The duration type for the discount. */ export declare const Duration: { readonly Forever: "forever"; readonly Once: "once"; readonly Repeating: "repeating"; }; /** * The duration type for the discount. */ export type Duration = ClosedEnum; export type DiscountEntity = { /** * Unique identifier for the object. */ id: string; /** * String representing the environment. */ mode: EnvironmentMode; /** * A string representing the object’s type. Objects of the same type share the same value. */ object: string; /** * The status of the discount (e.g., active, inactive). */ status: DiscountEntityStatus; /** * The name of the discount. */ name: string; /** * The discount code. A unique identifier for the discount. */ code: string; /** * The type of the discount, either "percentage" or "fixed". */ type: Type; /** * The amount of the discount. Can be a percentage or a fixed amount. */ amount?: number | undefined; /** * The currency of the discount. Only required if type is "fixed". */ currency?: string | undefined; /** * The percentage of the discount. Only applicable if type is "percentage". */ percentage?: number | undefined; /** * The expiry date of the discount. */ expiryDate?: Date | undefined; /** * The maximum number of redemptions allowed for the discount. */ maxRedemptions?: number | undefined; /** * The duration type for the discount. */ duration?: Duration | undefined; /** * 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 | undefined; /** * The number of times this discount has been redeemed. */ redeemCount?: number | undefined; }; /** @internal */ export declare const DiscountEntityStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const DiscountEntityStatus$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Type$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Type$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Duration$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Duration$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const DiscountEntity$inboundSchema: z.ZodType; /** @internal */ export type DiscountEntity$Outbound = { id: string; mode: string; object: string; status: string; name: string; code: string; type: string; amount?: number | undefined; currency?: string | undefined; percentage?: number | undefined; expiry_date?: string | undefined; max_redemptions?: number | undefined; duration?: string | undefined; duration_in_months?: number | undefined; applies_to_products?: Array | undefined; redeem_count?: number | undefined; }; /** @internal */ export declare const DiscountEntity$outboundSchema: z.ZodType; export declare function discountEntityToJSON(discountEntity: DiscountEntity): string; export declare function discountEntityFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=discountentity.d.ts.map