Home Reference Source

References

summary
public

F addProduct(id: number, title: string, price: number)

adds a product to the products object

public

F formatAddress(customerEmail: string): address

returns an customer address in a format appropriate for putting on an envelope

public

F productById(productId: number): Object

takes a productId and returns the product corresponding to that id.

public

F productCost(productId: number): number

takes a productId and returns the price of the product corresponding to that id.

public

Returns the title of the shop

public

F totalCost(customerEmail: string, orderId: number): number

returns the total cost of an order which is the sum of all products contained in an order

public

F updateProductPrice(id: number, newPrice: number)

updates the price of a product in the products object

public

F upperCase(inputString: string)

Coverts a string to uppercase

public

Returns the shop title in uppercase.

public

An address

public

A customer

public

An item which is part of an order

public

An order

public

A product