Show/Hide Toolbars

CWT Software Configuration Handbook

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

Value:
Default:
Description:

cleared

Value:1 to 2147483647, Daily, Weekly and Monthly
Default:-
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

Value:1 to 31
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

Value:00:00 – 23:59
Default:23:59
Description:Fixed cleared time of the rule

clearedWeekday

Value:Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Default:Sunday
Description:Fixed cleared weekday of the rule

NOTE: This parameter is only used if cleared is set to Weekly

fallbackTariffPackageId

Value:0 to 2147483647
Default:-
Description:Fallback tariff package if purchase rule denies a purchase when validating OnCodeInput

fallbackValidation

Value:true/false
Default:false
Description:Validate fall-back tariff package

id

Value:0-65535
Default:-
Description:Identification of rule

name

Value:string
Description:Name of rule

nofPurchases

Value:-1 to 65535
Default:-1
Description:Maximum number of purchases allowed

totalTicks

-1 to 2147483647

Default:-
Description:Maximum number ticks of all purchases allowed

totalTimeMinute

Value:-1 to 2147483647
Default:-1
Description:Total allowed parking time in minutes per fixed cleared date (daily, weekly or monthly)

type

Value:Rolling, Fixed
Default:Rolling
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/>