Table of Contents

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

voucherList VoucherList

The voucher list to delete.

GetAllVoucherLists()

Gets every voucher list.

public virtual IEnumerable<VoucherList> GetAllVoucherLists()

Returns

IEnumerable<VoucherList>

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

type VoucherUseCategoryType

Which kind of usage to treat as claiming a list.

selectedVoucherListsIds IEnumerable<int>

Lists already selected by the caller, which stay available.

Returns

IEnumerable<VoucherList>

GetVoucherListById(int)

Gets a voucher list by its identifier.

public virtual VoucherList? GetVoucherListById(int listId)

Parameters

listId int

The voucher list identifier.

Returns

VoucherList

The voucher list, or null when no list has that identifier.

Save(VoucherList)

Creates or updates a voucher list.

public virtual void Save(VoucherList voucherList)

Parameters

voucherList VoucherList

The voucher list to save.

To top