ProductSchedule: GetRates

Can be called to get all the rates associated with the product schedule.

Function

Array GetRates()

Parameters

None

Return Value

An Array object that contains Stepped Rate objects with Rate and Duration properties. the return array will have at least one object

Name Type Description
Rate Number The product rate per minute
Duration Number The duration (seconds) for the rate is applied

Example

var obj = GetComponentByNameAndType("ProductSchedule1", "Product Schedule");

let rates = obj.GetRates();

for (let i = 0; i < rates.length; ++i)
{
	LogDebug("Stepped Rate object index "+i+": Rate: " + rates[i].Rate +" Duration: "+ rates[i].Duration );
}