Skip to content

Commit b1d6ff2

Browse files
committed
fix: updated doc examples
1 parent 62dd956 commit b1d6ff2

File tree

3 files changed

+49
-42
lines changed

3 files changed

+49
-42
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"username": "rubefons",
3-
"tier": "premium",
4-
"basked_id": "random_id"
2+
"username": "rubefons",
3+
"tier": "premium",
4+
"basked_id": "random_id"
55
}
Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
{
2-
"weekend_premium_discount": {
3-
"default": false,
4-
"rules": {
5-
"customer tier equals premium": {
6-
"when_match": true,
7-
"conditions": [
8-
{
9-
"action": "EQUALS",
10-
"key": "tier",
11-
"value": "premium"
12-
}
13-
]
14-
},
15-
"is weekend": {
16-
"when_match": true,
17-
"conditions": [
18-
{
19-
"action": "SCHEDULE_BETWEEN_DAYS_OF_WEEK",
20-
"key": "CURRENT_DAY_OF_WEEK_UTC",
21-
"value": ["SATURDAY", "SUNDAY"]
22-
}
23-
]
2+
"weekend_premium_discount": {
3+
"default": false,
4+
"rules": {
5+
"customer tier equals premium": {
6+
"when_match": true,
7+
"conditions": [
8+
{
9+
"action": "EQUALS",
10+
"key": "tier",
11+
"value": "premium"
12+
}
13+
]
14+
},
15+
"is weekend": {
16+
"when_match": true,
17+
"conditions": [
18+
{
19+
"action": "SCHEDULE_BETWEEN_DAYS_OF_WEEK",
20+
"key": "CURRENT_DAY_OF_WEEK",
21+
"value": {
22+
"DAYS": [
23+
"SATURDAY",
24+
"SUNDAY"
25+
],
26+
"TIMEZONE": "America/New_York"
2427
}
25-
}
28+
}
29+
]
30+
}
2631
}
32+
}
2733
}
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
2-
"happy_hour": {
3-
"default": false,
4-
"rules": {
5-
"is happy hour": {
6-
"when_match": true,
7-
"conditions": [
8-
{
9-
"action": "SCHEDULE_BETWEEN_TIME_RANGE",
10-
"key": "CURRENT_TIME_UTC",
11-
"value": {
12-
"START": "17:00",
13-
"END": "19:00"
14-
}
15-
}
16-
]
2+
"happy_hour": {
3+
"default": false,
4+
"rules": {
5+
"is happy hour": {
6+
"when_match": true,
7+
"conditions": [
8+
{
9+
"action": "SCHEDULE_BETWEEN_TIME_RANGE",
10+
"key": "CURRENT_TIME",
11+
"value": {
12+
"START": "17:00",
13+
"END": "19:00",
14+
"TIMEZONE": "Europe/Copenhagen"
1715
}
18-
}
16+
}
17+
]
18+
}
1919
}
20+
}
2021
}

0 commit comments

Comments
 (0)