Inspection

Inspection interface data transfer object description

BetweenTimeInspection

Applies if the current time does not belong to the start and end parameters range. If the rule is not set, it is allowed to buy the product at all times.

Example

Product adding to shopping card is allowed only if current time between 10:00 and 22:00. Otherwise adding restricted.

{
    "action" : "RESTRICT",
    "start" : "10:00",
    "end": "22:00",
    "timezone" : "Europe/Tallinn",
    "type": "BETWEEN_TIME"
}

MinTimeInspection

Applies if the current time is less than the set time value. If the rule is not set, it is allowed to buy the product at all times.

MaxTimeInspection

Applies if the current time is greater than the set time value. If the rule is not set, it is allowed to buy the product at all times.

MinAgeInspection

Applies if rule is set.

Example

Customer should be at least 18 years old to allow product purchase.

{
    "action" : "INSPECT",
    "age" : 18,
    "type" : "MIN_AGE"
}

MinAmountInspection

Applies when product quantity is less than amount.

MaxAmountInspection

Applies when product quantity is greater than amount.

Enum type possible values

Last updated