# new PromoCodes()
- Source:
Methods
# (static) claim(code) → {Promise.<PromoCode>}
Claim promo code. Will return an error if promocode is not valid, expired or already claimed.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | Promo code to be claimed. |
- Source:
Returns:
Promise with promocode if operation was successful.
- Type
- Promise.<PromoCode>
# (static) create(content) → {Promise.<PromoCode>}
Create a promo code.
Parameters:
Name | Type | Description |
---|---|---|
content |
PromoCodeContent | Promo Code content. |
- Source:
Returns:
Promise with created promo code or error.
- Type
- Promise.<PromoCode>
# (static) get(code) → {Promise.<PromoCode>}
Get the promo code entity by its code.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | code. |
- Source:
Returns:
- Promise with promo code.
- Type
- Promise.<PromoCode>