@golemio/parkings
Version:
Golemio Parkings Module
15 lines • 526 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MaxPriceRule = void 0;
class MaxPriceRule {
isValid(tariffInfo) {
if (tariffInfo.pricePerHour === undefined ||
tariffInfo.maxParkingTime === undefined ||
tariffInfo.maxPrice === undefined) {
return false;
}
return !(tariffInfo.pricePerHour * tariffInfo.maxParkingTime < tariffInfo.maxPrice);
}
}
exports.MaxPriceRule = MaxPriceRule;
//# sourceMappingURL=MaxPriceRule.js.map