Element Path: <cwt><PURCHASERULES><rule>
The rule element describes a rule to validate the purchase against.
Each rule can have a fall-back tariff package that will be selected if the rule denies a purchase on code input.
If all rules fail that the first rule will be checked if it has a fallbackTariffPackageId and will try to change to this TariffPackage. If this fails, the purchase will be canceled. If the first rule does not have a fallbackTariffPackageId specified, the purchase will also be canceled. The selected tariff package should not lead to a Payment Service change. Whether the fall-back tariff package should be validated is control by attribute fallbackValidation.
attributes
cleared
Value: | 1 to 2147483647, Daily, Weekly and Monthly |
Description: | If type is Rolling, then cleared means period of time in minutes |
If type is Fixed, then cleared means fixed date and time, Calculated from clearedWeekday, clearedDay, and clearedTime
clearedDay
Default: | 31 or last day of the month |
Description: | Fixed cleared day of the rule. |
NOTE: This parameter is only used if cleared is set to Monthly
|
clearedTime
Description: | Fixed cleared time of the rule |
clearedWeekday
Value: | Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
Description: | Fixed cleared weekday of the rule |
NOTE: This parameter is only used if cleared is set to Weekly
|
fallbackTariffPackageId
Description: | Fallback tariff package if purchase rule denies a purchase when validating OnCodeInput |
fallbackValidation
Description: | Validate fall-back tariff package |
id
Description: | Identification of rule |
name
nofPurchases
Description: | Maximum number of purchases allowed |
totalTicks
-1 to 2147483647
Description: | Maximum number ticks of all purchases allowed |
totalTimeMinute
Description: | Total allowed parking time in minutes per fixed cleared date (daily, weekly or monthly) |
type
Description: | Type of time limitation of the rule |
•Rolling: Cleared date is rolling
•Fixed: Cleared date is fixed date and time
e.g. Cleared every Monday at 12:30 or Cleared every 15th in the month at 11:00
Example: simple rule
“Allow only purchases up to $1000 with each code within a rolling period of 3h.”
<rule id="1" name="B" totalTicks="1000" type="Rolling" cleared="180">
<code/>
</rule>
Example: falback validation
Validate against purchase rules on code input and on accept, if rule with id=0 denies fall-back to tariff package with id=1 and validate again against purchase rules (maybe rule with id=1 will deny):
<PURCAHSERULES validation="OnCodeInputAndAccept"/>
<rule id="0" nofPurchases="1" type="Rolling" cleared="1440" fallbackTariffPackageId="1"
fallbackValidation="true"/>
<rule id="1" nofPurchases="1" type="Rolling" cleared="1440" >
<tariffPackage id="1"/>
<rule/>
<PURCAHSERULES/>