Product: CreateProduct

Called to create a new instance of product.

Function

Product CreateProduct();
Product CreateProduct(identifier: string);

Parameters

Name Type Description
identifier String OPTIONAL: product’s identifier. If this is not a string, an Error will be thrown.

Return Value

The new product instance, or undefined on error

Example

let product1 = CreateProduct();
let product2 = CreateProduct("123");
LogDebug(product2.Identifier); // Prints "123".