Skip to content

Commit b1b749e

Browse files
committed
allocationrequired and batchcreated events [two_new_events]
1 parent 5ba647e commit b1b749e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/allocation/events.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1+
# pylint: disable=too-few-public-methods
12
from dataclasses import dataclass
3+
from datetime import date
4+
from typing import Optional
25

36
class Event:
47
pass
58

69
@dataclass
7-
class OutOfStock(Event):
10+
class BatchCreated(Event):
11+
ref: str
12+
sku: str
13+
qty: int
14+
eta: Optional[date] = None
15+
16+
@dataclass
17+
class AllocationRequired(Event):
18+
orderid: str
819
sku: str
20+
qty: int
921

22+
@dataclass
23+
class OutOfStock(Event):
24+
sku: str

0 commit comments

Comments
 (0)