import type * as Whop from "../index.js"; export interface PromoCode { /** Account that owns the promo code. */ account: Whop.AccountSummary; /** Affiliate credited with referrals that use the promo code, or `null` when no affiliate is attached. */ affiliate: Whop.PromoCodeAffiliate | null; /** Discount amount. Percentage discounts are represented as a decimal fraction. */ amount_off: number; /** Whether the promo code is restricted to churned customers. */ churned_users_only: boolean; /** Code entered at checkout. */ code: string | null; /** When the promo code was created, as an ISO 8601 timestamp. */ created_at: string; /** Currency used for a fixed-amount discount. */ currency: PromoCode.Currency; /** How long the discount applies. */ duration: PromoCode.Duration; /** Whether the promo code applies only to existing memberships. */ existing_memberships_only: boolean; /** When the promo code expires, as an ISO 8601 timestamp. */ expires_at: string | null; /** Promo code ID, prefixed `promo_`. */ id: string; /** Custom key-value metadata stored on the promo code. */ metadata: Record; /** Whether the promo code is restricted to new customers. */ new_users_only: boolean; /** Whether each customer may redeem the promo code only once. */ one_per_customer: boolean; /** Product the promo code is restricted to, or `null` when it is not product-scoped. */ product: Whop.PromoCodeProduct | null; /** Billing intervals the discount applies to. */ promo_duration_months: number | null; /** Whether the discount is percentage-based or a fixed amount. */ promo_type: PromoCode.PromoType; /** Promo code lifecycle status. */ status: Whop.PromoCodeStatus; /** Maximum uses when stock is limited. */ stock: number; /** Whether the promo code has no redemption limit. */ unlimited_stock: boolean; /** When the promo code was updated, as an ISO 8601 timestamp. */ updated_at: string; /** Memberships that used the promo code. */ uses: number; } export declare namespace PromoCode { /** Currency used for a fixed-amount discount. */ const Currency: { readonly Usd: "usd"; readonly Sgd: "sgd"; readonly Inr: "inr"; readonly Aud: "aud"; readonly Brl: "brl"; readonly Cad: "cad"; readonly Dkk: "dkk"; readonly Eur: "eur"; readonly Nok: "nok"; readonly Gbp: "gbp"; readonly Sek: "sek"; readonly Chf: "chf"; readonly Hkd: "hkd"; readonly Huf: "huf"; readonly Jpy: "jpy"; readonly Mxn: "mxn"; readonly Myr: "myr"; readonly Pln: "pln"; readonly Czk: "czk"; readonly Nzd: "nzd"; readonly Aed: "aed"; readonly Eth: "eth"; readonly Ape: "ape"; readonly Cop: "cop"; readonly Ron: "ron"; readonly Thb: "thb"; readonly Bgn: "bgn"; readonly Idr: "idr"; readonly Dop: "dop"; readonly Php: "php"; readonly Try: "try"; readonly Krw: "krw"; readonly Twd: "twd"; readonly Vnd: "vnd"; readonly Pkr: "pkr"; readonly Clp: "clp"; readonly Uyu: "uyu"; readonly Ars: "ars"; readonly Zar: "zar"; readonly Dzd: "dzd"; readonly Tnd: "tnd"; readonly Mad: "mad"; readonly Kes: "kes"; readonly Kwd: "kwd"; readonly Jod: "jod"; readonly All: "all"; readonly Xcd: "xcd"; readonly Amd: "amd"; readonly Bsd: "bsd"; readonly Bhd: "bhd"; readonly Bob: "bob"; readonly Bam: "bam"; readonly Khr: "khr"; readonly Crc: "crc"; readonly Xof: "xof"; readonly Egp: "egp"; readonly Etb: "etb"; readonly Gmd: "gmd"; readonly Ghs: "ghs"; readonly Gtq: "gtq"; readonly Gyd: "gyd"; readonly Ils: "ils"; readonly Jmd: "jmd"; readonly Mop: "mop"; readonly Mga: "mga"; readonly Mur: "mur"; readonly Mdl: "mdl"; readonly Mnt: "mnt"; readonly Nad: "nad"; readonly Ngn: "ngn"; readonly Mkd: "mkd"; readonly Omr: "omr"; readonly Pyg: "pyg"; readonly Pen: "pen"; readonly Qar: "qar"; readonly Rwf: "rwf"; readonly Sar: "sar"; readonly Rsd: "rsd"; readonly Lkr: "lkr"; readonly Tzs: "tzs"; readonly Ttd: "ttd"; readonly Uzs: "uzs"; readonly Rub: "rub"; readonly Btc: "btc"; readonly Cny: "cny"; readonly Usdt: "usdt"; readonly Kzt: "kzt"; readonly Awg: "awg"; readonly WhopUsd: "whop_usd"; readonly Xau: "xau"; }; type Currency = (typeof Currency)[keyof typeof Currency]; /** How long the discount applies. */ const Duration: { readonly Forever: "forever"; readonly Once: "once"; readonly Repeating: "repeating"; }; type Duration = (typeof Duration)[keyof typeof Duration]; /** Whether the discount is percentage-based or a fixed amount. */ const PromoType: { readonly Percentage: "percentage"; readonly FlatAmount: "flat_amount"; }; type PromoType = (typeof PromoType)[keyof typeof PromoType]; }