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.
Field | Type | Required | Description |
start | Time (HH:MM) | Yes | Start time when a product can be purchased (hours:minutes) |
end | Time (HH:MM) | Yes | End time when a product can be purchase (hours:minutes) |
timezone | Timezone UTC | Yes | Time zone in UTC format |
action | Yes | Take a purchase check or disable the product in the shopping card |
Example
Product adding to shopping card is allowed only if current time between 10:00 and 22:00. Otherwise adding restricted.
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.
Field | Type | Required | Description |
time | Time (HH:MM) | Yes | Time (hours:minutes) |
timezone | Timezone UTC | Yes | Time zone in UTC format |
action | Yes | Take a purchase check or disable the product in the shopping card |
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.
Field | Type | Required | Description |
time | Time (HH:MM) | Yes | Time |
timezone | Timezone UTC | Yes | Time zone |
action | Yes | Take a purchase check or disable the product in the shopping card |
MinAgeInspection
Applies if rule is set.
Field | Type | Required | Description |
age | Integer | Yes | Age |
action | Yes | Take a purchase check or disable the product in the shopping card |
Example
Customer should be at least 18 years old to allow product purchase.
MinAmountInspection
Applies when product quantity is less than amount.
Field | Type | Required | Description |
amount | Double | Yes | Product quantity |
action | Yes | Take a purchase check or disable the product in the shopping card |
MaxAmountInspection
Applies when product quantity is greater than amount.
Field | Type | Required | Description |
amount | Double | Yes | Product quantity |
action | Yes | Take a purchase check or disable the product in the shopping card |
Enum type possible values
AdditionType | |
INSPECT | Allow adding to shopping card but inspect before purchase |
RESTRICT | Restrict adding to shopping cart. |
Last updated