square_sandbox_simulator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +176 -0
- data/bin/simulate +388 -0
- data/lib/square_sandbox_simulator/configuration.rb +193 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/categories.json +54 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/combos.json +33 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/coupon_codes.json +133 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/discounts.json +113 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/items.json +55 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/modifiers.json +73 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/tax_rates.json +26 -0
- data/lib/square_sandbox_simulator/data/cafe_bakery/tenders.json +41 -0
- data/lib/square_sandbox_simulator/data/restaurant/categories.json +54 -0
- data/lib/square_sandbox_simulator/data/restaurant/combos.json +265 -0
- data/lib/square_sandbox_simulator/data/restaurant/coupon_codes.json +266 -0
- data/lib/square_sandbox_simulator/data/restaurant/discounts.json +198 -0
- data/lib/square_sandbox_simulator/data/restaurant/gift_cards.json +82 -0
- data/lib/square_sandbox_simulator/data/restaurant/items.json +388 -0
- data/lib/square_sandbox_simulator/data/restaurant/modifiers.json +62 -0
- data/lib/square_sandbox_simulator/data/restaurant/tax_rates.json +38 -0
- data/lib/square_sandbox_simulator/data/restaurant/tenders.json +41 -0
- data/lib/square_sandbox_simulator/data/salon_spa/categories.json +24 -0
- data/lib/square_sandbox_simulator/data/salon_spa/combos.json +88 -0
- data/lib/square_sandbox_simulator/data/salon_spa/coupon_codes.json +96 -0
- data/lib/square_sandbox_simulator/data/salon_spa/discounts.json +93 -0
- data/lib/square_sandbox_simulator/data/salon_spa/gift_cards.json +47 -0
- data/lib/square_sandbox_simulator/data/salon_spa/items.json +100 -0
- data/lib/square_sandbox_simulator/data/salon_spa/modifiers.json +49 -0
- data/lib/square_sandbox_simulator/data/salon_spa/tax_rates.json +17 -0
- data/lib/square_sandbox_simulator/data/salon_spa/tenders.json +41 -0
- data/lib/square_sandbox_simulator/database.rb +224 -0
- data/lib/square_sandbox_simulator/db/factories/api_requests.rb +95 -0
- data/lib/square_sandbox_simulator/db/factories/business_types.rb +178 -0
- data/lib/square_sandbox_simulator/db/factories/categories.rb +379 -0
- data/lib/square_sandbox_simulator/db/factories/daily_summaries.rb +56 -0
- data/lib/square_sandbox_simulator/db/factories/items.rb +1526 -0
- data/lib/square_sandbox_simulator/db/factories/simulated_orders.rb +112 -0
- data/lib/square_sandbox_simulator/db/factories/simulated_payments.rb +61 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000000_enable_pgcrypto.rb +7 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000001_create_business_types.rb +18 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000002_create_categories.rb +18 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000003_create_items.rb +23 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000004_create_simulated_orders.rb +36 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000005_create_simulated_payments.rb +26 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000006_create_api_requests.rb +27 -0
- data/lib/square_sandbox_simulator/db/migrate/20260312000007_create_daily_summaries.rb +24 -0
- data/lib/square_sandbox_simulator/generators/data_loader.rb +202 -0
- data/lib/square_sandbox_simulator/generators/entity_generator.rb +248 -0
- data/lib/square_sandbox_simulator/generators/order_generator.rb +632 -0
- data/lib/square_sandbox_simulator/models/api_request.rb +43 -0
- data/lib/square_sandbox_simulator/models/business_type.rb +25 -0
- data/lib/square_sandbox_simulator/models/category.rb +18 -0
- data/lib/square_sandbox_simulator/models/daily_summary.rb +68 -0
- data/lib/square_sandbox_simulator/models/item.rb +33 -0
- data/lib/square_sandbox_simulator/models/record.rb +16 -0
- data/lib/square_sandbox_simulator/models/simulated_order.rb +42 -0
- data/lib/square_sandbox_simulator/models/simulated_payment.rb +28 -0
- data/lib/square_sandbox_simulator/seeder.rb +242 -0
- data/lib/square_sandbox_simulator/services/base_service.rb +253 -0
- data/lib/square_sandbox_simulator/services/square/catalog_service.rb +203 -0
- data/lib/square_sandbox_simulator/services/square/customer_service.rb +130 -0
- data/lib/square_sandbox_simulator/services/square/order_service.rb +121 -0
- data/lib/square_sandbox_simulator/services/square/payment_service.rb +136 -0
- data/lib/square_sandbox_simulator/services/square/services_manager.rb +68 -0
- data/lib/square_sandbox_simulator/services/square/team_service.rb +108 -0
- data/lib/square_sandbox_simulator/version.rb +5 -0
- data/lib/square_sandbox_simulator.rb +47 -0
- metadata +348 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tax_rates": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Sales Tax",
|
|
5
|
+
"rate": 8.875,
|
|
6
|
+
"is_default": true,
|
|
7
|
+
"description": "Standard sales tax on prepared food and beverages"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "Prepared Food Tax",
|
|
11
|
+
"rate": 8.875,
|
|
12
|
+
"is_default": false,
|
|
13
|
+
"description": "Tax on prepared/heated food items"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"category_tax_mapping": {
|
|
17
|
+
"Coffee & Espresso": ["Sales Tax"],
|
|
18
|
+
"Pastries & Baked Goods": ["Sales Tax"],
|
|
19
|
+
"Breakfast": ["Sales Tax"],
|
|
20
|
+
"Sandwiches & Wraps": ["Sales Tax"],
|
|
21
|
+
"Smoothies & Juices": ["Sales Tax"],
|
|
22
|
+
"Drinks": ["Sales Tax"],
|
|
23
|
+
"Grab & Go": ["Sales Tax"],
|
|
24
|
+
"default": ["Sales Tax"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tenders": [
|
|
3
|
+
{
|
|
4
|
+
"label": "Cash",
|
|
5
|
+
"label_key": "com.clover.tender.cash",
|
|
6
|
+
"opens_cash_drawer": true,
|
|
7
|
+
"weight": 30
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"label": "Check",
|
|
11
|
+
"label_key": "com.clover.tender.check",
|
|
12
|
+
"opens_cash_drawer": true,
|
|
13
|
+
"weight": 5
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"label": "Gift Card",
|
|
17
|
+
"label_key": "com.clover.tender.external_gift_card",
|
|
18
|
+
"opens_cash_drawer": false,
|
|
19
|
+
"weight": 15
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"label": "External Payment",
|
|
23
|
+
"label_key": "com.clover.tender.external_payment",
|
|
24
|
+
"opens_cash_drawer": false,
|
|
25
|
+
"weight": 10
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"label": "Mobile Payment",
|
|
29
|
+
"label_key": "com.clover.tender.mobile_payment",
|
|
30
|
+
"opens_cash_drawer": false,
|
|
31
|
+
"weight": 20
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "Store Credit",
|
|
35
|
+
"label_key": "com.clover.tender.store_credit",
|
|
36
|
+
"opens_cash_drawer": false,
|
|
37
|
+
"weight": 10
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"note": "Credit Card and Debit Card are intentionally excluded - they are broken in Clover sandbox"
|
|
41
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"categories": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Appetizers",
|
|
5
|
+
"sort_order": 1,
|
|
6
|
+
"description": "Start your meal right"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "Soups & Salads",
|
|
10
|
+
"sort_order": 2,
|
|
11
|
+
"description": "Fresh soups and crisp salads"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Entrees",
|
|
15
|
+
"sort_order": 3,
|
|
16
|
+
"description": "Main courses"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Sides",
|
|
20
|
+
"sort_order": 4,
|
|
21
|
+
"description": "Perfect accompaniments"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Kids Menu",
|
|
25
|
+
"sort_order": 5,
|
|
26
|
+
"description": "For our younger guests"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Brunch",
|
|
30
|
+
"sort_order": 6,
|
|
31
|
+
"description": "Weekend brunch favorites"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "Desserts",
|
|
35
|
+
"sort_order": 7,
|
|
36
|
+
"description": "Sweet endings"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Drinks",
|
|
40
|
+
"sort_order": 8,
|
|
41
|
+
"description": "Non-alcoholic beverages"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Alcoholic Beverages",
|
|
45
|
+
"sort_order": 9,
|
|
46
|
+
"description": "Beer, wine, and cocktails"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Specials",
|
|
50
|
+
"sort_order": 10,
|
|
51
|
+
"description": "Chef's daily specials"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
{
|
|
2
|
+
"combos": [
|
|
3
|
+
{
|
|
4
|
+
"id": "classic_meal",
|
|
5
|
+
"name": "Classic Meal Deal",
|
|
6
|
+
"description": "Entree + Side + Drink for a discount",
|
|
7
|
+
"discount_type": "percentage",
|
|
8
|
+
"discount_value": 15,
|
|
9
|
+
"required_components": [
|
|
10
|
+
{
|
|
11
|
+
"category": "Entrees",
|
|
12
|
+
"quantity": 1
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"category": "Sides",
|
|
16
|
+
"quantity": 1
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"category": "Drinks",
|
|
20
|
+
"quantity": 1
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"applies_to": "total",
|
|
24
|
+
"max_discount_amount": null,
|
|
25
|
+
"active": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "family_feast",
|
|
29
|
+
"name": "Family Feast",
|
|
30
|
+
"description": "2 Entrees + 2 Sides + 2 Drinks",
|
|
31
|
+
"discount_type": "percentage",
|
|
32
|
+
"discount_value": 20,
|
|
33
|
+
"required_components": [
|
|
34
|
+
{
|
|
35
|
+
"category": "Entrees",
|
|
36
|
+
"quantity": 2
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"category": "Sides",
|
|
40
|
+
"quantity": 2
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"category": "Drinks",
|
|
44
|
+
"quantity": 2
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"applies_to": "total",
|
|
48
|
+
"max_discount_amount": 2000,
|
|
49
|
+
"active": true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "appetizer_sampler",
|
|
53
|
+
"name": "Appetizer Sampler",
|
|
54
|
+
"description": "Any 3 appetizers for 25% off",
|
|
55
|
+
"discount_type": "percentage",
|
|
56
|
+
"discount_value": 25,
|
|
57
|
+
"required_components": [
|
|
58
|
+
{
|
|
59
|
+
"category": "Appetizers",
|
|
60
|
+
"quantity": 3
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"applies_to": "matching_items",
|
|
64
|
+
"max_discount_amount": null,
|
|
65
|
+
"active": true
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "happy_hour_combo",
|
|
69
|
+
"name": "Happy Hour Combo",
|
|
70
|
+
"description": "Appetizer + 2 Drinks during happy hour",
|
|
71
|
+
"discount_type": "percentage",
|
|
72
|
+
"discount_value": 30,
|
|
73
|
+
"required_components": [
|
|
74
|
+
{
|
|
75
|
+
"category": "Appetizers",
|
|
76
|
+
"quantity": 1
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"category": "Alcoholic Beverages",
|
|
80
|
+
"quantity": 2
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"applies_to": "total",
|
|
84
|
+
"time_restricted": true,
|
|
85
|
+
"time_rules": {
|
|
86
|
+
"start_hour": 15,
|
|
87
|
+
"end_hour": 18
|
|
88
|
+
},
|
|
89
|
+
"max_discount_amount": 1500,
|
|
90
|
+
"active": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "date_night",
|
|
94
|
+
"name": "Date Night Special",
|
|
95
|
+
"description": "2 Entrees + 1 Appetizer + 2 Drinks + 1 Dessert",
|
|
96
|
+
"discount_type": "fixed",
|
|
97
|
+
"discount_value": 1500,
|
|
98
|
+
"required_components": [
|
|
99
|
+
{
|
|
100
|
+
"category": "Entrees",
|
|
101
|
+
"quantity": 2
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"category": "Appetizers",
|
|
105
|
+
"quantity": 1
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"category": "Drinks",
|
|
109
|
+
"quantity": 2
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"category": "Desserts",
|
|
113
|
+
"quantity": 1
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"applies_to": "total",
|
|
117
|
+
"max_discount_amount": null,
|
|
118
|
+
"active": true
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "burger_meal",
|
|
122
|
+
"name": "Burger Meal",
|
|
123
|
+
"description": "Any burger + fries + drink",
|
|
124
|
+
"discount_type": "percentage",
|
|
125
|
+
"discount_value": 12,
|
|
126
|
+
"required_components": [
|
|
127
|
+
{
|
|
128
|
+
"items": ["Classic Burger", "Bacon Cheeseburger"],
|
|
129
|
+
"quantity": 1
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"items": ["French Fries", "Sweet Potato Fries", "Onion Rings"],
|
|
133
|
+
"quantity": 1
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"category": "Drinks",
|
|
137
|
+
"quantity": 1
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"applies_to": "matching_items",
|
|
141
|
+
"max_discount_amount": null,
|
|
142
|
+
"active": true
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "dessert_duo",
|
|
146
|
+
"name": "Dessert Duo",
|
|
147
|
+
"description": "Any 2 desserts for 20% off",
|
|
148
|
+
"discount_type": "percentage",
|
|
149
|
+
"discount_value": 20,
|
|
150
|
+
"required_components": [
|
|
151
|
+
{
|
|
152
|
+
"category": "Desserts",
|
|
153
|
+
"quantity": 2
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"applies_to": "matching_items",
|
|
157
|
+
"max_discount_amount": null,
|
|
158
|
+
"active": true
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "lunch_special_combo",
|
|
162
|
+
"name": "Lunch Special Combo",
|
|
163
|
+
"description": "Entree + Soup of the Day + Drink",
|
|
164
|
+
"discount_type": "fixed",
|
|
165
|
+
"discount_value": 300,
|
|
166
|
+
"required_components": [
|
|
167
|
+
{
|
|
168
|
+
"category": "Entrees",
|
|
169
|
+
"quantity": 1
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"items": ["Soup of the Day"],
|
|
173
|
+
"quantity": 1
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"category": "Drinks",
|
|
177
|
+
"quantity": 1
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"applies_to": "total",
|
|
181
|
+
"time_restricted": true,
|
|
182
|
+
"time_rules": {
|
|
183
|
+
"start_hour": 11,
|
|
184
|
+
"end_hour": 14
|
|
185
|
+
},
|
|
186
|
+
"max_discount_amount": null,
|
|
187
|
+
"active": true
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "steak_night",
|
|
191
|
+
"name": "Steak Night",
|
|
192
|
+
"description": "Steak + Side + Wine for $10 off",
|
|
193
|
+
"discount_type": "fixed",
|
|
194
|
+
"discount_value": 1000,
|
|
195
|
+
"required_components": [
|
|
196
|
+
{
|
|
197
|
+
"items": ["NY Strip Steak"],
|
|
198
|
+
"quantity": 1
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"category": "Sides",
|
|
202
|
+
"quantity": 1
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"items": ["House Wine", "Premium Wine"],
|
|
206
|
+
"quantity": 1
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"applies_to": "total",
|
|
210
|
+
"day_restricted": true,
|
|
211
|
+
"valid_days": [1, 2, 3],
|
|
212
|
+
"max_discount_amount": null,
|
|
213
|
+
"active": true
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "kids_meal",
|
|
217
|
+
"name": "Kids Meal",
|
|
218
|
+
"description": "Kids item + Drink for 10% off",
|
|
219
|
+
"discount_type": "percentage",
|
|
220
|
+
"discount_value": 10,
|
|
221
|
+
"required_components": [
|
|
222
|
+
{
|
|
223
|
+
"category": "Kids Menu",
|
|
224
|
+
"quantity": 1
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"category": "Drinks",
|
|
228
|
+
"quantity": 1
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"applies_to": "total",
|
|
232
|
+
"max_discount_amount": 300,
|
|
233
|
+
"active": true
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "brunch_special",
|
|
237
|
+
"name": "Brunch Special",
|
|
238
|
+
"description": "Brunch item + Drink + Side for 15% off",
|
|
239
|
+
"discount_type": "percentage",
|
|
240
|
+
"discount_value": 15,
|
|
241
|
+
"required_components": [
|
|
242
|
+
{
|
|
243
|
+
"category": "Brunch",
|
|
244
|
+
"quantity": 1
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"category": "Drinks",
|
|
248
|
+
"quantity": 1
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"category": "Sides",
|
|
252
|
+
"quantity": 1
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"applies_to": "total",
|
|
256
|
+
"time_restricted": true,
|
|
257
|
+
"time_rules": {
|
|
258
|
+
"start_hour": 7,
|
|
259
|
+
"end_hour": 14
|
|
260
|
+
},
|
|
261
|
+
"max_discount_amount": 500,
|
|
262
|
+
"active": true
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"coupon_codes": [
|
|
3
|
+
{
|
|
4
|
+
"code": "SAVE10",
|
|
5
|
+
"name": "Save 10%",
|
|
6
|
+
"description": "10% off your order",
|
|
7
|
+
"discount_type": "percentage",
|
|
8
|
+
"discount_value": 10,
|
|
9
|
+
"min_order_amount": 0,
|
|
10
|
+
"max_discount_amount": null,
|
|
11
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
12
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
13
|
+
"usage_limit": null,
|
|
14
|
+
"usage_count": 0,
|
|
15
|
+
"single_use_per_customer": false,
|
|
16
|
+
"stackable": false,
|
|
17
|
+
"applicable_categories": null,
|
|
18
|
+
"excluded_categories": null,
|
|
19
|
+
"active": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"code": "SAVE20",
|
|
23
|
+
"name": "Save 20%",
|
|
24
|
+
"description": "20% off your order",
|
|
25
|
+
"discount_type": "percentage",
|
|
26
|
+
"discount_value": 20,
|
|
27
|
+
"min_order_amount": 5000,
|
|
28
|
+
"max_discount_amount": 2000,
|
|
29
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
30
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
31
|
+
"usage_limit": 500,
|
|
32
|
+
"usage_count": 127,
|
|
33
|
+
"single_use_per_customer": true,
|
|
34
|
+
"stackable": false,
|
|
35
|
+
"applicable_categories": null,
|
|
36
|
+
"excluded_categories": ["Alcoholic Beverages"],
|
|
37
|
+
"active": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"code": "WELCOME20",
|
|
41
|
+
"name": "New Customer Welcome",
|
|
42
|
+
"description": "20% off for new customers",
|
|
43
|
+
"discount_type": "percentage",
|
|
44
|
+
"discount_value": 20,
|
|
45
|
+
"min_order_amount": 0,
|
|
46
|
+
"max_discount_amount": 1500,
|
|
47
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
48
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
49
|
+
"usage_limit": null,
|
|
50
|
+
"usage_count": 0,
|
|
51
|
+
"single_use_per_customer": true,
|
|
52
|
+
"new_customers_only": true,
|
|
53
|
+
"stackable": false,
|
|
54
|
+
"applicable_categories": null,
|
|
55
|
+
"excluded_categories": null,
|
|
56
|
+
"active": true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"code": "VIP25",
|
|
60
|
+
"name": "VIP Discount",
|
|
61
|
+
"description": "25% off for VIP members",
|
|
62
|
+
"discount_type": "percentage",
|
|
63
|
+
"discount_value": 25,
|
|
64
|
+
"min_order_amount": 0,
|
|
65
|
+
"max_discount_amount": null,
|
|
66
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
67
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
68
|
+
"usage_limit": null,
|
|
69
|
+
"usage_count": 0,
|
|
70
|
+
"single_use_per_customer": false,
|
|
71
|
+
"vip_only": true,
|
|
72
|
+
"stackable": false,
|
|
73
|
+
"applicable_categories": null,
|
|
74
|
+
"excluded_categories": null,
|
|
75
|
+
"active": true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"code": "FIVER",
|
|
79
|
+
"name": "$5 Off",
|
|
80
|
+
"description": "$5 off orders $25 or more",
|
|
81
|
+
"discount_type": "fixed",
|
|
82
|
+
"discount_value": 500,
|
|
83
|
+
"min_order_amount": 2500,
|
|
84
|
+
"max_discount_amount": null,
|
|
85
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
86
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
87
|
+
"usage_limit": null,
|
|
88
|
+
"usage_count": 0,
|
|
89
|
+
"single_use_per_customer": false,
|
|
90
|
+
"stackable": false,
|
|
91
|
+
"applicable_categories": null,
|
|
92
|
+
"excluded_categories": null,
|
|
93
|
+
"active": true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"code": "TENNER",
|
|
97
|
+
"name": "$10 Off",
|
|
98
|
+
"description": "$10 off orders $50 or more",
|
|
99
|
+
"discount_type": "fixed",
|
|
100
|
+
"discount_value": 1000,
|
|
101
|
+
"min_order_amount": 5000,
|
|
102
|
+
"max_discount_amount": null,
|
|
103
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
104
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
105
|
+
"usage_limit": 200,
|
|
106
|
+
"usage_count": 45,
|
|
107
|
+
"single_use_per_customer": true,
|
|
108
|
+
"stackable": false,
|
|
109
|
+
"applicable_categories": null,
|
|
110
|
+
"excluded_categories": null,
|
|
111
|
+
"active": true
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"code": "HAPPYHOUR",
|
|
115
|
+
"name": "Happy Hour Code",
|
|
116
|
+
"description": "Extra 10% off during happy hour",
|
|
117
|
+
"discount_type": "percentage",
|
|
118
|
+
"discount_value": 10,
|
|
119
|
+
"min_order_amount": 0,
|
|
120
|
+
"max_discount_amount": 1000,
|
|
121
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
122
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
123
|
+
"usage_limit": null,
|
|
124
|
+
"usage_count": 0,
|
|
125
|
+
"single_use_per_customer": false,
|
|
126
|
+
"time_restricted": true,
|
|
127
|
+
"time_rules": {
|
|
128
|
+
"start_hour": 15,
|
|
129
|
+
"end_hour": 18
|
|
130
|
+
},
|
|
131
|
+
"stackable": true,
|
|
132
|
+
"applicable_categories": null,
|
|
133
|
+
"excluded_categories": null,
|
|
134
|
+
"active": true
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"code": "FREEDESSERT",
|
|
138
|
+
"name": "Free Dessert",
|
|
139
|
+
"description": "Free dessert with $40+ order",
|
|
140
|
+
"discount_type": "percentage",
|
|
141
|
+
"discount_value": 100,
|
|
142
|
+
"min_order_amount": 4000,
|
|
143
|
+
"max_discount_amount": 899,
|
|
144
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
145
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
146
|
+
"usage_limit": 100,
|
|
147
|
+
"usage_count": 23,
|
|
148
|
+
"single_use_per_customer": true,
|
|
149
|
+
"stackable": false,
|
|
150
|
+
"applicable_categories": ["Desserts"],
|
|
151
|
+
"excluded_categories": null,
|
|
152
|
+
"active": true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"code": "HALFAPP",
|
|
156
|
+
"name": "Half Off Appetizers",
|
|
157
|
+
"description": "50% off all appetizers",
|
|
158
|
+
"discount_type": "percentage",
|
|
159
|
+
"discount_value": 50,
|
|
160
|
+
"min_order_amount": 0,
|
|
161
|
+
"max_discount_amount": null,
|
|
162
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
163
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
164
|
+
"usage_limit": null,
|
|
165
|
+
"usage_count": 0,
|
|
166
|
+
"single_use_per_customer": false,
|
|
167
|
+
"stackable": false,
|
|
168
|
+
"applicable_categories": ["Appetizers"],
|
|
169
|
+
"excluded_categories": null,
|
|
170
|
+
"active": true
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"code": "BIRTHDAY15",
|
|
174
|
+
"name": "Birthday Code",
|
|
175
|
+
"description": "15% off for your birthday",
|
|
176
|
+
"discount_type": "percentage",
|
|
177
|
+
"discount_value": 15,
|
|
178
|
+
"min_order_amount": 0,
|
|
179
|
+
"max_discount_amount": null,
|
|
180
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
181
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
182
|
+
"usage_limit": null,
|
|
183
|
+
"usage_count": 0,
|
|
184
|
+
"single_use_per_customer": true,
|
|
185
|
+
"birthday_required": true,
|
|
186
|
+
"stackable": false,
|
|
187
|
+
"applicable_categories": null,
|
|
188
|
+
"excluded_categories": ["Alcoholic Beverages"],
|
|
189
|
+
"active": true
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"code": "WEEKEND25",
|
|
193
|
+
"name": "Weekend Special",
|
|
194
|
+
"description": "25% off weekend orders",
|
|
195
|
+
"discount_type": "percentage",
|
|
196
|
+
"discount_value": 25,
|
|
197
|
+
"min_order_amount": 3000,
|
|
198
|
+
"max_discount_amount": 2500,
|
|
199
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
200
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
201
|
+
"usage_limit": null,
|
|
202
|
+
"usage_count": 0,
|
|
203
|
+
"single_use_per_customer": false,
|
|
204
|
+
"day_restricted": true,
|
|
205
|
+
"valid_days": [0, 6],
|
|
206
|
+
"stackable": false,
|
|
207
|
+
"applicable_categories": null,
|
|
208
|
+
"excluded_categories": null,
|
|
209
|
+
"active": true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"code": "EXPIRED20",
|
|
213
|
+
"name": "Expired Code",
|
|
214
|
+
"description": "This code has expired (for testing)",
|
|
215
|
+
"discount_type": "percentage",
|
|
216
|
+
"discount_value": 20,
|
|
217
|
+
"min_order_amount": 0,
|
|
218
|
+
"max_discount_amount": null,
|
|
219
|
+
"valid_from": "2023-01-01T00:00:00Z",
|
|
220
|
+
"valid_until": "2023-12-31T23:59:59Z",
|
|
221
|
+
"usage_limit": null,
|
|
222
|
+
"usage_count": 0,
|
|
223
|
+
"single_use_per_customer": false,
|
|
224
|
+
"stackable": false,
|
|
225
|
+
"applicable_categories": null,
|
|
226
|
+
"excluded_categories": null,
|
|
227
|
+
"active": true
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"code": "MAXEDOUT",
|
|
231
|
+
"name": "Maxed Out Code",
|
|
232
|
+
"description": "This code has reached its limit (for testing)",
|
|
233
|
+
"discount_type": "percentage",
|
|
234
|
+
"discount_value": 15,
|
|
235
|
+
"min_order_amount": 0,
|
|
236
|
+
"max_discount_amount": null,
|
|
237
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
238
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
239
|
+
"usage_limit": 100,
|
|
240
|
+
"usage_count": 100,
|
|
241
|
+
"single_use_per_customer": false,
|
|
242
|
+
"stackable": false,
|
|
243
|
+
"applicable_categories": null,
|
|
244
|
+
"excluded_categories": null,
|
|
245
|
+
"active": true
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"code": "INACTIVE",
|
|
249
|
+
"name": "Inactive Code",
|
|
250
|
+
"description": "This code is inactive (for testing)",
|
|
251
|
+
"discount_type": "percentage",
|
|
252
|
+
"discount_value": 10,
|
|
253
|
+
"min_order_amount": 0,
|
|
254
|
+
"max_discount_amount": null,
|
|
255
|
+
"valid_from": "2024-01-01T00:00:00Z",
|
|
256
|
+
"valid_until": "2027-12-31T23:59:59Z",
|
|
257
|
+
"usage_limit": null,
|
|
258
|
+
"usage_count": 0,
|
|
259
|
+
"single_use_per_customer": false,
|
|
260
|
+
"stackable": false,
|
|
261
|
+
"applicable_categories": null,
|
|
262
|
+
"excluded_categories": null,
|
|
263
|
+
"active": false
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|