Class VoucherListService
- Namespace
- Dynamicweb.Ecommerce.Orders.Vouchers
- Assembly
- Dynamicweb.Ecommerce.dll
Manages voucher lists: the named collections that vouchers belong to, and which a discount or a loyalty reward draws its codes from.
public class VoucherListService
- Inheritance
-
VoucherListService
- Inherited Members
Methods
Delete(VoucherList)
Deletes a voucher list.
public virtual void Delete(VoucherList voucherList)
Parameters
voucherListVoucherListThe voucher list to delete.
GetAllVoucherLists()
Gets every voucher list.
public virtual IEnumerable<VoucherList> GetAllVoucherLists()
Returns
GetUnusedVoucherListsFor(VoucherUseCategoryType, IEnumerable<int>)
Gets the voucher lists that are not already claimed by a discount or a loyalty reward, so they can be offered when configuring a new one.
public virtual IEnumerable<VoucherList> GetUnusedVoucherListsFor(VoucherUseCategoryType type, IEnumerable<int> selectedVoucherListsIds)
Parameters
typeVoucherUseCategoryTypeWhich kind of usage to treat as claiming a list.
selectedVoucherListsIdsIEnumerable<int>Lists already selected by the caller, which stay available.
Returns
GetVoucherListById(int)
Gets a voucher list by its identifier.
public virtual VoucherList? GetVoucherListById(int listId)
Parameters
listIdintThe voucher list identifier.
Returns
- VoucherList
The voucher list, or
nullwhen no list has that identifier.
Save(VoucherList)
Creates or updates a voucher list.
public virtual void Save(VoucherList voucherList)
Parameters
voucherListVoucherListThe voucher list to save.