@acceleratxr/core_sdk / PromoCode
Class: PromoCode#
A promotional code that can be applied to an order to obtain a pricing discount, cash back or free product.
REQUIRES: Purchasing Services
author Jean-Philippe Steinmetz info@acceleratxr.com
Hierarchy#
-
↳ PromoCode
Index#
Constructors#
Properties#
Accessors#
Constructors#
constructor#
+ new PromoCode(other?: any): PromoCode
Overrides EntityBase.constructor
Defined in src/models/PromoCode.ts:70
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: PromoCode
Properties#
amount#
• amount: any = undefined
Defined in src/models/PromoCode.ts:65
The amount of the promotion to apply when redeemed.
customers#
• customers: Array<string> = []
Defined in src/models/PromoCode.ts:60
The list of wallet uid’s that can redeem this promotion. If null then anyone can redeem.
dateCreated#
• dateCreated: Date = new Date()
Inherited from EntityBase.dateCreated
Defined in src/EntityBase.ts:18
The date and time that the object was created.
dateModified#
• dateModified: Date = new Date()
Inherited from EntityBase.dateModified
Defined in src/EntityBase.ts:23
The date and time that the object was last modified.
description#
• description: string = “”
Defined in src/models/PromoCode.ts:30
The textual description of the promotion.
expires#
• expires: Date | undefined = undefined
Defined in src/models/PromoCode.ts:40
The date and time that the promotion expires and can no longer be redeemed. A null value indicates no expiration date.
maxUses#
• maxUses: number = 0
Defined in src/models/PromoCode.ts:35
The maximum number of times that the promotion can be redeemed. If -1 or null indicates no limit.
name#
• name: string = “”
Defined in src/models/PromoCode.ts:25
The unique name of the promotional code.
products#
• products: Array<string> = []
Defined in src/models/PromoCode.ts:55
The list of product uid’s that this promotion can be applied to. If null then applies to all products.
redeemed#
• redeemed: number = 0
Defined in src/models/PromoCode.ts:50
The number of times that this promotion has been redeemed.
starts#
• starts: Date = new Date()
Defined in src/models/PromoCode.ts:45
The date and time that the promotion begins and can be redeemed.
type#
• type: PromoCodeType = PromoCodeType.PERCENT
Defined in src/models/PromoCode.ts:70
The type of promotion that will be applied when redeemed.
uid#
• uid: string = uuid.v4()
Inherited from EntityBase.uid
Defined in src/EntityBase.ts:13
The universally unique identifier of the object.
version#
• version: number = 0
Inherited from EntityBase.version
Defined in src/EntityBase.ts:28
The optimistic locking version of the object.
Accessors#
ClassName#
• Staticget ClassName(): string
Defined in src/models/PromoCode.ts:20
Returns: string