Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

Discount

API reference for Discount in Vendr, the eCommerce solution for Umbraco v8+

Discount

public class Discount : DiscountReadOnly

Inheritance

Namespace

Methods

Create (1 of 2)

public static Discount Create(IUnitOfWork uow, Guid storeId, string alias, string name)

Create (2 of 2)

public static Discount Create(IUnitOfWork uow, Guid id, Guid storeId, string alias, string name)

AddCode (1 of 2)

public Discount AddCode(string code, int? usageLimit = null, bool isUnlimited = false)

AddCode (2 of 2)

public Discount AddCode(DiscountCode code)

AddCodes

public Discount AddCodes(IEnumerable<DiscountCode> codes)

ClearCodes

public Discount ClearCodes()

RemoveCode (1 of 3)

public Discount RemoveCode(string code)

RemoveCode (2 of 3)

public Discount RemoveCode(Guid id)

RemoveCode (3 of 3)

public Discount RemoveCode(DiscountCode code)

RemoveCodes

public Discount RemoveCodes(IEnumerable<DiscountCode> codes)

SetActive

public Discount SetActive(bool isActive)

SetAlias

public Discount SetAlias(string alias)

SetBlockFurtherDiscounts

public Discount SetBlockFurtherDiscounts(bool blockFurtherDiscounts)

SetBlockIfPreviousDiscounts

public Discount SetBlockIfPreviousDiscounts(bool blockIfPreviousDiscounts)

SetCodes

public Discount SetCodes(IEnumerable<DiscountCode> codes, 
    SetBehavior setBehavior = SetBehavior.Merge)

SetDateRange

public Discount SetDateRange(DateTime? startDate, DateTime? expiryDate)

SetName (1 of 2)

public Discount SetName(string name)

SetName (2 of 2)

public Discount SetName(string name, string alias)

SetRewards

public Discount SetRewards(IEnumerable<DiscountRewardConfig> rewards)

SetRules (1 of 2)

public Discount SetRules(DiscountRuleConfig rules, bool blockFurtherDiscounts, 
    bool blockIfPreviousDiscounts)

SetRules (2 of 2)

public Discount SetRules(DiscountRuleConfig rules)

SetSortOrder

public Discount SetSortOrder(int sortOrder)

SetType

public Discount SetType(DiscountType type)

UpdateCode (1 of 3)

public Discount UpdateCode(string oldCode, string newCode, int? usageLimit = null, 
    bool? isUnlimited = null)

UpdateCode (2 of 3)

public Discount UpdateCode(Guid id, string code, int? usageLimit = null, bool? isUnlimited = null)

UpdateCode (3 of 3)

public Discount UpdateCode(DiscountCode code)

UpdateCodes

public Discount UpdateCodes(IEnumerable<DiscountCode> codes)

Edit this page on GitHub

Site + logo design © 2024 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.