ToppingItemController

ToppingItemController

Controller for topping items.

Constructor

new ToppingItemController()

Source:

Methods

add(name, quantity, price, availableUntil) → {Promise.<any>}

Create a new topping item

Source:
Parameters:
Name Type Description
name string

The name of the Topping Object

quantity int

The amount of the Topping Object

price int

The cost of the Topping Object

availableUntil int

The length of time that this Topping Object is available

Returns:
Type:
Promise.<any>
  • The id of the Topping Object

delete(id) → {Promise.<any>}

Delete a topping item

Source:
Parameters:
Name Type Description
id int

The id of the Topping Object

Returns:
Type:
Promise.<any>

update(id, name, remainingQuantity, availableUntil, toppingItems) → {Promise.<any>}

Update a topping item

Source:
Parameters:
Name Type Default Description
id int

The id of the Topping Object

name string null

The name of the Topping Object

remainingQuantity int null

The amount of Toppings remaining

availableUntil int null

The length of time that this Topping Object is available

toppingItems null
Returns:
Type:
Promise.<any>
  • The id of the Topping Object