Class: VoucherManager

VoucherManager(client)

new VoucherManager(client)

Parameters:
Name Type Description
client Client The client being used
Source:

Methods

(async) create(data) → {Promise.<Voucher>}

Create a new voucher
Parameters:
Name Type Description
data Object An object containing voucher data
Source:
Returns:
The newly created voucher
Type
Promise.<Voucher>

(async) fetch(id) → {Promise.<Voucher>}

Fetch a voucher from its id
Parameters:
Name Type Description
id string
Source:
Returns:
Fetched voucher
Type
Promise.<Voucher>

(async) fetchAll() → {Promise.<Collection.<string, Voucher>>}

Fetch all vouchers
Source:
Returns:
A Collection of vouchers mapped with their id
Type
Promise.<Collection.<string, Voucher>>