-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer.py
31 lines (21 loc) · 1.08 KB
/
customer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import sys
if any('unittest/../' in string for string in sys.path):
# Current working directory is unittest so go back from cwd twice
sys.path.insert(2, sys.path[0] + '/../../team22-common-services-backend')
sys.path.insert(2, sys.path[0] + '/../../common-services-backend')
else:
# Current working directory is demand-backend so go back from cwd once
sys.path.insert(2, sys.path[0] + '/../team22-common-services-backend')
sys.path.insert(2, sys.path[0] + '/../common-services-backend')
from user import User
class Customer(User):
# class constructor, receives a dictionary and populates class attributes
# inherents parent attributes
def __init__(self, dict):
super().__init__(dict)
def placeOrder(self):
raise NotImplementedError
def fetchOrderStatus(self):
raise NotImplementedError
def __str__(self):
return f"Customer (\nid: {self.id} \nfirstName: {self.firstName} \nlastName: {self.lastName} \nphoneNumber: {self.phoneNumber} \nemail: {self.email} \nusername: {self.username} \npassword: {self.password} \n)"